diff --git a/plugins/spine4.1/dist/SpineCanvasPlugin.js b/plugins/spine4.1/dist/SpineCanvasPlugin.js index 11832dbf9..2d8c116f0 100644 --- a/plugins/spine4.1/dist/SpineCanvasPlugin.js +++ b/plugins/spine4.1/dist/SpineCanvasPlugin.js @@ -10790,7 +10790,7 @@ var SpinePlugin = new Class({ * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser. * * @method Phaser.Loader.LoaderPlugin#spine - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.19.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -13599,7 +13599,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.60.0', + VERSION: '3.70.0', BlendModes: __webpack_require__(8351), @@ -14017,24 +14017,21 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to increase the value for. - * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key. + * @param {string} key - The key to change the value for. + * @param {number} [amount=1] - The amount to increase the given key by. Pass a negative value to decrease the key. * * @return {this} This Data Manager instance. */ - inc: function (key, data) + inc: function (key, amount) { if (this._frozen) { return this; } - if (data === undefined) + if (amount === undefined) { - data = 1; + amount = 1; } var value = this.get(key); @@ -14044,7 +14041,7 @@ var DataManager = new Class({ value = 0; } - this.set(key, (value + data)); + this.set(key, (value + amount)); return this; }, @@ -14060,10 +14057,7 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to toggle the value for. + * @param {string} key - The key to toggle the value for. * * @return {this} This Data Manager instance. */ @@ -14823,6 +14817,7 @@ function init () else if ((/AppleWebKit/).test(ua) && OS.iOS) { Browser.mobileSafari = true; + Browser.es2019 = true; } else if ((/MSIE (\d+\.\d+);/).test(ua)) { @@ -17730,7 +17725,7 @@ var Blur = new Class({ * @type {number} * @since 3.60.0 */ - this.quality = 0; + this.quality = quality; /** * The horizontal offset of the blur effect. @@ -18156,8 +18151,28 @@ var Circle = new Class({ color[2] = (value & 0xFF) / 255; } - } + }, + /** + * The alpha of the background, behind the texture, given as a number value. + * + * @name Phaser.FX.Circle#backgroundAlpha + * @type {number} + * @since 3.70.0 + */ + backgroundAlpha: { + + get: function () + { + return this.glcolor2[3]; + }, + + set: function (value) + { + this.glcolor2[3] = value; + } + + } }); module.exports = Circle; @@ -18660,10 +18675,10 @@ var FX_CONST = __webpack_require__(1571); * @param {number} [color1=0xff0000] - The first gradient color, given as a number value. * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value. * @param {number} [alpha=0.2] - The alpha value of the gradient effect. - * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. + * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toY=1] - The vertical position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect. */ var Gradient = new Class({ @@ -18705,7 +18720,7 @@ var Gradient = new Class({ this.size = size; /** - * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. + * The horizontal position the gradient will start from. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#fromX * @type {number} @@ -18714,7 +18729,7 @@ var Gradient = new Class({ this.fromX = fromX; /** - * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. + * The vertical position the gradient will start from. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#fromY * @type {number} @@ -18723,7 +18738,7 @@ var Gradient = new Class({ this.fromY = fromY; /** - * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels. + * The horizontal position the gradient will end. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#toX * @type {number} @@ -18732,7 +18747,7 @@ var Gradient = new Class({ this.toX = toX; /** - * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels. + * The vertical position the gradient will end. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#toY * @type {number} @@ -20105,22 +20120,19 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#incData * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to increase the value for. - * @param {*} [data] - The value to increase for the given key. + * @param {string} key - The key to change the value for. + * @param {number} [amount=1] - The amount to increase the given key by. Pass a negative value to decrease the key. * * @return {this} This GameObject. */ - incData: function (key, value) + incData: function (key, amount) { if (!this.data) { this.data = new DataManager(this); } - this.data.inc(key, value); + this.data.inc(key, amount); return this; }, @@ -20138,10 +20150,7 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#toggleData * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to toggle the value for. + * @param {string} key - The key to toggle the value for. * * @return {this} This GameObject. */ @@ -22381,10 +22390,10 @@ var FX = new Class({ * @param {number} [color1=0xff0000] - The first gradient color, given as a number value. * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value. * @param {number} [alpha=0.2] - The alpha value of the gradient effect. - * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. + * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toY=1] - The vertical position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect. * * @return {Phaser.FX.Gradient} The Gradient FX Controller. @@ -23919,7 +23928,7 @@ var PathFollower = { { var tween = this.pathTween; - if (tween) + if (tween && tween.data) { var tweenData = tween.data[0]; var pathDelta = this.pathDelta; @@ -24943,19 +24952,25 @@ var Texture = { * * Textures are referenced by their string-based keys, as stored in the Texture Manager. * + * Calling this method will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * * @method Phaser.GameObjects.Components.Texture#setTexture * @since 3.0.0 * * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance. * @param {(string|number)} [frame] - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call change the origin of the Game Object? * * @return {this} This Game Object instance. */ - setTexture: function (key, frame) + setTexture: function (key, frame, updateSize, updateOrigin) { this.texture = this.scene.sys.textures.get(key); - return this.setFrame(frame); + return this.setFrame(frame, updateSize, updateOrigin); }, /** @@ -25440,7 +25455,7 @@ var Tint = { /** * The tint value being applied to the whole of the Game Object. - * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value. + * Return `tintTopLeft` when read this tint property. * * @name Phaser.GameObjects.Components.Tint#tint * @type {number} @@ -25449,6 +25464,11 @@ var Tint = { */ tint: { + get: function () + { + return this.tintTopLeft; + }, + set: function (value) { this.setTint(value, value, value, value); @@ -26892,9 +26912,7 @@ var TransformMatrix = new Class({ */ setToContext: function (ctx) { - var matrix = this.matrix; - - ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + ctx.setTransform(this); return ctx; }, @@ -27104,13 +27122,14 @@ var TransformMatrix = new Class({ * @param {number} y - The y value. * @param {number} xw - The xw value. * @param {number} yh - The yh value. - * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {boolean} [roundPixels=false] - Pass the results via Math.round? * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. * * @return {Float32Array} The quad Float32Array. */ setQuad: function (x, y, xw, yh, roundPixels, quad) { + if (roundPixels === undefined) { roundPixels = false; } if (quad === undefined) { quad = this.quad; } var matrix = this.matrix; @@ -27122,24 +27141,33 @@ var TransformMatrix = new Class({ var e = matrix[4]; var f = matrix[5]; - quad[0] = x * a + y * c + e; - quad[1] = x * b + y * d + f; - - quad[2] = x * a + yh * c + e; - quad[3] = x * b + yh * d + f; - - quad[4] = xw * a + yh * c + e; - quad[5] = xw * b + yh * d + f; - - quad[6] = xw * a + y * c + e; - quad[7] = xw * b + y * d + f; - if (roundPixels) { - quad.forEach(function (value, index) - { - quad[index] = Math.round(value); - }); + quad[0] = Math.round(x * a + y * c + e); + quad[1] = Math.round(x * b + y * d + f); + + quad[2] = Math.round(x * a + yh * c + e); + quad[3] = Math.round(x * b + yh * d + f); + + quad[4] = Math.round(xw * a + yh * c + e); + quad[5] = Math.round(xw * b + yh * d + f); + + quad[6] = Math.round(xw * a + y * c + e); + quad[7] = Math.round(xw * b + y * d + f); + } + else + { + quad[0] = x * a + y * c + e; + quad[1] = x * b + y * d + f; + + quad[2] = x * a + yh * c + e; + quad[3] = x * b + yh * d + f; + + quad[4] = xw * a + yh * c + e; + quad[5] = xw * b + yh * d + f; + + quad[6] = xw * a + y * c + e; + quad[7] = xw * b + y * d + f; } return quad; @@ -29954,6 +29982,28 @@ var Line = new Class({ return this; }, + /** + * Sets this Line to match the x/y coordinates of the two given Vector2Like objects. + * + * @method Phaser.Geom.Line#setFromObjects + * @since 3.70.0 + * + * @param {Phaser.Types.Math.Vector2Like} start - Any object with public `x` and `y` properties, whose values will be assigned to the x1/y1 components of this Line. + * @param {Phaser.Types.Math.Vector2Like} end - Any object with public `x` and `y` properties, whose values will be assigned to the x2/y2 components of this Line. + * + * @return {this} This Line object. + */ + setFromObjects: function (start, end) + { + this.x1 = start.x; + this.y1 = start.y; + + this.x2 = end.x; + this.y2 = end.y; + + return this; + }, + /** * Returns a Vector2 object that corresponds to the start of this Line. * @@ -31847,6 +31897,13 @@ var MultiFile = new Class({ */ this.key = key; + var loadKey = this.key; + + if (loader.prefix && loader.prefix !== '') + { + this.key = loader.prefix + loadKey; + } + /** * The current index being used by multi-file loaders to avoid key clashes. * @@ -32964,8 +33021,11 @@ var ImageFile = new Class({ // We do, but has it loaded? if (linkFile.state >= CONST.FILE_COMPLETE) { - // Both files have loaded - if (this.type === 'normalMap') + if (linkFile.type === 'spritesheet') + { + linkFile.addToCache(); + } + else if (this.type === 'normalMap') { // linkFile.data = Image // this.data = Normal Map @@ -33076,7 +33136,7 @@ var ImageFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#image - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -33315,7 +33375,7 @@ var JSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -33496,7 +33556,7 @@ var TextFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#text - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -41120,12 +41180,6 @@ module.exports = Within; */ var Wrap = function (value, min, max) { - if (value >= min && value <= max) - { - // Skip modulo if already in range - return value; - } - var range = max - min; return (min + ((((value - min) % range) + range) % range)); @@ -44692,7 +44746,7 @@ var RandomDataGenerator = new Class({ */ weightedPick: function (array) { - return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)]; + return array[~~(Math.pow(this.frac(), 2) * array.length + 0.5)]; }, /** @@ -46997,6 +47051,14 @@ var Frame = new Class({ y: 0, width: 0, height: 0 + }, + is3Slice: false, + scale9: false, + scale9Borders: { + x: 0, + y: 0, + w: 0, + h: 0 } }; @@ -47116,6 +47178,38 @@ var Frame = new Class({ return this.updateUVs(); }, + /** + * Sets the scale9 center rectangle values. + * + * Scale9 is a feature of Texture Packer, allowing you to define a nine-slice scaling grid. + * + * This is set automatically by the JSONArray and JSONHash parsers. + * + * @method Phaser.Textures.Frame#setScale9 + * @since 3.70.0 + * + * @param {number} x - The left coordinate of the center scale9 rectangle. + * @param {number} y - The top coordinate of the center scale9 rectangle. + * @param {number} width - The width of the center scale9 rectangle. + * @param {number} height - The height coordinate of the center scale9 rectangle. + * + * @return {this} This Frame object. + */ + setScale9: function (x, y, width, height) + { + var data = this.data; + + data.scale9 = true; + data.is3Slice = (y === 0 && height === this.height); + + data.scale9Borders.x = x; + data.scale9Borders.y = y; + data.scale9Borders.w = width; + data.scale9Borders.h = height; + + return this; + }, + /** * Takes a crop data object and, based on the rectangular region given, calculates the * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering. @@ -47417,8 +47511,8 @@ var Frame = new Class({ */ destroy: function () { - this.source = null; this.texture = null; + this.source = null; this.glTexture = null; this.customData = null; this.data = null; @@ -47494,6 +47588,40 @@ var Frame = new Class({ }, + /** + * Does the Frame have scale9 border data? + * + * @name Phaser.Textures.Frame#scale9 + * @type {boolean} + * @readonly + * @since 3.70.0 + */ + scale9: { + + get: function () + { + return this.data.scale9; + } + + }, + + /** + * If the Frame has scale9 border data, is it 3-slice or 9-slice data? + * + * @name Phaser.Textures.Frame#is3Slice + * @type {boolean} + * @readonly + * @since 3.70.0 + */ + is3Slice: { + + get: function () + { + return this.data.is3Slice; + } + + }, + /** * The Canvas drawImage data object. * @@ -48775,11 +48903,15 @@ module.exports = GetFirst; * @function Phaser.Utils.Array.GetRandom * @since 3.0.0 * - * @param {array} array - The array to select the random entry from. + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] + * + * @param {T[]} array - The array to select the random entry from. * @param {number} [startIndex=0] - An optional start index. * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from. * - * @return {*} A random element from the array, or `null` if no element could be found in the range given. + * @return {T} A random element from the array, or `null` if no element could be found in the range given. */ var GetRandom = function (array, startIndex, length) { @@ -50774,12 +50906,20 @@ var RotateMatrix = __webpack_require__(7116); * @genericUse {T[][]} - [matrix,$return] * * @param {T[][]} [matrix] - The array to rotate. + * @param {number} [amount=1] - The number of times to rotate the matrix. * * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. */ -var RotateLeft = function (matrix) +var RotateLeft = function (matrix, amount) { - return RotateMatrix(matrix, 90); + if (amount === undefined) { amount = 1; } + + for (var i = 0; i < amount; i++) + { + matrix = RotateMatrix(matrix, 90); + } + + return matrix; }; module.exports = RotateLeft; @@ -50909,12 +51049,20 @@ var RotateMatrix = __webpack_require__(7116); * @genericUse {T[][]} - [matrix,$return] * * @param {T[][]} [matrix] - The array to rotate. + * @param {number} [amount=1] - The number of times to rotate the matrix. * * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. */ -var RotateRight = function (matrix) +var RotateRight = function (matrix, amount) { - return RotateMatrix(matrix, -90); + if (amount === undefined) { amount = 1; } + + for (var i = 0; i < amount; i++) + { + matrix = RotateMatrix(matrix, -90); + } + + return matrix; }; module.exports = RotateRight; @@ -51275,7 +51423,7 @@ var GetValue = __webpack_require__(5851); * * Allowed types: * - * Implicit + * Explicit: * { * x: 4 * } diff --git a/plugins/spine4.1/dist/SpineCanvasPlugin.min.js b/plugins/spine4.1/dist/SpineCanvasPlugin.min.js index c56389e49..2fa83afc0 100644 --- a/plugins/spine4.1/dist/SpineCanvasPlugin.min.js +++ b/plugins/spine4.1/dist/SpineCanvasPlugin.min.js @@ -1 +1 @@ -(()=>{var t={4399:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,s,n,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new r(s,n||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,r=[];if(0===this._eventsCount)return r;for(s in t=this._events)e.call(t,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,n=s.length,a=new Array(n);r{(function(){"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r={};((e,i)=>{for(var s in i)t(e,s,{get:i[s],enumerable:!0})})(r,{AlphaTimeline:()=>ft,Animation:()=>T,AnimationState:()=>Ct,AnimationStateAdapter:()=>Yt,AnimationStateData:()=>Vt,AssetManager:()=>bi,AssetManagerBase:()=>ue,AtlasAttachmentLoader:()=>ne,Attachment:()=>b,AttachmentTimeline:()=>gt,BinaryInput:()=>Oe,BlendMode:()=>Ce,Bone:()=>he,BoneData:()=>ae,BoundingBoxAttachment:()=>Ut,CURRENT:()=>Nt,CanvasTexture:()=>wi,ClippingAttachment:()=>Wt,Color:()=>h,ConstraintData:()=>le,CurveTimeline:()=>Q,CurveTimeline1:()=>J,CurveTimeline2:()=>tt,DebugUtils:()=>g,DeformTimeline:()=>xt,Downloader:()=>ce,DrawOrderTimeline:()=>bt,Event:()=>de,EventData:()=>fe,EventQueue:()=>Ft,EventTimeline:()=>yt,EventType:()=>Ot,FIRST:()=>Dt,FakeTexture:()=>$t,HOLD_FIRST:()=>_t,HOLD_MIX:()=>Bt,HOLD_SUBSEQUENT:()=>Xt,IkConstraint:()=>pe,IkConstraintData:()=>me,IkConstraintTimeline:()=>At,IntSet:()=>n,Interpolation:()=>c,MathUtils:()=>u,MeshAttachment:()=>te,MixBlend:()=>R,MixDirection:()=>C,PathAttachment:()=>ee,PathConstraint:()=>be,PathConstraintData:()=>ge,PathConstraintMixTimeline:()=>It,PathConstraintPositionTimeline:()=>St,PathConstraintSpacingTimeline:()=>Et,PointAttachment:()=>ie,Pool:()=>x,PositionMode:()=>xe,Pow:()=>d,PowOut:()=>f,RGB2Timeline:()=>mt,RGBA2Timeline:()=>pt,RGBATimeline:()=>ct,RGBTimeline:()=>dt,RegionAttachment:()=>re,RotateMode:()=>ye,RotateTimeline:()=>et,SETUP:()=>zt,SUBSEQUENT:()=>Lt,ScaleTimeline:()=>nt,ScaleXTimeline:()=>at,ScaleYTimeline:()=>ot,SequenceTimeline:()=>Tt,ShearTimeline:()=>ht,ShearXTimeline:()=>lt,ShearYTimeline:()=>ut,Skeleton:()=>Ee,SkeletonBinary:()=>Fe,SkeletonBounds:()=>ui,SkeletonClipping:()=>di,SkeletonData:()=>Ie,SkeletonJson:()=>fi,SkeletonRenderer:()=>Si,Skin:()=>Te,SkinEntry:()=>ke,Slot:()=>Ae,SlotData:()=>Re,SpacingMode:()=>ve,StringSet:()=>a,Texture:()=>qt,TextureAtlas:()=>Kt,TextureAtlasPage:()=>Qt,TextureAtlasRegion:()=>Jt,TextureFilter:()=>Gt,TextureRegion:()=>jt,TextureWrap:()=>Ht,TimeKeeper:()=>y,Timeline:()=>Z,TrackEntry:()=>Pt,TransformConstraint:()=>Me,TransformConstraintData:()=>Pe,TransformConstraintTimeline:()=>Mt,TransformMode:()=>oe,TranslateTimeline:()=>it,TranslateXTimeline:()=>st,TranslateYTimeline:()=>rt,Triangulator:()=>ci,Utils:()=>m,Vector2:()=>v,VertexAttachment:()=>M,WindowedMean:()=>w});var n=class{constructor(){this.array=new Array}add(t){let e=this.contains(t);return this.array[0|t]=0|t,!e}contains(t){return null!=this.array[0|t]}remove(t){this.array[0|t]=void 0}clear(){this.array.length=0}},a=class{constructor(){this.entries={},this.size=0}add(t){let e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){let e=this.size;for(var i=0,s=t.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}static rgb888ToColor(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}static fromString(t){return(new o).setFromString(t)}},h=o;h.WHITE=new o(1,1,1,1),h.RED=new o(1,0,0,1),h.GREEN=new o(0,1,0,1),h.BLUE=new o(0,0,1,1),h.MAGENTA=new o(1,0,1,1);var l=class{static clamp(t,e,i){return ti?i:t}static cosDeg(t){return Math.cos(t*l.degRad)}static sinDeg(t){return Math.sin(t*l.degRad)}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){let e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return l.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,i){let s=Math.random(),r=e-t;return s<=(i-t)/r?t+Math.sqrt(s*r*(i-t)):e-Math.sqrt((1-s)*r*(e-i))}static isPowerOfTwo(t){return t&&0==(t&t-1)}},u=l;u.PI=3.1415927,u.PI2=2*l.PI,u.radiansToDegrees=180/l.PI,u.radDeg=l.radiansToDegrees,u.degreesToRadians=l.PI/180,u.degRad=l.degreesToRadians;var c=class{apply(t,e,i){return t+(e-t)*this.applyInternal(i)}},d=class extends c{constructor(t){super(),this.power=2,this.power=t}applyInternal(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}},f=class extends d{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}},p=class{static arrayCopy(t,e,i,s,r){for(let n=e,a=s;n=e?t:p.setArraySize(t,e,i)}static newArray(t,e){let i=new Array(t);for(let s=0;s0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},w=class{constructor(t=32){this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e>1)*n;let a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(!l){o.length>0&&(h=o);let a=t.bone,l=a.worldX,u=a.worldY,c=a.a,d=a.b,f=a.c,p=a.d;for(let t=e,a=r;a=this.regions.length&&(i=this.regions.length-1);let s=this.regions[i];e.region!=s&&(e.region=s,e.updateRegion())}getPath(t,e){let i=t,s=(this.start+e).toString();for(let t=this.digits-s.length;t>0;t--)i+="0";return i+=s,i}static nextID(){return S._nextID++}},E=S;E._nextID=0;var I=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(I||{}),k=[0,1,2,3,4,5,6],T=class{constructor(t,e,i){if(this.timelines=[],this.timelineIds=new a,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=i}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));let h=this.timelines;for(let s=0,l=h.length;s(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(R||{}),C=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(C||{}),P=0,F=1,O=2,Y=3,L=4,D=5,X=6,_=7,B=8,z=9,N=10,V=11,U=12,W=13,q=14,G=15,H=16,j=17,$=18,K=19,Z=class{constructor(t,e){this.propertyIds=e,this.frames=m.newFloatArray(t*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(t,e){let i=t.length;for(let s=1;se)return s-1;return i-1}static search(t,e,i){let s=t.length;for(let r=i;re)return r-i;return s-i}},Q=class extends Z{constructor(t,e,i){super(t,i),this.curves=m.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let e=this.getFrameCount()+18*t;if(this.curves.length>e){let t=m.newFloatArray(e);m.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,i,s,r,n,a,o,h,l,u){let c=this.curves,d=this.getFrameCount()+18*t;0==i&&(c[e]=2+d);let f=.03*(s-2*n+o),p=.03*(r-2*a+h),m=.006*(3*(n-o)-s+l),g=.006*(3*(a-h)-r+u),x=2*f+m,v=2*p+g,y=.3*(n-s)+f+.16666667*m,w=.3*(a-r)+p+.16666667*g,b=s+y,A=r+w;for(let t=d+18;dt){let n=this.frames[e],a=this.frames[e+i];return a+(t-n)/(r[s]-n)*(r[s+1]-a)}let n=s+18;for(s+=2;s=t){let e=r[s-2],i=r[s-1];return i+(t-e)/(r[s]-e)*(r[s+1]-i)}e+=this.getFrameEntries();let a=r[n-2],o=r[n-1];return o+(t-a)/(this.frames[e]-a)*(this.frames[e+i]-o)}},J=class extends Q{constructor(t,e,i){super(t,e,[i])}getFrameEntries(){return 2}setFrame(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+1]=i}getCurveValue(t){let e=this.frames,i=e.length-2;for(let s=2;s<=i;s+=2)if(e[s]>t){i=s-2;break}let s=this.curves[i>>1];switch(s){case 0:let s=e[i],r=e[i+1];return r+(t-s)/(e[i+2]-s)*(e[i+2+1]-r);case 1:return e[i+1]}return this.getBezierValue(t,i,1,s-2)}},tt=class extends Q{constructor(t,e,i,s){super(t,e,[i,s])}getFrameEntries(){return 3}setFrame(t,e,i,s){t*=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s}},et=class extends J{constructor(t,e,i){super(t,e,P+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i>2];switch(p){case 0:let t=h[f];u=h[f+1],c=h[f+2],d=h[f+3];let e=(i-t)/(h[f+4]-t);u+=(h[f+4+1]-u)*e,c+=(h[f+4+2]-c)*e,d+=(h[f+4+3]-d)*e;break;case 1:u=h[f+1],c=h[f+2],d=h[f+3];break;default:u=this.getBezierValue(i,f,1,p-2),c=this.getBezierValue(i,f,2,p+18-2),d=this.getBezierValue(i,f,3,p+36-2)}if(1==r)l.r=u,l.g=c,l.b=d;else{if(0==n){let t=o.data.color;l.r=t.r,l.g=t.g,l.b=t.b}l.r+=(u-l.r)*r,l.g+=(c-l.g)*r,l.b+=(d-l.b)*r}}},ft=class extends J{constructor(t,e,i){super(t,e,B+"|"+i),this.slotIndex=0,this.slotIndex=i}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.color;if(i>3];switch(y){case 0:let t=h[v];c=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],m=h[v+5],g=h[v+6],x=h[v+7];let e=(i-t)/(h[v+8]-t);c+=(h[v+8+1]-c)*e,d+=(h[v+8+2]-d)*e,f+=(h[v+8+3]-f)*e,p+=(h[v+8+4]-p)*e,m+=(h[v+8+5]-m)*e,g+=(h[v+8+6]-g)*e,x+=(h[v+8+7]-x)*e;break;case 1:c=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],m=h[v+5],g=h[v+6],x=h[v+7];break;default:c=this.getBezierValue(i,v,1,y-2),d=this.getBezierValue(i,v,2,y+18-2),f=this.getBezierValue(i,v,3,y+36-2),p=this.getBezierValue(i,v,4,y+54-2),m=this.getBezierValue(i,v,5,y+72-2),g=this.getBezierValue(i,v,6,y+90-2),x=this.getBezierValue(i,v,7,y+108-2)}if(1==r)l.set(c,d,f,p),u.r=m,u.g=g,u.b=x;else{if(0==n){l.setFromColor(o.data.color);let t=o.data.darkColor;u.r=t.r,u.g=t.g,u.b=t.b}l.add((c-l.r)*r,(d-l.g)*r,(f-l.b)*r,(p-l.a)*r),u.r+=(m-u.r)*r,u.g+=(g-u.g)*r,u.b+=(x-u.b)*r}}},mt=class extends Q{constructor(t,e,i){super(t,e,[_+"|"+i,z+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,s,r,n,a,o){t*=7,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n,this.frames[t+5]=a,this.frames[t+6]=o}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,u=o.darkColor;if(it){let r=this.frames[e];return i[s+1]*(t-r)/(i[s]-r)}let r=s+18;for(s+=2;s=t){let e=i[s-2],r=i[s-1];return r+(t-e)/(i[s]-e)*(i[s+1]-r)}let n=i[r-2],a=i[r-1];return a+(1-a)*(t-n)/(this.frames[e+this.getFrameEntries()]-n)}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.getAttachment();if(!h)return;if(!(h instanceof M)||h.timelineAttachment!=this.attachment)return;let l=o.deform;0==l.length&&(n=0);let u=this.vertices,c=u[0].length,d=this.frames;if(i=d[d.length-1]){let t=u[d.length-1];if(1==r)if(3==n){let e=h;if(e.bones)for(let e=0;ei)this.apply(t,e,Number.MAX_VALUE,s,r,n,a),e=-1;else if(e>=o[h-1])return;if(i0&&o[l-1]==t;)l--}for(;l=o[l];l++)s.push(this.events[l])}},yt=vt;yt.propertyIds=[""+U];var wt=class extends Z{constructor(t){super(t,wt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.drawOrders[t]=i}apply(t,e,i,s,r,n,a){if(1==a)return void(0==n&&m.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(i>2];switch(f){case 0:let t=c[d];h=c[d+1],l=c[d+2],u=c[d+3];let e=(i-t)/(c[d+4]-t);h+=(c[d+4+1]-h)*e,l+=(c[d+4+2]-l)*e,u+=(c[d+4+3]-u)*e;break;case 1:h=c[d+1],l=c[d+2],u=c[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),u=this.getBezierValue(i,d,3,f+36-2)}if(0==n){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*r,o.mixX=t.mixX+(l-t.mixX)*r,o.mixY=t.mixY+(u-t.mixY)*r}else o.mixRotate+=(h-o.mixRotate)*r,o.mixX+=(l-o.mixX)*r,o.mixY+=(u-o.mixY)*r}},kt=class extends Z{constructor(t,e,i){super(t,[K+"|"+e+"|"+i.sequence.id]),this.slotIndex=e,this.attachment=i}getFrameEntries(){return kt.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,i,s,r){let n=this.frames;n[t*=kt.ENTRIES]=e,n[t+kt.MODE]=i|s<<4,n[t+kt.DELAY]=r}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.attachment,l=this.attachment;if(!(h==l||h instanceof M&&h.timelineAttachment==l))return;let u=this.frames;if(i>4,g=this.attachment.sequence.regions.length,x=k[15&f];if(0!=x)switch(m+=(i-d)/p+1e-5|0,x){case 1:m=Math.min(g-1,m);break;case 2:m%=g;break;case 3:{let t=(g<<1)-2;m=0==t?0:m%t,m>=g&&(m=t-m);break}case 4:m=Math.max(g-1-m,0);break;case 5:m=g-1-m%g;break;case 6:{let t=(g<<1)-2;m=0==t?0:(m+g-1)%t,m>=g&&(m=t-m)}}o.sequenceIndex=m}},Tt=kt;Tt.ENTRIES=3,Tt.MODE=1,Tt.DELAY=2;var Rt=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Ft(this),this.propertyIDs=new a,this.animationsChanged=!1,this.trackEntryPool=new x((()=>new Pt)),this.data=t}static emptyAnimation(){return Rt._emptyAnimation}update(t){t*=this.timeScale;let e=this.tracks;for(let i=0,s=e.length;i0){if(s.delay-=r,s.delay>0)continue;r=-s.delay,s.delay=0}let n=s.next;if(n){let e=s.trackLast-n.delay;if(e>=0){for(n.delay=0,n.trackTime+=0==s.timeScale?0:(e/s.timeScale+t)*n.timeScale,s.trackTime+=r,this.setCurrent(i,n,!0);n.mixingFrom;)n.mixTime+=t,n=n.mixingFrom;continue}}else if(s.trackLast>=s.trackEnd&&!s.mixingFrom){e[i]=null,this.queue.end(s),this.clearNext(s);continue}if(s.mixingFrom&&this.updateMixingFrom(s,t)){let t=s.mixingFrom;for(s.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}s.trackTime+=r}this.queue.drain()}updateMixingFrom(t,e){let i=t.mixingFrom;if(!i)return!0;let s=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),s):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let e=this.events,i=this.tracks,s=!1;for(let n=0,a=i.length;n0)continue;s=!0;let o=0==n?1:a.mixBlend,h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let l=a.animationLast,u=a.getAnimationTime(),c=u,d=e;a.reverse&&(c=a.animation.duration-c,d=null);let f=a.animation.timelines,p=f.length;if(0==n&&1==h||3==o)for(let e=0;e1&&(r=1),1!=i&&(i=s.mixBlend));let n=r0&&this.queueEvents(s,d),this.events.length=0,s.nextAnimationLast=d,s.nextTrackLast=s.trackTime,r}applyAttachmentTimeline(t,e,i,s,r){var n=e.slots[t.slotIndex];n.bone.active&&(i0,s=t>=0;u.signum(e)!=u.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*u.signum(t)),s=i),d=f+t-t%360,s!=i&&(d+=360*u.signum(t)),n[a]=d}n[a+1]=f,h.rotation=l+d*s}queueEvents(t,e){let i=t.animationStart,s=t.animationEnd,r=s-i,n=t.trackLast%r,a=this.events,o=0,h=a.length;for(;os||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==r||n>t.trackTime%r:e>=s&&t.animationLast=this.tracks.length)return;let e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let i=e;for(;;){let t=i.mixingFrom;if(!t)break;this.queue.end(t),i.mixingFrom=null,i.mixingTo=null,i=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,i){let s=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,s&&(i&&this.queue.interrupt(s),e.mixingFrom=s,s.mixingTo=e,e.mixTime=0,s.mixingFrom&&s.mixDuration>0&&(e.interruptAlpha*=Math.min(1,s.mixTime/s.mixDuration)),s.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,i=!1){let s=this.data.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,s,i)}setAnimationWith(t,e,i=!1){if(!e)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));let n=this.trackEntry(t,e,i,r);return this.setCurrent(t,n,s),this.queue.drain(),n}addAnimation(t,e,i=!1,s=0){let r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,s)}addAnimationWith(t,e,i=!1,s=0){if(!e)throw new Error("animation cannot be null.");let r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;let n=this.trackEntry(t,e,i,r);return r?(r.next=n,n.previous=r,s<=0&&(s+=r.getTrackComplete()-n.mixDuration)):(this.setCurrent(t,n,!0),this.queue.drain()),n.delay=s,n}setEmptyAnimation(t,e=0){let i=this.setAnimationWith(t,Rt.emptyAnimation(),!1);return i.mixDuration=e,i.trackEnd=e,i}addEmptyAnimation(t,e=0,i=0){let s=this.addAnimationWith(t,Rt.emptyAnimation(),!1,i);return i<=0&&(s.delay+=s.mixDuration-e),s.mixDuration=e,s.trackEnd=e,s}setEmptyAnimations(t=0){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,i=this.tracks.length;e0){r[o]=Bt,n[o]=i;continue t}break}r[o]=_t}else r[o]=Lt}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},Ct=Rt;Ct._emptyAnimation=new T("",[],0);var Pt=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=2,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(t){this.animationLast=t,this.nextAnimationLast=t}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime(t[t.start=0]="start",t[t.interrupt=1]="interrupt",t[t.end=2]="end",t[t.dispose=3]="dispose",t[t.complete=4]="complete",t[t.event=5]="event",t))(Ot||{}),Yt=class{start(t){}interrupt(t){}end(t){}dispose(t){}complete(t){}event(t,e){}},Lt=0,Dt=1,Xt=2,_t=3,Bt=4,zt=1,Nt=2,Vt=class{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,i){let s=this.skeletonData.findAnimation(t);if(!s)throw new Error("Animation not found: "+t);let r=this.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);this.setMixWith(s,r,i)}setMixWith(t,e,i){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");let s=t.name+"."+e.name;this.animationToMixTime[s]=i}getMix(t,e){let i=t.name+"."+e.name,s=this.animationToMixTime[i];return void 0===s?this.defaultMix:s}},Ut=class extends M{constructor(t){super(t),this.color=new h(1,1,1,1)}copy(){let t=new Ut(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}},Wt=class extends M{constructor(t){super(t),this.endSlot=null,this.color=new h(.2275,.2275,.8078,1)}copy(){let t=new Wt(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}},qt=class{constructor(t){this._image=t}getImage(){return this._image}},Gt=(t=>(t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear",t))(Gt||{}),Ht=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(Ht||{}),jt=class{constructor(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}},$t=class extends qt{setFilters(t,e){}setWraps(t,e){}dispose(){}},Kt=class{constructor(t){this.pages=new Array,this.regions=new Array;let e=new Zt(t),i=new Array(4),s={size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},format:()=>{},filter:t=>{t.minFilter=m.enumValue(Gt,i[1]),t.magFilter=m.enumValue(Gt,i[2])},repeat:t=>{-1!=i[1].indexOf("x")&&(t.uWrap=10497),-1!=i[1].indexOf("y")&&(t.vWrap=10497)},pma:t=>{t.pma="true"==i[1]}};var r={xy:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2])},size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},bounds:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2]),t.width=parseInt(i[3]),t.height=parseInt(i[4])},offset:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2])},orig:t=>{t.originalWidth=parseInt(i[1]),t.originalHeight=parseInt(i[2])},offsets:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2]),t.originalWidth=parseInt(i[3]),t.originalHeight=parseInt(i[4])},rotate:t=>{let e=i[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:t=>{t.index=parseInt(i[1])}};let n=e.readLine();for(;n&&0==n.trim().length;)n=e.readLine();for(;n&&0!=n.trim().length&&0!=e.readEntry(i,n);)n=e.readLine();let a=null,o=null,h=null;for(;null!==n;)if(0==n.trim().length)a=null,n=e.readLine();else if(a){let t=new Jt(a,n);for(;;){let s=e.readEntry(i,n=e.readLine());if(0==s)break;let a=r[i[0]];if(a)a(t);else{o||(o=[]),h||(h=[]),o.push(i[0]);let t=[];for(let e=0;e0&&h&&h.length>0&&(t.names=o,t.values=h,o=null,h=null),t.u=t.x/a.width,t.v=t.y/a.height,90==t.degrees?(t.u2=(t.x+t.height)/a.width,t.v2=(t.y+t.width)/a.height):(t.u2=(t.x+t.width)/a.width,t.v2=(t.y+t.height)/a.height),this.regions.push(t)}else{for(a=new Qt(n.trim());0!=e.readEntry(i,n=e.readLine());){let t=s[i[0]];t&&t(a)}this.pages.push(a)}}findRegion(t){for(let e=0;e=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;let i=e.indexOf(":");if(-1==i)return 0;t[0]=e.substr(0,i).trim();for(let s=1,r=i+1;;s++){let i=e.indexOf(",",r);if(-1==i)return t[s]=e.substr(r).trim(),s;if(t[s]=e.substr(r,i-r).trim(),r=i+1,4==s)return 4}}},Qt=class{constructor(t){this.minFilter=9728,this.magFilter=9728,this.uWrap=33071,this.vWrap=33071,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.name=t}setTexture(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}},Jt=class extends jt{constructor(t,e){super(),this.x=0,this.y=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.index=0,this.degrees=0,this.names=null,this.values=null,this.page=t,this.name=e}},te=class extends M{constructor(t,e){super(t),this.region=null,this.regionUVs=[],this.uvs=[],this.triangles=[],this.color=new h(1,1,1,1),this.width=0,this.height=0,this.hullLength=0,this.edges=[],this.parentMesh=null,this.sequence=null,this.tempColor=new h(0,0,0,0),this.path=e}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=m.newFloatArray(t.length));let e=this.uvs,i=this.uvs.length,s=this.region.u,r=this.region.v,n=0,a=0;if(this.region instanceof Jt){let o=this.region,h=o.page.texture.getImage(),l=h.width,u=h.height;switch(o.degrees){case 90:s-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/u,n=o.originalHeight/l,a=o.originalWidth/u;for(let o=0;o= 0.");if(!e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}},oe=(t=>(t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection",t))(oe||{}),he=class{constructor(t,e,i){if(this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}isActive(){return this.active}update(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(t,e,i,s,r,n,a){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=s,this.ascaleY=r,this.ashearX=n,this.ashearY=a;let o=this.parent;if(!o){let o=this.skeleton,h=i+90+a,l=o.scaleX,c=o.scaleY;return this.a=u.cosDeg(i+n)*s*l,this.b=u.cosDeg(h)*r*l,this.c=u.sinDeg(i+n)*s*c,this.d=u.sinDeg(h)*r*c,this.worldX=t*l+o.x,void(this.worldY=e*c+o.y)}let h=o.a,l=o.b,c=o.c,d=o.d;switch(this.worldX=h*t+l*e+o.worldX,this.worldY=c*t+d*e+o.worldY,this.data.transformMode){case 0:{let t=i+90+a,e=u.cosDeg(i+n)*s,o=u.cosDeg(t)*r,f=u.sinDeg(i+n)*s,p=u.sinDeg(t)*r;return this.a=h*e+l*f,this.b=h*o+l*p,this.c=c*e+d*f,void(this.d=c*o+d*p)}case 1:{let t=i+90+a;this.a=u.cosDeg(i+n)*s,this.b=u.cosDeg(t)*r,this.c=u.sinDeg(i+n)*s,this.d=u.sinDeg(t)*r;break}case 2:{let t=h*h+c*c,e=0;t>1e-4?(t=Math.abs(h*d-l*c)/t,h/=this.skeleton.scaleX,c/=this.skeleton.scaleY,l=c*t,d=h*t,e=Math.atan2(c,h)*u.radDeg):(h=0,c=0,e=90-Math.atan2(d,l)*u.radDeg);let o=i+n-e,f=i+a-e+90,p=u.cosDeg(o)*s,m=u.cosDeg(f)*r,g=u.sinDeg(o)*s,x=u.sinDeg(f)*r;this.a=h*p-l*g,this.b=h*m-l*x,this.c=c*p+d*g,this.d=c*m+d*x;break}case 3:case 4:{let t=u.cosDeg(i),e=u.sinDeg(i),o=(h*t+l*e)/this.skeleton.scaleX,f=(c*t+d*e)/this.skeleton.scaleY,p=Math.sqrt(o*o+f*f);p>1e-5&&(p=1/p),o*=p,f*=p,p=Math.sqrt(o*o+f*f),3==this.data.transformMode&&h*d-l*c<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(p=-p);let m=Math.PI/2+Math.atan2(f,o),g=Math.cos(m)*p,x=Math.sin(m)*p,v=u.cosDeg(n)*s,y=u.cosDeg(90+a)*r,w=u.sinDeg(n)*s,b=u.sinDeg(90+a)*r;this.a=o*v+g*w,this.b=o*y+g*b,this.c=f*v+x*w,this.d=f*y+x*b;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}getWorldRotationX(){return Math.atan2(this.c,this.a)*u.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*u.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}updateAppliedTransform(){let t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*u.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*u.radDeg);let e=t.a,i=t.b,s=t.c,r=t.d,n=1/(e*r-i*s),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*n-o*i*n,this.ay=o*e*n-a*s*n;let h=n*r,l=n*e,c=n*i,d=n*s,f=h*this.a-c*this.c,p=h*this.b-c*this.d,m=l*this.c-d*this.a,g=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+m*m),this.ascaleX>1e-4){let t=f*g-p*m;this.ascaleY=t/this.ascaleX,this.ashearY=Math.atan2(f*p+m*g,t)*u.radDeg,this.arotation=Math.atan2(m,f)*u.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*u.radDeg}worldToLocal(t){let e=1/(this.a*this.d-this.b*this.c),i=t.x-this.worldX,s=t.y-this.worldY;return t.x=i*this.d*e-s*this.b*e,t.y=s*this.a*e-i*this.c*e,t}localToWorld(t){let e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t}worldToLocalRotation(t){let e=u.sinDeg(t),i=u.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*u.radDeg+this.rotation-this.shearX}localToWorldRotation(t){t-=this.rotation-this.shearX;let e=u.sinDeg(t),i=u.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*u.radDeg}rotateWorld(t){let e=this.a,i=this.b,s=this.c,r=this.d,n=u.cosDeg(t),a=u.sinDeg(t);this.a=n*e-a*s,this.b=n*i-a*r,this.c=a*e+n*s,this.d=a*i+n*r}},le=class{constructor(t,e,i){this.name=t,this.order=e,this.skinRequired=i}},ue=class{constructor(t,e="",i=new ce){this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=t,this.pathPrefix=e,this.downloader=i}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,i){this.toLoad--,this.loaded++,this.assets[e]=i,t&&t(e,i)}error(t,e,i){this.toLoad--,this.loaded++,this.errors[e]=i,t&&t(e,i)}loadAll(){return new Promise(((t,e)=>{let i=()=>{this.isLoadingComplete()?this.hasErrors()?e(this.errors):t(this):requestAnimationFrame(i)};requestAnimationFrame(i)}))}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadBinary(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load binary ${t}: status ${e}, ${s}`)}))}loadText(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadText(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load text ${t}: status ${e}, ${s}`)}))}loadJson(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadJson(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load JSON ${t}: status ${e}, ${s}`)}))}loadTexture(t,e=(()=>{}),i=(()=>{})){if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then((e=>e.ok?e.blob():(this.error(i,t,`Couldn't load image: ${t}`),null))).then((t=>t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null)).then((i=>{i&&this.success(e,t,this.textureLoader(i))}));else{let s=new Image;s.crossOrigin="anonymous",s.onload=()=>{this.success(e,t,this.textureLoader(s))},s.onerror=()=>{this.error(i,t,`Couldn't load image: ${t}`)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),s.src=t}}loadTextureAtlas(t,e=(()=>{}),i=(()=>{}),s){let r=t.lastIndexOf("/"),n=r>=0?t.substring(0,r+1):"";t=this.start(t),this.downloader.downloadText(t,(r=>{try{let a=new Kt(r),o=a.pages.length,h=!1;for(let r of a.pages)this.loadTexture(s?s[r.name]:n+r.name,((i,s)=>{h||(r.setTexture(s),0==--o&&this.success(e,t,a))}),((e,s)=>{h||this.error(i,t,`Couldn't load texture atlas ${t} page image: ${e}`),h=!0}))}catch(e){this.error(i,t,`Couldn't parse texture atlas ${t}: ${e.message}`)}}),((e,s)=>{this.error(i,t,`Couldn't load texture atlas ${t}: status ${e}, ${s}`)}))}get(t){return this.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;let e=this.assets[t];if(e)return e;let i=this.errors[t];throw Error("Asset not found: "+t+(i?"\n"+i:""))}remove(t){t=this.pathPrefix+t;let e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}removeAll(){for(let t in this.assets){let e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}isLoadingComplete(){return 0==this.toLoad}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}},ce=class{constructor(){this.callbacks={},this.rawDataUris={}}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return-1!=e?(e+="base64,".length,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){for(var e=window.atob(t),i=e.length,s=new Uint8Array(i),r=0;r{this.finish(t,s.status,s.responseText)};s.onload=r,s.onerror=r,s.send()}downloadJson(t,e,i){this.downloadText(t,(t=>{e(JSON.parse(t))}),i)}downloadBinary(t,e,i){if(this.start(t,e,i))return;if(this.rawDataUris[t]){try{let e=this.rawDataUris[t];this.finish(t,200,this.dataUriToUint8Array(e))}catch(e){this.finish(t,400,JSON.stringify(e))}return}let s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer";let r=()=>{this.finish(t,s.status,s.response)};s.onload=()=>{200==s.status||0==s.status?this.finish(t,200,new Uint8Array(s.response)):r()},s.onerror=r,s.send()}start(t,e,i){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,i)}}finish(t,e,i){let s=this.callbacks[t];delete this.callbacks[t];let r=200==e||0==e?[i]:[e,i];for(let t=r.length-1,e=s.length;t180?f-=360:f<-180&&(f+=360);let g=t.ascaleX,x=t.ascaleY;if(s||r){switch(t.data.transformMode){case 3:case 4:p=e-t.worldX,m=i-t.worldY}let o=t.data.length*g,h=Math.sqrt(p*p+m*m);if(s&&ho&&o>1e-4){let t=(h/o-1)*a+1;g*=t,n&&(x*=t)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,g,x,t.ashearX,t.ashearY)}apply2(t,e,i,s,r,n,a,o,h){let l=t.ax,c=t.ay,d=t.ascaleX,f=t.ascaleY,p=d,m=f,g=e.ascaleX,x=0,v=0,y=0;d<0?(d=-d,x=180,y=-1):(x=0,y=1),f<0&&(f=-f,y=-y),g<0?(g=-g,v=180):v=0;let w=e.ax,b=0,A=0,M=0,S=t.a,E=t.b,I=t.c,k=t.d,T=Math.abs(d-f)<=1e-4;!T||n?(b=0,A=S*w+t.worldX,M=I*w+t.worldY):(b=e.ay,A=S*w+E*b+t.worldX,M=I*w+k*b+t.worldY);let R=t.parent;if(!R)throw new Error("IK parent must itself have a parent.");S=R.a,E=R.b,I=R.c,k=R.d;let C,P,F=1/(S*k-E*I),O=A-R.worldX,Y=M-R.worldY,L=(O*k-Y*E)*F-l,D=(Y*S-O*I)*F-c,X=Math.sqrt(L*L+D*D),_=e.data.length*g;if(X<1e-4)return this.apply1(t,i,s,!1,n,!1,h),void e.updateWorldTransformWith(w,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);O=i-R.worldX,Y=s-R.worldY;let B=(O*k-Y*E)*F-l,z=(Y*S-O*I)*F-c,N=B*B+z*z;if(0!=o){o*=d*(g+1)*.5;let t=Math.sqrt(N),e=t-X-_*d+o;if(e>0){let i=Math.min(1,e/(2*o))-1;i=(e-o*(1-i*i))/t,B-=i*B,z-=i*z,N=B*B+z*z}}t:if(T){_*=d;let t=(N-X*X-_*_)/(2*X*_);t<-1?(t=-1,P=Math.PI*r):t>1?(t=1,P=0,n&&(S=(Math.sqrt(N)/(X+_)-1)*h+1,p*=S,a&&(m*=S))):P=Math.acos(t)*r,S=X+_*t,E=_*Math.sin(P),C=Math.atan2(z*S-B*E,B*S+z*E)}else{S=d*_,E=f*_;let t=S*S,e=E*E,i=Math.atan2(z,B);I=e*X*X+t*N-t*e;let s=-2*e*X,n=e-t;if(k=s*s-4*n*I,k>=0){let t=Math.sqrt(k);s<0&&(t=-t),t=.5*-(s+t);let e=t/n,a=I/t,o=Math.abs(e)=-1&&I<=1&&(I=Math.acos(I),O=S*Math.cos(I)+X,Y=E*Math.sin(I),k=O*O+Y*Y,km&&(c=I,m=k,p=O,g=Y)),N<=.5*(h+m)?(C=i-Math.atan2(l*r,o),P=a*r):(C=i-Math.atan2(g*r,p),P=c*r)}let V=Math.atan2(b,w)*y,U=t.arotation;C=(C-V)*u.radDeg+x-U,C>180?C-=360:C<-180&&(C+=360),t.updateWorldTransformWith(l,c,U+C*h,p,m,0,0),U=e.arotation,P=((P+V)*u.radDeg-e.ashearX)*y+v-U,P>180?P-=360:P<-180&&(P+=360),e.updateWorldTransformWith(w,b,U+P*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}},me=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.softness=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},ge=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.positionMode=xe.Fixed,this.spacingMode=ve.Fixed,this.rotateMode=ye.Chain,this.offsetRotation=0,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}},xe=(t=>(t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent",t))(xe||{}),ve=(t=>(t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional",t))(ve||{}),ye=(t=>(t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale",t))(ye||{}),we=class{constructor(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(let i=0,s=t.bones.length;i0){t=l/t*f;for(let e=1;e0?u.degRad:-u.degRad}for(let t=0,r=3;t0){let i=h.a,s=h.b,a=h.c,o=h.d,l=0,d=0,f=0;if(l=n?p[r-1]:0==c[t+1]?p[r+2]:Math.atan2(w,m),l-=Math.atan2(a,i),y){d=Math.cos(l),f=Math.sin(l);let t=h.data.length;g+=(t*(d*i-f*a)-m)*e,x+=(t*(f*i+d*a)-w)*e}else l+=v;l>u.PI?l-=u.PI2:l<-u.PI&&(l+=u.PI2),l*=e,d=Math.cos(l),f=Math.sin(l),h.a=d*i-f*a,h.b=d*s-f*o,h.c=f*i+d*a,h.d=f*s+d*o}h.updateAppliedTransform()}}computeWorldPositions(t,e,i){let s=this.target,r=this.position,n=this.spaces,a=m.setArraySize(this.positions,3*e+2),o=this.world,h=t.closed,l=t.worldVerticesLength,u=l/6,c=we.NONE;if(!t.constantSpeed){let d=t.lengths;u-=h?1:2;let f,p=d[u];switch(1==this.data.positionMode&&(r*=p),this.data.spacingMode){case 2:f=p;break;case 3:f=p/e;break;default:f=1}o=m.setArraySize(this.world,8);for(let m=0,g=0,x=0;mp){c!=we.AFTER&&(c=we.AFTER,t.computeWorldVertices(s,l-6,4,o,0,2)),this.addAfterPosition(v-p,o,0,a,g);continue}}for(;;x++){let t=d[x];if(!(v>t)){if(0==x)v/=t;else{let e=d[x-1];v=(v-e)/(t-e)}break}}x!=c&&(c=x,h&&x==u?(t.computeWorldVertices(s,l-4,4,o,0,2),t.computeWorldVertices(s,0,4,o,4,2)):t.computeWorldVertices(s,6*x+2,8,o,0,2)),this.addCurvePosition(v,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],a,g,i||m>0&&0==e)}return a}h?(l+=2,o=m.setArraySize(this.world,l),t.computeWorldVertices(s,2,l-4,o,0,2),t.computeWorldVertices(s,0,2,o,l-4,2),o[l-2]=o[0],o[l-1]=o[1]):(u--,l-=4,o=m.setArraySize(this.world,l),t.computeWorldVertices(s,2,l,o,0,2));let d,f=m.setArraySize(this.curves,u),p=0,g=o[0],x=o[1],v=0,y=0,w=0,b=0,A=0,M=0,S=0,E=0,I=0,k=0,T=0,R=0,C=0,P=0;for(let t=0,e=2;tp){this.addAfterPosition(Y-p,o,l-4,a,s);continue}}for(;;u++){let t=f[u];if(!(Y>t)){if(0==u)Y/=t;else{let e=f[u-1];Y=(Y-e)/(t-e)}break}}if(u!=c){c=u;let t=6*u;for(g=o[t],x=o[t+1],v=o[t+2],y=o[t+3],w=o[t+4],b=o[t+5],A=o[t+6],M=o[t+7],S=.03*(g-2*v+w),E=.03*(x-2*y+b),I=.006*(3*(v-w)-g+A),k=.006*(3*(y-b)-x+M),T=2*S+I,R=2*E+k,C=.3*(v-g)+S+.16666667*I,P=.3*(y-x)+E+.16666667*k,O=Math.sqrt(C*C+P*P),F[0]=O,t=1;t<8;t++)C+=T,P+=R,T+=I,R+=k,O+=Math.sqrt(C*C+P*P),F[t]=O;C+=T,P+=R,O+=Math.sqrt(C*C+P*P),F[8]=O,C+=T+I,P+=R+k,O+=Math.sqrt(C*C+P*P),F[9]=O,m=0}for(Y*=O;;m++){let t=F[m];if(!(Y>t)){if(0==m)Y/=t;else{let e=F[m-1];Y=m+(Y-e)/(t-e)}break}}this.addCurvePosition(.1*Y,g,x,v,y,w,b,A,M,a,s,i||t>0&&0==e)}return a}addBeforePosition(t,e,i,s,r){let n=e[i],a=e[i+1],o=e[i+2]-n,h=e[i+3]-a,l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addAfterPosition(t,e,i,s,r){let n=e[i+2],a=e[i+3],o=n-e[i],h=a-e[i+1],l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addCurvePosition(t,e,i,s,r,n,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=i,void(l[u+2]=Math.atan2(r-i,s-e));let d=t*t,f=d*t,p=1-t,m=p*p,g=m*p,x=p*t,v=3*x,y=p*v,w=v*t,b=e*g+s*y+n*w+o*f,A=i*g+r*y+a*w+h*f;l[u]=b,l[u+1]=A,c&&(l[u+2]=t<.001?Math.atan2(r-i,s-e):Math.atan2(A-(i*m+r*x*2+a*d),b-(e*m+s*x*2+n*d)))}},be=we;be.NONE=-1,be.BEFORE=-2,be.AFTER=-3,be.epsilon=1e-5;var Ae=class{constructor(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(t instanceof M&&this.attachment instanceof M&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},Me=class{constructor(t,e){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new v,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(let i=0;i0?u.degRad:-u.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fu.PI?n-=u.PI2:n<-u.PI&&(n+=u.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=(t.x-x.worldX)*e,x.worldY+=(t.y-x.worldY)*i}if(0!=s){let t=Math.sqrt(x.a*x.a+x.c*x.c);0!=t&&(t=(t+(Math.sqrt(h*h+c*c)-t+this.data.offsetScaleX)*s)/t),x.a*=t,x.c*=t}if(0!=r){let t=Math.sqrt(x.b*x.b+x.d*x.d);0!=t&&(t=(t+(Math.sqrt(l*l+d*d)-t+this.data.offsetScaleY)*r)/t),x.b*=t,x.d*=t}if(n>0){let t=x.b,e=x.d,i=Math.atan2(e,t),s=Math.atan2(d,l)-Math.atan2(c,h)-(i-Math.atan2(x.c,x.a));s>u.PI?s-=u.PI2:s<-u.PI&&(s+=u.PI2),s=i+(s+m)*n;let r=Math.sqrt(t*t+e*e);x.b=Math.cos(s)*r,x.d=Math.sin(s)*r}x.updateAppliedTransform()}}applyRelativeWorld(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=0!=e||0!=i,o=this.target,h=o.a,l=o.b,c=o.c,d=o.d,f=h*d-l*c>0?u.degRad:-u.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fu.PI?n-=u.PI2:n<-u.PI&&(n+=u.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=t.x*e,x.worldY+=t.y*i}if(0!=s){let t=(Math.sqrt(h*h+c*c)-1+this.data.offsetScaleX)*s+1;x.a*=t,x.c*=t}if(0!=r){let t=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*r+1;x.b*=t,x.d*=t}if(n>0){let t=Math.atan2(d,l)-Math.atan2(c,h);t>u.PI?t-=u.PI2:t<-u.PI&&(t+=u.PI2);let e=x.b,i=x.d;t=Math.atan2(i,e)+(t-u.PI/2+m)*n;let s=Math.sqrt(e*e+i*i);x.b=Math.cos(t)*s,x.d=Math.sin(t)*s}x.updateAppliedTransform()}}applyAbsoluteLocal(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=this.target,o=this.bones;for(let h=0,l=o.length;h=s.length&&(s.length=t+1),s[t]||(s[t]={}),s[t][e]=i}addSkin(t){for(let e=0;e= 0.");if(!e)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}},Ce=(t=>(t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen",t))(Ce||{}),Pe=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Fe=class{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){let e=this.scale,i=new Ie;i.name="";let s=new Oe(t),r=s.readInt32(),n=s.readInt32();i.hash=0==n&&0==r?null:n.toString(16)+r.toString(16),i.version=s.readString(),i.x=s.readFloat(),i.y=s.readFloat(),i.width=s.readFloat(),i.height=s.readFloat();let a=s.readBoolean();a&&(i.fps=s.readFloat(),i.imagesPath=s.readString(),i.audioPath=s.readString());let o=0;o=s.readInt(!0);for(let t=0;t>4,t.readFloat())}s.push(e);break}}}}}let n=t.readInt(!0);if(n>0){let e=new bt(n),r=i.slots.length;for(let i=0;i=0;t--)a[t]=-1;let o=m.newArray(r-n,0),h=0,l=0;for(let e=0;e=0;t--)-1==a[t]&&(a[t]=o[--l]);e.setFrame(i,s,a)}s.push(e)}let a=t.readInt(!0);if(a>0){let e=new yt(a);for(let s=0;s>>1^-(1&i)}readStringRef(){let t=this.readInt(!0);return 0==t?null:this.strings[t-1]}readString(){let t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;let e="";for(let i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(t),i++}}return e}readFloat(){let t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}},Ye=class{constructor(t,e,i,s,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=s,this.inheritTimeline=r}},Le=class{constructor(t=null,e=null){this.bones=t,this.vertices=e}},De=(t=>(t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping",t))(De||{});function Xe(t,e,i){let s=t.readFloat(),r=t.readFloat()*i;for(let n=0,a=0,o=e.getFrameCount()-1;e.setFrame(n,s,r),n!=o;n++){let o=t.readFloat(),h=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(n);break;case li:Be(t,e,a++,n,0,s,o,r,h,i)}s=o,r=h}return e}function _e(t,e,i){let s=t.readFloat(),r=t.readFloat()*i,n=t.readFloat()*i;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,s,r,n),a!=h;a++){let h=t.readFloat(),l=t.readFloat()*i,u=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(a);break;case li:Be(t,e,o++,a,0,s,h,r,l,i),Be(t,e,o++,a,1,s,h,n,u,i)}s=h,r=l,n=u}return e}function Be(t,e,i,s,r,n,a,o,h,l){e.setBezier(i,s,r,n,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,a,h)}var ze,Ne=0,Ve=1,Ue=2,We=3,qe=4,Ge=5,He=6,je=7,$e=8,Ke=9,Ze=0,Qe=1,Je=2,ti=3,ei=4,ii=5,si=0,ri=1,ni=0,ai=1,oi=2,hi=1,li=2,ui=class{constructor(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new x((()=>m.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");let i=this.boundingBoxes,s=this.polygons,r=this.polygonPool,n=t.slots,a=n.length;i.length=0,r.freeAll(s),s.length=0;for(let t=0;t=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,i,s){let r=this.minX,n=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=n&&s<=n||t>=a&&i>=a||e>=o&&s>=o)return!1;let h=(s-e)/(i-t),l=h*(r-t)+e;if(l>n&&ln&&lr&&ur&&ut.minX&&this.minYt.minY}containsPoint(t,e){let i=this.polygons;for(let s=0,r=i.length;s=i||o=i){let h=s[t];h+(i-r)/(o-r)*(s[n]-h)=u&&x<=a||x>=a&&x<=u)&&(x>=e&&x<=s||x>=s&&x<=e)){let t=(l*m-h*f)/g;if((t>=c&&t<=d||t>=d&&t<=c)&&(t>=i&&t<=r||t>=r&&t<=i))return!0}u=a,c=d}return!1}getPolygon(t){if(!t)throw new Error("boundingBox cannot be null.");let e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}},ci=class{constructor(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new x((()=>new Array)),this.polygonIndicesPool=new x((()=>new Array))}triangulate(t){let e=t,i=t.length>>1,s=this.indicesArray;s.length=0;for(let t=0;t3;){let t=i-1,a=0,o=1;for(;;){t:if(!r[a]){let n=s[t]<<1,h=s[a]<<1,l=s[o]<<1,u=e[n],c=e[n+1],d=e[h],f=e[h+1],p=e[l],m=e[l+1];for(let n=(o+1)%i;n!=t;n=(n+1)%i){if(!r[n])continue;let t=s[n]<<1,i=e[t],a=e[t+1];if(ci.positiveArea(p,m,u,c,i,a)&&ci.positiveArea(u,c,d,f,i,a)&&ci.positiveArea(d,f,p,m,i,a))break t}break}if(0==o){do{if(!r[a])break;a--}while(a>0);break}t=a,a=o,o=(o+1)%i}n.push(s[(i+a-1)%i]),n.push(s[a]),n.push(s[(a+1)%i]),s.splice(a,1),r.splice(a,1),i--;let h=(i+a-1)%i,l=a==i?0:a;r[h]=ci.isConcave(h,i,e,s),r[l]=ci.isConcave(l,i,e,s)}return 3==i&&(n.push(s[2]),n.push(s[0]),n.push(s[1])),n}decompose(t,e){let i=t,s=this.convexPolygons;this.polygonPool.freeAll(s),s.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let n=this.polygonIndicesPool.obtain();n.length=0;let a=this.polygonPool.obtain();a.length=0;let o=-1,h=0;for(let t=0,l=e.length;t0?(s.push(a),r.push(n)):(this.polygonPool.free(a),this.polygonIndicesPool.free(n)),a=this.polygonPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),a.push(m),a.push(g),a.push(x),n=this.polygonIndicesPool.obtain(),n.length=0,n.push(l),n.push(u),n.push(c),h=ci.winding(d,f,p,m,g,x),o=l)}a.length>0&&(s.push(a),r.push(n));for(let t=0,e=s.length;t=0;t--)a=s[t],0==a.length&&(s.splice(t,1),this.polygonPool.free(a),n=r[t],r.splice(t,1),this.polygonIndicesPool.free(n));return s}static isConcave(t,e,i,s){let r=s[(e+t-1)%e]<<1,n=s[t]<<1,a=s[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[n],i[n+1],i[a],i[a+1])}static positiveArea(t,e,i,s,r,n){return t*(n-s)+i*(e-n)+r*(s-e)>=0}static winding(t,e,i,s,r,n){let a=i-t,o=s-e;return r*o-n*a+a*e-t*o>=0?1:-1}},di=class{constructor(){this.triangulator=new ci,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}clipStart(t,e){if(this.clipAttachment)return 0;this.clipAttachment=e;let i=e.worldVerticesLength,s=m.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,s,0,2);let r=this.clippingPolygon;di.makeClockwise(r);let n=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let t=0,e=n.length;t>1,R=this.clipOutput,C=m.setArraySize(l,e+T*f);for(let h=0;h=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(s),h.push(r),h.push(n),h.push(t),h.push(e),o.length=0;let c=a,d=a.length-4;for(let t=0;;t+=2){let e=c[t],i=c[t+1],s=c[t+2],r=c[t+3],n=e-s,a=i-r,f=h,p=h.length-2,m=o.length;for(let t=0;t0;if(n*(l-r)-a*(h-s)>0){if(p){o.push(c),o.push(d);continue}let t=d-l,n=c-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let u=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*u),o.push(i+(r-i)*u)}else o.push(e),o.push(i)}else if(p){let t=d-l,n=c-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let u=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*u),o.push(i+(r-i)*u)}else o.push(e),o.push(i);o.push(c),o.push(d)}u=!0}if(m==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),t==d)break;let g=o;(o=h).length=0,h=g}if(l!=o){l.length=0;for(let t=0,e=o.length-2;t>1;t=0;e--)-1==o[e]&&(o[e]=t[--r])}e.setFrame(n,vi(a,"time",0),o)}r.push(e)}if(t.events){let e=new yt(t.events.length),s=0;for(let r=0;rnew wi(t)),t,e)}},Ai=m.newFloatArray(8),Mi=class{constructor(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=m.newFloatArray(8192),this.tempColor=new h,this.ctx=t}draw(t){this.triangleRendering?this.drawTriangles(t):this.drawImages(t)}drawImages(t){let e=this.ctx,i=this.tempColor,s=t.color,r=t.drawOrder;this.debugRendering&&(e.strokeStyle="green");for(let t=0,n=r.length;t{if(n&&"object"==typeof n||"function"==typeof n)for(let h of i(n))s.call(r,h)||h===a||t(r,h,{get:()=>n[h],enumerable:!(o=e(n,h))||o.enumerable});return r})(t({},"__esModule",{value:!0}),yi)})();t.exports=e}).call(window)},3524:(t,e,i)=>{var s=i(7473),r=i(4597),n=i(6732),a=i(2482),o=i(704),h=i(3137),l=i(1192),u=new s({Extends:h,initialize:function(t,e,i,s,n,u,c){var d,f,p,m=[],g=t.cacheManager.custom.spine;if(a(e)){var x=e;for(e=r(x,"key"),f=new o(t,{key:e,url:r(x,"jsonURL"),extension:r(x,"jsonExtension","json"),xhrSettings:r(x,"jsonXhrSettings")}),s=r(x,"atlasURL"),n=r(x,"preMultipliedAlpha"),Array.isArray(s)||(s=[s]),d=0;d{var s=i(2494),r=i(7473),n=i(5851),a=i(3527),o=i(5722),h={canvas:i(5159),webgl:i(5159)},l=i(3524),u=i(8332),c=i(5782),d=i(1984),f=new r({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:d,postRender:d,render:d,destroy:d});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,s,r,n){var a=this.scene.sys[i],o=new u(this.scene,a,t,e,s,r,n);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var r=n(t,"key",null),a=n(t,"animationName",null),o=n(t,"loop",!1),h=this.scene.sys[i],l=new u(this.scene,h,0,0,r,a,o);void 0!==e&&(t.add=e),s(this.scene,l,t);var c=n(t,"skinName",!1);c&&l.setSkinByName(c);var d=n(t,"slotName",!1),f=n(t,"attachmentName",null);return d&&l.setAttachment(d,f),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,s){var r=this.scene.sys[i],n=new c(this.scene,r,t,e,s);return this.displayList.add(n),n}),(function(t,e){void 0===t&&(t={});var r=n(t,"x",0),a=n(t,"y",0),o=n(t,"children",null),h=this.scene.sys[i],l=new c(this.scene,h,r,a,o);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(a,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=this.renderer.spineSceneRenderer;t||(t=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0),this.renderer.spineSceneRenderer=t),this.sceneRenderer=t,this.skeletonRenderer=t.skeletonRenderer,this.skeletonDebugRenderer=t.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures;i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures,n=this.sceneRenderer.context.gl;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(n,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,s,r,n,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h{var s=i(7473),r=i(7361),n=i(7738),a=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n){r.call(this,t,i,s,n),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},8064:t=>{t.exports=function(t,e,i,s){var r=e.list;if(0!==r.length){i.addToRenderList(e);var n=e.localTransform;s?(n.loadIdentity(),n.multiply(s),n.translate(e.x,e.y),n.rotate(e.rotation),n.scale(e.scaleX,e.scaleY)):n.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var s=i(1984),r=i(1984);r=i(8064),t.exports={renderWebGL:s,renderCanvas:r}},6576:t=>{t.exports="complete"},8621:t=>{t.exports="dispose"},8944:t=>{t.exports="end"},7494:t=>{t.exports="event"},1908:t=>{t.exports="interrupted"},5591:t=>{t.exports="start"},5146:(t,e,i)=>{t.exports={COMPLETE:i(6576),DISPOSE:i(8621),END:i(8944),EVENT:i(7494),INTERRUPTED:i(1908),START:i(5591)}},8332:(t,e,i)=>{var s=i(6412),r=i(2915),n=i(7473),a=i(1991),o=i(3131),h=i(9660),l=i(4627),u=i(3212),c=i(8414),d=i(3426),f=i(7149),p=i(2273),m=i(4208),g=i(5146),x=i(2762),v=new n({Extends:p,Mixins:[a,o,h,l,u,c,x],initialize:function(t,e,i,s,r,n,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,s),r&&this.setSkeleton(r,n,a)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var s=this.plugin,r=s.sceneRenderer;s.gl&&r.batcher.isDrawing&&(r.end(),s.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,s=(t>>8&255)/255,r=(255&t)/255,n=t>16777215?(t>>>24)/255:null,a=this.skeleton;if(e){var o=this.findSlot(e);o&&(a=o)}return a.color.r=i,a.color.g=s,a.color.b=r,null!==n&&(a.color.a=n),this},setSkeletonFromJSON:function(t,e,i,s){return this.setSkeleton(t,e,i,s)},setSkeleton:function(t,e,i,s){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,s);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var n=r.skeleton;return n.setSkin(),n.setToSetupPose(),this.skeleton=n,r=this.plugin.createAnimationState(n),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(d(this.rotation))+90),this.state.apply(n),n.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=m(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,s){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===s&&(s=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-s,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,s=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=i,t.scaleY=s,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i{var s=i(3426),r=i(4208),n=i(8445);t.exports=function(t,e,i,a){var o=t.currentContext,h=e.plugin,l=e.skeleton,u=h.skeletonRenderer,c=t._tempMatrix1,d=t._tempMatrix2,f=t._tempMatrix3;i.addToRenderList(e),d.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),c.copyFrom(i.matrix),a?(c.multiplyWithOffset(a,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),d.e=e.x,d.f=e.y,c.multiply(d,f)):(d.e-=i.scrollX*e.scrollFactorX,d.f-=i.scrollY*e.scrollFactorY,c.multiply(d,f)),l.x=f.tx,l.y=f.ty,l.scaleX=f.scaleX,l.scaleY=-1*f.scaleY,e.scaleX<0?(l.scaleX*=-1,e.root.rotation=r(f.rotationNormalized)):e.root.rotation=n(r(s(f.rotationNormalized))+90,0,360),e.scaleY<0&&(l.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*r(f.rotationNormalized):e.root.rotation+=2*r(f.rotationNormalized)),i.renderToTexture&&(l.y=f.ty,l.scaleY*=-1),l.updateWorldTransform(),u.ctx=o,u.debugRendering=h.drawDebug||e.drawDebug,o.save(),u.draw(l),o.restore()}},2762:(t,e,i)=>{var s=i(1984),r=i(1984),n=i(1984);r=i(2753),t.exports={renderWebGL:s,renderCanvas:r,renderDirect:n}},9454:(t,e,i)=>{var s={VERSION:"3.60.0",BlendModes:i(8351),ScaleModes:i(8196),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},1081:(t,e,i)=>{var s=i(7473),r=i(6748),n=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{t.exports="changedata"},7801:t=>{t.exports="changedata-"},4873:t=>{t.exports="destroy"},9966:t=>{t.exports="removedata"},4586:t=>{t.exports="setdata"},6748:(t,e,i)=>{t.exports={CHANGE_DATA:i(9044),CHANGE_DATA_KEY:i(7801),DESTROY:i(4873),REMOVE_DATA:i(9966),SET_DATA:i(4586)}},3004:(t,e,i)=>{var s=i(2776),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(r.ogg=i('ogg; codecs="vorbis"'),r.opus=i('ogg; codecs="opus"',"opus"),r.mp3=i("mpeg"),r.wav=i("wav"),r.m4a=i("x-m4a"),r.aac=i("aac"),r.flac=i("flac","x-flac"),r.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)r.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var n=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===n&&a>=11||n>10)&&(r.dolby=!0)}}}catch(t){}return r}()},2776:(t,e,i)=>{var s,r=i(5203),n={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edg\/\d+/.test(s)?(n.edge=!0,n.es2019=!0):/OPR/.test(s)?(n.opera=!0,n.es2019=!0):/Chrome\/(\d+)/.test(s)&&!r.windowsPhone?(n.chrome=!0,n.chromeVersion=parseInt(RegExp.$1,10),n.es2019=n.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(n.firefox=!0,n.firefoxVersion=parseInt(RegExp.$1,10),n.es2019=n.firefoxVersion>10):/AppleWebKit/.test(s)&&r.iOS?n.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(n.ie=!0,n.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(s)&&!r.windowsPhone?(n.safari=!0,n.safariVersion=parseInt(RegExp.$1,10),n.es2019=n.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(n.ie=!0,n.trident=!0,n.tridentVersion=parseInt(RegExp.$1,10),n.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(n.silk=!0),n)},6505:(t,e,i)=>{var s,r,n,a=i(8073),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(n=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(n,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+r},n.src=s+"AP804Oa6"+r,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return a.remove(this),s}()),o)},6543:(t,e,i)=>{var s=i(5203),r=i(2776),n=i(8073),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=n.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=n.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=s.data instanceof Uint8ClampedArray,n.remove(t),n.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(a.getUserMedia=!1),!s.iOS&&(r.ie||r.firefox||r.chrome)&&(a.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},3922:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",r=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(2776),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},5203:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},2131:(t,e,i)=>{var s=i(4597),r={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};t.exports=function(){if("function"==typeof importScripts)return r;var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(r.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(r.h264=!0,r.mp4=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(r.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(r.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(r.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,"")&&(r.hls=!0))}catch(t){}return t.parentNode&&t.parentNode.removeChild(t),r.getVideoURL=function(t){Array.isArray(t)||(t=[t]);for(var e=0;e{t.exports={os:i(5203),browser:i(2776),features:i(6543),input:i(1454),audio:i(3004),video:i(2131),fullscreen:i(3922),canvasFeatures:i(6505)}},5686:(t,e,i)=>{var s=i(7473),r=new Float32Array(20),n=new s({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(t){return this._matrix.set(t),this._dirty=!0,this},reset:function(){var t=this._matrix;return t.fill(0),t[0]=1,t[6]=1,t[12]=1,t[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var t=this._data;return this._dirty&&(t.set(this._matrix),t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._dirty=!1),t},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),r=.213,n=.715,a=.072;return this.multiply([r+.787*i+s*-r,n+i*-n+s*-n,a+i*-a+.928*s,0,0,r+i*-r+.143*s,n+i*(1-n)+.14*s,a+i*-a+-.283*s,0,0,r+i*-r+-.787*s,n+i*-n+s*n,a+.928*i+s*a,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply(n.BLACK_WHITE,t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply(n.NEGATIVE,t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply(n.DESATURATE_LUMINANCE,t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply(n.SEPIA,t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply(n.LSD,t)},brown:function(t){return void 0===t&&(t=!1),this.multiply(n.BROWN,t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply(n.VINTAGE,t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply(n.KODACHROME,t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply(n.TECHNICOLOR,t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply(n.POLAROID,t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply(n.SHIFT_BGR,t)},multiply:function(t,e){void 0===e&&(e=!1),e||this.reset();var i=this._matrix,s=r;return s.set(i),i.set([s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19]]),this._dirty=!0,this}});n.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],n.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],n.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],n.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],n.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],n.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],n.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],n.KODACHROME=[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],n.TECHNICOLOR=[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],n.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],n.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t.exports=n},8073:(t,e,i)=>{var s,r,n,a=i(9454),o=i(2150),h=[],l=!1;t.exports=(n=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,a.CANVAS)},create:s=function(t,e,i,s,n){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=a.CANVAS),void 0===n&&(n=!1);var c=r(s);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:s},s===a.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),n&&(c.parent=u),u.width=e,u.height=i,l&&s===a.CANVAS&&o.disable(u.getContext("2d",{willReadFrequently:!1})),u},createWebGL:function(t,e,i){return s(t,e,i,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{var s=i(7473),r=i(3649),n=new s({initialize:function(t,e,i,s,r,n){e||(e=t.sys.make.image({x:i,y:s,key:r,frame:n,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,i,s,r){return new n(this.scene,t,e,i,s,r)})),t.exports=n},6726:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,r=this.geometryMask,n=t.maskCount,a=255;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,n,a),s.stencilOp(s.KEEP,s.KEEP,s.INCR),n++):(s.stencilFunc(s.EQUAL,n+1,a),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),this.level=n,r.renderWebGL(t,r,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),this.invertAlpha?s.stencilFunc(s.NOTEQUAL,n,a):s.stencilFunc(s.EQUAL,n,a)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},7340:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.BARREL,t),this.amount=e}});t.exports=a},5170:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===i&&(i=1),void 0===s&&(s=1),void 0===a&&(a=1),void 0===o&&(o=1),void 0===h&&(h=4),r.call(this,n.BLOOM,t),this.steps=h,this.offsetX=i,this.offsetY=s,this.blurStrength=a,this.strength=o,this.glcolor=[1,1,1],null!=e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},4199:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===e&&(e=0),void 0===i&&(i=2),void 0===s&&(s=2),void 0===a&&(a=1),void 0===h&&(h=4),r.call(this,n.BLUR,t),this.quality=0,this.x=i,this.y=s,this.steps=h,this.strength=a,this.glcolor=[1,1,1],null!=o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},3132:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=.5),void 0===i&&(i=1),void 0===s&&(s=.2),void 0===a&&(a=!1),void 0===o&&(o=1),void 0===h&&(h=1),void 0===l&&(l=1),r.call(this,n.BOKEH,t),this.radius=e,this.amount=i,this.contrast=s,this.isTiltShift=a,this.strength=l,this.blurX=o,this.blurY=h}});t.exports=a},6610:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o){void 0===e&&(e=8),void 0===a&&(a=1),void 0===o&&(o=.005),r.call(this,n.CIRCLE,t),this.scale=a,this.feather=o,this.thickness=e,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=i&&(this.color=i),null!=s&&(this.backgroundColor=s)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundColor:{get:function(){var t=this.glcolor2;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor2;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},4931:(t,e,i)=>{var s=i(7473),r=i(5686),n=i(1571),a=new s({Extends:r,initialize:function(t){r.call(this),this.type=n.COLOR_MATRIX,this.gameObject=t,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});t.exports=a},6128:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.type=t,this.gameObject=e,this.active=!0},setActive:function(t){return this.active=t,this},destroy:function(){this.gameObject=null,this.active=!1}});t.exports=s},9195:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s){void 0===e&&(e="__WHITE"),void 0===i&&(i=.005),void 0===s&&(s=.005),r.call(this,n.DISPLACEMENT,t),this.x=i,this.y=s,this.glTexture,this.setTexture(e)},setTexture:function(t){var e=this.gameObject.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this}});t.exports=a},445:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===i&&(i=4),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.GLOW,t),this.outerStrength=i,this.innerStrength=s,this.knockout=a,this.glcolor=[1,1,1,1],void 0!==e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},7724:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l,u){void 0===s&&(s=.2),void 0===a&&(a=0),void 0===o&&(o=0),void 0===h&&(h=0),void 0===l&&(l=1),void 0===u&&(u=0),r.call(this,n.GRADIENT,t),this.alpha=s,this.size=u,this.fromX=a,this.fromY=o,this.toX=h,this.toY=l,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=e&&(this.color1=e),null!=i&&(this.color2=i)},color1:{get:function(){var t=this.glcolor1;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor1;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}},color2:{get:function(){var t=this.glcolor2;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor2;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}}});t.exports=a},4412:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.PIXELATE,t),this.amount=e}});t.exports=a},75:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.1),void 0===a&&(a=1),void 0===h&&(h=6),void 0===l&&(l=1),r.call(this,n.SHADOW,t),this.x=e,this.y=i,this.decay=s,this.power=a,this.glcolor=[0,0,0,1],this.samples=h,this.intensity=l,void 0!==o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},8734:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=3),void 0===a&&(a=!1),r.call(this,n.SHINE,t),this.speed=e,this.lineWidth=i,this.gradient=s,this.reveal=a}});t.exports=a},2437:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=.5),void 0===a&&(a=.5),r.call(this,n.VIGNETTE,t),this.x=e,this.y=i,this.radius=s,this.strength=a}});t.exports=a},5984:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.WIPE,t),this.progress=0,this.wipeWidth=e,this.direction=i,this.axis=s,this.reveal=a}});t.exports=a},1571:t=>{t.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},7347:(t,e,i)=>{var s=i(1030),r=i(1571),n={Barrel:i(7340),Controller:i(6128),Bloom:i(5170),Blur:i(4199),Bokeh:i(3132),Circle:i(6610),ColorMatrix:i(4931),Displacement:i(9195),Glow:i(445),Gradient:i(7724),Pixelate:i(4412),Shadow:i(75),Shine:i(8734),Vignette:i(2437),Wipe:i(5984)};n=s(!1,n,r),t.exports=n},2494:(t,e,i)=>{var s=i(8351),r=i(8361);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var n=r(i,"scale",null);"number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=r(n,"x",1),e.scaleY=r(n,"y",1));var a=r(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(i,"rotation",0);var o=r(i,"angle",null);null!==o&&(e.angle=o),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),u=r(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=r(i,"blendMode",s.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},2273:(t,e,i)=>{var s=i(7473),r=i(6125),n=i(1081),a=i(4399),o=i(3389),h=i(204),l=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(t,e){return this.data||(this.data=new n(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new n(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new n(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new n(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},3649:(t,e,i)=>{var s=i(7473),r=i(8456),n=i(204),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(n.DESTROY,this.destroy,this)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},r.register("GameObjectFactory",a,"add"),t.exports=a},4344:(t,e,i)=>{var s=i(2915),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},4518:(t,e,i)=>{var s=i(2915),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},5173:(t,e,i)=>{var s=i(8351),r={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},1991:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},8305:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},3131:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},1626:(t,e,i)=>{var s=i(7473),r=i(7347),n=i(8935),a=new s({initialize:function(t,e){this.gameObject=t,this.isPost=e,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(t){return void 0===t&&(t=0),this.padding=t,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(t){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,void 0!==t&&(this.padding=t),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var t=this.list,e=0;e{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},3671:(t,e,i)=>{var s=i(1392),r=i(9876),n=i(2529),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t,e){return void 0===t&&(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getTopLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,n,a,o,h,l;if(void 0===t&&(t=new s),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),r=t.x,n=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,n=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(i,n,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(i,n,o,l)-t.y,t}};t.exports=a},2246:(t,e,i)=>{var s=i(7499),r=i(6726),n={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,r,n){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,r,n)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=n},5085:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},77:(t,e,i)=>{var s=i(7149),r=i(1864),n=i(5851),a=i(3747),o=i(2529),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=n(t,"from",0),t.to=n(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=n(t,"rotationOffset",0);var l=n(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var n=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-n,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},986:(t,e,i)=>{var s=i(3911),r={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(t){this.pipelineData={};var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){var a=n.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?s(e):e)}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},resetPipeline:function(t){return void 0===t&&(t=!1),this.pipeline=this.defaultPipeline,t&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=r},4461:(t,e,i)=>{var s=i(3911),r=i(1626),n=i(8935),a={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(t){this.postPipelines=[],this.postPipelineData={},this.postFX=new r(this,!0),t&&(this.preFX=new r(this,!1))},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPostPipelineData:function(t,e){var i=this.postPipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],r=0;r=0;s--){var r=i[s];(e&&r.name===t||!e&&r===t)&&(r.destroy(),n(i,s))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};t.exports=a},4627:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},1868:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},4976:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},9243:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=r},5693:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},6125:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},3212:(t,e,i)=>{var s=i(7425),r=i(4227),n=i(7556),a=i(3692),o=i(2820),h=i(2529),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return o(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(e||(e=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var r=s.scrollX,a=s.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):n(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},4227:(t,e,i)=>{var s=i(7473),r=i(7425),n=i(2529),a=new s({initialize:function(t,e,i,s,r,n){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===r&&(r=0),void 0===n&&(n=0),this.matrix=new Float32Array([t,e,i,s,r,n,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||n?r.TAU-(n>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3];return s[0]=r*i+a*e,s[1]=n*i+o*e,s[2]=r*-e+a*i,s[3]=n*-e+o*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,r=i[0],n=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=s[0],c=s[1],d=s[2],f=s[3],p=s[4],m=s[5],g=void 0===e?i:e.matrix;return g[0]=u*r+c*a,g[1]=u*n+c*o,g[2]=d*r+f*a,g[3]=d*n+f*o,g[4]=p*r+m*a+h,g[5]=p*n+m*o+l,g},multiplyWithOffset:function(t,e,i){var s=this.matrix,r=t.matrix,n=s[0],a=s[1],o=s[2],h=s[3],l=e*n+i*o+s[4],u=e*a+i*h+s[5],c=r[0],d=r[1],f=r[2],p=r[3],m=r[4],g=r[5];return s[0]=c*n+d*o,s[1]=c*a+d*h,s[2]=f*n+p*o,s[3]=f*a+p*h,s[4]=m*n+g*o+l,s[5]=m*a+g*h+u,this},transform:function(t,e,i,s,r,n){var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*u,a[2]=i*o+s*l,a[3]=i*h+s*u,a[4]=r*o+n*l+c,a[5]=r*h+n*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3],h=s[4],l=s[5];return i.x=t*r+e*a+h,i.y=t*n+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=e*r-i*s;return t[0]=r/o,t[1]=-i/o,t[2]=-s/o,t[3]=e/o,t[4]=(s*a-r*n)/o,t[5]=-(e*a-i*n)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,r,n){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=s,a[4]=r,a[5]=n,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],r=e[2],n=e[3],a=i*n-s*r;if(t.translateX=e[4],t.translateY=e[5],i||s){var o=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/o):-Math.acos(i/o),t.scaleX=o,t.scaleY=a/o}else if(r||n){var h=Math.sqrt(r*r+n*n);t.rotation=.5*Math.PI-(n>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,r){var n=this.matrix,a=Math.sin(i),o=Math.cos(i);return n[4]=t,n[5]=e,n[0]=o*s,n[1]=a*s,n[2]=-a*r,n[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new n);var s=this.matrix,r=s[0],a=s[1],o=s[2],h=s[3],l=s[4],u=s[5],c=1/(r*h+o*-a);return i.x=h*c*t+-o*c*e+(u*o-l*h)*c,i.y=r*c*e+-a*c*t+(-u*r+l*a)*c,i},setQuad:function(t,e,i,s,r,n){void 0===n&&(n=this.quad);var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return n[0]=t*o+e*l+c,n[1]=t*h+e*u+d,n[2]=t*o+s*l+c,n[3]=t*h+s*u+d,n[4]=i*o+s*l+c,n[5]=i*h+s*u+d,n[6]=i*o+e*l+c,n[7]=i*h+e*u+d,r&&n.forEach((function(t,e){n[e]=Math.round(t)})),n},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},8414:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},4286:(t,e,i)=>{t.exports={Alpha:i(4344),AlphaSingle:i(4518),BlendMode:i(5173),ComputedSize:i(1991),Crop:i(8305),Depth:i(3131),Flip:i(9660),FX:i(1626),GetBounds:i(3671),Mask:i(2246),Origin:i(5085),PathFollower:i(77),Pipeline:i(986),PostPipeline:i(4461),ScrollFactor:i(4627),Size:i(1868),Texture:i(4976),TextureCrop:i(9243),Tint:i(5693),ToJSON:i(6125),Transform:i(3212),TransformMatrix:i(4227),Visible:i(8414)}},7361:(t,e,i)=>{var s=i(1953),r=i(8351),n=i(7473),a=i(4286),o=i(3389),h=i(2273),l=i(1392),u=i(3232),c=i(9422),d=i(2529),f=new n({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.PostPipeline,a.Transform,a.Visible,u],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(e,i),this.setBlendMode(r.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,r=!1;t.setEmpty();for(var n=0;n-1},setAll:function(t,e,i,r){return s.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,s=[null],r=this.list.slice(),n=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},2840:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var r=e.list;if(0!==r.length){var n=e.localTransform;s?(n.loadIdentity(),n.multiply(s),n.translate(e.x,e.y),n.rotate(e.rotation),n.scale(e.scaleX,e.scaleY)):n.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var s=i(1984),r=s,n=s;n=i(2840),t.exports={renderWebGL:r,renderCanvas:n}},6608:t=>{t.exports="addedtoscene"},4265:t=>{t.exports="destroy"},8671:t=>{t.exports="removedfromscene"},3420:t=>{t.exports="complete"},601:t=>{t.exports="created"},7919:t=>{t.exports="error"},6231:t=>{t.exports="locked"},5241:t=>{t.exports="loop"},8325:t=>{t.exports="playing"},3356:t=>{t.exports="play"},7513:t=>{t.exports="seeked"},5788:t=>{t.exports="seeking"},7111:t=>{t.exports="stalled"},8118:t=>{t.exports="stop"},9184:t=>{t.exports="textureready"},4287:t=>{t.exports="unlocked"},857:t=>{t.exports="unsupported"},3389:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(6608),DESTROY:i(4265),REMOVED_FROM_SCENE:i(8671),VIDEO_COMPLETE:i(3420),VIDEO_CREATED:i(601),VIDEO_ERROR:i(7919),VIDEO_LOCKED:i(6231),VIDEO_LOOP:i(5241),VIDEO_PLAY:i(3356),VIDEO_PLAYING:i(8325),VIDEO_SEEKED:i(7513),VIDEO_SEEKING:i(5788),VIDEO_STALLED:i(7111),VIDEO_STOP:i(8118),VIDEO_TEXTURE:i(9184),VIDEO_UNLOCKED:i(4287),VIDEO_UNSUPPORTED:i(857)}},1643:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},8881:(t,e,i)=>{var s=i(7655);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},4479:(t,e,i)=>{var s=i(4771),r=i(7655);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=s(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},284:(t,e,i)=>{var s=i(7473),r=i(8881),n=i(4479),a=i(1643),o=i(3915),h=i(2529),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return n(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},3915:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},7655:(t,e,i)=>{var s=i(7473),r=i(1643),n=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=n},5956:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},716:(t,e,i)=>{var s=i(7120),r=i(7655);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var n=s(t)*e;return e>.5?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width)),i}},8151:(t,e,i)=>{var s=i(716),r=i(7120);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=r(t)/i);for(var a=0;a{t.exports=function(t){return 2*(t.width+t.height)}},2161:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},1392:(t,e,i)=>{var s=i(7473),r=i(5956),n=i(716),a=i(8151),o=i(1643),h=i(284),l=i(2161),u=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},9422:(t,e,i)=>{var s=i(1392);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=Math.min(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-n;return i.setTo(r,n,a,o)}},1593:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=i(4597),o=i(5593),h=i(7410),l=i(5874),u=i(707),c=new s({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=a(e,"url");void 0===s?s=t.path+i+"."+a(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(n.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(n.FILE_COMPLETE,e,i,t),this.loader.emit(n.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},9845:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},5593:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},7410:(t,e,i)=>{var s=i(1030),r=i(707);t.exports=function(t,e){var i=void 0===t?r():s({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},3137:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=new s({initialize:function(t,e,i,s){var n=[];s.forEach((function(t){t&&n.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=n,this.state=r.FILE_PENDING,this.complete=!1,this.pending=n.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a{var s=i(7410);t.exports=function(t,e){var i=s(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var n in i.headers)r.setRequestHeader(n,i.headers[n]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},707:t=>{t.exports=function(t,e,i,s,r,n){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===r&&(r=0),void 0===n&&(n=!1),{responseType:t,async:e,user:i,password:s,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}}},4359:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},462:t=>{t.exports="addfile"},7297:t=>{t.exports="complete"},8660:t=>{t.exports="filecomplete"},6484:t=>{t.exports="filecomplete-"},7972:t=>{t.exports="loaderror"},1906:t=>{t.exports="load"},1441:t=>{t.exports="fileprogress"},1072:t=>{t.exports="postprocess"},1927:t=>{t.exports="progress"},6597:t=>{t.exports="start"},1179:(t,e,i)=>{t.exports={ADD:i(462),COMPLETE:i(7297),FILE_COMPLETE:i(8660),FILE_KEY_COMPLETE:i(6484),FILE_LOAD_ERROR:i(7972),FILE_LOAD:i(1906),FILE_PROGRESS:i(1441),POST_PROCESS:i(1072),PROGRESS:i(1927),START:i(6597)}},6732:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=i(5593),u=new s({Extends:n,initialize:function t(e,i,s,r,a){var l,u="png";if(h(i)){var c=i;i=o(c,"key"),s=o(c,"url"),l=o(c,"normalMap"),r=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:s,xhrSettings:r,config:a};if(n.call(this,e,d),l){var f=new t(e,this.key,l,r,a);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){n.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){n.revokeObjectURL(t.data),t.onProcessError()},n.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(5851),l=i(2482),u=new s({Extends:n,initialize:function(t,e,i,s,a){var u="json";if(l(e)){var c=e;e=o(c,"key"),i=o(c,"url"),s=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"dataKey",a)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:s,config:a};n.call(this,t,d),l(i)&&(this.data=a?h(i,a):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=new s({Extends:n,initialize:function(t,e,i,s){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),s=o(u,"xhrSettings"),a=o(u,"extension",a),r=o(u,"type",r),l=o(u,"cache",l)}var c={type:r,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports=function(t){for(var e=0,i=0;i{var s=i(3916);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},7025:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},48:t=>{t.exports=function(t,e,i,s,r){var n=.5*(s-e),a=.5*(r-i),o=t*t;return(2*i-2*s+n+a)*(t*o)+(-3*i+3*s-2*n-a)*o+n*t+i}},5035:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},2915:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},7149:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.DEG_TO_RAD}},2975:t=>{t.exports=function(t,e){return Math.abs(t-e)}},2107:(t,e,i)=>{var s=i(2915),r=i(7473),n=i(9652),a=i(1984),o=new n,h=new r({initialize:function t(e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,n=r[0],a=r[4],o=r[8],h=r[1],l=r[5],u=r[9],c=r[2],d=r[6],f=r[10],p=0,m=0,g=0,x=.99999;switch(e){case"XYZ":m=Math.asin(s(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},104:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},4941:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},1555:(t,e,i)=>{var s=i(2915);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},5005:t=>{t.exports=function(t,e){return t/e/1e3}},3702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},8820:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},1743:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},3416:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},2149:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*n-a*h,c=-l*r+a*o,d=h*r-n*o,f=e*u+i*c+s*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+s*h)*f,t[2]=(a*i-s*n)*f,t[3]=c*f,t[4]=(l*e-s*o)*f,t[5]=(-a*e+s*r)*f,t[6]=d*f,t[7]=(-h*e+i*o)*f,t[8]=(n*e-i*r)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=n*l-a*h,t[1]=s*h-i*l,t[2]=i*a-s*n,t[3]=a*o-r*l,t[4]=e*l-s*o,t[5]=s*r-e*a,t[6]=r*h-n*o,t[7]=i*o-e*h,t[8]=e*n-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*n-a*h)+i*(-l*r+a*o)+s*(h*r-n*o)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],m=c[3],g=c[4],x=c[5],v=c[6],y=c[7],w=c[8];return e[0]=d*i+f*n+p*h,e[1]=d*s+f*a+p*l,e[2]=d*r+f*o+p*u,e[3]=m*i+g*n+x*h,e[4]=m*s+g*a+x*l,e[5]=m*r+g*o+x*u,e[6]=v*i+y*n+w*h,e[7]=v*s+y*a+w*l,e[8]=v*r+y*o+w*u,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*n,e[1]=l*s+h*a,e[2]=l*r+h*o,e[3]=l*n-h*i,e[4]=l*a-h*s,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,r=t.w,n=e+e,a=i+i,o=s+s,h=e*n,l=e*a,u=e*o,c=i*a,d=i*o,f=s*o,p=r*n,m=r*a,g=r*o,x=this.val;return x[0]=1-(c+f),x[3]=l+g,x[6]=u-m,x[1]=l-g,x[4]=1-(h+f),x[7]=d+p,x[2]=u+m,x[5]=d-p,x[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],r=e[1],n=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],m=e[12],g=e[13],x=e[14],v=e[15],y=s*h-r*o,w=s*l-n*o,b=s*u-a*o,A=r*l-n*h,M=r*u-a*h,S=n*u-a*l,E=c*g-d*m,I=c*x-f*m,k=c*v-p*m,T=d*x-f*g,R=d*v-p*g,C=f*v-p*x,P=y*C-w*R+b*T+A*k-M*I+S*E;return P?(P=1/P,i[0]=(h*C-l*R+u*T)*P,i[1]=(l*k-o*C-u*I)*P,i[2]=(o*R-h*k+u*E)*P,i[3]=(n*R-r*C-a*T)*P,i[4]=(s*C-n*k+a*I)*P,i[5]=(r*k-s*R-a*E)*P,i[6]=(g*S-x*M+v*A)*P,i[7]=(x*b-m*S-v*w)*P,i[8]=(m*M-g*b+v*y)*P,this):null}});t.exports=s},9652:(t,e,i)=>{var s=i(7473),r=i(5689),n=1e-6,a=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,r,n,a,o,h,l,u,c,d,f,p,m){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=s,g[4]=r,g[5]=n,g[6]=a,g[7]=o,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=f,g[14]=p,g[15]=m,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=o.fromQuat(i).val,r=e.x,n=e.y,a=e.z;return this.setValues(s[0]*r,s[1]*r,s[2]*r,0,s[4]*n,s[5]*n,s[6]*n,0,s[8]*a,s[9]*a,s[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],r=t[6],n=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=r,t[11]=t[14],t[12]=s,t[13]=n,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15],x=e*a-i*n,v=e*o-s*n,y=e*h-r*n,w=i*o-s*a,b=i*h-r*a,A=s*h-r*o,M=l*p-u*f,S=l*m-c*f,E=l*g-d*f,I=u*m-c*p,k=u*g-d*p,T=c*g-d*m,R=x*T-v*k+y*I+w*E-b*S+A*M;return R?(R=1/R,this.setValues((a*T-o*k+h*I)*R,(s*k-i*T-r*I)*R,(p*A-m*b+g*w)*R,(c*b-u*A-d*w)*R,(o*E-n*T-h*S)*R,(e*T-s*E+r*S)*R,(m*y-f*A-g*v)*R,(l*A-c*y+d*v)*R,(n*k-a*E+h*M)*R,(i*E-e*k-r*M)*R,(f*b-p*y+g*x)*R,(u*y-l*b-d*x)*R,(a*S-n*I-o*M)*R,(e*I-i*S+s*M)*R,(p*v-f*w-m*x)*R,(l*w-u*v+c*x)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return this.setValues(a*(c*g-d*m)-u*(o*g-h*m)+p*(o*d-h*c),-(i*(c*g-d*m)-u*(s*g-r*m)+p*(s*d-r*c)),i*(o*g-h*m)-a*(s*g-r*m)+p*(s*h-r*o),-(i*(o*d-h*c)-a*(s*d-r*c)+u*(s*h-r*o)),-(n*(c*g-d*m)-l*(o*g-h*m)+f*(o*d-h*c)),e*(c*g-d*m)-l*(s*g-r*m)+f*(s*d-r*c),-(e*(o*g-h*m)-n*(s*g-r*m)+f*(s*h-r*o)),e*(o*d-h*c)-n*(s*d-r*c)+l*(s*h-r*o),n*(u*g-d*p)-l*(a*g-h*p)+f*(a*d-h*u),-(e*(u*g-d*p)-l*(i*g-r*p)+f*(i*d-r*u)),e*(a*g-h*p)-n*(i*g-r*p)+f*(i*h-r*a),-(e*(a*d-h*u)-n*(i*d-r*u)+l*(i*h-r*a)),-(n*(u*m-c*p)-l*(a*m-o*p)+f*(a*c-o*u)),e*(u*m-c*p)-l*(i*m-s*p)+f*(i*c-s*u),-(e*(a*m-o*p)-n*(i*m-s*p)+f*(i*o-s*a)),e*(a*c-o*u)-n*(i*c-s*u)+l*(i*o-s*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*a-i*n)*(c*g-d*m)-(e*o-s*n)*(u*g-d*p)+(e*h-r*n)*(u*m-c*p)+(i*o-s*a)*(l*g-d*f)-(i*h-r*a)*(l*m-c*f)+(s*h-r*o)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],x=e[15],v=t.val,y=v[0],w=v[1],b=v[2],A=v[3];return e[0]=y*i+w*a+b*u+A*p,e[1]=y*s+w*o+b*c+A*m,e[2]=y*r+w*h+b*d+A*g,e[3]=y*n+w*l+b*f+A*x,y=v[4],w=v[5],b=v[6],A=v[7],e[4]=y*i+w*a+b*u+A*p,e[5]=y*s+w*o+b*c+A*m,e[6]=y*r+w*h+b*d+A*g,e[7]=y*n+w*l+b*f+A*x,y=v[8],w=v[9],b=v[10],A=v[11],e[8]=y*i+w*a+b*u+A*p,e[9]=y*s+w*o+b*c+A*m,e[10]=y*r+w*h+b*d+A*g,e[11]=y*n+w*l+b*f+A*x,y=v[12],w=v[13],b=v[14],A=v[15],e[12]=y*i+w*a+b*u+A*p,e[13]=y*s+w*o+b*c+A*m,e[14]=y*r+w*h+b*d+A*g,e[15]=y*n+w*l+b*f+A*x,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,r=i[0],n=i[4],a=i[8],o=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],f=i[6],p=i[10],m=i[14],g=i[3],x=i[7],v=i[11],y=i[15],w=s[0],b=s[4],A=s[8],M=s[12],S=s[1],E=s[5],I=s[9],k=s[13],T=s[2],R=s[6],C=s[10],P=s[14],F=s[3],O=s[7],Y=s[11],L=s[15];return this.setValues(r*w+n*S+a*T+o*F,h*w+l*S+u*T+c*F,d*w+f*S+p*T+m*F,g*w+x*S+v*T+y*F,r*b+n*E+a*R+o*O,h*b+l*E+u*R+c*O,d*b+f*E+p*R+m*O,g*b+x*E+v*R+y*O,r*A+n*I+a*C+o*Y,h*A+l*I+u*C+c*Y,d*A+f*I+p*C+m*Y,g*A+x*I+v*C+y*Y,r*M+n*k+a*P+o*L,h*M+l*k+u*P+c*L,d*M+f*k+p*P+m*L,g*M+x*k+v*P+y*L)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),r=1-i,n=t.x,a=t.y,o=t.z,h=r*n,l=r*a;return this.setValues(h*n+i,h*a-s*o,h*o+s*a,0,h*a+s*o,l*a+i,l*o-s*n,0,h*o-s*a,l*o+s*n,r*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,r=e.y,a=e.z,o=Math.sqrt(s*s+r*r+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},44:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},5385:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},8585:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==s?(r=(s-t)/(s-i))<0&&(r=0):r=1:r<0&&(r=0),r}},372:(t,e,i)=>{var s=i(7473),r=i(2149),n=i(1984),a=i(5689),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new a(1,0,0),c=new a(0,1,0),d=new a,f=new r,p=new s({initialize:function(t,e,i,s){this.onChangeCallback=n,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=s*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),r+e*(t.z-r),n+e*(t.w-n))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=f.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*n+i*o-s*a,i*h+r*a+s*n-e*o,s*h+r*o+e*a-i*n,r*h-e*n-i*a-s*o)},slerp:function(t,e){var i=this.x,s=this.y,r=this.z,n=this.w,a=t.x,h=t.y,l=t.z,u=t.w,c=i*a+s*h+r*l+n*u;c<0&&(c=-c,a=-a,h=-h,l=-l,u=-u);var d=1-e,f=e;if(1-c>o){var p=Math.acos(c),m=Math.sin(p);d=Math.sin((1-e)*p)/m,f=Math.sin(e*p)/m}return this.set(d*i+f*a,d*s+f*h,d*r+f*l,d*n+f*u)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s,n=r?1/r:0;return this.set(-t*n,-e*n,-i*n,s*n)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*n,i*a+s*n,s*a-i*n,r*a-e*n)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a-s*n,i*a+r*n,s*a+e*n,r*a-i*n)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*n,i*a-e*n,s*a+r*n,r*a-s*n)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,r=t.z/2,n=Math.cos(i),a=Math.cos(s),o=Math.cos(r),h=Math.sin(i),l=Math.sin(s),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+n*l*u,n*l*o-h*a*u,n*a*u+h*l*o,n*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+n*l*u,n*l*o-h*a*u,n*a*u-h*l*o,n*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-n*l*u,n*l*o+h*a*u,n*a*u+h*l*o,n*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-n*l*u,n*l*o+h*a*u,n*a*u-h*l*o,n*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+n*l*u,n*l*o+h*a*u,n*a*u-h*l*o,n*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-n*l*u,n*l*o-h*a*u,n*a*u+h*l*o,n*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],r=i[4],n=i[8],a=i[1],o=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=s+o+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(n-l)*e,(a-r)*e,.25/e)):s>o&&s>c?(e=2*Math.sqrt(1+s-o-c),this.set(.25*e,(r+a)/e,(n+l)/e,(u-h)/e)):o>c?(e=2*Math.sqrt(1+o-s-c),this.set((r+a)/e,.25*e,(h+u)/e,(n-l)/e)):(e=2*Math.sqrt(1+c-s-o),this.set((n+l)/e,(h+u)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var n=h[r],a=h[n];e=Math.sqrt(i[3*r+r]-i[3*n+n]-i[3*a+a]+1),l[r]=.5*e,e=.5/e,l[n]=(i[3*n+r]+i[3*r+n])*e,l[a]=(i[3*a+r]+i[3*r+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+n]-i[3*n+a])*e}return this.onChangeCallback(this),this}});t.exports=p},4208:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.RAD_TO_DEG}},1705:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},6650:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,r=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=s*e,t}},2037:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},6283:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},9876:t=>{t.exports=function(t,e,i,s){var r=Math.cos(s),n=Math.sin(s),a=t.x-e,o=t.y-i;return t.x=a*r-o*n+e,t.y=a*n+o*r+i,t}},8348:t=>{t.exports=function(t,e,i,s,r){var n=s+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},4497:t=>{t.exports=function(t,e,i,s,r){return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},9640:(t,e,i)=>{var s=i(5689),r=i(9652),n=i(372),a=new r,o=new n,h=new s;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},4078:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},855:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},4936:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var r=[],n=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},278:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},163:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r){void 0===r&&(r=new s);var n=0,a=0;return t>0&&t<=e*i&&(n=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(n,a)}},7556:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r,n,a,o,h){void 0===h&&(h=new s);var l=Math.sin(n),u=Math.cos(n),c=u*a,d=l*a,f=-l*o,p=u*o,m=1/(c*p+f*-d);return h.x=p*m*t+-f*m*e+(r*f-i*p)*m,h.y=c*m*e+-d*m*t+(-r*c+i*d)*m,h}},2529:(t,e,i)=>{var s=i(7473),r=i(12),n=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new n(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},5689:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,r=t.z,n=e.x,a=e.y,o=e.z;return this.x=s*o-r*a,this.y=r*n-i*o,this.z=i*a-s*n,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z;return this.x=i*a-s*n,this.y=s*r-e*a,this.z=e*n-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*s,this.y=r[1]*e+r[4]*i+r[7]*s,this.z=r[2]*e+r[5]*i+r[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=1/(r[3]*e+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*s+r[12])*n,this.y=(r[1]*e+r[5]*i+r[9]*s+r[13])*n,this.z=(r[2]*e+r[6]*i+r[10]*s+r[14])*n,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+s*r[6],this.y=e*r[1]+i*r[4]+s*r[7],this.z=e*r[2]+i*r[5]+s*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12],this.y=r[1]*e+r[5]*i+r[9]*s+r[13],this.z=r[2]*e+r[6]*i+r[10]*s+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=e*r[0]+i*r[4]+s*r[8]+r[12],a=e*r[1]+i*r[5]+s*r[9]+r[13],o=e*r[2]+i*r[6]+s*r[10]+r[14],h=e*r[3]+i*r[7]+s*r[11]+r[15];return this.x=n/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,u=o*s+r*i-n*e,c=-r*e-n*i-a*s;return this.x=h*o+c*-r+l*-a-u*-n,this.y=l*o+c*-n+u*-r-h*-a,this.z=u*o+c*-a+h*-n-l*-r,this},project:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=r[0],a=r[1],o=r[2],h=r[3],l=r[4],u=r[5],c=r[6],d=r[7],f=r[8],p=r[9],m=r[10],g=r[11],x=r[12],v=r[13],y=r[14],w=1/(e*h+i*d+s*g+r[15]);return this.x=(e*n+i*l+s*f+x)*w,this.y=(e*a+i*u+s*p+v)*w,this.z=(e*o+i*c+s*m+y)*w,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,r=t.z,n=t.w,a=this.x-i,o=n-this.y-1-s,h=this.z;return this.x=2*a/r-1,this.y=2*o/n-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},9279:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=s*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this.w=n+e*(t.w-n),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+s*s+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12]*r,this.y=n[1]*e+n[5]*i+n[9]*s+n[13]*r,this.z=n[2]*e+n[6]*i+n[10]*s+n[14]*r,this.w=n[3]*e+n[7]*i+n[11]*s+n[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,u=o*s+r*i-n*e,c=-r*e-n*i-a*s;return this.x=h*o+c*-r+l*-a-u*-n,this.y=l*o+c*-n+u*-r-h*-a,this.z=u*o+c*-a+h*-n-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},4119:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},8445:t=>{t.exports=function(t,e,i){if(t>=e&&t<=i)return t;var s=i-e;return e+((t-e)%s+s)%s}},6412:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},760:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},6909:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},6947:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},3426:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},6906:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},3270:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-Math.PI,Math.PI)}},2748:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-180,180)}},936:(t,e,i)=>{var s=i(6906);t.exports=function(t){return s(t+Math.PI)}},1935:(t,e,i)=>{var s=i(7425);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},3692:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},2820:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-180,180)}},1833:(t,e,i)=>{t.exports={Between:i(6412),BetweenPoints:i(760),BetweenPointsY:i(6909),BetweenY:i(6947),CounterClockwise:i(3426),Normalize:i(6906),Random:i(3270),RandomDegrees:i(2748),Reverse:i(936),RotateTo:i(1935),ShortestBetween:i(5393),Wrap:i(3692),WrapDegrees:i(2820)}},7425:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},1518:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return Math.sqrt(r*r+n*n)}},5372:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},4430:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},4361:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},7798:t=>{t.exports=function(t,e,i,s,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(s-e,r))}},8290:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},3788:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return r*r+n*n}},6338:(t,e,i)=>{t.exports={Between:i(1518),BetweenPoints:i(5372),BetweenPointsSquared:i(4430),Chebyshev:i(4361),Power:i(7798),Snake:i(8290),Squared:i(3788)}},5751:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},6203:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},9103:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},4938:(t,e,i)=>{t.exports={In:i(5751),Out:i(9103),InOut:i(6203)}},8677:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},4649:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},504:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},8872:(t,e,i)=>{t.exports={In:i(8677),Out:i(504),InOut:i(4649)}},3170:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},2627:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},1349:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},5006:(t,e,i)=>{t.exports={In:i(3170),Out:i(1349),InOut:i(2627)}},6046:t=>{t.exports=function(t){return t*t*t}},9531:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},4836:t=>{t.exports=function(t){return--t*t*t+1}},875:(t,e,i)=>{t.exports={In:i(6046),Out:i(4836),InOut:i(9531)}},7619:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},7437:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},8119:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},2884:(t,e,i)=>{t.exports={In:i(7619),Out:i(8119),InOut:i(7437)}},5456:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},3461:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},2711:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},6287:(t,e,i)=>{t.exports={In:i(5456),Out:i(2711),InOut:i(3461)}},8613:(t,e,i)=>{t.exports={Back:i(4938),Bounce:i(8872),Circular:i(5006),Cubic:i(875),Elastic:i(2884),Expo:i(6287),Linear:i(4233),Quadratic:i(6341),Quartic:i(762),Quintic:i(345),Sine:i(8698),Stepped:i(7051)}},744:t=>{t.exports=function(t){return t}},4233:(t,e,i)=>{t.exports=i(744)},9810:t=>{t.exports=function(t){return t*t}},8163:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},6123:t=>{t.exports=function(t){return t*(2-t)}},6341:(t,e,i)=>{t.exports={In:i(9810),Out:i(6123),InOut:i(8163)}},7337:t=>{t.exports=function(t){return t*t*t*t}},4878:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},9012:t=>{t.exports=function(t){return 1- --t*t*t*t}},762:(t,e,i)=>{t.exports={In:i(7337),Out:i(9012),InOut:i(4878)}},303:t=>{t.exports=function(t){return t*t*t*t*t}},553:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},1632:t=>{t.exports=function(t){return--t*t*t*t*t+1}},345:(t,e,i)=>{t.exports={In:i(303),Out:i(1632),InOut:i(553)}},8455:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},1844:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},990:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},8698:(t,e,i)=>{t.exports={In:i(8455),Out:i(990),InOut:i(1844)}},6745:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},7051:(t,e,i)=>{t.exports=i(6745)},3158:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},12:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},7373:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},2622:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(3158),Equal:i(12),Floor:i(1326),GreaterThan:i(7373),LessThan:i(2622)}},4675:(t,e,i)=>{var s=i(7425),r=i(1030),n={Angle:i(1833),Distance:i(6338),Easing:i(8613),Fuzzy:i(7927),Interpolation:i(2140),Pow2:i(7897),Snap:i(3943),RandomDataGenerator:i(6957),Average:i(3136),Bernstein:i(785),Between:i(7025),CatmullRom:i(48),CeilTo:i(5035),Clamp:i(2915),DegToRad:i(7149),Difference:i(2975),Euler:i(2107),Factorial:i(3916),FloatBetween:i(104),FloorTo:i(4941),FromPercent:i(1555),GetSpeed:i(5005),IsEven:i(3702),IsEvenStrict:i(8820),Linear:i(1743),LinearXY:i(3416),MaxAdd:i(3733),Median:i(44),MinSub:i(5385),Percent:i(8585),RadToDeg:i(4208),RandomXY:i(1705),RandomXYZ:i(6650),RandomXYZW:i(2037),Rotate:i(6283),RotateAround:i(9876),RotateAroundDistance:i(8348),RotateTo:i(4497),RoundAwayFromZero:i(4078),RoundTo:i(855),SinCosTableGenerator:i(4936),SmootherStep:i(278),SmoothStep:i(2733),ToXY:i(163),TransformXY:i(7556),Within:i(4119),Wrap:i(8445),Vector2:i(2529),Vector3:i(5689),Vector4:i(9279),Matrix3:i(2149),Matrix4:i(9652),Quaternion:i(372),RotateVec3:i(9640)};n=r(!1,n,s),t.exports=n},1640:(t,e,i)=>{var s=i(785);t.exports=function(t,e){for(var i=0,r=t.length-1,n=0;n<=r;n++)i+=Math.pow(1-e,r-n)*Math.pow(e,n)*t[n]*s(r,n);return i}},6105:(t,e,i)=>{var s=i(48);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return t[0]===t[i]?(e<0&&(n=Math.floor(r=i*(1+e))),s(r-n,t[(n-1+i)%i],t[n],t[(n+1)%i],t[(n+2)%i])):e<0?t[0]-(s(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(r-n,t[n?n-1:0],t[n],t[i{t.exports=function(t,e,i,s,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,r)}},6765:(t,e,i)=>{var s=i(1743);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return e<0?s(t[0],t[1],r):e>1?s(t[i],t[i-1],i-r):s(t[n],t[n+1>i?i:n+1],r-n)}},6388:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},5735:(t,e,i)=>{var s=i(2733);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},8705:(t,e,i)=>{var s=i(278);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},2140:(t,e,i)=>{t.exports={Bezier:i(1640),CatmullRom:i(6105),CubicBezier:i(4002),Linear:i(6765),QuadraticBezier:i(6388),SmoothStep:i(5735),SmootherStep:i(8705)}},5443:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},167:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},7897:(t,e,i)=>{t.exports={GetNext:i(5443),IsSize:i(725),IsValue:i(167)}},6957:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},5659:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},5461:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},5131:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},3943:(t,e,i)=>{t.exports={Ceil:i(5659),Floor:i(5461),To:i(5131)}},8666:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},8456:t=>{var e={},i={},s={register:function(t,i,s,r){void 0===r&&(r=!1),e[t]={plugin:i,mapping:s,custom:r}},registerCustom:function(t,e,s,r){i[t]={plugin:e,mapping:s,data:r}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},5722:(t,e,i)=>{var s=i(8666),r=i(7473),n=i(204),a=new r({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(n.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},8351:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},8196:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},3527:t=>{t.exports="resize"},8618:t=>{t.exports="addedtoscene"},4328:t=>{t.exports="boot"},6099:t=>{t.exports="create"},7645:t=>{t.exports="destroy"},2710:t=>{t.exports="pause"},2547:t=>{t.exports="postupdate"},8577:t=>{t.exports="prerender"},8197:t=>{t.exports="preupdate"},8997:t=>{t.exports="ready"},7604:t=>{t.exports="removedfromscene"},8999:t=>{t.exports="render"},9742:t=>{t.exports="resume"},3667:t=>{t.exports="shutdown"},3468:t=>{t.exports="sleep"},7840:t=>{t.exports="start"},9896:t=>{t.exports="transitioncomplete"},5103:t=>{t.exports="transitioninit"},3162:t=>{t.exports="transitionout"},7841:t=>{t.exports="transitionstart"},6454:t=>{t.exports="transitionwake"},6536:t=>{t.exports="update"},3875:t=>{t.exports="wake"},204:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(8618),BOOT:i(4328),CREATE:i(6099),DESTROY:i(7645),PAUSE:i(2710),POST_UPDATE:i(2547),PRE_RENDER:i(8577),PRE_UPDATE:i(8197),READY:i(8997),REMOVED_FROM_SCENE:i(7604),RENDER:i(8999),RESUME:i(9742),SHUTDOWN:i(3667),SLEEP:i(3468),START:i(7840),TRANSITION_COMPLETE:i(9896),TRANSITION_INIT:i(5103),TRANSITION_OUT:i(3162),TRANSITION_START:i(7841),TRANSITION_WAKE:i(6454),UPDATE:i(6536),WAKE:i(3875)}},2362:(t,e,i)=>{var s=i(7473),r=i(2915),n=i(1030),a=new s({initialize:function(t,e,i,s,r,n,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(n,a,s,r)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,n=r.cut;n.x=i,n.y=s,n.w=t,n.h=e,n.r=i+t,n.b=s+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var a=r.drawImage;return a.x=i,a.y=s,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,i,s,r,n){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=s,o.w=r,o.h=n,o.r=i+r,o.b=s+n,this.x=i,this.y=s,this.width=r,this.height=n,this.halfWidth=.5*r,this.halfHeight=.5*n,this.centerX=Math.floor(r/2),this.centerY=Math.floor(n/2),this.updateUVs()},setCropUVs:function(t,e,i,s,n,a,o){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=r(e,0,d)),m=l+(i=r(i,0,f)),g=s=r(s,0,d-e),x=n=r(n,0,f-i),v=this.data;if(v.trim){var y=v.spriteSourceSize,w=e+(s=r(s,0,u-e)),b=i+(n=r(n,0,c-i));if(!(y.rw||y.y>b)){var A=Math.max(y.x,e),M=Math.max(y.y,i),S=Math.min(y.r,w)-A,E=Math.min(y.b,b)-M;g=S,x=E,p=a?h+(u-(A-y.x)-S):h+(A-y.x),m=o?l+(c-(M-y.y)-E):l+(M-y.y),e=A,i=M,s=S,n=E}else p=0,m=0,g=0,x=0}else a&&(p=h+(u-e-s)),o&&(m=l+(c-i-n));var I=this.source.width,k=this.source.height;return t.u0=Math.max(0,p/I),t.v0=Math.max(0,m/k),t.u1=Math.min(1,(p+g)/I),t.v1=Math.min(1,(m+x)/k),t.x=e,t.y=i,t.cx=p,t.cy=m,t.cw=g,t.ch=x,t.width=s,t.height=n,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,r,n){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=i,this.v0=s,this.u1=r,this.v1=n,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,r=this.data.drawImage;r.width=i,r.height=s;var n=this.source.width,a=this.source.height;return this.u0=t/n,this.v0=e/a,this.u1=(t+i)/n,this.v1=(e+s)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=n(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=a},1864:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},3747:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},7473:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,r,a){for(var o in s)if(s.hasOwnProperty(o)){var h=e(s,o,r);if(!1!==h){if(i((a||t).prototype,o)){if(n.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=s[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},1792:t=>{t.exports=function(t,e,i,s,r){if(void 0===r&&(r=t),i>0){var n=i-t.length;if(n<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>n&&(e.splice(n),a=n);for(var o=0;o{t.exports=function(t,e,i,s,r,n){if(void 0===i&&(i=0),void 0===n&&(n=t),s>0){var a=s-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;s>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(n,l)}return e}},2513:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=0;if(s(t,r,n))for(var o=r;o{t.exports=function(t,e,i){var s,r=[null];for(s=3;s{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,r,n=1;if(i){if(te.length&&(n=e.length),i?(s=e[n-1][i],(r=e[n][i])-t<=t-s?e[n]:e[n-1]):(s=e[n-1],(r=e[n])-t<=t-s?r:s)}},4493:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=[];if(s(t,r,n))for(var o=r;o{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},8683:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s>r||(t.splice(s,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},546:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],r=t.indexOf(s);t[i]=s,t[r]=e}return t}},1419:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},6512:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var r,n=[],a=!1;if((i||s)&&(a=!0,i||(i=""),s||(s="")),e=e;r--)a?n.push(i+r.toString()+s):n.push(r);else for(r=t;r<=e;r++)a?n.push(i+r.toString()+s):n.push(r);return n}},1316:(t,e,i)=>{var s=i(4078);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],n=Math.max(s((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,r,n,a,o){for(void 0===n&&(n=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>n;){if(a-n>600){var h=a-n+1,l=r-n+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(n,Math.floor(r-l*c/h+d)),p=Math.min(a,Math.floor(r+(h-l)*c/h+d));s(t,r,f,p,o)}var m=t[r],g=n,x=a;for(e(t,n,r),o(t[a],m)>0&&e(t,n,a);g0;)x--}0===o(t[n],m)?e(t,n,x):e(t,++x,a),x<=r&&(n=x+1),r<=x&&(a=x-1)}};t.exports=s},9703:(t,e,i)=>{var s=i(5851),r=i(4912),n=function(t,e,i){for(var s=[],r=0;r{var s=i(8935);t.exports=function(t,e,i,r){var n;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(n=t.indexOf(e))?(s(t,n),i&&i.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(n=t.indexOf(h))&&(s(t,n),o.push(h),i&&i.call(r,h)),a--}return o}},4725:(t,e,i)=>{var s=i(8935);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var n=s(t,e);return i&&i.call(r,n),n}},8780:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===n&&(n=t),s(t,e,i)){var a=i-e,o=t.splice(e,a);if(r)for(var h=0;h{var s=i(8935);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return s(t,r)}},6960:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),r=t.indexOf(i);return-1!==s&&-1===r&&(t[s]=i,!0)}},1021:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var r=t.length;if(e<0||e>r||e>=i||i>r){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},5361:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},3718:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},2071:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},8935:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],r=e;r{var s=i(9356);function r(t,e){return String(t).localeCompare(e)}function n(t,e,i,s){var r,n,a,o,h,l=t.length,u=0,c=2*i;for(r=0;rl&&(n=l),a>l&&(a=l),o=r,h=n;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[r]=e,t}},1953:(t,e,i)=>{t.exports={Matrix:i(1237),Add:i(1792),AddAt:i(2280),BringToTop:i(2513),CountAllMatching:i(1771),Each:i(7883),EachInRange:i(5856),FindClosestInSorted:i(3957),Flatten:i(4493),GetAll:i(6245),GetFirst:i(1647),GetRandom:i(5301),MoveDown:i(1842),MoveTo:i(1419),MoveUp:i(6512),MoveAbove:i(8683),MoveBelow:i(546),NumberArray:i(4130),NumberArrayStep:i(1316),QuickSelect:i(9465),Range:i(9703),Remove:i(7161),RemoveAt:i(4725),RemoveBetween:i(8780),RemoveRandomElement:i(5744),Replace:i(6960),RotateLeft:i(1021),RotateRight:i(4027),SafeRange:i(2497),SendToBack:i(5361),SetAll:i(3718),Shuffle:i(4912),SortByDigits:i(2071),SpliceOne:i(8935),StableSort:i(9992),Swap:i(2372)}},1816:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(7222),r=i(1816);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},6063:t=>{t.exports=function(t){for(var e=0;e{var s=i(7116);t.exports=function(t){return s(t,180)}},2597:(t,e,i)=>{var s=i(7116);t.exports=function(t){return s(t,90)}},7116:(t,e,i)=>{var s=i(1816),r=i(4780);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(7116);t.exports=function(t){return s(t,-90)}},7711:(t,e,i)=>{var s=i(1021),r=i(4027);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):r(t,i)),0!==e)for(var n=0;n{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),r=0;r-1;n--)s[r][n]=t[n][r]}return s}},1237:(t,e,i)=>{t.exports={CheckMatrix:i(1816),MatrixToString:i(6655),ReverseColumns:i(582),ReverseRows:i(6063),Rotate180:i(8321),RotateLeft:i(2597),RotateMatrix:i(7116),RotateRight:i(6285),Translate:i(7711),TransposeMatrix:i(4780)}},3911:t=>{var e=function(t){var i,s,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)s=t[r],i[r]=e(s);return i};t.exports=e},1030:(t,e,i)=>{var s=i(2482),r=function(){var t,e,i,n,a,o,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l{var s=i(4675),r=i(5851);t.exports=function(t,e,i){var n=r(t,e,null);if(null===n)return i;if(Array.isArray(n))return s.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return s.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return s.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(e);return n}},4597:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},5851:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),n=t,a=s,o=i,h=i,l=!0,u=!0,c=0;c{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},7222:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var r=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var n=Math.ceil((r=e-t.length)/2);t=new Array(r-n+1).join(i)+t+new Array(n+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}}},e={};var i=function i(s){var r=e[s];if(void 0!==r)return r.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}(4513);window.SpinePlugin=i})(); \ No newline at end of file +(()=>{var t={4399:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,s,n,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new r(s,n||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,r=[];if(0===this._eventsCount)return r;for(s in t=this._events)e.call(t,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,n=s.length,a=new Array(n);r{(function(){"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r={};((e,i)=>{for(var s in i)t(e,s,{get:i[s],enumerable:!0})})(r,{AlphaTimeline:()=>ft,Animation:()=>T,AnimationState:()=>Ct,AnimationStateAdapter:()=>Yt,AnimationStateData:()=>Vt,AssetManager:()=>bi,AssetManagerBase:()=>ue,AtlasAttachmentLoader:()=>ne,Attachment:()=>b,AttachmentTimeline:()=>mt,BinaryInput:()=>Oe,BlendMode:()=>Ce,Bone:()=>he,BoneData:()=>ae,BoundingBoxAttachment:()=>Ut,CURRENT:()=>Nt,CanvasTexture:()=>wi,ClippingAttachment:()=>Wt,Color:()=>h,ConstraintData:()=>le,CurveTimeline:()=>Q,CurveTimeline1:()=>J,CurveTimeline2:()=>tt,DebugUtils:()=>m,DeformTimeline:()=>xt,Downloader:()=>ce,DrawOrderTimeline:()=>bt,Event:()=>de,EventData:()=>fe,EventQueue:()=>Ft,EventTimeline:()=>yt,EventType:()=>Ot,FIRST:()=>Dt,FakeTexture:()=>$t,HOLD_FIRST:()=>_t,HOLD_MIX:()=>Bt,HOLD_SUBSEQUENT:()=>Xt,IkConstraint:()=>pe,IkConstraintData:()=>ge,IkConstraintTimeline:()=>Mt,IntSet:()=>n,Interpolation:()=>c,MathUtils:()=>u,MeshAttachment:()=>te,MixBlend:()=>R,MixDirection:()=>C,PathAttachment:()=>ee,PathConstraint:()=>be,PathConstraintData:()=>me,PathConstraintMixTimeline:()=>It,PathConstraintPositionTimeline:()=>St,PathConstraintSpacingTimeline:()=>Et,PointAttachment:()=>ie,Pool:()=>x,PositionMode:()=>xe,Pow:()=>d,PowOut:()=>f,RGB2Timeline:()=>gt,RGBA2Timeline:()=>pt,RGBATimeline:()=>ct,RGBTimeline:()=>dt,RegionAttachment:()=>re,RotateMode:()=>ye,RotateTimeline:()=>et,SETUP:()=>zt,SUBSEQUENT:()=>Lt,ScaleTimeline:()=>nt,ScaleXTimeline:()=>at,ScaleYTimeline:()=>ot,SequenceTimeline:()=>Tt,ShearTimeline:()=>ht,ShearXTimeline:()=>lt,ShearYTimeline:()=>ut,Skeleton:()=>Ee,SkeletonBinary:()=>Fe,SkeletonBounds:()=>ui,SkeletonClipping:()=>di,SkeletonData:()=>Ie,SkeletonJson:()=>fi,SkeletonRenderer:()=>Si,Skin:()=>Te,SkinEntry:()=>ke,Slot:()=>Me,SlotData:()=>Re,SpacingMode:()=>ve,StringSet:()=>a,Texture:()=>qt,TextureAtlas:()=>Kt,TextureAtlasPage:()=>Qt,TextureAtlasRegion:()=>Jt,TextureFilter:()=>Gt,TextureRegion:()=>jt,TextureWrap:()=>Ht,TimeKeeper:()=>y,Timeline:()=>Z,TrackEntry:()=>Pt,TransformConstraint:()=>Ae,TransformConstraintData:()=>Pe,TransformConstraintTimeline:()=>At,TransformMode:()=>oe,TranslateTimeline:()=>it,TranslateXTimeline:()=>st,TranslateYTimeline:()=>rt,Triangulator:()=>ci,Utils:()=>g,Vector2:()=>v,VertexAttachment:()=>A,WindowedMean:()=>w});var n=class{constructor(){this.array=new Array}add(t){let e=this.contains(t);return this.array[0|t]=0|t,!e}contains(t){return null!=this.array[0|t]}remove(t){this.array[0|t]=void 0}clear(){this.array.length=0}},a=class{constructor(){this.entries={},this.size=0}add(t){let e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){let e=this.size;for(var i=0,s=t.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}static rgb888ToColor(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}static fromString(t){return(new o).setFromString(t)}},h=o;h.WHITE=new o(1,1,1,1),h.RED=new o(1,0,0,1),h.GREEN=new o(0,1,0,1),h.BLUE=new o(0,0,1,1),h.MAGENTA=new o(1,0,1,1);var l=class{static clamp(t,e,i){return ti?i:t}static cosDeg(t){return Math.cos(t*l.degRad)}static sinDeg(t){return Math.sin(t*l.degRad)}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){let e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return l.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,i){let s=Math.random(),r=e-t;return s<=(i-t)/r?t+Math.sqrt(s*r*(i-t)):e-Math.sqrt((1-s)*r*(e-i))}static isPowerOfTwo(t){return t&&0==(t&t-1)}},u=l;u.PI=3.1415927,u.PI2=2*l.PI,u.radiansToDegrees=180/l.PI,u.radDeg=l.radiansToDegrees,u.degreesToRadians=l.PI/180,u.degRad=l.degreesToRadians;var c=class{apply(t,e,i){return t+(e-t)*this.applyInternal(i)}},d=class extends c{constructor(t){super(),this.power=2,this.power=t}applyInternal(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}},f=class extends d{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}},p=class{static arrayCopy(t,e,i,s,r){for(let n=e,a=s;n=e?t:p.setArraySize(t,e,i)}static newArray(t,e){let i=new Array(t);for(let s=0;s0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},w=class{constructor(t=32){this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e>1)*n;let a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(!l){o.length>0&&(h=o);let a=t.bone,l=a.worldX,u=a.worldY,c=a.a,d=a.b,f=a.c,p=a.d;for(let t=e,a=r;a=this.regions.length&&(i=this.regions.length-1);let s=this.regions[i];e.region!=s&&(e.region=s,e.updateRegion())}getPath(t,e){let i=t,s=(this.start+e).toString();for(let t=this.digits-s.length;t>0;t--)i+="0";return i+=s,i}static nextID(){return S._nextID++}},E=S;E._nextID=0;var I=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(I||{}),k=[0,1,2,3,4,5,6],T=class{constructor(t,e,i){if(this.timelines=[],this.timelineIds=new a,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=i}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));let h=this.timelines;for(let s=0,l=h.length;s(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(R||{}),C=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(C||{}),P=0,F=1,O=2,Y=3,L=4,D=5,X=6,_=7,B=8,z=9,N=10,V=11,U=12,W=13,q=14,G=15,H=16,j=17,$=18,K=19,Z=class{constructor(t,e){this.propertyIds=e,this.frames=g.newFloatArray(t*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(t,e){let i=t.length;for(let s=1;se)return s-1;return i-1}static search(t,e,i){let s=t.length;for(let r=i;re)return r-i;return s-i}},Q=class extends Z{constructor(t,e,i){super(t,i),this.curves=g.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let e=this.getFrameCount()+18*t;if(this.curves.length>e){let t=g.newFloatArray(e);g.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,i,s,r,n,a,o,h,l,u){let c=this.curves,d=this.getFrameCount()+18*t;0==i&&(c[e]=2+d);let f=.03*(s-2*n+o),p=.03*(r-2*a+h),g=.006*(3*(n-o)-s+l),m=.006*(3*(a-h)-r+u),x=2*f+g,v=2*p+m,y=.3*(n-s)+f+.16666667*g,w=.3*(a-r)+p+.16666667*m,b=s+y,M=r+w;for(let t=d+18;dt){let n=this.frames[e],a=this.frames[e+i];return a+(t-n)/(r[s]-n)*(r[s+1]-a)}let n=s+18;for(s+=2;s=t){let e=r[s-2],i=r[s-1];return i+(t-e)/(r[s]-e)*(r[s+1]-i)}e+=this.getFrameEntries();let a=r[n-2],o=r[n-1];return o+(t-a)/(this.frames[e]-a)*(this.frames[e+i]-o)}},J=class extends Q{constructor(t,e,i){super(t,e,[i])}getFrameEntries(){return 2}setFrame(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+1]=i}getCurveValue(t){let e=this.frames,i=e.length-2;for(let s=2;s<=i;s+=2)if(e[s]>t){i=s-2;break}let s=this.curves[i>>1];switch(s){case 0:let s=e[i],r=e[i+1];return r+(t-s)/(e[i+2]-s)*(e[i+2+1]-r);case 1:return e[i+1]}return this.getBezierValue(t,i,1,s-2)}},tt=class extends Q{constructor(t,e,i,s){super(t,e,[i,s])}getFrameEntries(){return 3}setFrame(t,e,i,s){t*=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s}},et=class extends J{constructor(t,e,i){super(t,e,P+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i>2];switch(p){case 0:let t=h[f];u=h[f+1],c=h[f+2],d=h[f+3];let e=(i-t)/(h[f+4]-t);u+=(h[f+4+1]-u)*e,c+=(h[f+4+2]-c)*e,d+=(h[f+4+3]-d)*e;break;case 1:u=h[f+1],c=h[f+2],d=h[f+3];break;default:u=this.getBezierValue(i,f,1,p-2),c=this.getBezierValue(i,f,2,p+18-2),d=this.getBezierValue(i,f,3,p+36-2)}if(1==r)l.r=u,l.g=c,l.b=d;else{if(0==n){let t=o.data.color;l.r=t.r,l.g=t.g,l.b=t.b}l.r+=(u-l.r)*r,l.g+=(c-l.g)*r,l.b+=(d-l.b)*r}}},ft=class extends J{constructor(t,e,i){super(t,e,B+"|"+i),this.slotIndex=0,this.slotIndex=i}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.color;if(i>3];switch(y){case 0:let t=h[v];c=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],g=h[v+5],m=h[v+6],x=h[v+7];let e=(i-t)/(h[v+8]-t);c+=(h[v+8+1]-c)*e,d+=(h[v+8+2]-d)*e,f+=(h[v+8+3]-f)*e,p+=(h[v+8+4]-p)*e,g+=(h[v+8+5]-g)*e,m+=(h[v+8+6]-m)*e,x+=(h[v+8+7]-x)*e;break;case 1:c=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],g=h[v+5],m=h[v+6],x=h[v+7];break;default:c=this.getBezierValue(i,v,1,y-2),d=this.getBezierValue(i,v,2,y+18-2),f=this.getBezierValue(i,v,3,y+36-2),p=this.getBezierValue(i,v,4,y+54-2),g=this.getBezierValue(i,v,5,y+72-2),m=this.getBezierValue(i,v,6,y+90-2),x=this.getBezierValue(i,v,7,y+108-2)}if(1==r)l.set(c,d,f,p),u.r=g,u.g=m,u.b=x;else{if(0==n){l.setFromColor(o.data.color);let t=o.data.darkColor;u.r=t.r,u.g=t.g,u.b=t.b}l.add((c-l.r)*r,(d-l.g)*r,(f-l.b)*r,(p-l.a)*r),u.r+=(g-u.r)*r,u.g+=(m-u.g)*r,u.b+=(x-u.b)*r}}},gt=class extends Q{constructor(t,e,i){super(t,e,[_+"|"+i,z+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,s,r,n,a,o){t*=7,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n,this.frames[t+5]=a,this.frames[t+6]=o}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,u=o.darkColor;if(it){let r=this.frames[e];return i[s+1]*(t-r)/(i[s]-r)}let r=s+18;for(s+=2;s=t){let e=i[s-2],r=i[s-1];return r+(t-e)/(i[s]-e)*(i[s+1]-r)}let n=i[r-2],a=i[r-1];return a+(1-a)*(t-n)/(this.frames[e+this.getFrameEntries()]-n)}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.getAttachment();if(!h)return;if(!(h instanceof A)||h.timelineAttachment!=this.attachment)return;let l=o.deform;0==l.length&&(n=0);let u=this.vertices,c=u[0].length,d=this.frames;if(i=d[d.length-1]){let t=u[d.length-1];if(1==r)if(3==n){let e=h;if(e.bones)for(let e=0;ei)this.apply(t,e,Number.MAX_VALUE,s,r,n,a),e=-1;else if(e>=o[h-1])return;if(i0&&o[l-1]==t;)l--}for(;l=o[l];l++)s.push(this.events[l])}},yt=vt;yt.propertyIds=[""+U];var wt=class extends Z{constructor(t){super(t,wt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.drawOrders[t]=i}apply(t,e,i,s,r,n,a){if(1==a)return void(0==n&&g.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(i>2];switch(f){case 0:let t=c[d];h=c[d+1],l=c[d+2],u=c[d+3];let e=(i-t)/(c[d+4]-t);h+=(c[d+4+1]-h)*e,l+=(c[d+4+2]-l)*e,u+=(c[d+4+3]-u)*e;break;case 1:h=c[d+1],l=c[d+2],u=c[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),u=this.getBezierValue(i,d,3,f+36-2)}if(0==n){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*r,o.mixX=t.mixX+(l-t.mixX)*r,o.mixY=t.mixY+(u-t.mixY)*r}else o.mixRotate+=(h-o.mixRotate)*r,o.mixX+=(l-o.mixX)*r,o.mixY+=(u-o.mixY)*r}},kt=class extends Z{constructor(t,e,i){super(t,[K+"|"+e+"|"+i.sequence.id]),this.slotIndex=e,this.attachment=i}getFrameEntries(){return kt.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,i,s,r){let n=this.frames;n[t*=kt.ENTRIES]=e,n[t+kt.MODE]=i|s<<4,n[t+kt.DELAY]=r}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.attachment,l=this.attachment;if(!(h==l||h instanceof A&&h.timelineAttachment==l))return;let u=this.frames;if(i>4,m=this.attachment.sequence.regions.length,x=k[15&f];if(0!=x)switch(g+=(i-d)/p+1e-5|0,x){case 1:g=Math.min(m-1,g);break;case 2:g%=m;break;case 3:{let t=(m<<1)-2;g=0==t?0:g%t,g>=m&&(g=t-g);break}case 4:g=Math.max(m-1-g,0);break;case 5:g=m-1-g%m;break;case 6:{let t=(m<<1)-2;g=0==t?0:(g+m-1)%t,g>=m&&(g=t-g)}}o.sequenceIndex=g}},Tt=kt;Tt.ENTRIES=3,Tt.MODE=1,Tt.DELAY=2;var Rt=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Ft(this),this.propertyIDs=new a,this.animationsChanged=!1,this.trackEntryPool=new x((()=>new Pt)),this.data=t}static emptyAnimation(){return Rt._emptyAnimation}update(t){t*=this.timeScale;let e=this.tracks;for(let i=0,s=e.length;i0){if(s.delay-=r,s.delay>0)continue;r=-s.delay,s.delay=0}let n=s.next;if(n){let e=s.trackLast-n.delay;if(e>=0){for(n.delay=0,n.trackTime+=0==s.timeScale?0:(e/s.timeScale+t)*n.timeScale,s.trackTime+=r,this.setCurrent(i,n,!0);n.mixingFrom;)n.mixTime+=t,n=n.mixingFrom;continue}}else if(s.trackLast>=s.trackEnd&&!s.mixingFrom){e[i]=null,this.queue.end(s),this.clearNext(s);continue}if(s.mixingFrom&&this.updateMixingFrom(s,t)){let t=s.mixingFrom;for(s.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}s.trackTime+=r}this.queue.drain()}updateMixingFrom(t,e){let i=t.mixingFrom;if(!i)return!0;let s=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),s):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let e=this.events,i=this.tracks,s=!1;for(let n=0,a=i.length;n0)continue;s=!0;let o=0==n?1:a.mixBlend,h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let l=a.animationLast,u=a.getAnimationTime(),c=u,d=e;a.reverse&&(c=a.animation.duration-c,d=null);let f=a.animation.timelines,p=f.length;if(0==n&&1==h||3==o)for(let e=0;e1&&(r=1),1!=i&&(i=s.mixBlend));let n=r0&&this.queueEvents(s,d),this.events.length=0,s.nextAnimationLast=d,s.nextTrackLast=s.trackTime,r}applyAttachmentTimeline(t,e,i,s,r){var n=e.slots[t.slotIndex];n.bone.active&&(i0,s=t>=0;u.signum(e)!=u.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*u.signum(t)),s=i),d=f+t-t%360,s!=i&&(d+=360*u.signum(t)),n[a]=d}n[a+1]=f,h.rotation=l+d*s}queueEvents(t,e){let i=t.animationStart,s=t.animationEnd,r=s-i,n=t.trackLast%r,a=this.events,o=0,h=a.length;for(;os||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==r||n>t.trackTime%r:e>=s&&t.animationLast=this.tracks.length)return;let e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let i=e;for(;;){let t=i.mixingFrom;if(!t)break;this.queue.end(t),i.mixingFrom=null,i.mixingTo=null,i=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,i){let s=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,s&&(i&&this.queue.interrupt(s),e.mixingFrom=s,s.mixingTo=e,e.mixTime=0,s.mixingFrom&&s.mixDuration>0&&(e.interruptAlpha*=Math.min(1,s.mixTime/s.mixDuration)),s.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,i=!1){let s=this.data.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,s,i)}setAnimationWith(t,e,i=!1){if(!e)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));let n=this.trackEntry(t,e,i,r);return this.setCurrent(t,n,s),this.queue.drain(),n}addAnimation(t,e,i=!1,s=0){let r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,s)}addAnimationWith(t,e,i=!1,s=0){if(!e)throw new Error("animation cannot be null.");let r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;let n=this.trackEntry(t,e,i,r);return r?(r.next=n,n.previous=r,s<=0&&(s+=r.getTrackComplete()-n.mixDuration)):(this.setCurrent(t,n,!0),this.queue.drain()),n.delay=s,n}setEmptyAnimation(t,e=0){let i=this.setAnimationWith(t,Rt.emptyAnimation(),!1);return i.mixDuration=e,i.trackEnd=e,i}addEmptyAnimation(t,e=0,i=0){let s=this.addAnimationWith(t,Rt.emptyAnimation(),!1,i);return i<=0&&(s.delay+=s.mixDuration-e),s.mixDuration=e,s.trackEnd=e,s}setEmptyAnimations(t=0){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,i=this.tracks.length;e0){r[o]=Bt,n[o]=i;continue t}break}r[o]=_t}else r[o]=Lt}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},Ct=Rt;Ct._emptyAnimation=new T("",[],0);var Pt=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=2,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(t){this.animationLast=t,this.nextAnimationLast=t}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime(t[t.start=0]="start",t[t.interrupt=1]="interrupt",t[t.end=2]="end",t[t.dispose=3]="dispose",t[t.complete=4]="complete",t[t.event=5]="event",t))(Ot||{}),Yt=class{start(t){}interrupt(t){}end(t){}dispose(t){}complete(t){}event(t,e){}},Lt=0,Dt=1,Xt=2,_t=3,Bt=4,zt=1,Nt=2,Vt=class{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,i){let s=this.skeletonData.findAnimation(t);if(!s)throw new Error("Animation not found: "+t);let r=this.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);this.setMixWith(s,r,i)}setMixWith(t,e,i){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");let s=t.name+"."+e.name;this.animationToMixTime[s]=i}getMix(t,e){let i=t.name+"."+e.name,s=this.animationToMixTime[i];return void 0===s?this.defaultMix:s}},Ut=class extends A{constructor(t){super(t),this.color=new h(1,1,1,1)}copy(){let t=new Ut(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}},Wt=class extends A{constructor(t){super(t),this.endSlot=null,this.color=new h(.2275,.2275,.8078,1)}copy(){let t=new Wt(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}},qt=class{constructor(t){this._image=t}getImage(){return this._image}},Gt=(t=>(t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear",t))(Gt||{}),Ht=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(Ht||{}),jt=class{constructor(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}},$t=class extends qt{setFilters(t,e){}setWraps(t,e){}dispose(){}},Kt=class{constructor(t){this.pages=new Array,this.regions=new Array;let e=new Zt(t),i=new Array(4),s={size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},format:()=>{},filter:t=>{t.minFilter=g.enumValue(Gt,i[1]),t.magFilter=g.enumValue(Gt,i[2])},repeat:t=>{-1!=i[1].indexOf("x")&&(t.uWrap=10497),-1!=i[1].indexOf("y")&&(t.vWrap=10497)},pma:t=>{t.pma="true"==i[1]}};var r={xy:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2])},size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},bounds:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2]),t.width=parseInt(i[3]),t.height=parseInt(i[4])},offset:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2])},orig:t=>{t.originalWidth=parseInt(i[1]),t.originalHeight=parseInt(i[2])},offsets:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2]),t.originalWidth=parseInt(i[3]),t.originalHeight=parseInt(i[4])},rotate:t=>{let e=i[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:t=>{t.index=parseInt(i[1])}};let n=e.readLine();for(;n&&0==n.trim().length;)n=e.readLine();for(;n&&0!=n.trim().length&&0!=e.readEntry(i,n);)n=e.readLine();let a=null,o=null,h=null;for(;null!==n;)if(0==n.trim().length)a=null,n=e.readLine();else if(a){let t=new Jt(a,n);for(;;){let s=e.readEntry(i,n=e.readLine());if(0==s)break;let a=r[i[0]];if(a)a(t);else{o||(o=[]),h||(h=[]),o.push(i[0]);let t=[];for(let e=0;e0&&h&&h.length>0&&(t.names=o,t.values=h,o=null,h=null),t.u=t.x/a.width,t.v=t.y/a.height,90==t.degrees?(t.u2=(t.x+t.height)/a.width,t.v2=(t.y+t.width)/a.height):(t.u2=(t.x+t.width)/a.width,t.v2=(t.y+t.height)/a.height),this.regions.push(t)}else{for(a=new Qt(n.trim());0!=e.readEntry(i,n=e.readLine());){let t=s[i[0]];t&&t(a)}this.pages.push(a)}}findRegion(t){for(let e=0;e=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;let i=e.indexOf(":");if(-1==i)return 0;t[0]=e.substr(0,i).trim();for(let s=1,r=i+1;;s++){let i=e.indexOf(",",r);if(-1==i)return t[s]=e.substr(r).trim(),s;if(t[s]=e.substr(r,i-r).trim(),r=i+1,4==s)return 4}}},Qt=class{constructor(t){this.minFilter=9728,this.magFilter=9728,this.uWrap=33071,this.vWrap=33071,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.name=t}setTexture(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}},Jt=class extends jt{constructor(t,e){super(),this.x=0,this.y=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.index=0,this.degrees=0,this.names=null,this.values=null,this.page=t,this.name=e}},te=class extends A{constructor(t,e){super(t),this.region=null,this.regionUVs=[],this.uvs=[],this.triangles=[],this.color=new h(1,1,1,1),this.width=0,this.height=0,this.hullLength=0,this.edges=[],this.parentMesh=null,this.sequence=null,this.tempColor=new h(0,0,0,0),this.path=e}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=g.newFloatArray(t.length));let e=this.uvs,i=this.uvs.length,s=this.region.u,r=this.region.v,n=0,a=0;if(this.region instanceof Jt){let o=this.region,h=o.page.texture.getImage(),l=h.width,u=h.height;switch(o.degrees){case 90:s-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/u,n=o.originalHeight/l,a=o.originalWidth/u;for(let o=0;o= 0.");if(!e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}},oe=(t=>(t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection",t))(oe||{}),he=class{constructor(t,e,i){if(this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}isActive(){return this.active}update(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(t,e,i,s,r,n,a){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=s,this.ascaleY=r,this.ashearX=n,this.ashearY=a;let o=this.parent;if(!o){let o=this.skeleton,h=i+90+a,l=o.scaleX,c=o.scaleY;return this.a=u.cosDeg(i+n)*s*l,this.b=u.cosDeg(h)*r*l,this.c=u.sinDeg(i+n)*s*c,this.d=u.sinDeg(h)*r*c,this.worldX=t*l+o.x,void(this.worldY=e*c+o.y)}let h=o.a,l=o.b,c=o.c,d=o.d;switch(this.worldX=h*t+l*e+o.worldX,this.worldY=c*t+d*e+o.worldY,this.data.transformMode){case 0:{let t=i+90+a,e=u.cosDeg(i+n)*s,o=u.cosDeg(t)*r,f=u.sinDeg(i+n)*s,p=u.sinDeg(t)*r;return this.a=h*e+l*f,this.b=h*o+l*p,this.c=c*e+d*f,void(this.d=c*o+d*p)}case 1:{let t=i+90+a;this.a=u.cosDeg(i+n)*s,this.b=u.cosDeg(t)*r,this.c=u.sinDeg(i+n)*s,this.d=u.sinDeg(t)*r;break}case 2:{let t=h*h+c*c,e=0;t>1e-4?(t=Math.abs(h*d-l*c)/t,h/=this.skeleton.scaleX,c/=this.skeleton.scaleY,l=c*t,d=h*t,e=Math.atan2(c,h)*u.radDeg):(h=0,c=0,e=90-Math.atan2(d,l)*u.radDeg);let o=i+n-e,f=i+a-e+90,p=u.cosDeg(o)*s,g=u.cosDeg(f)*r,m=u.sinDeg(o)*s,x=u.sinDeg(f)*r;this.a=h*p-l*m,this.b=h*g-l*x,this.c=c*p+d*m,this.d=c*g+d*x;break}case 3:case 4:{let t=u.cosDeg(i),e=u.sinDeg(i),o=(h*t+l*e)/this.skeleton.scaleX,f=(c*t+d*e)/this.skeleton.scaleY,p=Math.sqrt(o*o+f*f);p>1e-5&&(p=1/p),o*=p,f*=p,p=Math.sqrt(o*o+f*f),3==this.data.transformMode&&h*d-l*c<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(p=-p);let g=Math.PI/2+Math.atan2(f,o),m=Math.cos(g)*p,x=Math.sin(g)*p,v=u.cosDeg(n)*s,y=u.cosDeg(90+a)*r,w=u.sinDeg(n)*s,b=u.sinDeg(90+a)*r;this.a=o*v+m*w,this.b=o*y+m*b,this.c=f*v+x*w,this.d=f*y+x*b;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}getWorldRotationX(){return Math.atan2(this.c,this.a)*u.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*u.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}updateAppliedTransform(){let t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*u.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*u.radDeg);let e=t.a,i=t.b,s=t.c,r=t.d,n=1/(e*r-i*s),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*n-o*i*n,this.ay=o*e*n-a*s*n;let h=n*r,l=n*e,c=n*i,d=n*s,f=h*this.a-c*this.c,p=h*this.b-c*this.d,g=l*this.c-d*this.a,m=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+g*g),this.ascaleX>1e-4){let t=f*m-p*g;this.ascaleY=t/this.ascaleX,this.ashearY=Math.atan2(f*p+g*m,t)*u.radDeg,this.arotation=Math.atan2(g,f)*u.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,p)*u.radDeg}worldToLocal(t){let e=1/(this.a*this.d-this.b*this.c),i=t.x-this.worldX,s=t.y-this.worldY;return t.x=i*this.d*e-s*this.b*e,t.y=s*this.a*e-i*this.c*e,t}localToWorld(t){let e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t}worldToLocalRotation(t){let e=u.sinDeg(t),i=u.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*u.radDeg+this.rotation-this.shearX}localToWorldRotation(t){t-=this.rotation-this.shearX;let e=u.sinDeg(t),i=u.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*u.radDeg}rotateWorld(t){let e=this.a,i=this.b,s=this.c,r=this.d,n=u.cosDeg(t),a=u.sinDeg(t);this.a=n*e-a*s,this.b=n*i-a*r,this.c=a*e+n*s,this.d=a*i+n*r}},le=class{constructor(t,e,i){this.name=t,this.order=e,this.skinRequired=i}},ue=class{constructor(t,e="",i=new ce){this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=t,this.pathPrefix=e,this.downloader=i}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,i){this.toLoad--,this.loaded++,this.assets[e]=i,t&&t(e,i)}error(t,e,i){this.toLoad--,this.loaded++,this.errors[e]=i,t&&t(e,i)}loadAll(){return new Promise(((t,e)=>{let i=()=>{this.isLoadingComplete()?this.hasErrors()?e(this.errors):t(this):requestAnimationFrame(i)};requestAnimationFrame(i)}))}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadBinary(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load binary ${t}: status ${e}, ${s}`)}))}loadText(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadText(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load text ${t}: status ${e}, ${s}`)}))}loadJson(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadJson(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load JSON ${t}: status ${e}, ${s}`)}))}loadTexture(t,e=(()=>{}),i=(()=>{})){if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then((e=>e.ok?e.blob():(this.error(i,t,`Couldn't load image: ${t}`),null))).then((t=>t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null)).then((i=>{i&&this.success(e,t,this.textureLoader(i))}));else{let s=new Image;s.crossOrigin="anonymous",s.onload=()=>{this.success(e,t,this.textureLoader(s))},s.onerror=()=>{this.error(i,t,`Couldn't load image: ${t}`)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),s.src=t}}loadTextureAtlas(t,e=(()=>{}),i=(()=>{}),s){let r=t.lastIndexOf("/"),n=r>=0?t.substring(0,r+1):"";t=this.start(t),this.downloader.downloadText(t,(r=>{try{let a=new Kt(r),o=a.pages.length,h=!1;for(let r of a.pages)this.loadTexture(s?s[r.name]:n+r.name,((i,s)=>{h||(r.setTexture(s),0==--o&&this.success(e,t,a))}),((e,s)=>{h||this.error(i,t,`Couldn't load texture atlas ${t} page image: ${e}`),h=!0}))}catch(e){this.error(i,t,`Couldn't parse texture atlas ${t}: ${e.message}`)}}),((e,s)=>{this.error(i,t,`Couldn't load texture atlas ${t}: status ${e}, ${s}`)}))}get(t){return this.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;let e=this.assets[t];if(e)return e;let i=this.errors[t];throw Error("Asset not found: "+t+(i?"\n"+i:""))}remove(t){t=this.pathPrefix+t;let e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}removeAll(){for(let t in this.assets){let e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}isLoadingComplete(){return 0==this.toLoad}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}},ce=class{constructor(){this.callbacks={},this.rawDataUris={}}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return-1!=e?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){for(var e=window.atob(t),i=e.length,s=new Uint8Array(i),r=0;r{this.finish(t,s.status,s.responseText)};s.onload=r,s.onerror=r,s.send()}downloadJson(t,e,i){this.downloadText(t,(t=>{e(JSON.parse(t))}),i)}downloadBinary(t,e,i){if(this.start(t,e,i))return;if(this.rawDataUris[t]){try{let e=this.rawDataUris[t];this.finish(t,200,this.dataUriToUint8Array(e))}catch(e){this.finish(t,400,JSON.stringify(e))}return}let s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer";let r=()=>{this.finish(t,s.status,s.response)};s.onload=()=>{200==s.status||0==s.status?this.finish(t,200,new Uint8Array(s.response)):r()},s.onerror=r,s.send()}start(t,e,i){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,i)}}finish(t,e,i){let s=this.callbacks[t];delete this.callbacks[t];let r=200==e||0==e?[i]:[e,i];for(let t=r.length-1,e=s.length;t180?f-=360:f<-180&&(f+=360);let m=t.ascaleX,x=t.ascaleY;if(s||r){switch(t.data.transformMode){case 3:case 4:p=e-t.worldX,g=i-t.worldY}let o=t.data.length*m,h=Math.sqrt(p*p+g*g);if(s&&ho&&o>1e-4){let t=(h/o-1)*a+1;m*=t,n&&(x*=t)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,m,x,t.ashearX,t.ashearY)}apply2(t,e,i,s,r,n,a,o,h){let l=t.ax,c=t.ay,d=t.ascaleX,f=t.ascaleY,p=d,g=f,m=e.ascaleX,x=0,v=0,y=0;d<0?(d=-d,x=180,y=-1):(x=0,y=1),f<0&&(f=-f,y=-y),m<0?(m=-m,v=180):v=0;let w=e.ax,b=0,M=0,A=0,S=t.a,E=t.b,I=t.c,k=t.d,T=Math.abs(d-f)<=1e-4;!T||n?(b=0,M=S*w+t.worldX,A=I*w+t.worldY):(b=e.ay,M=S*w+E*b+t.worldX,A=I*w+k*b+t.worldY);let R=t.parent;if(!R)throw new Error("IK parent must itself have a parent.");S=R.a,E=R.b,I=R.c,k=R.d;let C,P,F=1/(S*k-E*I),O=M-R.worldX,Y=A-R.worldY,L=(O*k-Y*E)*F-l,D=(Y*S-O*I)*F-c,X=Math.sqrt(L*L+D*D),_=e.data.length*m;if(X<1e-4)return this.apply1(t,i,s,!1,n,!1,h),void e.updateWorldTransformWith(w,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);O=i-R.worldX,Y=s-R.worldY;let B=(O*k-Y*E)*F-l,z=(Y*S-O*I)*F-c,N=B*B+z*z;if(0!=o){o*=d*(m+1)*.5;let t=Math.sqrt(N),e=t-X-_*d+o;if(e>0){let i=Math.min(1,e/(2*o))-1;i=(e-o*(1-i*i))/t,B-=i*B,z-=i*z,N=B*B+z*z}}t:if(T){_*=d;let t=(N-X*X-_*_)/(2*X*_);t<-1?(t=-1,P=Math.PI*r):t>1?(t=1,P=0,n&&(S=(Math.sqrt(N)/(X+_)-1)*h+1,p*=S,a&&(g*=S))):P=Math.acos(t)*r,S=X+_*t,E=_*Math.sin(P),C=Math.atan2(z*S-B*E,B*S+z*E)}else{S=d*_,E=f*_;let t=S*S,e=E*E,i=Math.atan2(z,B);I=e*X*X+t*N-t*e;let s=-2*e*X,n=e-t;if(k=s*s-4*n*I,k>=0){let t=Math.sqrt(k);s<0&&(t=-t),t=.5*-(s+t);let e=t/n,a=I/t,o=Math.abs(e)=-1&&I<=1&&(I=Math.acos(I),O=S*Math.cos(I)+X,Y=E*Math.sin(I),k=O*O+Y*Y,kg&&(c=I,g=k,p=O,m=Y)),N<=.5*(h+g)?(C=i-Math.atan2(l*r,o),P=a*r):(C=i-Math.atan2(m*r,p),P=c*r)}let V=Math.atan2(b,w)*y,U=t.arotation;C=(C-V)*u.radDeg+x-U,C>180?C-=360:C<-180&&(C+=360),t.updateWorldTransformWith(l,c,U+C*h,p,g,0,0),U=e.arotation,P=((P+V)*u.radDeg-e.ashearX)*y+v-U,P>180?P-=360:P<-180&&(P+=360),e.updateWorldTransformWith(w,b,U+P*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}},ge=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.softness=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},me=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.positionMode=xe.Fixed,this.spacingMode=ve.Fixed,this.rotateMode=ye.Chain,this.offsetRotation=0,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}},xe=(t=>(t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent",t))(xe||{}),ve=(t=>(t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional",t))(ve||{}),ye=(t=>(t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale",t))(ye||{}),we=class{constructor(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(let i=0,s=t.bones.length;i0){t=l/t*f;for(let e=1;e0?u.degRad:-u.degRad}for(let t=0,r=3;t0){let i=h.a,s=h.b,a=h.c,o=h.d,l=0,d=0,f=0;if(l=n?p[r-1]:0==c[t+1]?p[r+2]:Math.atan2(w,g),l-=Math.atan2(a,i),y){d=Math.cos(l),f=Math.sin(l);let t=h.data.length;m+=(t*(d*i-f*a)-g)*e,x+=(t*(f*i+d*a)-w)*e}else l+=v;l>u.PI?l-=u.PI2:l<-u.PI&&(l+=u.PI2),l*=e,d=Math.cos(l),f=Math.sin(l),h.a=d*i-f*a,h.b=d*s-f*o,h.c=f*i+d*a,h.d=f*s+d*o}h.updateAppliedTransform()}}computeWorldPositions(t,e,i){let s=this.target,r=this.position,n=this.spaces,a=g.setArraySize(this.positions,3*e+2),o=this.world,h=t.closed,l=t.worldVerticesLength,u=l/6,c=we.NONE;if(!t.constantSpeed){let d=t.lengths;u-=h?1:2;let f,p=d[u];switch(1==this.data.positionMode&&(r*=p),this.data.spacingMode){case 2:f=p;break;case 3:f=p/e;break;default:f=1}o=g.setArraySize(this.world,8);for(let g=0,m=0,x=0;gp){c!=we.AFTER&&(c=we.AFTER,t.computeWorldVertices(s,l-6,4,o,0,2)),this.addAfterPosition(v-p,o,0,a,m);continue}}for(;;x++){let t=d[x];if(!(v>t)){if(0==x)v/=t;else{let e=d[x-1];v=(v-e)/(t-e)}break}}x!=c&&(c=x,h&&x==u?(t.computeWorldVertices(s,l-4,4,o,0,2),t.computeWorldVertices(s,0,4,o,4,2)):t.computeWorldVertices(s,6*x+2,8,o,0,2)),this.addCurvePosition(v,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],a,m,i||g>0&&0==e)}return a}h?(l+=2,o=g.setArraySize(this.world,l),t.computeWorldVertices(s,2,l-4,o,0,2),t.computeWorldVertices(s,0,2,o,l-4,2),o[l-2]=o[0],o[l-1]=o[1]):(u--,l-=4,o=g.setArraySize(this.world,l),t.computeWorldVertices(s,2,l,o,0,2));let d,f=g.setArraySize(this.curves,u),p=0,m=o[0],x=o[1],v=0,y=0,w=0,b=0,M=0,A=0,S=0,E=0,I=0,k=0,T=0,R=0,C=0,P=0;for(let t=0,e=2;tp){this.addAfterPosition(Y-p,o,l-4,a,s);continue}}for(;;u++){let t=f[u];if(!(Y>t)){if(0==u)Y/=t;else{let e=f[u-1];Y=(Y-e)/(t-e)}break}}if(u!=c){c=u;let t=6*u;for(m=o[t],x=o[t+1],v=o[t+2],y=o[t+3],w=o[t+4],b=o[t+5],M=o[t+6],A=o[t+7],S=.03*(m-2*v+w),E=.03*(x-2*y+b),I=.006*(3*(v-w)-m+M),k=.006*(3*(y-b)-x+A),T=2*S+I,R=2*E+k,C=.3*(v-m)+S+.16666667*I,P=.3*(y-x)+E+.16666667*k,O=Math.sqrt(C*C+P*P),F[0]=O,t=1;t<8;t++)C+=T,P+=R,T+=I,R+=k,O+=Math.sqrt(C*C+P*P),F[t]=O;C+=T,P+=R,O+=Math.sqrt(C*C+P*P),F[8]=O,C+=T+I,P+=R+k,O+=Math.sqrt(C*C+P*P),F[9]=O,g=0}for(Y*=O;;g++){let t=F[g];if(!(Y>t)){if(0==g)Y/=t;else{let e=F[g-1];Y=g+(Y-e)/(t-e)}break}}this.addCurvePosition(.1*Y,m,x,v,y,w,b,M,A,a,s,i||t>0&&0==e)}return a}addBeforePosition(t,e,i,s,r){let n=e[i],a=e[i+1],o=e[i+2]-n,h=e[i+3]-a,l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addAfterPosition(t,e,i,s,r){let n=e[i+2],a=e[i+3],o=n-e[i],h=a-e[i+1],l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addCurvePosition(t,e,i,s,r,n,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=i,void(l[u+2]=Math.atan2(r-i,s-e));let d=t*t,f=d*t,p=1-t,g=p*p,m=g*p,x=p*t,v=3*x,y=p*v,w=v*t,b=e*m+s*y+n*w+o*f,M=i*m+r*y+a*w+h*f;l[u]=b,l[u+1]=M,c&&(l[u+2]=t<.001?Math.atan2(r-i,s-e):Math.atan2(M-(i*g+r*x*2+a*d),b-(e*g+s*x*2+n*d)))}},be=we;be.NONE=-1,be.BEFORE=-2,be.AFTER=-3,be.epsilon=1e-5;var Me=class{constructor(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(t instanceof A&&this.attachment instanceof A&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},Ae=class{constructor(t,e){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new v,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(let i=0;i0?u.degRad:-u.degRad,p=this.data.offsetRotation*f,g=this.data.offsetShearY*f,m=this.bones;for(let f=0,x=m.length;fu.PI?n-=u.PI2:n<-u.PI&&(n+=u.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=(t.x-x.worldX)*e,x.worldY+=(t.y-x.worldY)*i}if(0!=s){let t=Math.sqrt(x.a*x.a+x.c*x.c);0!=t&&(t=(t+(Math.sqrt(h*h+c*c)-t+this.data.offsetScaleX)*s)/t),x.a*=t,x.c*=t}if(0!=r){let t=Math.sqrt(x.b*x.b+x.d*x.d);0!=t&&(t=(t+(Math.sqrt(l*l+d*d)-t+this.data.offsetScaleY)*r)/t),x.b*=t,x.d*=t}if(n>0){let t=x.b,e=x.d,i=Math.atan2(e,t),s=Math.atan2(d,l)-Math.atan2(c,h)-(i-Math.atan2(x.c,x.a));s>u.PI?s-=u.PI2:s<-u.PI&&(s+=u.PI2),s=i+(s+g)*n;let r=Math.sqrt(t*t+e*e);x.b=Math.cos(s)*r,x.d=Math.sin(s)*r}x.updateAppliedTransform()}}applyRelativeWorld(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=0!=e||0!=i,o=this.target,h=o.a,l=o.b,c=o.c,d=o.d,f=h*d-l*c>0?u.degRad:-u.degRad,p=this.data.offsetRotation*f,g=this.data.offsetShearY*f,m=this.bones;for(let f=0,x=m.length;fu.PI?n-=u.PI2:n<-u.PI&&(n+=u.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=t.x*e,x.worldY+=t.y*i}if(0!=s){let t=(Math.sqrt(h*h+c*c)-1+this.data.offsetScaleX)*s+1;x.a*=t,x.c*=t}if(0!=r){let t=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*r+1;x.b*=t,x.d*=t}if(n>0){let t=Math.atan2(d,l)-Math.atan2(c,h);t>u.PI?t-=u.PI2:t<-u.PI&&(t+=u.PI2);let e=x.b,i=x.d;t=Math.atan2(i,e)+(t-u.PI/2+g)*n;let s=Math.sqrt(e*e+i*i);x.b=Math.cos(t)*s,x.d=Math.sin(t)*s}x.updateAppliedTransform()}}applyAbsoluteLocal(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=this.target,o=this.bones;for(let h=0,l=o.length;h=s.length&&(s.length=t+1),s[t]||(s[t]={}),s[t][e]=i}addSkin(t){for(let e=0;e= 0.");if(!e)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}},Ce=(t=>(t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen",t))(Ce||{}),Pe=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Fe=class{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){let e=this.scale,i=new Ie;i.name="";let s=new Oe(t),r=s.readInt32(),n=s.readInt32();i.hash=0==n&&0==r?null:n.toString(16)+r.toString(16),i.version=s.readString(),i.x=s.readFloat(),i.y=s.readFloat(),i.width=s.readFloat(),i.height=s.readFloat();let a=s.readBoolean();a&&(i.fps=s.readFloat(),i.imagesPath=s.readString(),i.audioPath=s.readString());let o=0;o=s.readInt(!0);for(let t=0;t>4,t.readFloat())}s.push(e);break}}}}}let n=t.readInt(!0);if(n>0){let e=new bt(n),r=i.slots.length;for(let i=0;i=0;t--)a[t]=-1;let o=g.newArray(r-n,0),h=0,l=0;for(let e=0;e=0;t--)-1==a[t]&&(a[t]=o[--l]);e.setFrame(i,s,a)}s.push(e)}let a=t.readInt(!0);if(a>0){let e=new yt(a);for(let s=0;s>>1^-(1&i)}readStringRef(){let t=this.readInt(!0);return 0==t?null:this.strings[t-1]}readString(){let t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;let e="";for(let i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(t),i++}}return e}readFloat(){let t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}},Ye=class{constructor(t,e,i,s,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=s,this.inheritTimeline=r}},Le=class{constructor(t=null,e=null){this.bones=t,this.vertices=e}},De=(t=>(t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping",t))(De||{});function Xe(t,e,i){let s=t.readFloat(),r=t.readFloat()*i;for(let n=0,a=0,o=e.getFrameCount()-1;e.setFrame(n,s,r),n!=o;n++){let o=t.readFloat(),h=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(n);break;case li:Be(t,e,a++,n,0,s,o,r,h,i)}s=o,r=h}return e}function _e(t,e,i){let s=t.readFloat(),r=t.readFloat()*i,n=t.readFloat()*i;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,s,r,n),a!=h;a++){let h=t.readFloat(),l=t.readFloat()*i,u=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(a);break;case li:Be(t,e,o++,a,0,s,h,r,l,i),Be(t,e,o++,a,1,s,h,n,u,i)}s=h,r=l,n=u}return e}function Be(t,e,i,s,r,n,a,o,h,l){e.setBezier(i,s,r,n,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,a,h)}var ze,Ne=0,Ve=1,Ue=2,We=3,qe=4,Ge=5,He=6,je=7,$e=8,Ke=9,Ze=0,Qe=1,Je=2,ti=3,ei=4,ii=5,si=0,ri=1,ni=0,ai=1,oi=2,hi=1,li=2,ui=class{constructor(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new x((()=>g.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");let i=this.boundingBoxes,s=this.polygons,r=this.polygonPool,n=t.slots,a=n.length;i.length=0,r.freeAll(s),s.length=0;for(let t=0;t=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,i,s){let r=this.minX,n=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=n&&s<=n||t>=a&&i>=a||e>=o&&s>=o)return!1;let h=(s-e)/(i-t),l=h*(r-t)+e;if(l>n&&ln&&lr&&ur&&ut.minX&&this.minYt.minY}containsPoint(t,e){let i=this.polygons;for(let s=0,r=i.length;s=i||o=i){let h=s[t];h+(i-r)/(o-r)*(s[n]-h)=u&&x<=a||x>=a&&x<=u)&&(x>=e&&x<=s||x>=s&&x<=e)){let t=(l*g-h*f)/m;if((t>=c&&t<=d||t>=d&&t<=c)&&(t>=i&&t<=r||t>=r&&t<=i))return!0}u=a,c=d}return!1}getPolygon(t){if(!t)throw new Error("boundingBox cannot be null.");let e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}},ci=class{constructor(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new x((()=>new Array)),this.polygonIndicesPool=new x((()=>new Array))}triangulate(t){let e=t,i=t.length>>1,s=this.indicesArray;s.length=0;for(let t=0;t3;){let t=i-1,a=0,o=1;for(;;){t:if(!r[a]){let n=s[t]<<1,h=s[a]<<1,l=s[o]<<1,u=e[n],c=e[n+1],d=e[h],f=e[h+1],p=e[l],g=e[l+1];for(let n=(o+1)%i;n!=t;n=(n+1)%i){if(!r[n])continue;let t=s[n]<<1,i=e[t],a=e[t+1];if(ci.positiveArea(p,g,u,c,i,a)&&ci.positiveArea(u,c,d,f,i,a)&&ci.positiveArea(d,f,p,g,i,a))break t}break}if(0==o){do{if(!r[a])break;a--}while(a>0);break}t=a,a=o,o=(o+1)%i}n.push(s[(i+a-1)%i]),n.push(s[a]),n.push(s[(a+1)%i]),s.splice(a,1),r.splice(a,1),i--;let h=(i+a-1)%i,l=a==i?0:a;r[h]=ci.isConcave(h,i,e,s),r[l]=ci.isConcave(l,i,e,s)}return 3==i&&(n.push(s[2]),n.push(s[0]),n.push(s[1])),n}decompose(t,e){let i=t,s=this.convexPolygons;this.polygonPool.freeAll(s),s.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let n=this.polygonIndicesPool.obtain();n.length=0;let a=this.polygonPool.obtain();a.length=0;let o=-1,h=0;for(let t=0,l=e.length;t0?(s.push(a),r.push(n)):(this.polygonPool.free(a),this.polygonIndicesPool.free(n)),a=this.polygonPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),a.push(g),a.push(m),a.push(x),n=this.polygonIndicesPool.obtain(),n.length=0,n.push(l),n.push(u),n.push(c),h=ci.winding(d,f,p,g,m,x),o=l)}a.length>0&&(s.push(a),r.push(n));for(let t=0,e=s.length;t=0;t--)a=s[t],0==a.length&&(s.splice(t,1),this.polygonPool.free(a),n=r[t],r.splice(t,1),this.polygonIndicesPool.free(n));return s}static isConcave(t,e,i,s){let r=s[(e+t-1)%e]<<1,n=s[t]<<1,a=s[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[n],i[n+1],i[a],i[a+1])}static positiveArea(t,e,i,s,r,n){return t*(n-s)+i*(e-n)+r*(s-e)>=0}static winding(t,e,i,s,r,n){let a=i-t,o=s-e;return r*o-n*a+a*e-t*o>=0?1:-1}},di=class{constructor(){this.triangulator=new ci,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}clipStart(t,e){if(this.clipAttachment)return 0;this.clipAttachment=e;let i=e.worldVerticesLength,s=g.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,s,0,2);let r=this.clippingPolygon;di.makeClockwise(r);let n=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let t=0,e=n.length;t>1,R=this.clipOutput,C=g.setArraySize(l,e+T*f);for(let h=0;h=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(s),h.push(r),h.push(n),h.push(t),h.push(e),o.length=0;let c=a,d=a.length-4;for(let t=0;;t+=2){let e=c[t],i=c[t+1],s=c[t+2],r=c[t+3],n=e-s,a=i-r,f=h,p=h.length-2,g=o.length;for(let t=0;t0;if(n*(l-r)-a*(h-s)>0){if(p){o.push(c),o.push(d);continue}let t=d-l,n=c-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let u=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*u),o.push(i+(r-i)*u)}else o.push(e),o.push(i)}else if(p){let t=d-l,n=c-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let u=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*u),o.push(i+(r-i)*u)}else o.push(e),o.push(i);o.push(c),o.push(d)}u=!0}if(g==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),t==d)break;let m=o;(o=h).length=0,h=m}if(l!=o){l.length=0;for(let t=0,e=o.length-2;t>1;t=0;e--)-1==o[e]&&(o[e]=t[--r])}e.setFrame(n,vi(a,"time",0),o)}r.push(e)}if(t.events){let e=new yt(t.events.length),s=0;for(let r=0;rnew wi(t)),t,e)}},Mi=g.newFloatArray(8),Ai=class{constructor(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=g.newFloatArray(8192),this.tempColor=new h,this.ctx=t}draw(t){this.triangleRendering?this.drawTriangles(t):this.drawImages(t)}drawImages(t){let e=this.ctx,i=this.tempColor,s=t.color,r=t.drawOrder;this.debugRendering&&(e.strokeStyle="green");for(let t=0,n=r.length;t{if(n&&"object"==typeof n||"function"==typeof n)for(let h of i(n))s.call(r,h)||h===a||t(r,h,{get:()=>n[h],enumerable:!(o=e(n,h))||o.enumerable});return r})(t({},"__esModule",{value:!0}),yi)})();t.exports=e}).call(window)},3524:(t,e,i)=>{var s=i(7473),r=i(4597),n=i(6732),a=i(2482),o=i(704),h=i(3137),l=i(1192),u=new s({Extends:h,initialize:function(t,e,i,s,n,u,c){var d,f,p,g=[],m=t.cacheManager.custom.spine;if(a(e)){var x=e;for(e=r(x,"key"),f=new o(t,{key:e,url:r(x,"jsonURL"),extension:r(x,"jsonExtension","json"),xhrSettings:r(x,"jsonXhrSettings")}),s=r(x,"atlasURL"),n=r(x,"preMultipliedAlpha"),Array.isArray(s)||(s=[s]),d=0;d{var s=i(2494),r=i(7473),n=i(5851),a=i(3527),o=i(5722),h={canvas:i(5159),webgl:i(5159)},l=i(3524),u=i(8332),c=i(5782),d=i(1984),f=new r({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:d,postRender:d,render:d,destroy:d});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,s,r,n){var a=this.scene.sys[i],o=new u(this.scene,a,t,e,s,r,n);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var r=n(t,"key",null),a=n(t,"animationName",null),o=n(t,"loop",!1),h=this.scene.sys[i],l=new u(this.scene,h,0,0,r,a,o);void 0!==e&&(t.add=e),s(this.scene,l,t);var c=n(t,"skinName",!1);c&&l.setSkinByName(c);var d=n(t,"slotName",!1),f=n(t,"attachmentName",null);return d&&l.setAttachment(d,f),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,s){var r=this.scene.sys[i],n=new c(this.scene,r,t,e,s);return this.displayList.add(n),n}),(function(t,e){void 0===t&&(t={});var r=n(t,"x",0),a=n(t,"y",0),o=n(t,"children",null),h=this.scene.sys[i],l=new c(this.scene,h,r,a,o);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(a,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=this.renderer.spineSceneRenderer;t||(t=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0),this.renderer.spineSceneRenderer=t),this.sceneRenderer=t,this.skeletonRenderer=t.skeletonRenderer,this.skeletonDebugRenderer=t.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures;i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures,n=this.sceneRenderer.context.gl;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(n,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,s,r,n,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h{var s=i(7473),r=i(7361),n=i(7738),a=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n){r.call(this,t,i,s,n),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},8064:t=>{t.exports=function(t,e,i,s){var r=e.list;if(0!==r.length){i.addToRenderList(e);var n=e.localTransform;s?(n.loadIdentity(),n.multiply(s),n.translate(e.x,e.y),n.rotate(e.rotation),n.scale(e.scaleX,e.scaleY)):n.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var s=i(1984),r=i(1984);r=i(8064),t.exports={renderWebGL:s,renderCanvas:r}},6576:t=>{t.exports="complete"},8621:t=>{t.exports="dispose"},8944:t=>{t.exports="end"},7494:t=>{t.exports="event"},1908:t=>{t.exports="interrupted"},5591:t=>{t.exports="start"},5146:(t,e,i)=>{t.exports={COMPLETE:i(6576),DISPOSE:i(8621),END:i(8944),EVENT:i(7494),INTERRUPTED:i(1908),START:i(5591)}},8332:(t,e,i)=>{var s=i(6412),r=i(2915),n=i(7473),a=i(1991),o=i(3131),h=i(9660),l=i(4627),u=i(3212),c=i(8414),d=i(3426),f=i(7149),p=i(2273),g=i(4208),m=i(5146),x=i(2762),v=new n({Extends:p,Mixins:[a,o,h,l,u,c,x],initialize:function(t,e,i,s,r,n,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,s),r&&this.setSkeleton(r,n,a)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var s=this.plugin,r=s.sceneRenderer;s.gl&&r.batcher.isDrawing&&(r.end(),s.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,s=(t>>8&255)/255,r=(255&t)/255,n=t>16777215?(t>>>24)/255:null,a=this.skeleton;if(e){var o=this.findSlot(e);o&&(a=o)}return a.color.r=i,a.color.g=s,a.color.b=r,null!==n&&(a.color.a=n),this},setSkeletonFromJSON:function(t,e,i,s){return this.setSkeleton(t,e,i,s)},setSkeleton:function(t,e,i,s){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,s);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var n=r.skeleton;return n.setSkin(),n.setToSetupPose(),this.skeleton=n,r=this.plugin.createAnimationState(n),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=g(d(this.rotation))+90),this.state.apply(n),n.updateCache(),this.updateSize()},onComplete:function(t){this.emit(m.COMPLETE,t)},onDispose:function(t){this.emit(m.DISPOSE,t)},onEnd:function(t){this.emit(m.END,t)},onEvent:function(t,e){this.emit(m.EVENT,t,e)},onInterrupted:function(t){this.emit(m.INTERRUPTED,t)},onStart:function(t){this.emit(m.START,t)},refresh:function(){return this.root&&(this.root.rotation=g(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,s){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===s&&(s=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-s,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,s=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=i,t.scaleY=s,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i{var s=i(3426),r=i(4208),n=i(8445);t.exports=function(t,e,i,a){var o=t.currentContext,h=e.plugin,l=e.skeleton,u=h.skeletonRenderer,c=t._tempMatrix1,d=t._tempMatrix2,f=t._tempMatrix3;i.addToRenderList(e),d.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),c.copyFrom(i.matrix),a?(c.multiplyWithOffset(a,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),d.e=e.x,d.f=e.y,c.multiply(d,f)):(d.e-=i.scrollX*e.scrollFactorX,d.f-=i.scrollY*e.scrollFactorY,c.multiply(d,f)),l.x=f.tx,l.y=f.ty,l.scaleX=f.scaleX,l.scaleY=-1*f.scaleY,e.scaleX<0?(l.scaleX*=-1,e.root.rotation=r(f.rotationNormalized)):e.root.rotation=n(r(s(f.rotationNormalized))+90,0,360),e.scaleY<0&&(l.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*r(f.rotationNormalized):e.root.rotation+=2*r(f.rotationNormalized)),i.renderToTexture&&(l.y=f.ty,l.scaleY*=-1),l.updateWorldTransform(),u.ctx=o,u.debugRendering=h.drawDebug||e.drawDebug,o.save(),u.draw(l),o.restore()}},2762:(t,e,i)=>{var s=i(1984),r=i(1984),n=i(1984);r=i(2753),t.exports={renderWebGL:s,renderCanvas:r,renderDirect:n}},9454:(t,e,i)=>{var s={VERSION:"3.70.0",BlendModes:i(8351),ScaleModes:i(8196),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},1081:(t,e,i)=>{var s=i(7473),r=i(6748),n=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{t.exports="changedata"},7801:t=>{t.exports="changedata-"},4873:t=>{t.exports="destroy"},9966:t=>{t.exports="removedata"},4586:t=>{t.exports="setdata"},6748:(t,e,i)=>{t.exports={CHANGE_DATA:i(9044),CHANGE_DATA_KEY:i(7801),DESTROY:i(4873),REMOVE_DATA:i(9966),SET_DATA:i(4586)}},3004:(t,e,i)=>{var s=i(2776),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(r.ogg=i('ogg; codecs="vorbis"'),r.opus=i('ogg; codecs="opus"',"opus"),r.mp3=i("mpeg"),r.wav=i("wav"),r.m4a=i("x-m4a"),r.aac=i("aac"),r.flac=i("flac","x-flac"),r.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)r.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var n=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===n&&a>=11||n>10)&&(r.dolby=!0)}}}catch(t){}return r}()},2776:(t,e,i)=>{var s,r=i(5203),n={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edg\/\d+/.test(s)?(n.edge=!0,n.es2019=!0):/OPR/.test(s)?(n.opera=!0,n.es2019=!0):/Chrome\/(\d+)/.test(s)&&!r.windowsPhone?(n.chrome=!0,n.chromeVersion=parseInt(RegExp.$1,10),n.es2019=n.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(n.firefox=!0,n.firefoxVersion=parseInt(RegExp.$1,10),n.es2019=n.firefoxVersion>10):/AppleWebKit/.test(s)&&r.iOS?(n.mobileSafari=!0,n.es2019=!0):/MSIE (\d+\.\d+);/.test(s)?(n.ie=!0,n.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(s)&&!r.windowsPhone?(n.safari=!0,n.safariVersion=parseInt(RegExp.$1,10),n.es2019=n.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(n.ie=!0,n.trident=!0,n.tridentVersion=parseInt(RegExp.$1,10),n.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(n.silk=!0),n)},6505:(t,e,i)=>{var s,r,n,a=i(8073),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(n=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(n,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+r},n.src=s+"AP804Oa6"+r,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return a.remove(this),s}()),o)},6543:(t,e,i)=>{var s=i(5203),r=i(2776),n=i(8073),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=n.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=n.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=s.data instanceof Uint8ClampedArray,n.remove(t),n.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(a.getUserMedia=!1),!s.iOS&&(r.ie||r.firefox||r.chrome)&&(a.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},3922:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",r=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(2776),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},5203:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},2131:(t,e,i)=>{var s=i(4597),r={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};t.exports=function(){if("function"==typeof importScripts)return r;var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(r.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(r.h264=!0,r.mp4=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(r.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(r.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(r.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,"")&&(r.hls=!0))}catch(t){}return t.parentNode&&t.parentNode.removeChild(t),r.getVideoURL=function(t){Array.isArray(t)||(t=[t]);for(var e=0;e{t.exports={os:i(5203),browser:i(2776),features:i(6543),input:i(1454),audio:i(3004),video:i(2131),fullscreen:i(3922),canvasFeatures:i(6505)}},5686:(t,e,i)=>{var s=i(7473),r=new Float32Array(20),n=new s({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(t){return this._matrix.set(t),this._dirty=!0,this},reset:function(){var t=this._matrix;return t.fill(0),t[0]=1,t[6]=1,t[12]=1,t[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var t=this._data;return this._dirty&&(t.set(this._matrix),t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._dirty=!1),t},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),r=.213,n=.715,a=.072;return this.multiply([r+.787*i+s*-r,n+i*-n+s*-n,a+i*-a+.928*s,0,0,r+i*-r+.143*s,n+i*(1-n)+.14*s,a+i*-a+-.283*s,0,0,r+i*-r+-.787*s,n+i*-n+s*n,a+.928*i+s*a,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply(n.BLACK_WHITE,t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply(n.NEGATIVE,t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply(n.DESATURATE_LUMINANCE,t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply(n.SEPIA,t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply(n.LSD,t)},brown:function(t){return void 0===t&&(t=!1),this.multiply(n.BROWN,t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply(n.VINTAGE,t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply(n.KODACHROME,t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply(n.TECHNICOLOR,t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply(n.POLAROID,t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply(n.SHIFT_BGR,t)},multiply:function(t,e){void 0===e&&(e=!1),e||this.reset();var i=this._matrix,s=r;return s.set(i),i.set([s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19]]),this._dirty=!0,this}});n.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],n.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],n.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],n.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],n.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],n.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],n.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],n.KODACHROME=[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],n.TECHNICOLOR=[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],n.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],n.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t.exports=n},8073:(t,e,i)=>{var s,r,n,a=i(9454),o=i(2150),h=[],l=!1;t.exports=(n=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,a.CANVAS)},create:s=function(t,e,i,s,n){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=a.CANVAS),void 0===n&&(n=!1);var c=r(s);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:s},s===a.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),n&&(c.parent=u),u.width=e,u.height=i,l&&s===a.CANVAS&&o.disable(u.getContext("2d",{willReadFrequently:!1})),u},createWebGL:function(t,e,i){return s(t,e,i,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{var s=i(7473),r=i(3649),n=new s({initialize:function(t,e,i,s,r,n){e||(e=t.sys.make.image({x:i,y:s,key:r,frame:n,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,i,s,r){return new n(this.scene,t,e,i,s,r)})),t.exports=n},6726:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,r=this.geometryMask,n=t.maskCount,a=255;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,n,a),s.stencilOp(s.KEEP,s.KEEP,s.INCR),n++):(s.stencilFunc(s.EQUAL,n+1,a),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),this.level=n,r.renderWebGL(t,r,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),this.invertAlpha?s.stencilFunc(s.NOTEQUAL,n,a):s.stencilFunc(s.EQUAL,n,a)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},7340:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.BARREL,t),this.amount=e}});t.exports=a},5170:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===i&&(i=1),void 0===s&&(s=1),void 0===a&&(a=1),void 0===o&&(o=1),void 0===h&&(h=4),r.call(this,n.BLOOM,t),this.steps=h,this.offsetX=i,this.offsetY=s,this.blurStrength=a,this.strength=o,this.glcolor=[1,1,1],null!=e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},4199:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===e&&(e=0),void 0===i&&(i=2),void 0===s&&(s=2),void 0===a&&(a=1),void 0===h&&(h=4),r.call(this,n.BLUR,t),this.quality=e,this.x=i,this.y=s,this.steps=h,this.strength=a,this.glcolor=[1,1,1],null!=o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},3132:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=.5),void 0===i&&(i=1),void 0===s&&(s=.2),void 0===a&&(a=!1),void 0===o&&(o=1),void 0===h&&(h=1),void 0===l&&(l=1),r.call(this,n.BOKEH,t),this.radius=e,this.amount=i,this.contrast=s,this.isTiltShift=a,this.strength=l,this.blurX=o,this.blurY=h}});t.exports=a},6610:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o){void 0===e&&(e=8),void 0===a&&(a=1),void 0===o&&(o=.005),r.call(this,n.CIRCLE,t),this.scale=a,this.feather=o,this.thickness=e,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=i&&(this.color=i),null!=s&&(this.backgroundColor=s)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundColor:{get:function(){var t=this.glcolor2;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor2;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(t){this.glcolor2[3]=t}}});t.exports=a},4931:(t,e,i)=>{var s=i(7473),r=i(5686),n=i(1571),a=new s({Extends:r,initialize:function(t){r.call(this),this.type=n.COLOR_MATRIX,this.gameObject=t,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});t.exports=a},6128:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.type=t,this.gameObject=e,this.active=!0},setActive:function(t){return this.active=t,this},destroy:function(){this.gameObject=null,this.active=!1}});t.exports=s},9195:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s){void 0===e&&(e="__WHITE"),void 0===i&&(i=.005),void 0===s&&(s=.005),r.call(this,n.DISPLACEMENT,t),this.x=i,this.y=s,this.glTexture,this.setTexture(e)},setTexture:function(t){var e=this.gameObject.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this}});t.exports=a},445:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===i&&(i=4),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.GLOW,t),this.outerStrength=i,this.innerStrength=s,this.knockout=a,this.glcolor=[1,1,1,1],void 0!==e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},7724:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l,u){void 0===s&&(s=.2),void 0===a&&(a=0),void 0===o&&(o=0),void 0===h&&(h=0),void 0===l&&(l=1),void 0===u&&(u=0),r.call(this,n.GRADIENT,t),this.alpha=s,this.size=u,this.fromX=a,this.fromY=o,this.toX=h,this.toY=l,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=e&&(this.color1=e),null!=i&&(this.color2=i)},color1:{get:function(){var t=this.glcolor1;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor1;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}},color2:{get:function(){var t=this.glcolor2;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor2;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}}});t.exports=a},4412:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.PIXELATE,t),this.amount=e}});t.exports=a},75:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.1),void 0===a&&(a=1),void 0===h&&(h=6),void 0===l&&(l=1),r.call(this,n.SHADOW,t),this.x=e,this.y=i,this.decay=s,this.power=a,this.glcolor=[0,0,0,1],this.samples=h,this.intensity=l,void 0!==o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},8734:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=3),void 0===a&&(a=!1),r.call(this,n.SHINE,t),this.speed=e,this.lineWidth=i,this.gradient=s,this.reveal=a}});t.exports=a},2437:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=.5),void 0===a&&(a=.5),r.call(this,n.VIGNETTE,t),this.x=e,this.y=i,this.radius=s,this.strength=a}});t.exports=a},5984:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.WIPE,t),this.progress=0,this.wipeWidth=e,this.direction=i,this.axis=s,this.reveal=a}});t.exports=a},1571:t=>{t.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},7347:(t,e,i)=>{var s=i(1030),r=i(1571),n={Barrel:i(7340),Controller:i(6128),Bloom:i(5170),Blur:i(4199),Bokeh:i(3132),Circle:i(6610),ColorMatrix:i(4931),Displacement:i(9195),Glow:i(445),Gradient:i(7724),Pixelate:i(4412),Shadow:i(75),Shine:i(8734),Vignette:i(2437),Wipe:i(5984)};n=s(!1,n,r),t.exports=n},2494:(t,e,i)=>{var s=i(8351),r=i(8361);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var n=r(i,"scale",null);"number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=r(n,"x",1),e.scaleY=r(n,"y",1));var a=r(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(i,"rotation",0);var o=r(i,"angle",null);null!==o&&(e.angle=o),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),u=r(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=r(i,"blendMode",s.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},2273:(t,e,i)=>{var s=i(7473),r=i(6125),n=i(1081),a=i(4399),o=i(3389),h=i(204),l=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(t,e){return this.data||(this.data=new n(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new n(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new n(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new n(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},3649:(t,e,i)=>{var s=i(7473),r=i(8456),n=i(204),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(n.DESTROY,this.destroy,this)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},r.register("GameObjectFactory",a,"add"),t.exports=a},4344:(t,e,i)=>{var s=i(2915),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},4518:(t,e,i)=>{var s=i(2915),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},5173:(t,e,i)=>{var s=i(8351),r={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},1991:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},8305:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},3131:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},1626:(t,e,i)=>{var s=i(7473),r=i(7347),n=i(8935),a=new s({initialize:function(t,e){this.gameObject=t,this.isPost=e,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(t){return void 0===t&&(t=0),this.padding=t,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(t){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,void 0!==t&&(this.padding=t),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var t=this.list,e=0;e{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},3671:(t,e,i)=>{var s=i(1392),r=i(9876),n=i(2529),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t,e){return void 0===t&&(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getTopLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,n,a,o,h,l;if(void 0===t&&(t=new s),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),r=t.x,n=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,n=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(i,n,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(i,n,o,l)-t.y,t}};t.exports=a},2246:(t,e,i)=>{var s=i(7499),r=i(6726),n={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,r,n){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,r,n)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=n},5085:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},77:(t,e,i)=>{var s=i(7149),r=i(1864),n=i(5851),a=i(3747),o=i(2529),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=n(t,"from",0),t.to=n(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=n(t,"rotationOffset",0);var l=n(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t&&t.data){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var n=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-n,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},986:(t,e,i)=>{var s=i(3911),r={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(t){this.pipelineData={};var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){var a=n.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?s(e):e)}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},resetPipeline:function(t){return void 0===t&&(t=!1),this.pipeline=this.defaultPipeline,t&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=r},4461:(t,e,i)=>{var s=i(3911),r=i(1626),n=i(8935),a={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(t){this.postPipelines=[],this.postPipelineData={},this.postFX=new r(this,!0),t&&(this.preFX=new r(this,!1))},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPostPipelineData:function(t,e){var i=this.postPipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],r=0;r=0;s--){var r=i[s];(e&&r.name===t||!e&&r===t)&&(r.destroy(),n(i,s))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};t.exports=a},4627:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},1868:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},4976:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e,i,s){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e,i,s)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},9243:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=r},5693:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},6125:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},3212:(t,e,i)=>{var s=i(7425),r=i(4227),n=i(7556),a=i(3692),o=i(2820),h=i(2529),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return o(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(e||(e=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var r=s.scrollX,a=s.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):n(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},4227:(t,e,i)=>{var s=i(7473),r=i(7425),n=i(2529),a=new s({initialize:function(t,e,i,s,r,n){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===r&&(r=0),void 0===n&&(n=0),this.matrix=new Float32Array([t,e,i,s,r,n,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||n?r.TAU-(n>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3];return s[0]=r*i+a*e,s[1]=n*i+o*e,s[2]=r*-e+a*i,s[3]=n*-e+o*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,r=i[0],n=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=s[0],c=s[1],d=s[2],f=s[3],p=s[4],g=s[5],m=void 0===e?i:e.matrix;return m[0]=u*r+c*a,m[1]=u*n+c*o,m[2]=d*r+f*a,m[3]=d*n+f*o,m[4]=p*r+g*a+h,m[5]=p*n+g*o+l,m},multiplyWithOffset:function(t,e,i){var s=this.matrix,r=t.matrix,n=s[0],a=s[1],o=s[2],h=s[3],l=e*n+i*o+s[4],u=e*a+i*h+s[5],c=r[0],d=r[1],f=r[2],p=r[3],g=r[4],m=r[5];return s[0]=c*n+d*o,s[1]=c*a+d*h,s[2]=f*n+p*o,s[3]=f*a+p*h,s[4]=g*n+m*o+l,s[5]=g*a+m*h+u,this},transform:function(t,e,i,s,r,n){var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*u,a[2]=i*o+s*l,a[3]=i*h+s*u,a[4]=r*o+n*l+c,a[5]=r*h+n*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3],h=s[4],l=s[5];return i.x=t*r+e*a+h,i.y=t*n+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=e*r-i*s;return t[0]=r/o,t[1]=-i/o,t[2]=-s/o,t[3]=e/o,t[4]=(s*a-r*n)/o,t[5]=-(e*a-i*n)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){return t.setTransform(this),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,r,n){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=s,a[4]=r,a[5]=n,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],r=e[2],n=e[3],a=i*n-s*r;if(t.translateX=e[4],t.translateY=e[5],i||s){var o=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/o):-Math.acos(i/o),t.scaleX=o,t.scaleY=a/o}else if(r||n){var h=Math.sqrt(r*r+n*n);t.rotation=.5*Math.PI-(n>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,r){var n=this.matrix,a=Math.sin(i),o=Math.cos(i);return n[4]=t,n[5]=e,n[0]=o*s,n[1]=a*s,n[2]=-a*r,n[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new n);var s=this.matrix,r=s[0],a=s[1],o=s[2],h=s[3],l=s[4],u=s[5],c=1/(r*h+o*-a);return i.x=h*c*t+-o*c*e+(u*o-l*h)*c,i.y=r*c*e+-a*c*t+(-u*r+l*a)*c,i},setQuad:function(t,e,i,s,r,n){void 0===r&&(r=!1),void 0===n&&(n=this.quad);var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return r?(n[0]=Math.round(t*o+e*l+c),n[1]=Math.round(t*h+e*u+d),n[2]=Math.round(t*o+s*l+c),n[3]=Math.round(t*h+s*u+d),n[4]=Math.round(i*o+s*l+c),n[5]=Math.round(i*h+s*u+d),n[6]=Math.round(i*o+e*l+c),n[7]=Math.round(i*h+e*u+d)):(n[0]=t*o+e*l+c,n[1]=t*h+e*u+d,n[2]=t*o+s*l+c,n[3]=t*h+s*u+d,n[4]=i*o+s*l+c,n[5]=i*h+s*u+d,n[6]=i*o+e*l+c,n[7]=i*h+e*u+d),n},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},8414:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},4286:(t,e,i)=>{t.exports={Alpha:i(4344),AlphaSingle:i(4518),BlendMode:i(5173),ComputedSize:i(1991),Crop:i(8305),Depth:i(3131),Flip:i(9660),FX:i(1626),GetBounds:i(3671),Mask:i(2246),Origin:i(5085),PathFollower:i(77),Pipeline:i(986),PostPipeline:i(4461),ScrollFactor:i(4627),Size:i(1868),Texture:i(4976),TextureCrop:i(9243),Tint:i(5693),ToJSON:i(6125),Transform:i(3212),TransformMatrix:i(4227),Visible:i(8414)}},7361:(t,e,i)=>{var s=i(1953),r=i(8351),n=i(7473),a=i(4286),o=i(3389),h=i(2273),l=i(1392),u=i(3232),c=i(9422),d=i(2529),f=new n({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.PostPipeline,a.Transform,a.Visible,u],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(e,i),this.setBlendMode(r.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,r=!1;t.setEmpty();for(var n=0;n-1},setAll:function(t,e,i,r){return s.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,s=[null],r=this.list.slice(),n=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},2840:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var r=e.list;if(0!==r.length){var n=e.localTransform;s?(n.loadIdentity(),n.multiply(s),n.translate(e.x,e.y),n.rotate(e.rotation),n.scale(e.scaleX,e.scaleY)):n.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u{var s=i(1984),r=s,n=s;n=i(2840),t.exports={renderWebGL:r,renderCanvas:n}},6608:t=>{t.exports="addedtoscene"},4265:t=>{t.exports="destroy"},8671:t=>{t.exports="removedfromscene"},3420:t=>{t.exports="complete"},601:t=>{t.exports="created"},7919:t=>{t.exports="error"},6231:t=>{t.exports="locked"},5241:t=>{t.exports="loop"},8325:t=>{t.exports="playing"},3356:t=>{t.exports="play"},7513:t=>{t.exports="seeked"},5788:t=>{t.exports="seeking"},7111:t=>{t.exports="stalled"},8118:t=>{t.exports="stop"},9184:t=>{t.exports="textureready"},4287:t=>{t.exports="unlocked"},857:t=>{t.exports="unsupported"},3389:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(6608),DESTROY:i(4265),REMOVED_FROM_SCENE:i(8671),VIDEO_COMPLETE:i(3420),VIDEO_CREATED:i(601),VIDEO_ERROR:i(7919),VIDEO_LOCKED:i(6231),VIDEO_LOOP:i(5241),VIDEO_PLAY:i(3356),VIDEO_PLAYING:i(8325),VIDEO_SEEKED:i(7513),VIDEO_SEEKING:i(5788),VIDEO_STALLED:i(7111),VIDEO_STOP:i(8118),VIDEO_TEXTURE:i(9184),VIDEO_UNLOCKED:i(4287),VIDEO_UNSUPPORTED:i(857)}},1643:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},8881:(t,e,i)=>{var s=i(7655);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},4479:(t,e,i)=>{var s=i(4771),r=i(7655);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=s(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,u=0;u{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},284:(t,e,i)=>{var s=i(7473),r=i(8881),n=i(4479),a=i(1643),o=i(3915),h=i(2529),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return n(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},setFromObjects:function(t,e){return this.x1=t.x,this.y1=t.y,this.x2=e.x,this.y2=e.y,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},3915:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},7655:(t,e,i)=>{var s=i(7473),r=i(1643),n=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=n},5956:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},716:(t,e,i)=>{var s=i(7120),r=i(7655);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var n=s(t)*e;return e>.5?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width)),i}},8151:(t,e,i)=>{var s=i(716),r=i(7120);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=r(t)/i);for(var a=0;a{t.exports=function(t){return 2*(t.width+t.height)}},2161:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},1392:(t,e,i)=>{var s=i(7473),r=i(5956),n=i(716),a=i(8151),o=i(1643),h=i(284),l=i(2161),u=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},9422:(t,e,i)=>{var s=i(1392);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=Math.min(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-n;return i.setTo(r,n,a,o)}},1593:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=i(4597),o=i(5593),h=i(7410),l=i(5874),u=i(707),c=new s({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=a(e,"url");void 0===s?s=t.path+i+"."+a(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(n.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(n.FILE_COMPLETE,e,i,t),this.loader.emit(n.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},9845:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},5593:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},7410:(t,e,i)=>{var s=i(1030),r=i(707);t.exports=function(t,e){var i=void 0===t?r():s({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},3137:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=new s({initialize:function(t,e,i,s){var n=[];s.forEach((function(t){t&&n.push(t)})),this.loader=t,this.type=e,this.key=i;var a=this.key;t.prefix&&""!==t.prefix&&(this.key=t.prefix+a),this.multiKeyIndex=t.multiKeyIndex++,this.files=n,this.state=r.FILE_PENDING,this.complete=!1,this.pending=n.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o{var s=i(7410);t.exports=function(t,e){var i=s(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var n in i.headers)r.setRequestHeader(n,i.headers[n]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},707:t=>{t.exports=function(t,e,i,s,r,n){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===r&&(r=0),void 0===n&&(n=!1),{responseType:t,async:e,user:i,password:s,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}}},4359:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},462:t=>{t.exports="addfile"},7297:t=>{t.exports="complete"},8660:t=>{t.exports="filecomplete"},6484:t=>{t.exports="filecomplete-"},7972:t=>{t.exports="loaderror"},1906:t=>{t.exports="load"},1441:t=>{t.exports="fileprogress"},1072:t=>{t.exports="postprocess"},1927:t=>{t.exports="progress"},6597:t=>{t.exports="start"},1179:(t,e,i)=>{t.exports={ADD:i(462),COMPLETE:i(7297),FILE_COMPLETE:i(8660),FILE_KEY_COMPLETE:i(6484),FILE_LOAD_ERROR:i(7972),FILE_LOAD:i(1906),FILE_PROGRESS:i(1441),POST_PROCESS:i(1072),PROGRESS:i(1927),START:i(6597)}},6732:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=i(5593),u=new s({Extends:n,initialize:function t(e,i,s,r,a){var l,u="png";if(h(i)){var c=i;i=o(c,"key"),s=o(c,"url"),l=o(c,"normalMap"),r=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:s,xhrSettings:r,config:a};if(n.call(this,e,d),l){var f=new t(e,this.key,l,r,a);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){n.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){n.revokeObjectURL(t.data),t.onProcessError()},n.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("spritesheet"===t.type?t.addToCache():"normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(5851),l=i(2482),u=new s({Extends:n,initialize:function(t,e,i,s,a){var u="json";if(l(e)){var c=e;e=o(c,"key"),i=o(c,"url"),s=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"dataKey",a)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:s,config:a};n.call(this,t,d),l(i)&&(this.data=a?h(i,a):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=new s({Extends:n,initialize:function(t,e,i,s){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),s=o(u,"xhrSettings"),a=o(u,"extension",a),r=o(u,"type",r),l=o(u,"cache",l)}var c={type:r,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,c)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports=function(t){for(var e=0,i=0;i{var s=i(3916);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},7025:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},48:t=>{t.exports=function(t,e,i,s,r){var n=.5*(s-e),a=.5*(r-i),o=t*t;return(2*i-2*s+n+a)*(t*o)+(-3*i+3*s-2*n-a)*o+n*t+i}},5035:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},2915:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},7149:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.DEG_TO_RAD}},2975:t=>{t.exports=function(t,e){return Math.abs(t-e)}},2107:(t,e,i)=>{var s=i(2915),r=i(7473),n=i(9652),a=i(1984),o=new n,h=new r({initialize:function t(e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,n=r[0],a=r[4],o=r[8],h=r[1],l=r[5],u=r[9],c=r[2],d=r[6],f=r[10],p=0,g=0,m=0,x=.99999;switch(e){case"XYZ":g=Math.asin(s(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},104:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},4941:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},1555:(t,e,i)=>{var s=i(2915);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},5005:t=>{t.exports=function(t,e){return t/e/1e3}},3702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},8820:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},1743:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},3416:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},2149:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*n-a*h,c=-l*r+a*o,d=h*r-n*o,f=e*u+i*c+s*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+s*h)*f,t[2]=(a*i-s*n)*f,t[3]=c*f,t[4]=(l*e-s*o)*f,t[5]=(-a*e+s*r)*f,t[6]=d*f,t[7]=(-h*e+i*o)*f,t[8]=(n*e-i*r)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=n*l-a*h,t[1]=s*h-i*l,t[2]=i*a-s*n,t[3]=a*o-r*l,t[4]=e*l-s*o,t[5]=s*r-e*a,t[6]=r*h-n*o,t[7]=i*o-e*h,t[8]=e*n-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*n-a*h)+i*(-l*r+a*o)+s*(h*r-n*o)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],g=c[3],m=c[4],x=c[5],v=c[6],y=c[7],w=c[8];return e[0]=d*i+f*n+p*h,e[1]=d*s+f*a+p*l,e[2]=d*r+f*o+p*u,e[3]=g*i+m*n+x*h,e[4]=g*s+m*a+x*l,e[5]=g*r+m*o+x*u,e[6]=v*i+y*n+w*h,e[7]=v*s+y*a+w*l,e[8]=v*r+y*o+w*u,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*n,e[1]=l*s+h*a,e[2]=l*r+h*o,e[3]=l*n-h*i,e[4]=l*a-h*s,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,r=t.w,n=e+e,a=i+i,o=s+s,h=e*n,l=e*a,u=e*o,c=i*a,d=i*o,f=s*o,p=r*n,g=r*a,m=r*o,x=this.val;return x[0]=1-(c+f),x[3]=l+m,x[6]=u-g,x[1]=l-m,x[4]=1-(h+f),x[7]=d+p,x[2]=u+g,x[5]=d-p,x[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],r=e[1],n=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],g=e[12],m=e[13],x=e[14],v=e[15],y=s*h-r*o,w=s*l-n*o,b=s*u-a*o,M=r*l-n*h,A=r*u-a*h,S=n*u-a*l,E=c*m-d*g,I=c*x-f*g,k=c*v-p*g,T=d*x-f*m,R=d*v-p*m,C=f*v-p*x,P=y*C-w*R+b*T+M*k-A*I+S*E;return P?(P=1/P,i[0]=(h*C-l*R+u*T)*P,i[1]=(l*k-o*C-u*I)*P,i[2]=(o*R-h*k+u*E)*P,i[3]=(n*R-r*C-a*T)*P,i[4]=(s*C-n*k+a*I)*P,i[5]=(r*k-s*R-a*E)*P,i[6]=(m*S-x*A+v*M)*P,i[7]=(x*b-g*S-v*w)*P,i[8]=(g*A-m*b+v*y)*P,this):null}});t.exports=s},9652:(t,e,i)=>{var s=i(7473),r=i(5689),n=1e-6,a=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,r,n,a,o,h,l,u,c,d,f,p,g){var m=this.val;return m[0]=t,m[1]=e,m[2]=i,m[3]=s,m[4]=r,m[5]=n,m[6]=a,m[7]=o,m[8]=h,m[9]=l,m[10]=u,m[11]=c,m[12]=d,m[13]=f,m[14]=p,m[15]=g,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=o.fromQuat(i).val,r=e.x,n=e.y,a=e.z;return this.setValues(s[0]*r,s[1]*r,s[2]*r,0,s[4]*n,s[5]*n,s[6]*n,0,s[8]*a,s[9]*a,s[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],r=t[6],n=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=r,t[11]=t[14],t[12]=s,t[13]=n,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15],x=e*a-i*n,v=e*o-s*n,y=e*h-r*n,w=i*o-s*a,b=i*h-r*a,M=s*h-r*o,A=l*p-u*f,S=l*g-c*f,E=l*m-d*f,I=u*g-c*p,k=u*m-d*p,T=c*m-d*g,R=x*T-v*k+y*I+w*E-b*S+M*A;return R?(R=1/R,this.setValues((a*T-o*k+h*I)*R,(s*k-i*T-r*I)*R,(p*M-g*b+m*w)*R,(c*b-u*M-d*w)*R,(o*E-n*T-h*S)*R,(e*T-s*E+r*S)*R,(g*y-f*M-m*v)*R,(l*M-c*y+d*v)*R,(n*k-a*E+h*A)*R,(i*E-e*k-r*A)*R,(f*b-p*y+m*x)*R,(u*y-l*b-d*x)*R,(a*S-n*I-o*A)*R,(e*I-i*S+s*A)*R,(p*v-f*w-g*x)*R,(l*w-u*v+c*x)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15];return this.setValues(a*(c*m-d*g)-u*(o*m-h*g)+p*(o*d-h*c),-(i*(c*m-d*g)-u*(s*m-r*g)+p*(s*d-r*c)),i*(o*m-h*g)-a*(s*m-r*g)+p*(s*h-r*o),-(i*(o*d-h*c)-a*(s*d-r*c)+u*(s*h-r*o)),-(n*(c*m-d*g)-l*(o*m-h*g)+f*(o*d-h*c)),e*(c*m-d*g)-l*(s*m-r*g)+f*(s*d-r*c),-(e*(o*m-h*g)-n*(s*m-r*g)+f*(s*h-r*o)),e*(o*d-h*c)-n*(s*d-r*c)+l*(s*h-r*o),n*(u*m-d*p)-l*(a*m-h*p)+f*(a*d-h*u),-(e*(u*m-d*p)-l*(i*m-r*p)+f*(i*d-r*u)),e*(a*m-h*p)-n*(i*m-r*p)+f*(i*h-r*a),-(e*(a*d-h*u)-n*(i*d-r*u)+l*(i*h-r*a)),-(n*(u*g-c*p)-l*(a*g-o*p)+f*(a*c-o*u)),e*(u*g-c*p)-l*(i*g-s*p)+f*(i*c-s*u),-(e*(a*g-o*p)-n*(i*g-s*p)+f*(i*o-s*a)),e*(a*c-o*u)-n*(i*c-s*u)+l*(i*o-s*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15];return(e*a-i*n)*(c*m-d*g)-(e*o-s*n)*(u*m-d*p)+(e*h-r*n)*(u*g-c*p)+(i*o-s*a)*(l*m-d*f)-(i*h-r*a)*(l*g-c*f)+(s*h-r*o)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],g=e[13],m=e[14],x=e[15],v=t.val,y=v[0],w=v[1],b=v[2],M=v[3];return e[0]=y*i+w*a+b*u+M*p,e[1]=y*s+w*o+b*c+M*g,e[2]=y*r+w*h+b*d+M*m,e[3]=y*n+w*l+b*f+M*x,y=v[4],w=v[5],b=v[6],M=v[7],e[4]=y*i+w*a+b*u+M*p,e[5]=y*s+w*o+b*c+M*g,e[6]=y*r+w*h+b*d+M*m,e[7]=y*n+w*l+b*f+M*x,y=v[8],w=v[9],b=v[10],M=v[11],e[8]=y*i+w*a+b*u+M*p,e[9]=y*s+w*o+b*c+M*g,e[10]=y*r+w*h+b*d+M*m,e[11]=y*n+w*l+b*f+M*x,y=v[12],w=v[13],b=v[14],M=v[15],e[12]=y*i+w*a+b*u+M*p,e[13]=y*s+w*o+b*c+M*g,e[14]=y*r+w*h+b*d+M*m,e[15]=y*n+w*l+b*f+M*x,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,r=i[0],n=i[4],a=i[8],o=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],f=i[6],p=i[10],g=i[14],m=i[3],x=i[7],v=i[11],y=i[15],w=s[0],b=s[4],M=s[8],A=s[12],S=s[1],E=s[5],I=s[9],k=s[13],T=s[2],R=s[6],C=s[10],P=s[14],F=s[3],O=s[7],Y=s[11],L=s[15];return this.setValues(r*w+n*S+a*T+o*F,h*w+l*S+u*T+c*F,d*w+f*S+p*T+g*F,m*w+x*S+v*T+y*F,r*b+n*E+a*R+o*O,h*b+l*E+u*R+c*O,d*b+f*E+p*R+g*O,m*b+x*E+v*R+y*O,r*M+n*I+a*C+o*Y,h*M+l*I+u*C+c*Y,d*M+f*I+p*C+g*Y,m*M+x*I+v*C+y*Y,r*A+n*k+a*P+o*L,h*A+l*k+u*P+c*L,d*A+f*k+p*P+g*L,m*A+x*k+v*P+y*L)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),r=1-i,n=t.x,a=t.y,o=t.z,h=r*n,l=r*a;return this.setValues(h*n+i,h*a-s*o,h*o+s*a,0,h*a+s*o,l*a+i,l*o-s*n,0,h*o-s*a,l*o+s*n,r*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,r=e.y,a=e.z,o=Math.sqrt(s*s+r*r+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},44:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},5385:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},8585:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==s?(r=(s-t)/(s-i))<0&&(r=0):r=1:r<0&&(r=0),r}},372:(t,e,i)=>{var s=i(7473),r=i(2149),n=i(1984),a=i(5689),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),u=new a(1,0,0),c=new a(0,1,0),d=new a,f=new r,p=new s({initialize:function(t,e,i,s){this.onChangeCallback=n,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=s*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),r+e*(t.z-r),n+e*(t.w-n))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(u).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=f.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*n+i*o-s*a,i*h+r*a+s*n-e*o,s*h+r*o+e*a-i*n,r*h-e*n-i*a-s*o)},slerp:function(t,e){var i=this.x,s=this.y,r=this.z,n=this.w,a=t.x,h=t.y,l=t.z,u=t.w,c=i*a+s*h+r*l+n*u;c<0&&(c=-c,a=-a,h=-h,l=-l,u=-u);var d=1-e,f=e;if(1-c>o){var p=Math.acos(c),g=Math.sin(p);d=Math.sin((1-e)*p)/g,f=Math.sin(e*p)/g}return this.set(d*i+f*a,d*s+f*h,d*r+f*l,d*n+f*u)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s,n=r?1/r:0;return this.set(-t*n,-e*n,-i*n,s*n)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*n,i*a+s*n,s*a-i*n,r*a-e*n)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a-s*n,i*a+r*n,s*a+e*n,r*a-i*n)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*n,i*a-e*n,s*a+r*n,r*a-s*n)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,r=t.z/2,n=Math.cos(i),a=Math.cos(s),o=Math.cos(r),h=Math.sin(i),l=Math.sin(s),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+n*l*u,n*l*o-h*a*u,n*a*u+h*l*o,n*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+n*l*u,n*l*o-h*a*u,n*a*u-h*l*o,n*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-n*l*u,n*l*o+h*a*u,n*a*u+h*l*o,n*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-n*l*u,n*l*o+h*a*u,n*a*u-h*l*o,n*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+n*l*u,n*l*o+h*a*u,n*a*u-h*l*o,n*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-n*l*u,n*l*o-h*a*u,n*a*u+h*l*o,n*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],r=i[4],n=i[8],a=i[1],o=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=s+o+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(n-l)*e,(a-r)*e,.25/e)):s>o&&s>c?(e=2*Math.sqrt(1+s-o-c),this.set(.25*e,(r+a)/e,(n+l)/e,(u-h)/e)):o>c?(e=2*Math.sqrt(1+o-s-c),this.set((r+a)/e,.25*e,(h+u)/e,(n-l)/e)):(e=2*Math.sqrt(1+c-s-o),this.set((n+l)/e,(h+u)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var n=h[r],a=h[n];e=Math.sqrt(i[3*r+r]-i[3*n+n]-i[3*a+a]+1),l[r]=.5*e,e=.5/e,l[n]=(i[3*n+r]+i[3*r+n])*e,l[a]=(i[3*a+r]+i[3*r+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+n]-i[3*n+a])*e}return this.onChangeCallback(this),this}});t.exports=p},4208:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.RAD_TO_DEG}},1705:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},6650:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,r=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=s*e,t}},2037:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},6283:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},9876:t=>{t.exports=function(t,e,i,s){var r=Math.cos(s),n=Math.sin(s),a=t.x-e,o=t.y-i;return t.x=a*r-o*n+e,t.y=a*n+o*r+i,t}},8348:t=>{t.exports=function(t,e,i,s,r){var n=s+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},4497:t=>{t.exports=function(t,e,i,s,r){return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},9640:(t,e,i)=>{var s=i(5689),r=i(9652),n=i(372),a=new r,o=new n,h=new s;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},4078:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},855:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},4936:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var r=[],n=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},278:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},163:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r){void 0===r&&(r=new s);var n=0,a=0;return t>0&&t<=e*i&&(n=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(n,a)}},7556:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r,n,a,o,h){void 0===h&&(h=new s);var l=Math.sin(n),u=Math.cos(n),c=u*a,d=l*a,f=-l*o,p=u*o,g=1/(c*p+f*-d);return h.x=p*g*t+-f*g*e+(r*f-i*p)*g,h.y=c*g*e+-d*g*t+(-r*c+i*d)*g,h}},2529:(t,e,i)=>{var s=i(7473),r=i(12),n=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new n(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},5689:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,r=t.z,n=e.x,a=e.y,o=e.z;return this.x=s*o-r*a,this.y=r*n-i*o,this.z=i*a-s*n,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z;return this.x=i*a-s*n,this.y=s*r-e*a,this.z=e*n-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*s,this.y=r[1]*e+r[4]*i+r[7]*s,this.z=r[2]*e+r[5]*i+r[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=1/(r[3]*e+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*s+r[12])*n,this.y=(r[1]*e+r[5]*i+r[9]*s+r[13])*n,this.z=(r[2]*e+r[6]*i+r[10]*s+r[14])*n,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+s*r[6],this.y=e*r[1]+i*r[4]+s*r[7],this.z=e*r[2]+i*r[5]+s*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12],this.y=r[1]*e+r[5]*i+r[9]*s+r[13],this.z=r[2]*e+r[6]*i+r[10]*s+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=e*r[0]+i*r[4]+s*r[8]+r[12],a=e*r[1]+i*r[5]+s*r[9]+r[13],o=e*r[2]+i*r[6]+s*r[10]+r[14],h=e*r[3]+i*r[7]+s*r[11]+r[15];return this.x=n/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,u=o*s+r*i-n*e,c=-r*e-n*i-a*s;return this.x=h*o+c*-r+l*-a-u*-n,this.y=l*o+c*-n+u*-r-h*-a,this.z=u*o+c*-a+h*-n-l*-r,this},project:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=r[0],a=r[1],o=r[2],h=r[3],l=r[4],u=r[5],c=r[6],d=r[7],f=r[8],p=r[9],g=r[10],m=r[11],x=r[12],v=r[13],y=r[14],w=1/(e*h+i*d+s*m+r[15]);return this.x=(e*n+i*l+s*f+x)*w,this.y=(e*a+i*u+s*p+v)*w,this.z=(e*o+i*c+s*g+y)*w,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,r=t.z,n=t.w,a=this.x-i,o=n-this.y-1-s,h=this.z;return this.x=2*a/r-1,this.y=2*o/n-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},9279:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=s*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this.w=n+e*(t.w-n),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+s*s+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12]*r,this.y=n[1]*e+n[5]*i+n[9]*s+n[13]*r,this.z=n[2]*e+n[6]*i+n[10]*s+n[14]*r,this.w=n[3]*e+n[7]*i+n[11]*s+n[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,u=o*s+r*i-n*e,c=-r*e-n*i-a*s;return this.x=h*o+c*-r+l*-a-u*-n,this.y=l*o+c*-n+u*-r-h*-a,this.z=u*o+c*-a+h*-n-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},4119:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},8445:t=>{t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},6412:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},760:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},6909:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},6947:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},3426:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},6906:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},3270:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-Math.PI,Math.PI)}},2748:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-180,180)}},936:(t,e,i)=>{var s=i(6906);t.exports=function(t){return s(t+Math.PI)}},1935:(t,e,i)=>{var s=i(7425);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},3692:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},2820:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-180,180)}},1833:(t,e,i)=>{t.exports={Between:i(6412),BetweenPoints:i(760),BetweenPointsY:i(6909),BetweenY:i(6947),CounterClockwise:i(3426),Normalize:i(6906),Random:i(3270),RandomDegrees:i(2748),Reverse:i(936),RotateTo:i(1935),ShortestBetween:i(5393),Wrap:i(3692),WrapDegrees:i(2820)}},7425:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},1518:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return Math.sqrt(r*r+n*n)}},5372:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},4430:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},4361:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},7798:t=>{t.exports=function(t,e,i,s,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(s-e,r))}},8290:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},3788:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return r*r+n*n}},6338:(t,e,i)=>{t.exports={Between:i(1518),BetweenPoints:i(5372),BetweenPointsSquared:i(4430),Chebyshev:i(4361),Power:i(7798),Snake:i(8290),Squared:i(3788)}},5751:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},6203:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},9103:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},4938:(t,e,i)=>{t.exports={In:i(5751),Out:i(9103),InOut:i(6203)}},8677:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},4649:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},504:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},8872:(t,e,i)=>{t.exports={In:i(8677),Out:i(504),InOut:i(4649)}},3170:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},2627:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},1349:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},5006:(t,e,i)=>{t.exports={In:i(3170),Out:i(1349),InOut:i(2627)}},6046:t=>{t.exports=function(t){return t*t*t}},9531:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},4836:t=>{t.exports=function(t){return--t*t*t+1}},875:(t,e,i)=>{t.exports={In:i(6046),Out:i(4836),InOut:i(9531)}},7619:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},7437:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},8119:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},2884:(t,e,i)=>{t.exports={In:i(7619),Out:i(8119),InOut:i(7437)}},5456:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},3461:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},2711:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},6287:(t,e,i)=>{t.exports={In:i(5456),Out:i(2711),InOut:i(3461)}},8613:(t,e,i)=>{t.exports={Back:i(4938),Bounce:i(8872),Circular:i(5006),Cubic:i(875),Elastic:i(2884),Expo:i(6287),Linear:i(4233),Quadratic:i(6341),Quartic:i(762),Quintic:i(345),Sine:i(8698),Stepped:i(7051)}},744:t=>{t.exports=function(t){return t}},4233:(t,e,i)=>{t.exports=i(744)},9810:t=>{t.exports=function(t){return t*t}},8163:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},6123:t=>{t.exports=function(t){return t*(2-t)}},6341:(t,e,i)=>{t.exports={In:i(9810),Out:i(6123),InOut:i(8163)}},7337:t=>{t.exports=function(t){return t*t*t*t}},4878:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},9012:t=>{t.exports=function(t){return 1- --t*t*t*t}},762:(t,e,i)=>{t.exports={In:i(7337),Out:i(9012),InOut:i(4878)}},303:t=>{t.exports=function(t){return t*t*t*t*t}},553:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},1632:t=>{t.exports=function(t){return--t*t*t*t*t+1}},345:(t,e,i)=>{t.exports={In:i(303),Out:i(1632),InOut:i(553)}},8455:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},1844:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},990:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},8698:(t,e,i)=>{t.exports={In:i(8455),Out:i(990),InOut:i(1844)}},6745:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},7051:(t,e,i)=>{t.exports=i(6745)},3158:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},12:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},7373:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},2622:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(3158),Equal:i(12),Floor:i(1326),GreaterThan:i(7373),LessThan:i(2622)}},4675:(t,e,i)=>{var s=i(7425),r=i(1030),n={Angle:i(1833),Distance:i(6338),Easing:i(8613),Fuzzy:i(7927),Interpolation:i(2140),Pow2:i(7897),Snap:i(3943),RandomDataGenerator:i(6957),Average:i(3136),Bernstein:i(785),Between:i(7025),CatmullRom:i(48),CeilTo:i(5035),Clamp:i(2915),DegToRad:i(7149),Difference:i(2975),Euler:i(2107),Factorial:i(3916),FloatBetween:i(104),FloorTo:i(4941),FromPercent:i(1555),GetSpeed:i(5005),IsEven:i(3702),IsEvenStrict:i(8820),Linear:i(1743),LinearXY:i(3416),MaxAdd:i(3733),Median:i(44),MinSub:i(5385),Percent:i(8585),RadToDeg:i(4208),RandomXY:i(1705),RandomXYZ:i(6650),RandomXYZW:i(2037),Rotate:i(6283),RotateAround:i(9876),RotateAroundDistance:i(8348),RotateTo:i(4497),RoundAwayFromZero:i(4078),RoundTo:i(855),SinCosTableGenerator:i(4936),SmootherStep:i(278),SmoothStep:i(2733),ToXY:i(163),TransformXY:i(7556),Within:i(4119),Wrap:i(8445),Vector2:i(2529),Vector3:i(5689),Vector4:i(9279),Matrix3:i(2149),Matrix4:i(9652),Quaternion:i(372),RotateVec3:i(9640)};n=r(!1,n,s),t.exports=n},1640:(t,e,i)=>{var s=i(785);t.exports=function(t,e){for(var i=0,r=t.length-1,n=0;n<=r;n++)i+=Math.pow(1-e,r-n)*Math.pow(e,n)*t[n]*s(r,n);return i}},6105:(t,e,i)=>{var s=i(48);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return t[0]===t[i]?(e<0&&(n=Math.floor(r=i*(1+e))),s(r-n,t[(n-1+i)%i],t[n],t[(n+1)%i],t[(n+2)%i])):e<0?t[0]-(s(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(r-n,t[n?n-1:0],t[n],t[i{t.exports=function(t,e,i,s,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,r)}},6765:(t,e,i)=>{var s=i(1743);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return e<0?s(t[0],t[1],r):e>1?s(t[i],t[i-1],i-r):s(t[n],t[n+1>i?i:n+1],r-n)}},6388:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},5735:(t,e,i)=>{var s=i(2733);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},8705:(t,e,i)=>{var s=i(278);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},2140:(t,e,i)=>{t.exports={Bezier:i(1640),CatmullRom:i(6105),CubicBezier:i(4002),Linear:i(6765),QuadraticBezier:i(6388),SmoothStep:i(5735),SmootherStep:i(8705)}},5443:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},167:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},7897:(t,e,i)=>{t.exports={GetNext:i(5443),IsSize:i(725),IsValue:i(167)}},6957:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},5659:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},5461:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},5131:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},3943:(t,e,i)=>{t.exports={Ceil:i(5659),Floor:i(5461),To:i(5131)}},8666:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},8456:t=>{var e={},i={},s={register:function(t,i,s,r){void 0===r&&(r=!1),e[t]={plugin:i,mapping:s,custom:r}},registerCustom:function(t,e,s,r){i[t]={plugin:e,mapping:s,data:r}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},5722:(t,e,i)=>{var s=i(8666),r=i(7473),n=i(204),a=new r({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(n.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},8351:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},8196:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},3527:t=>{t.exports="resize"},8618:t=>{t.exports="addedtoscene"},4328:t=>{t.exports="boot"},6099:t=>{t.exports="create"},7645:t=>{t.exports="destroy"},2710:t=>{t.exports="pause"},2547:t=>{t.exports="postupdate"},8577:t=>{t.exports="prerender"},8197:t=>{t.exports="preupdate"},8997:t=>{t.exports="ready"},7604:t=>{t.exports="removedfromscene"},8999:t=>{t.exports="render"},9742:t=>{t.exports="resume"},3667:t=>{t.exports="shutdown"},3468:t=>{t.exports="sleep"},7840:t=>{t.exports="start"},9896:t=>{t.exports="transitioncomplete"},5103:t=>{t.exports="transitioninit"},3162:t=>{t.exports="transitionout"},7841:t=>{t.exports="transitionstart"},6454:t=>{t.exports="transitionwake"},6536:t=>{t.exports="update"},3875:t=>{t.exports="wake"},204:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(8618),BOOT:i(4328),CREATE:i(6099),DESTROY:i(7645),PAUSE:i(2710),POST_UPDATE:i(2547),PRE_RENDER:i(8577),PRE_UPDATE:i(8197),READY:i(8997),REMOVED_FROM_SCENE:i(7604),RENDER:i(8999),RESUME:i(9742),SHUTDOWN:i(3667),SLEEP:i(3468),START:i(7840),TRANSITION_COMPLETE:i(9896),TRANSITION_INIT:i(5103),TRANSITION_OUT:i(3162),TRANSITION_START:i(7841),TRANSITION_WAKE:i(6454),UPDATE:i(6536),WAKE:i(3875)}},2362:(t,e,i)=>{var s=i(7473),r=i(2915),n=i(1030),a=new s({initialize:function(t,e,i,s,r,n,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(n,a,s,r)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,n=r.cut;n.x=i,n.y=s,n.w=t,n.h=e,n.r=i+t,n.b=s+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var a=r.drawImage;return a.x=i,a.y=s,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,i,s,r,n){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=s,o.w=r,o.h=n,o.r=i+r,o.b=s+n,this.x=i,this.y=s,this.width=r,this.height=n,this.halfWidth=.5*r,this.halfHeight=.5*n,this.centerX=Math.floor(r/2),this.centerY=Math.floor(n/2),this.updateUVs()},setScale9:function(t,e,i,s){var r=this.data;return r.scale9=!0,r.is3Slice=0===e&&s===this.height,r.scale9Borders.x=t,r.scale9Borders.y=e,r.scale9Borders.w=i,r.scale9Borders.h=s,this},setCropUVs:function(t,e,i,s,n,a,o){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=r(e,0,d)),g=l+(i=r(i,0,f)),m=s=r(s,0,d-e),x=n=r(n,0,f-i),v=this.data;if(v.trim){var y=v.spriteSourceSize,w=e+(s=r(s,0,u-e)),b=i+(n=r(n,0,c-i));if(!(y.rw||y.y>b)){var M=Math.max(y.x,e),A=Math.max(y.y,i),S=Math.min(y.r,w)-M,E=Math.min(y.b,b)-A;m=S,x=E,p=a?h+(u-(M-y.x)-S):h+(M-y.x),g=o?l+(c-(A-y.y)-E):l+(A-y.y),e=M,i=A,s=S,n=E}else p=0,g=0,m=0,x=0}else a&&(p=h+(u-e-s)),o&&(g=l+(c-i-n));var I=this.source.width,k=this.source.height;return t.u0=Math.max(0,p/I),t.v0=Math.max(0,g/k),t.u1=Math.min(1,(p+m)/I),t.v1=Math.min(1,(g+x)/k),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=m,t.ch=x,t.width=s,t.height=n,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,r,n){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=i,this.v0=s,this.u1=r,this.v1=n,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,r=this.data.drawImage;r.width=i,r.height=s;var n=this.source.width,a=this.source.height;return this.u0=t/n,this.v0=e/a,this.u1=(t+i)/n,this.v1=(e+s)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=n(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=a},1864:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},3747:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},7473:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,r,a){for(var o in s)if(s.hasOwnProperty(o)){var h=e(s,o,r);if(!1!==h){if(i((a||t).prototype,o)){if(n.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=s[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},1792:t=>{t.exports=function(t,e,i,s,r){if(void 0===r&&(r=t),i>0){var n=i-t.length;if(n<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>n&&(e.splice(n),a=n);for(var o=0;o{t.exports=function(t,e,i,s,r,n){if(void 0===i&&(i=0),void 0===n&&(n=t),s>0){var a=s-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;s>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(n,l)}return e}},2513:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=0;if(s(t,r,n))for(var o=r;o{t.exports=function(t,e,i){var s,r=[null];for(s=3;s{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,r,n=1;if(i){if(te.length&&(n=e.length),i?(s=e[n-1][i],(r=e[n][i])-t<=t-s?e[n]:e[n-1]):(s=e[n-1],(r=e[n])-t<=t-s?r:s)}},4493:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=[];if(s(t,r,n))for(var o=r;o{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},8683:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s>r||(t.splice(s,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},546:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],r=t.indexOf(s);t[i]=s,t[r]=e}return t}},1419:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},6512:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var r,n=[],a=!1;if((i||s)&&(a=!0,i||(i=""),s||(s="")),e=e;r--)a?n.push(i+r.toString()+s):n.push(r);else for(r=t;r<=e;r++)a?n.push(i+r.toString()+s):n.push(r);return n}},1316:(t,e,i)=>{var s=i(4078);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],n=Math.max(s((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,r,n,a,o){for(void 0===n&&(n=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>n;){if(a-n>600){var h=a-n+1,l=r-n+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(n,Math.floor(r-l*c/h+d)),p=Math.min(a,Math.floor(r+(h-l)*c/h+d));s(t,r,f,p,o)}var g=t[r],m=n,x=a;for(e(t,n,r),o(t[a],g)>0&&e(t,n,a);m0;)x--}0===o(t[n],g)?e(t,n,x):e(t,++x,a),x<=r&&(n=x+1),r<=x&&(a=x-1)}};t.exports=s},9703:(t,e,i)=>{var s=i(5851),r=i(4912),n=function(t,e,i){for(var s=[],r=0;r{var s=i(8935);t.exports=function(t,e,i,r){var n;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(n=t.indexOf(e))?(s(t,n),i&&i.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(n=t.indexOf(h))&&(s(t,n),o.push(h),i&&i.call(r,h)),a--}return o}},4725:(t,e,i)=>{var s=i(8935);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var n=s(t,e);return i&&i.call(r,n),n}},8780:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===n&&(n=t),s(t,e,i)){var a=i-e,o=t.splice(e,a);if(r)for(var h=0;h{var s=i(8935);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return s(t,r)}},6960:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),r=t.indexOf(i);return-1!==s&&-1===r&&(t[s]=i,!0)}},1021:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var r=t.length;if(e<0||e>r||e>=i||i>r){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},5361:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},3718:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},2071:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},8935:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],r=e;r{var s=i(9356);function r(t,e){return String(t).localeCompare(e)}function n(t,e,i,s){var r,n,a,o,h,l=t.length,u=0,c=2*i;for(r=0;rl&&(n=l),a>l&&(a=l),o=r,h=n;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[r]=e,t}},1953:(t,e,i)=>{t.exports={Matrix:i(1237),Add:i(1792),AddAt:i(2280),BringToTop:i(2513),CountAllMatching:i(1771),Each:i(7883),EachInRange:i(5856),FindClosestInSorted:i(3957),Flatten:i(4493),GetAll:i(6245),GetFirst:i(1647),GetRandom:i(5301),MoveDown:i(1842),MoveTo:i(1419),MoveUp:i(6512),MoveAbove:i(8683),MoveBelow:i(546),NumberArray:i(4130),NumberArrayStep:i(1316),QuickSelect:i(9465),Range:i(9703),Remove:i(7161),RemoveAt:i(4725),RemoveBetween:i(8780),RemoveRandomElement:i(5744),Replace:i(6960),RotateLeft:i(1021),RotateRight:i(4027),SafeRange:i(2497),SendToBack:i(5361),SetAll:i(3718),Shuffle:i(4912),SortByDigits:i(2071),SpliceOne:i(8935),StableSort:i(9992),Swap:i(2372)}},1816:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(7222),r=i(1816);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},6063:t=>{t.exports=function(t){for(var e=0;e{var s=i(7116);t.exports=function(t){return s(t,180)}},2597:(t,e,i)=>{var s=i(7116);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i{var s=i(1816),r=i(4780);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(7116);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i{var s=i(1021),r=i(4027);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):r(t,i)),0!==e)for(var n=0;n{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),r=0;r-1;n--)s[r][n]=t[n][r]}return s}},1237:(t,e,i)=>{t.exports={CheckMatrix:i(1816),MatrixToString:i(6655),ReverseColumns:i(582),ReverseRows:i(6063),Rotate180:i(8321),RotateLeft:i(2597),RotateMatrix:i(7116),RotateRight:i(6285),Translate:i(7711),TransposeMatrix:i(4780)}},3911:t=>{var e=function(t){var i,s,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)s=t[r],i[r]=e(s);return i};t.exports=e},1030:(t,e,i)=>{var s=i(2482),r=function(){var t,e,i,n,a,o,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l{var s=i(4675),r=i(5851);t.exports=function(t,e,i){var n=r(t,e,null);if(null===n)return i;if(Array.isArray(n))return s.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return s.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return s.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(e);return n}},4597:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},5851:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),n=t,a=s,o=i,h=i,l=!0,u=!0,c=0;c{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},7222:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var r=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var n=Math.ceil((r=e-t.length)/2);t=new Array(r-n+1).join(i)+t+new Array(n+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}}},e={};var i=function i(s){var r=e[s];if(void 0!==r)return r.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}(4513);window.SpinePlugin=i})(); \ No newline at end of file diff --git a/plugins/spine4.1/dist/SpinePlugin.js b/plugins/spine4.1/dist/SpinePlugin.js index 880728d78..4340d7722 100644 --- a/plugins/spine4.1/dist/SpinePlugin.js +++ b/plugins/spine4.1/dist/SpinePlugin.js @@ -22828,7 +22828,7 @@ var SpinePlugin = new Class({ * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser. * * @method Phaser.Loader.LoaderPlugin#spine - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.19.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -26055,7 +26055,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.60.0', + VERSION: '3.70.0', BlendModes: __webpack_require__(8351), @@ -26473,24 +26473,21 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to increase the value for. - * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key. + * @param {string} key - The key to change the value for. + * @param {number} [amount=1] - The amount to increase the given key by. Pass a negative value to decrease the key. * * @return {this} This Data Manager instance. */ - inc: function (key, data) + inc: function (key, amount) { if (this._frozen) { return this; } - if (data === undefined) + if (amount === undefined) { - data = 1; + amount = 1; } var value = this.get(key); @@ -26500,7 +26497,7 @@ var DataManager = new Class({ value = 0; } - this.set(key, (value + data)); + this.set(key, (value + amount)); return this; }, @@ -26516,10 +26513,7 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to toggle the value for. + * @param {string} key - The key to toggle the value for. * * @return {this} This Data Manager instance. */ @@ -27279,6 +27273,7 @@ function init () else if ((/AppleWebKit/).test(ua) && OS.iOS) { Browser.mobileSafari = true; + Browser.es2019 = true; } else if ((/MSIE (\d+\.\d+);/).test(ua)) { @@ -30186,7 +30181,7 @@ var Blur = new Class({ * @type {number} * @since 3.60.0 */ - this.quality = 0; + this.quality = quality; /** * The horizontal offset of the blur effect. @@ -30612,8 +30607,28 @@ var Circle = new Class({ color[2] = (value & 0xFF) / 255; } - } + }, + /** + * The alpha of the background, behind the texture, given as a number value. + * + * @name Phaser.FX.Circle#backgroundAlpha + * @type {number} + * @since 3.70.0 + */ + backgroundAlpha: { + + get: function () + { + return this.glcolor2[3]; + }, + + set: function (value) + { + this.glcolor2[3] = value; + } + + } }); module.exports = Circle; @@ -31116,10 +31131,10 @@ var FX_CONST = __webpack_require__(1571); * @param {number} [color1=0xff0000] - The first gradient color, given as a number value. * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value. * @param {number} [alpha=0.2] - The alpha value of the gradient effect. - * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. + * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toY=1] - The vertical position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect. */ var Gradient = new Class({ @@ -31161,7 +31176,7 @@ var Gradient = new Class({ this.size = size; /** - * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. + * The horizontal position the gradient will start from. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#fromX * @type {number} @@ -31170,7 +31185,7 @@ var Gradient = new Class({ this.fromX = fromX; /** - * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. + * The vertical position the gradient will start from. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#fromY * @type {number} @@ -31179,7 +31194,7 @@ var Gradient = new Class({ this.fromY = fromY; /** - * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels. + * The horizontal position the gradient will end. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#toX * @type {number} @@ -31188,7 +31203,7 @@ var Gradient = new Class({ this.toX = toX; /** - * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels. + * The vertical position the gradient will end. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#toY * @type {number} @@ -32561,22 +32576,19 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#incData * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to increase the value for. - * @param {*} [data] - The value to increase for the given key. + * @param {string} key - The key to change the value for. + * @param {number} [amount=1] - The amount to increase the given key by. Pass a negative value to decrease the key. * * @return {this} This GameObject. */ - incData: function (key, value) + incData: function (key, amount) { if (!this.data) { this.data = new DataManager(this); } - this.data.inc(key, value); + this.data.inc(key, amount); return this; }, @@ -32594,10 +32606,7 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#toggleData * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to toggle the value for. + * @param {string} key - The key to toggle the value for. * * @return {this} This GameObject. */ @@ -34909,10 +34918,10 @@ var FX = new Class({ * @param {number} [color1=0xff0000] - The first gradient color, given as a number value. * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value. * @param {number} [alpha=0.2] - The alpha value of the gradient effect. - * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. + * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toY=1] - The vertical position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect. * * @return {Phaser.FX.Gradient} The Gradient FX Controller. @@ -36447,7 +36456,7 @@ var PathFollower = { { var tween = this.pathTween; - if (tween) + if (tween && tween.data) { var tweenData = tween.data[0]; var pathDelta = this.pathDelta; @@ -37471,19 +37480,25 @@ var Texture = { * * Textures are referenced by their string-based keys, as stored in the Texture Manager. * + * Calling this method will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * * @method Phaser.GameObjects.Components.Texture#setTexture * @since 3.0.0 * * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance. * @param {(string|number)} [frame] - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call change the origin of the Game Object? * * @return {this} This Game Object instance. */ - setTexture: function (key, frame) + setTexture: function (key, frame, updateSize, updateOrigin) { this.texture = this.scene.sys.textures.get(key); - return this.setFrame(frame); + return this.setFrame(frame, updateSize, updateOrigin); }, /** @@ -37968,7 +37983,7 @@ var Tint = { /** * The tint value being applied to the whole of the Game Object. - * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value. + * Return `tintTopLeft` when read this tint property. * * @name Phaser.GameObjects.Components.Tint#tint * @type {number} @@ -37977,6 +37992,11 @@ var Tint = { */ tint: { + get: function () + { + return this.tintTopLeft; + }, + set: function (value) { this.setTint(value, value, value, value); @@ -39420,9 +39440,7 @@ var TransformMatrix = new Class({ */ setToContext: function (ctx) { - var matrix = this.matrix; - - ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + ctx.setTransform(this); return ctx; }, @@ -39632,13 +39650,14 @@ var TransformMatrix = new Class({ * @param {number} y - The y value. * @param {number} xw - The xw value. * @param {number} yh - The yh value. - * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {boolean} [roundPixels=false] - Pass the results via Math.round? * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. * * @return {Float32Array} The quad Float32Array. */ setQuad: function (x, y, xw, yh, roundPixels, quad) { + if (roundPixels === undefined) { roundPixels = false; } if (quad === undefined) { quad = this.quad; } var matrix = this.matrix; @@ -39650,24 +39669,33 @@ var TransformMatrix = new Class({ var e = matrix[4]; var f = matrix[5]; - quad[0] = x * a + y * c + e; - quad[1] = x * b + y * d + f; - - quad[2] = x * a + yh * c + e; - quad[3] = x * b + yh * d + f; - - quad[4] = xw * a + yh * c + e; - quad[5] = xw * b + yh * d + f; - - quad[6] = xw * a + y * c + e; - quad[7] = xw * b + y * d + f; - if (roundPixels) { - quad.forEach(function (value, index) - { - quad[index] = Math.round(value); - }); + quad[0] = Math.round(x * a + y * c + e); + quad[1] = Math.round(x * b + y * d + f); + + quad[2] = Math.round(x * a + yh * c + e); + quad[3] = Math.round(x * b + yh * d + f); + + quad[4] = Math.round(xw * a + yh * c + e); + quad[5] = Math.round(xw * b + yh * d + f); + + quad[6] = Math.round(xw * a + y * c + e); + quad[7] = Math.round(xw * b + y * d + f); + } + else + { + quad[0] = x * a + y * c + e; + quad[1] = x * b + y * d + f; + + quad[2] = x * a + yh * c + e; + quad[3] = x * b + yh * d + f; + + quad[4] = xw * a + yh * c + e; + quad[5] = xw * b + yh * d + f; + + quad[6] = xw * a + y * c + e; + quad[7] = xw * b + y * d + f; } return quad; @@ -42637,6 +42665,28 @@ var Line = new Class({ return this; }, + /** + * Sets this Line to match the x/y coordinates of the two given Vector2Like objects. + * + * @method Phaser.Geom.Line#setFromObjects + * @since 3.70.0 + * + * @param {Phaser.Types.Math.Vector2Like} start - Any object with public `x` and `y` properties, whose values will be assigned to the x1/y1 components of this Line. + * @param {Phaser.Types.Math.Vector2Like} end - Any object with public `x` and `y` properties, whose values will be assigned to the x2/y2 components of this Line. + * + * @return {this} This Line object. + */ + setFromObjects: function (start, end) + { + this.x1 = start.x; + this.y1 = start.y; + + this.x2 = end.x; + this.y2 = end.y; + + return this; + }, + /** * Returns a Vector2 object that corresponds to the start of this Line. * @@ -44530,6 +44580,13 @@ var MultiFile = new Class({ */ this.key = key; + var loadKey = this.key; + + if (loader.prefix && loader.prefix !== '') + { + this.key = loader.prefix + loadKey; + } + /** * The current index being used by multi-file loaders to avoid key clashes. * @@ -45647,8 +45704,11 @@ var ImageFile = new Class({ // We do, but has it loaded? if (linkFile.state >= CONST.FILE_COMPLETE) { - // Both files have loaded - if (this.type === 'normalMap') + if (linkFile.type === 'spritesheet') + { + linkFile.addToCache(); + } + else if (this.type === 'normalMap') { // linkFile.data = Image // this.data = Normal Map @@ -45759,7 +45819,7 @@ var ImageFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#image - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -45998,7 +46058,7 @@ var JSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -46179,7 +46239,7 @@ var TextFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#text - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -53803,12 +53863,6 @@ module.exports = Within; */ var Wrap = function (value, min, max) { - if (value >= min && value <= max) - { - // Skip modulo if already in range - return value; - } - var range = max - min; return (min + ((((value - min) % range) + range) % range)); @@ -57375,7 +57429,7 @@ var RandomDataGenerator = new Class({ */ weightedPick: function (array) { - return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)]; + return array[~~(Math.pow(this.frac(), 2) * array.length + 0.5)]; }, /** @@ -59680,6 +59734,14 @@ var Frame = new Class({ y: 0, width: 0, height: 0 + }, + is3Slice: false, + scale9: false, + scale9Borders: { + x: 0, + y: 0, + w: 0, + h: 0 } }; @@ -59799,6 +59861,38 @@ var Frame = new Class({ return this.updateUVs(); }, + /** + * Sets the scale9 center rectangle values. + * + * Scale9 is a feature of Texture Packer, allowing you to define a nine-slice scaling grid. + * + * This is set automatically by the JSONArray and JSONHash parsers. + * + * @method Phaser.Textures.Frame#setScale9 + * @since 3.70.0 + * + * @param {number} x - The left coordinate of the center scale9 rectangle. + * @param {number} y - The top coordinate of the center scale9 rectangle. + * @param {number} width - The width of the center scale9 rectangle. + * @param {number} height - The height coordinate of the center scale9 rectangle. + * + * @return {this} This Frame object. + */ + setScale9: function (x, y, width, height) + { + var data = this.data; + + data.scale9 = true; + data.is3Slice = (y === 0 && height === this.height); + + data.scale9Borders.x = x; + data.scale9Borders.y = y; + data.scale9Borders.w = width; + data.scale9Borders.h = height; + + return this; + }, + /** * Takes a crop data object and, based on the rectangular region given, calculates the * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering. @@ -60100,8 +60194,8 @@ var Frame = new Class({ */ destroy: function () { - this.source = null; this.texture = null; + this.source = null; this.glTexture = null; this.customData = null; this.data = null; @@ -60177,6 +60271,40 @@ var Frame = new Class({ }, + /** + * Does the Frame have scale9 border data? + * + * @name Phaser.Textures.Frame#scale9 + * @type {boolean} + * @readonly + * @since 3.70.0 + */ + scale9: { + + get: function () + { + return this.data.scale9; + } + + }, + + /** + * If the Frame has scale9 border data, is it 3-slice or 9-slice data? + * + * @name Phaser.Textures.Frame#is3Slice + * @type {boolean} + * @readonly + * @since 3.70.0 + */ + is3Slice: { + + get: function () + { + return this.data.is3Slice; + } + + }, + /** * The Canvas drawImage data object. * @@ -61458,11 +61586,15 @@ module.exports = GetFirst; * @function Phaser.Utils.Array.GetRandom * @since 3.0.0 * - * @param {array} array - The array to select the random entry from. + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] + * + * @param {T[]} array - The array to select the random entry from. * @param {number} [startIndex=0] - An optional start index. * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from. * - * @return {*} A random element from the array, or `null` if no element could be found in the range given. + * @return {T} A random element from the array, or `null` if no element could be found in the range given. */ var GetRandom = function (array, startIndex, length) { @@ -63457,12 +63589,20 @@ var RotateMatrix = __webpack_require__(7116); * @genericUse {T[][]} - [matrix,$return] * * @param {T[][]} [matrix] - The array to rotate. + * @param {number} [amount=1] - The number of times to rotate the matrix. * * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. */ -var RotateLeft = function (matrix) +var RotateLeft = function (matrix, amount) { - return RotateMatrix(matrix, 90); + if (amount === undefined) { amount = 1; } + + for (var i = 0; i < amount; i++) + { + matrix = RotateMatrix(matrix, 90); + } + + return matrix; }; module.exports = RotateLeft; @@ -63592,12 +63732,20 @@ var RotateMatrix = __webpack_require__(7116); * @genericUse {T[][]} - [matrix,$return] * * @param {T[][]} [matrix] - The array to rotate. + * @param {number} [amount=1] - The number of times to rotate the matrix. * * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. */ -var RotateRight = function (matrix) +var RotateRight = function (matrix, amount) { - return RotateMatrix(matrix, -90); + if (amount === undefined) { amount = 1; } + + for (var i = 0; i < amount; i++) + { + matrix = RotateMatrix(matrix, -90); + } + + return matrix; }; module.exports = RotateRight; @@ -63958,7 +64106,7 @@ var GetValue = __webpack_require__(5851); * * Allowed types: * - * Implicit + * Explicit: * { * x: 4 * } diff --git a/plugins/spine4.1/dist/SpinePlugin.min.js b/plugins/spine4.1/dist/SpinePlugin.min.js index 2e95d6f03..1574f793d 100644 --- a/plugins/spine4.1/dist/SpinePlugin.min.js +++ b/plugins/spine4.1/dist/SpinePlugin.min.js @@ -1 +1 @@ -(()=>{var t={4399:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,s,n,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new r(s,n||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,r=[];if(0===this._eventsCount)return r;for(s in t=this._events)e.call(t,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,n=s.length,a=new Array(n);r{(function(){"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r={};((e,i)=>{for(var s in i)t(e,s,{get:i[s],enumerable:!0})})(r,{AlphaTimeline:()=>ft,Animation:()=>k,AnimationState:()=>Rt,AnimationStateAdapter:()=>Xt,AnimationStateData:()=>_t,AssetManager:()=>bi,AssetManagerBase:()=>ce,AtlasAttachmentLoader:()=>ne,Attachment:()=>b,AttachmentTimeline:()=>gt,BinaryInput:()=>Pe,BlendMode:()=>Re,Bone:()=>he,BoneData:()=>ae,BoundingBoxAttachment:()=>Ut,CURRENT:()=>Nt,CanvasTexture:()=>yi,ClippingAttachment:()=>Wt,Color:()=>h,ConstraintData:()=>le,CurveTimeline:()=>Q,CurveTimeline1:()=>$,CurveTimeline2:()=>tt,DebugUtils:()=>g,DeformTimeline:()=>xt,Downloader:()=>ue,DrawOrderTimeline:()=>bt,Event:()=>de,EventData:()=>fe,EventQueue:()=>Yt,EventTimeline:()=>vt,EventType:()=>Pt,FIRST:()=>Ot,FakeTexture:()=>Zt,HOLD_FIRST:()=>Bt,HOLD_MIX:()=>Vt,HOLD_SUBSEQUENT:()=>Dt,IkConstraint:()=>pe,IkConstraintData:()=>me,IkConstraintTimeline:()=>At,IntSet:()=>n,Interpolation:()=>u,MathUtils:()=>c,MeshAttachment:()=>te,MixBlend:()=>C,MixDirection:()=>R,PathAttachment:()=>ee,PathConstraint:()=>be,PathConstraintData:()=>ge,PathConstraintMixTimeline:()=>Et,PathConstraintPositionTimeline:()=>Mt,PathConstraintSpacingTimeline:()=>It,PointAttachment:()=>ie,Pool:()=>x,PositionMode:()=>xe,Pow:()=>d,PowOut:()=>f,RGB2Timeline:()=>mt,RGBA2Timeline:()=>pt,RGBATimeline:()=>ut,RGBTimeline:()=>dt,RegionAttachment:()=>re,RotateMode:()=>ve,RotateTimeline:()=>et,SETUP:()=>zt,SUBSEQUENT:()=>Lt,ScaleTimeline:()=>nt,ScaleXTimeline:()=>at,ScaleYTimeline:()=>ot,SequenceTimeline:()=>kt,ShearTimeline:()=>ht,ShearXTimeline:()=>lt,ShearYTimeline:()=>ct,Skeleton:()=>Ie,SkeletonBinary:()=>Ye,SkeletonBounds:()=>ci,SkeletonClipping:()=>di,SkeletonData:()=>Ee,SkeletonJson:()=>fi,SkeletonRenderer:()=>Mi,Skin:()=>ke,SkinEntry:()=>Te,Slot:()=>Ae,SlotData:()=>Ce,SpacingMode:()=>we,StringSet:()=>a,Texture:()=>qt,TextureAtlas:()=>Kt,TextureAtlasPage:()=>Qt,TextureAtlasRegion:()=>$t,TextureFilter:()=>Gt,TextureRegion:()=>Ht,TextureWrap:()=>jt,TimeKeeper:()=>v,Timeline:()=>J,TrackEntry:()=>Ft,TransformConstraint:()=>Se,TransformConstraintData:()=>Fe,TransformConstraintTimeline:()=>St,TransformMode:()=>oe,TranslateTimeline:()=>it,TranslateXTimeline:()=>st,TranslateYTimeline:()=>rt,Triangulator:()=>ui,Utils:()=>m,Vector2:()=>w,VertexAttachment:()=>S,WindowedMean:()=>y});var n=class{constructor(){this.array=new Array}add(t){let e=this.contains(t);return this.array[0|t]=0|t,!e}contains(t){return null!=this.array[0|t]}remove(t){this.array[0|t]=void 0}clear(){this.array.length=0}},a=class{constructor(){this.entries={},this.size=0}add(t){let e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){let e=this.size;for(var i=0,s=t.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}static rgb888ToColor(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}static fromString(t){return(new o).setFromString(t)}},h=o;h.WHITE=new o(1,1,1,1),h.RED=new o(1,0,0,1),h.GREEN=new o(0,1,0,1),h.BLUE=new o(0,0,1,1),h.MAGENTA=new o(1,0,1,1);var l=class{static clamp(t,e,i){return ti?i:t}static cosDeg(t){return Math.cos(t*l.degRad)}static sinDeg(t){return Math.sin(t*l.degRad)}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){let e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return l.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,i){let s=Math.random(),r=e-t;return s<=(i-t)/r?t+Math.sqrt(s*r*(i-t)):e-Math.sqrt((1-s)*r*(e-i))}static isPowerOfTwo(t){return t&&0==(t&t-1)}},c=l;c.PI=3.1415927,c.PI2=2*l.PI,c.radiansToDegrees=180/l.PI,c.radDeg=l.radiansToDegrees,c.degreesToRadians=l.PI/180,c.degRad=l.degreesToRadians;var u=class{apply(t,e,i){return t+(e-t)*this.applyInternal(i)}},d=class extends u{constructor(t){super(),this.power=2,this.power=t}applyInternal(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}},f=class extends d{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}},p=class{static arrayCopy(t,e,i,s,r){for(let n=e,a=s;n=e?t:p.setArraySize(t,e,i)}static newArray(t,e){let i=new Array(t);for(let s=0;s0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},y=class{constructor(t=32){this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e>1)*n;let a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(!l){o.length>0&&(h=o);let a=t.bone,l=a.worldX,c=a.worldY,u=a.a,d=a.b,f=a.c,p=a.d;for(let t=e,a=r;a=this.regions.length&&(i=this.regions.length-1);let s=this.regions[i];e.region!=s&&(e.region=s,e.updateRegion())}getPath(t,e){let i=t,s=(this.start+e).toString();for(let t=this.digits-s.length;t>0;t--)i+="0";return i+=s,i}static nextID(){return M._nextID++}},I=M;I._nextID=0;var E=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(E||{}),T=[0,1,2,3,4,5,6],k=class{constructor(t,e,i){if(this.timelines=[],this.timelineIds=new a,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=i}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));let h=this.timelines;for(let s=0,l=h.length;s(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(C||{}),R=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(R||{}),F=0,Y=1,P=2,X=3,L=4,O=5,D=6,B=7,V=8,z=9,N=10,_=11,U=12,W=13,q=14,G=15,j=16,H=17,Z=18,K=19,J=class{constructor(t,e){this.propertyIds=e,this.frames=m.newFloatArray(t*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(t,e){let i=t.length;for(let s=1;se)return s-1;return i-1}static search(t,e,i){let s=t.length;for(let r=i;re)return r-i;return s-i}},Q=class extends J{constructor(t,e,i){super(t,i),this.curves=m.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let e=this.getFrameCount()+18*t;if(this.curves.length>e){let t=m.newFloatArray(e);m.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,i,s,r,n,a,o,h,l,c){let u=this.curves,d=this.getFrameCount()+18*t;0==i&&(u[e]=2+d);let f=.03*(s-2*n+o),p=.03*(r-2*a+h),m=.006*(3*(n-o)-s+l),g=.006*(3*(a-h)-r+c),x=2*f+m,w=2*p+g,v=.3*(n-s)+f+.16666667*m,y=.3*(a-r)+p+.16666667*g,b=s+v,A=r+y;for(let t=d+18;dt){let n=this.frames[e],a=this.frames[e+i];return a+(t-n)/(r[s]-n)*(r[s+1]-a)}let n=s+18;for(s+=2;s=t){let e=r[s-2],i=r[s-1];return i+(t-e)/(r[s]-e)*(r[s+1]-i)}e+=this.getFrameEntries();let a=r[n-2],o=r[n-1];return o+(t-a)/(this.frames[e]-a)*(this.frames[e+i]-o)}},$=class extends Q{constructor(t,e,i){super(t,e,[i])}getFrameEntries(){return 2}setFrame(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+1]=i}getCurveValue(t){let e=this.frames,i=e.length-2;for(let s=2;s<=i;s+=2)if(e[s]>t){i=s-2;break}let s=this.curves[i>>1];switch(s){case 0:let s=e[i],r=e[i+1];return r+(t-s)/(e[i+2]-s)*(e[i+2+1]-r);case 1:return e[i+1]}return this.getBezierValue(t,i,1,s-2)}},tt=class extends Q{constructor(t,e,i,s){super(t,e,[i,s])}getFrameEntries(){return 3}setFrame(t,e,i,s){t*=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s}},et=class extends ${constructor(t,e,i){super(t,e,F+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i>2];switch(p){case 0:let t=h[f];c=h[f+1],u=h[f+2],d=h[f+3];let e=(i-t)/(h[f+4]-t);c+=(h[f+4+1]-c)*e,u+=(h[f+4+2]-u)*e,d+=(h[f+4+3]-d)*e;break;case 1:c=h[f+1],u=h[f+2],d=h[f+3];break;default:c=this.getBezierValue(i,f,1,p-2),u=this.getBezierValue(i,f,2,p+18-2),d=this.getBezierValue(i,f,3,p+36-2)}if(1==r)l.r=c,l.g=u,l.b=d;else{if(0==n){let t=o.data.color;l.r=t.r,l.g=t.g,l.b=t.b}l.r+=(c-l.r)*r,l.g+=(u-l.g)*r,l.b+=(d-l.b)*r}}},ft=class extends ${constructor(t,e,i){super(t,e,V+"|"+i),this.slotIndex=0,this.slotIndex=i}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.color;if(i>3];switch(v){case 0:let t=h[w];u=h[w+1],d=h[w+2],f=h[w+3],p=h[w+4],m=h[w+5],g=h[w+6],x=h[w+7];let e=(i-t)/(h[w+8]-t);u+=(h[w+8+1]-u)*e,d+=(h[w+8+2]-d)*e,f+=(h[w+8+3]-f)*e,p+=(h[w+8+4]-p)*e,m+=(h[w+8+5]-m)*e,g+=(h[w+8+6]-g)*e,x+=(h[w+8+7]-x)*e;break;case 1:u=h[w+1],d=h[w+2],f=h[w+3],p=h[w+4],m=h[w+5],g=h[w+6],x=h[w+7];break;default:u=this.getBezierValue(i,w,1,v-2),d=this.getBezierValue(i,w,2,v+18-2),f=this.getBezierValue(i,w,3,v+36-2),p=this.getBezierValue(i,w,4,v+54-2),m=this.getBezierValue(i,w,5,v+72-2),g=this.getBezierValue(i,w,6,v+90-2),x=this.getBezierValue(i,w,7,v+108-2)}if(1==r)l.set(u,d,f,p),c.r=m,c.g=g,c.b=x;else{if(0==n){l.setFromColor(o.data.color);let t=o.data.darkColor;c.r=t.r,c.g=t.g,c.b=t.b}l.add((u-l.r)*r,(d-l.g)*r,(f-l.b)*r,(p-l.a)*r),c.r+=(m-c.r)*r,c.g+=(g-c.g)*r,c.b+=(x-c.b)*r}}},mt=class extends Q{constructor(t,e,i){super(t,e,[B+"|"+i,z+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,s,r,n,a,o){t*=7,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n,this.frames[t+5]=a,this.frames[t+6]=o}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,c=o.darkColor;if(it){let r=this.frames[e];return i[s+1]*(t-r)/(i[s]-r)}let r=s+18;for(s+=2;s=t){let e=i[s-2],r=i[s-1];return r+(t-e)/(i[s]-e)*(i[s+1]-r)}let n=i[r-2],a=i[r-1];return a+(1-a)*(t-n)/(this.frames[e+this.getFrameEntries()]-n)}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.getAttachment();if(!h)return;if(!(h instanceof S)||h.timelineAttachment!=this.attachment)return;let l=o.deform;0==l.length&&(n=0);let c=this.vertices,u=c[0].length,d=this.frames;if(i=d[d.length-1]){let t=c[d.length-1];if(1==r)if(3==n){let e=h;if(e.bones)for(let e=0;ei)this.apply(t,e,Number.MAX_VALUE,s,r,n,a),e=-1;else if(e>=o[h-1])return;if(i0&&o[l-1]==t;)l--}for(;l=o[l];l++)s.push(this.events[l])}},vt=wt;vt.propertyIds=[""+U];var yt=class extends J{constructor(t){super(t,yt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.drawOrders[t]=i}apply(t,e,i,s,r,n,a){if(1==a)return void(0==n&&m.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(i>2];switch(f){case 0:let t=u[d];h=u[d+1],l=u[d+2],c=u[d+3];let e=(i-t)/(u[d+4]-t);h+=(u[d+4+1]-h)*e,l+=(u[d+4+2]-l)*e,c+=(u[d+4+3]-c)*e;break;case 1:h=u[d+1],l=u[d+2],c=u[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),c=this.getBezierValue(i,d,3,f+36-2)}if(0==n){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*r,o.mixX=t.mixX+(l-t.mixX)*r,o.mixY=t.mixY+(c-t.mixY)*r}else o.mixRotate+=(h-o.mixRotate)*r,o.mixX+=(l-o.mixX)*r,o.mixY+=(c-o.mixY)*r}},Tt=class extends J{constructor(t,e,i){super(t,[K+"|"+e+"|"+i.sequence.id]),this.slotIndex=e,this.attachment=i}getFrameEntries(){return Tt.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,i,s,r){let n=this.frames;n[t*=Tt.ENTRIES]=e,n[t+Tt.MODE]=i|s<<4,n[t+Tt.DELAY]=r}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.attachment,l=this.attachment;if(!(h==l||h instanceof S&&h.timelineAttachment==l))return;let c=this.frames;if(i>4,g=this.attachment.sequence.regions.length,x=T[15&f];if(0!=x)switch(m+=(i-d)/p+1e-5|0,x){case 1:m=Math.min(g-1,m);break;case 2:m%=g;break;case 3:{let t=(g<<1)-2;m=0==t?0:m%t,m>=g&&(m=t-m);break}case 4:m=Math.max(g-1-m,0);break;case 5:m=g-1-m%g;break;case 6:{let t=(g<<1)-2;m=0==t?0:(m+g-1)%t,m>=g&&(m=t-m)}}o.sequenceIndex=m}},kt=Tt;kt.ENTRIES=3,kt.MODE=1,kt.DELAY=2;var Ct=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Yt(this),this.propertyIDs=new a,this.animationsChanged=!1,this.trackEntryPool=new x((()=>new Ft)),this.data=t}static emptyAnimation(){return Ct._emptyAnimation}update(t){t*=this.timeScale;let e=this.tracks;for(let i=0,s=e.length;i0){if(s.delay-=r,s.delay>0)continue;r=-s.delay,s.delay=0}let n=s.next;if(n){let e=s.trackLast-n.delay;if(e>=0){for(n.delay=0,n.trackTime+=0==s.timeScale?0:(e/s.timeScale+t)*n.timeScale,s.trackTime+=r,this.setCurrent(i,n,!0);n.mixingFrom;)n.mixTime+=t,n=n.mixingFrom;continue}}else if(s.trackLast>=s.trackEnd&&!s.mixingFrom){e[i]=null,this.queue.end(s),this.clearNext(s);continue}if(s.mixingFrom&&this.updateMixingFrom(s,t)){let t=s.mixingFrom;for(s.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}s.trackTime+=r}this.queue.drain()}updateMixingFrom(t,e){let i=t.mixingFrom;if(!i)return!0;let s=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),s):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let e=this.events,i=this.tracks,s=!1;for(let n=0,a=i.length;n0)continue;s=!0;let o=0==n?1:a.mixBlend,h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let l=a.animationLast,c=a.getAnimationTime(),u=c,d=e;a.reverse&&(u=a.animation.duration-u,d=null);let f=a.animation.timelines,p=f.length;if(0==n&&1==h||3==o)for(let e=0;e1&&(r=1),1!=i&&(i=s.mixBlend));let n=r0&&this.queueEvents(s,d),this.events.length=0,s.nextAnimationLast=d,s.nextTrackLast=s.trackTime,r}applyAttachmentTimeline(t,e,i,s,r){var n=e.slots[t.slotIndex];n.bone.active&&(i0,s=t>=0;c.signum(e)!=c.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*c.signum(t)),s=i),d=f+t-t%360,s!=i&&(d+=360*c.signum(t)),n[a]=d}n[a+1]=f,h.rotation=l+d*s}queueEvents(t,e){let i=t.animationStart,s=t.animationEnd,r=s-i,n=t.trackLast%r,a=this.events,o=0,h=a.length;for(;os||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==r||n>t.trackTime%r:e>=s&&t.animationLast=this.tracks.length)return;let e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let i=e;for(;;){let t=i.mixingFrom;if(!t)break;this.queue.end(t),i.mixingFrom=null,i.mixingTo=null,i=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,i){let s=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,s&&(i&&this.queue.interrupt(s),e.mixingFrom=s,s.mixingTo=e,e.mixTime=0,s.mixingFrom&&s.mixDuration>0&&(e.interruptAlpha*=Math.min(1,s.mixTime/s.mixDuration)),s.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,i=!1){let s=this.data.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,s,i)}setAnimationWith(t,e,i=!1){if(!e)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));let n=this.trackEntry(t,e,i,r);return this.setCurrent(t,n,s),this.queue.drain(),n}addAnimation(t,e,i=!1,s=0){let r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,s)}addAnimationWith(t,e,i=!1,s=0){if(!e)throw new Error("animation cannot be null.");let r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;let n=this.trackEntry(t,e,i,r);return r?(r.next=n,n.previous=r,s<=0&&(s+=r.getTrackComplete()-n.mixDuration)):(this.setCurrent(t,n,!0),this.queue.drain()),n.delay=s,n}setEmptyAnimation(t,e=0){let i=this.setAnimationWith(t,Ct.emptyAnimation(),!1);return i.mixDuration=e,i.trackEnd=e,i}addEmptyAnimation(t,e=0,i=0){let s=this.addAnimationWith(t,Ct.emptyAnimation(),!1,i);return i<=0&&(s.delay+=s.mixDuration-e),s.mixDuration=e,s.trackEnd=e,s}setEmptyAnimations(t=0){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,i=this.tracks.length;e0){r[o]=Vt,n[o]=i;continue t}break}r[o]=Bt}else r[o]=Lt}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},Rt=Ct;Rt._emptyAnimation=new k("",[],0);var Ft=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=2,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(t){this.animationLast=t,this.nextAnimationLast=t}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime(t[t.start=0]="start",t[t.interrupt=1]="interrupt",t[t.end=2]="end",t[t.dispose=3]="dispose",t[t.complete=4]="complete",t[t.event=5]="event",t))(Pt||{}),Xt=class{start(t){}interrupt(t){}end(t){}dispose(t){}complete(t){}event(t,e){}},Lt=0,Ot=1,Dt=2,Bt=3,Vt=4,zt=1,Nt=2,_t=class{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,i){let s=this.skeletonData.findAnimation(t);if(!s)throw new Error("Animation not found: "+t);let r=this.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);this.setMixWith(s,r,i)}setMixWith(t,e,i){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");let s=t.name+"."+e.name;this.animationToMixTime[s]=i}getMix(t,e){let i=t.name+"."+e.name,s=this.animationToMixTime[i];return void 0===s?this.defaultMix:s}},Ut=class extends S{constructor(t){super(t),this.color=new h(1,1,1,1)}copy(){let t=new Ut(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}},Wt=class extends S{constructor(t){super(t),this.endSlot=null,this.color=new h(.2275,.2275,.8078,1)}copy(){let t=new Wt(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}},qt=class{constructor(t){this._image=t}getImage(){return this._image}},Gt=(t=>(t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear",t))(Gt||{}),jt=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(jt||{}),Ht=class{constructor(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}},Zt=class extends qt{setFilters(t,e){}setWraps(t,e){}dispose(){}},Kt=class{constructor(t){this.pages=new Array,this.regions=new Array;let e=new Jt(t),i=new Array(4),s={size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},format:()=>{},filter:t=>{t.minFilter=m.enumValue(Gt,i[1]),t.magFilter=m.enumValue(Gt,i[2])},repeat:t=>{-1!=i[1].indexOf("x")&&(t.uWrap=10497),-1!=i[1].indexOf("y")&&(t.vWrap=10497)},pma:t=>{t.pma="true"==i[1]}};var r={xy:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2])},size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},bounds:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2]),t.width=parseInt(i[3]),t.height=parseInt(i[4])},offset:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2])},orig:t=>{t.originalWidth=parseInt(i[1]),t.originalHeight=parseInt(i[2])},offsets:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2]),t.originalWidth=parseInt(i[3]),t.originalHeight=parseInt(i[4])},rotate:t=>{let e=i[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:t=>{t.index=parseInt(i[1])}};let n=e.readLine();for(;n&&0==n.trim().length;)n=e.readLine();for(;n&&0!=n.trim().length&&0!=e.readEntry(i,n);)n=e.readLine();let a=null,o=null,h=null;for(;null!==n;)if(0==n.trim().length)a=null,n=e.readLine();else if(a){let t=new $t(a,n);for(;;){let s=e.readEntry(i,n=e.readLine());if(0==s)break;let a=r[i[0]];if(a)a(t);else{o||(o=[]),h||(h=[]),o.push(i[0]);let t=[];for(let e=0;e0&&h&&h.length>0&&(t.names=o,t.values=h,o=null,h=null),t.u=t.x/a.width,t.v=t.y/a.height,90==t.degrees?(t.u2=(t.x+t.height)/a.width,t.v2=(t.y+t.width)/a.height):(t.u2=(t.x+t.width)/a.width,t.v2=(t.y+t.height)/a.height),this.regions.push(t)}else{for(a=new Qt(n.trim());0!=e.readEntry(i,n=e.readLine());){let t=s[i[0]];t&&t(a)}this.pages.push(a)}}findRegion(t){for(let e=0;e=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;let i=e.indexOf(":");if(-1==i)return 0;t[0]=e.substr(0,i).trim();for(let s=1,r=i+1;;s++){let i=e.indexOf(",",r);if(-1==i)return t[s]=e.substr(r).trim(),s;if(t[s]=e.substr(r,i-r).trim(),r=i+1,4==s)return 4}}},Qt=class{constructor(t){this.minFilter=9728,this.magFilter=9728,this.uWrap=33071,this.vWrap=33071,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.name=t}setTexture(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}},$t=class extends Ht{constructor(t,e){super(),this.x=0,this.y=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.index=0,this.degrees=0,this.names=null,this.values=null,this.page=t,this.name=e}},te=class extends S{constructor(t,e){super(t),this.region=null,this.regionUVs=[],this.uvs=[],this.triangles=[],this.color=new h(1,1,1,1),this.width=0,this.height=0,this.hullLength=0,this.edges=[],this.parentMesh=null,this.sequence=null,this.tempColor=new h(0,0,0,0),this.path=e}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=m.newFloatArray(t.length));let e=this.uvs,i=this.uvs.length,s=this.region.u,r=this.region.v,n=0,a=0;if(this.region instanceof $t){let o=this.region,h=o.page.texture.getImage(),l=h.width,c=h.height;switch(o.degrees){case 90:s-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/c,n=o.originalHeight/l,a=o.originalWidth/c;for(let o=0;o= 0.");if(!e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}},oe=(t=>(t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection",t))(oe||{}),he=class{constructor(t,e,i){if(this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}isActive(){return this.active}update(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(t,e,i,s,r,n,a){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=s,this.ascaleY=r,this.ashearX=n,this.ashearY=a;let o=this.parent;if(!o){let o=this.skeleton,h=i+90+a,l=o.scaleX,u=o.scaleY;return this.a=c.cosDeg(i+n)*s*l,this.b=c.cosDeg(h)*r*l,this.c=c.sinDeg(i+n)*s*u,this.d=c.sinDeg(h)*r*u,this.worldX=t*l+o.x,void(this.worldY=e*u+o.y)}let h=o.a,l=o.b,u=o.c,d=o.d;switch(this.worldX=h*t+l*e+o.worldX,this.worldY=u*t+d*e+o.worldY,this.data.transformMode){case 0:{let t=i+90+a,e=c.cosDeg(i+n)*s,o=c.cosDeg(t)*r,f=c.sinDeg(i+n)*s,p=c.sinDeg(t)*r;return this.a=h*e+l*f,this.b=h*o+l*p,this.c=u*e+d*f,void(this.d=u*o+d*p)}case 1:{let t=i+90+a;this.a=c.cosDeg(i+n)*s,this.b=c.cosDeg(t)*r,this.c=c.sinDeg(i+n)*s,this.d=c.sinDeg(t)*r;break}case 2:{let t=h*h+u*u,e=0;t>1e-4?(t=Math.abs(h*d-l*u)/t,h/=this.skeleton.scaleX,u/=this.skeleton.scaleY,l=u*t,d=h*t,e=Math.atan2(u,h)*c.radDeg):(h=0,u=0,e=90-Math.atan2(d,l)*c.radDeg);let o=i+n-e,f=i+a-e+90,p=c.cosDeg(o)*s,m=c.cosDeg(f)*r,g=c.sinDeg(o)*s,x=c.sinDeg(f)*r;this.a=h*p-l*g,this.b=h*m-l*x,this.c=u*p+d*g,this.d=u*m+d*x;break}case 3:case 4:{let t=c.cosDeg(i),e=c.sinDeg(i),o=(h*t+l*e)/this.skeleton.scaleX,f=(u*t+d*e)/this.skeleton.scaleY,p=Math.sqrt(o*o+f*f);p>1e-5&&(p=1/p),o*=p,f*=p,p=Math.sqrt(o*o+f*f),3==this.data.transformMode&&h*d-l*u<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(p=-p);let m=Math.PI/2+Math.atan2(f,o),g=Math.cos(m)*p,x=Math.sin(m)*p,w=c.cosDeg(n)*s,v=c.cosDeg(90+a)*r,y=c.sinDeg(n)*s,b=c.sinDeg(90+a)*r;this.a=o*w+g*y,this.b=o*v+g*b,this.c=f*w+x*y,this.d=f*v+x*b;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}getWorldRotationX(){return Math.atan2(this.c,this.a)*c.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*c.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}updateAppliedTransform(){let t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*c.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*c.radDeg);let e=t.a,i=t.b,s=t.c,r=t.d,n=1/(e*r-i*s),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*n-o*i*n,this.ay=o*e*n-a*s*n;let h=n*r,l=n*e,u=n*i,d=n*s,f=h*this.a-u*this.c,p=h*this.b-u*this.d,m=l*this.c-d*this.a,g=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+m*m),this.ascaleX>1e-4){let t=f*g-p*m;this.ascaleY=t/this.ascaleX,this.ashearY=Math.atan2(f*p+m*g,t)*c.radDeg,this.arotation=Math.atan2(m,f)*c.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*c.radDeg}worldToLocal(t){let e=1/(this.a*this.d-this.b*this.c),i=t.x-this.worldX,s=t.y-this.worldY;return t.x=i*this.d*e-s*this.b*e,t.y=s*this.a*e-i*this.c*e,t}localToWorld(t){let e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t}worldToLocalRotation(t){let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*c.radDeg+this.rotation-this.shearX}localToWorldRotation(t){t-=this.rotation-this.shearX;let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*c.radDeg}rotateWorld(t){let e=this.a,i=this.b,s=this.c,r=this.d,n=c.cosDeg(t),a=c.sinDeg(t);this.a=n*e-a*s,this.b=n*i-a*r,this.c=a*e+n*s,this.d=a*i+n*r}},le=class{constructor(t,e,i){this.name=t,this.order=e,this.skinRequired=i}},ce=class{constructor(t,e="",i=new ue){this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=t,this.pathPrefix=e,this.downloader=i}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,i){this.toLoad--,this.loaded++,this.assets[e]=i,t&&t(e,i)}error(t,e,i){this.toLoad--,this.loaded++,this.errors[e]=i,t&&t(e,i)}loadAll(){return new Promise(((t,e)=>{let i=()=>{this.isLoadingComplete()?this.hasErrors()?e(this.errors):t(this):requestAnimationFrame(i)};requestAnimationFrame(i)}))}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadBinary(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load binary ${t}: status ${e}, ${s}`)}))}loadText(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadText(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load text ${t}: status ${e}, ${s}`)}))}loadJson(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadJson(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load JSON ${t}: status ${e}, ${s}`)}))}loadTexture(t,e=(()=>{}),i=(()=>{})){if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then((e=>e.ok?e.blob():(this.error(i,t,`Couldn't load image: ${t}`),null))).then((t=>t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null)).then((i=>{i&&this.success(e,t,this.textureLoader(i))}));else{let s=new Image;s.crossOrigin="anonymous",s.onload=()=>{this.success(e,t,this.textureLoader(s))},s.onerror=()=>{this.error(i,t,`Couldn't load image: ${t}`)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),s.src=t}}loadTextureAtlas(t,e=(()=>{}),i=(()=>{}),s){let r=t.lastIndexOf("/"),n=r>=0?t.substring(0,r+1):"";t=this.start(t),this.downloader.downloadText(t,(r=>{try{let a=new Kt(r),o=a.pages.length,h=!1;for(let r of a.pages)this.loadTexture(s?s[r.name]:n+r.name,((i,s)=>{h||(r.setTexture(s),0==--o&&this.success(e,t,a))}),((e,s)=>{h||this.error(i,t,`Couldn't load texture atlas ${t} page image: ${e}`),h=!0}))}catch(e){this.error(i,t,`Couldn't parse texture atlas ${t}: ${e.message}`)}}),((e,s)=>{this.error(i,t,`Couldn't load texture atlas ${t}: status ${e}, ${s}`)}))}get(t){return this.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;let e=this.assets[t];if(e)return e;let i=this.errors[t];throw Error("Asset not found: "+t+(i?"\n"+i:""))}remove(t){t=this.pathPrefix+t;let e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}removeAll(){for(let t in this.assets){let e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}isLoadingComplete(){return 0==this.toLoad}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}},ue=class{constructor(){this.callbacks={},this.rawDataUris={}}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return-1!=e?(e+="base64,".length,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){for(var e=window.atob(t),i=e.length,s=new Uint8Array(i),r=0;r{this.finish(t,s.status,s.responseText)};s.onload=r,s.onerror=r,s.send()}downloadJson(t,e,i){this.downloadText(t,(t=>{e(JSON.parse(t))}),i)}downloadBinary(t,e,i){if(this.start(t,e,i))return;if(this.rawDataUris[t]){try{let e=this.rawDataUris[t];this.finish(t,200,this.dataUriToUint8Array(e))}catch(e){this.finish(t,400,JSON.stringify(e))}return}let s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer";let r=()=>{this.finish(t,s.status,s.response)};s.onload=()=>{200==s.status||0==s.status?this.finish(t,200,new Uint8Array(s.response)):r()},s.onerror=r,s.send()}start(t,e,i){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,i)}}finish(t,e,i){let s=this.callbacks[t];delete this.callbacks[t];let r=200==e||0==e?[i]:[e,i];for(let t=r.length-1,e=s.length;t180?f-=360:f<-180&&(f+=360);let g=t.ascaleX,x=t.ascaleY;if(s||r){switch(t.data.transformMode){case 3:case 4:p=e-t.worldX,m=i-t.worldY}let o=t.data.length*g,h=Math.sqrt(p*p+m*m);if(s&&ho&&o>1e-4){let t=(h/o-1)*a+1;g*=t,n&&(x*=t)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,g,x,t.ashearX,t.ashearY)}apply2(t,e,i,s,r,n,a,o,h){let l=t.ax,u=t.ay,d=t.ascaleX,f=t.ascaleY,p=d,m=f,g=e.ascaleX,x=0,w=0,v=0;d<0?(d=-d,x=180,v=-1):(x=0,v=1),f<0&&(f=-f,v=-v),g<0?(g=-g,w=180):w=0;let y=e.ax,b=0,A=0,S=0,M=t.a,I=t.b,E=t.c,T=t.d,k=Math.abs(d-f)<=1e-4;!k||n?(b=0,A=M*y+t.worldX,S=E*y+t.worldY):(b=e.ay,A=M*y+I*b+t.worldX,S=E*y+T*b+t.worldY);let C=t.parent;if(!C)throw new Error("IK parent must itself have a parent.");M=C.a,I=C.b,E=C.c,T=C.d;let R,F,Y=1/(M*T-I*E),P=A-C.worldX,X=S-C.worldY,L=(P*T-X*I)*Y-l,O=(X*M-P*E)*Y-u,D=Math.sqrt(L*L+O*O),B=e.data.length*g;if(D<1e-4)return this.apply1(t,i,s,!1,n,!1,h),void e.updateWorldTransformWith(y,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);P=i-C.worldX,X=s-C.worldY;let V=(P*T-X*I)*Y-l,z=(X*M-P*E)*Y-u,N=V*V+z*z;if(0!=o){o*=d*(g+1)*.5;let t=Math.sqrt(N),e=t-D-B*d+o;if(e>0){let i=Math.min(1,e/(2*o))-1;i=(e-o*(1-i*i))/t,V-=i*V,z-=i*z,N=V*V+z*z}}t:if(k){B*=d;let t=(N-D*D-B*B)/(2*D*B);t<-1?(t=-1,F=Math.PI*r):t>1?(t=1,F=0,n&&(M=(Math.sqrt(N)/(D+B)-1)*h+1,p*=M,a&&(m*=M))):F=Math.acos(t)*r,M=D+B*t,I=B*Math.sin(F),R=Math.atan2(z*M-V*I,V*M+z*I)}else{M=d*B,I=f*B;let t=M*M,e=I*I,i=Math.atan2(z,V);E=e*D*D+t*N-t*e;let s=-2*e*D,n=e-t;if(T=s*s-4*n*E,T>=0){let t=Math.sqrt(T);s<0&&(t=-t),t=.5*-(s+t);let e=t/n,a=E/t,o=Math.abs(e)=-1&&E<=1&&(E=Math.acos(E),P=M*Math.cos(E)+D,X=I*Math.sin(E),T=P*P+X*X,Tm&&(u=E,m=T,p=P,g=X)),N<=.5*(h+m)?(R=i-Math.atan2(l*r,o),F=a*r):(R=i-Math.atan2(g*r,p),F=u*r)}let _=Math.atan2(b,y)*v,U=t.arotation;R=(R-_)*c.radDeg+x-U,R>180?R-=360:R<-180&&(R+=360),t.updateWorldTransformWith(l,u,U+R*h,p,m,0,0),U=e.arotation,F=((F+_)*c.radDeg-e.ashearX)*v+w-U,F>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(y,b,U+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}},me=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.softness=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},ge=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.positionMode=xe.Fixed,this.spacingMode=we.Fixed,this.rotateMode=ve.Chain,this.offsetRotation=0,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}},xe=(t=>(t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent",t))(xe||{}),we=(t=>(t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional",t))(we||{}),ve=(t=>(t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale",t))(ve||{}),ye=class{constructor(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(let i=0,s=t.bones.length;i0){t=l/t*f;for(let e=1;e0?c.degRad:-c.degRad}for(let t=0,r=3;t0){let i=h.a,s=h.b,a=h.c,o=h.d,l=0,d=0,f=0;if(l=n?p[r-1]:0==u[t+1]?p[r+2]:Math.atan2(y,m),l-=Math.atan2(a,i),v){d=Math.cos(l),f=Math.sin(l);let t=h.data.length;g+=(t*(d*i-f*a)-m)*e,x+=(t*(f*i+d*a)-y)*e}else l+=w;l>c.PI?l-=c.PI2:l<-c.PI&&(l+=c.PI2),l*=e,d=Math.cos(l),f=Math.sin(l),h.a=d*i-f*a,h.b=d*s-f*o,h.c=f*i+d*a,h.d=f*s+d*o}h.updateAppliedTransform()}}computeWorldPositions(t,e,i){let s=this.target,r=this.position,n=this.spaces,a=m.setArraySize(this.positions,3*e+2),o=this.world,h=t.closed,l=t.worldVerticesLength,c=l/6,u=ye.NONE;if(!t.constantSpeed){let d=t.lengths;c-=h?1:2;let f,p=d[c];switch(1==this.data.positionMode&&(r*=p),this.data.spacingMode){case 2:f=p;break;case 3:f=p/e;break;default:f=1}o=m.setArraySize(this.world,8);for(let m=0,g=0,x=0;mp){u!=ye.AFTER&&(u=ye.AFTER,t.computeWorldVertices(s,l-6,4,o,0,2)),this.addAfterPosition(w-p,o,0,a,g);continue}}for(;;x++){let t=d[x];if(!(w>t)){if(0==x)w/=t;else{let e=d[x-1];w=(w-e)/(t-e)}break}}x!=u&&(u=x,h&&x==c?(t.computeWorldVertices(s,l-4,4,o,0,2),t.computeWorldVertices(s,0,4,o,4,2)):t.computeWorldVertices(s,6*x+2,8,o,0,2)),this.addCurvePosition(w,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],a,g,i||m>0&&0==e)}return a}h?(l+=2,o=m.setArraySize(this.world,l),t.computeWorldVertices(s,2,l-4,o,0,2),t.computeWorldVertices(s,0,2,o,l-4,2),o[l-2]=o[0],o[l-1]=o[1]):(c--,l-=4,o=m.setArraySize(this.world,l),t.computeWorldVertices(s,2,l,o,0,2));let d,f=m.setArraySize(this.curves,c),p=0,g=o[0],x=o[1],w=0,v=0,y=0,b=0,A=0,S=0,M=0,I=0,E=0,T=0,k=0,C=0,R=0,F=0;for(let t=0,e=2;tp){this.addAfterPosition(X-p,o,l-4,a,s);continue}}for(;;c++){let t=f[c];if(!(X>t)){if(0==c)X/=t;else{let e=f[c-1];X=(X-e)/(t-e)}break}}if(c!=u){u=c;let t=6*c;for(g=o[t],x=o[t+1],w=o[t+2],v=o[t+3],y=o[t+4],b=o[t+5],A=o[t+6],S=o[t+7],M=.03*(g-2*w+y),I=.03*(x-2*v+b),E=.006*(3*(w-y)-g+A),T=.006*(3*(v-b)-x+S),k=2*M+E,C=2*I+T,R=.3*(w-g)+M+.16666667*E,F=.3*(v-x)+I+.16666667*T,P=Math.sqrt(R*R+F*F),Y[0]=P,t=1;t<8;t++)R+=k,F+=C,k+=E,C+=T,P+=Math.sqrt(R*R+F*F),Y[t]=P;R+=k,F+=C,P+=Math.sqrt(R*R+F*F),Y[8]=P,R+=k+E,F+=C+T,P+=Math.sqrt(R*R+F*F),Y[9]=P,m=0}for(X*=P;;m++){let t=Y[m];if(!(X>t)){if(0==m)X/=t;else{let e=Y[m-1];X=m+(X-e)/(t-e)}break}}this.addCurvePosition(.1*X,g,x,w,v,y,b,A,S,a,s,i||t>0&&0==e)}return a}addBeforePosition(t,e,i,s,r){let n=e[i],a=e[i+1],o=e[i+2]-n,h=e[i+3]-a,l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addAfterPosition(t,e,i,s,r){let n=e[i+2],a=e[i+3],o=n-e[i],h=a-e[i+1],l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addCurvePosition(t,e,i,s,r,n,a,o,h,l,c,u){if(0==t||isNaN(t))return l[c]=e,l[c+1]=i,void(l[c+2]=Math.atan2(r-i,s-e));let d=t*t,f=d*t,p=1-t,m=p*p,g=m*p,x=p*t,w=3*x,v=p*w,y=w*t,b=e*g+s*v+n*y+o*f,A=i*g+r*v+a*y+h*f;l[c]=b,l[c+1]=A,u&&(l[c+2]=t<.001?Math.atan2(r-i,s-e):Math.atan2(A-(i*m+r*x*2+a*d),b-(e*m+s*x*2+n*d)))}},be=ye;be.NONE=-1,be.BEFORE=-2,be.AFTER=-3,be.epsilon=1e-5;var Ae=class{constructor(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(t instanceof S&&this.attachment instanceof S&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},Se=class{constructor(t,e){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new w,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(let i=0;i0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=(t.x-x.worldX)*e,x.worldY+=(t.y-x.worldY)*i}if(0!=s){let t=Math.sqrt(x.a*x.a+x.c*x.c);0!=t&&(t=(t+(Math.sqrt(h*h+u*u)-t+this.data.offsetScaleX)*s)/t),x.a*=t,x.c*=t}if(0!=r){let t=Math.sqrt(x.b*x.b+x.d*x.d);0!=t&&(t=(t+(Math.sqrt(l*l+d*d)-t+this.data.offsetScaleY)*r)/t),x.b*=t,x.d*=t}if(n>0){let t=x.b,e=x.d,i=Math.atan2(e,t),s=Math.atan2(d,l)-Math.atan2(u,h)-(i-Math.atan2(x.c,x.a));s>c.PI?s-=c.PI2:s<-c.PI&&(s+=c.PI2),s=i+(s+m)*n;let r=Math.sqrt(t*t+e*e);x.b=Math.cos(s)*r,x.d=Math.sin(s)*r}x.updateAppliedTransform()}}applyRelativeWorld(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=0!=e||0!=i,o=this.target,h=o.a,l=o.b,u=o.c,d=o.d,f=h*d-l*u>0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=t.x*e,x.worldY+=t.y*i}if(0!=s){let t=(Math.sqrt(h*h+u*u)-1+this.data.offsetScaleX)*s+1;x.a*=t,x.c*=t}if(0!=r){let t=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*r+1;x.b*=t,x.d*=t}if(n>0){let t=Math.atan2(d,l)-Math.atan2(u,h);t>c.PI?t-=c.PI2:t<-c.PI&&(t+=c.PI2);let e=x.b,i=x.d;t=Math.atan2(i,e)+(t-c.PI/2+m)*n;let s=Math.sqrt(e*e+i*i);x.b=Math.cos(t)*s,x.d=Math.sin(t)*s}x.updateAppliedTransform()}}applyAbsoluteLocal(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=this.target,o=this.bones;for(let h=0,l=o.length;h=s.length&&(s.length=t+1),s[t]||(s[t]={}),s[t][e]=i}addSkin(t){for(let e=0;e= 0.");if(!e)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}},Re=(t=>(t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen",t))(Re||{}),Fe=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Ye=class{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){let e=this.scale,i=new Ee;i.name="";let s=new Pe(t),r=s.readInt32(),n=s.readInt32();i.hash=0==n&&0==r?null:n.toString(16)+r.toString(16),i.version=s.readString(),i.x=s.readFloat(),i.y=s.readFloat(),i.width=s.readFloat(),i.height=s.readFloat();let a=s.readBoolean();a&&(i.fps=s.readFloat(),i.imagesPath=s.readString(),i.audioPath=s.readString());let o=0;o=s.readInt(!0);for(let t=0;t>4,t.readFloat())}s.push(e);break}}}}}let n=t.readInt(!0);if(n>0){let e=new bt(n),r=i.slots.length;for(let i=0;i=0;t--)a[t]=-1;let o=m.newArray(r-n,0),h=0,l=0;for(let e=0;e=0;t--)-1==a[t]&&(a[t]=o[--l]);e.setFrame(i,s,a)}s.push(e)}let a=t.readInt(!0);if(a>0){let e=new vt(a);for(let s=0;s>>1^-(1&i)}readStringRef(){let t=this.readInt(!0);return 0==t?null:this.strings[t-1]}readString(){let t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;let e="";for(let i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(t),i++}}return e}readFloat(){let t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}},Xe=class{constructor(t,e,i,s,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=s,this.inheritTimeline=r}},Le=class{constructor(t=null,e=null){this.bones=t,this.vertices=e}},Oe=(t=>(t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping",t))(Oe||{});function De(t,e,i){let s=t.readFloat(),r=t.readFloat()*i;for(let n=0,a=0,o=e.getFrameCount()-1;e.setFrame(n,s,r),n!=o;n++){let o=t.readFloat(),h=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(n);break;case li:Ve(t,e,a++,n,0,s,o,r,h,i)}s=o,r=h}return e}function Be(t,e,i){let s=t.readFloat(),r=t.readFloat()*i,n=t.readFloat()*i;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,s,r,n),a!=h;a++){let h=t.readFloat(),l=t.readFloat()*i,c=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(a);break;case li:Ve(t,e,o++,a,0,s,h,r,l,i),Ve(t,e,o++,a,1,s,h,n,c,i)}s=h,r=l,n=c}return e}function Ve(t,e,i,s,r,n,a,o,h,l){e.setBezier(i,s,r,n,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,a,h)}var ze,Ne=0,_e=1,Ue=2,We=3,qe=4,Ge=5,je=6,He=7,Ze=8,Ke=9,Je=0,Qe=1,$e=2,ti=3,ei=4,ii=5,si=0,ri=1,ni=0,ai=1,oi=2,hi=1,li=2,ci=class{constructor(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new x((()=>m.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");let i=this.boundingBoxes,s=this.polygons,r=this.polygonPool,n=t.slots,a=n.length;i.length=0,r.freeAll(s),s.length=0;for(let t=0;t=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,i,s){let r=this.minX,n=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=n&&s<=n||t>=a&&i>=a||e>=o&&s>=o)return!1;let h=(s-e)/(i-t),l=h*(r-t)+e;if(l>n&&ln&&lr&&cr&&ct.minX&&this.minYt.minY}containsPoint(t,e){let i=this.polygons;for(let s=0,r=i.length;s=i||o=i){let h=s[t];h+(i-r)/(o-r)*(s[n]-h)=c&&x<=a||x>=a&&x<=c)&&(x>=e&&x<=s||x>=s&&x<=e)){let t=(l*m-h*f)/g;if((t>=u&&t<=d||t>=d&&t<=u)&&(t>=i&&t<=r||t>=r&&t<=i))return!0}c=a,u=d}return!1}getPolygon(t){if(!t)throw new Error("boundingBox cannot be null.");let e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}},ui=class{constructor(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new x((()=>new Array)),this.polygonIndicesPool=new x((()=>new Array))}triangulate(t){let e=t,i=t.length>>1,s=this.indicesArray;s.length=0;for(let t=0;t3;){let t=i-1,a=0,o=1;for(;;){t:if(!r[a]){let n=s[t]<<1,h=s[a]<<1,l=s[o]<<1,c=e[n],u=e[n+1],d=e[h],f=e[h+1],p=e[l],m=e[l+1];for(let n=(o+1)%i;n!=t;n=(n+1)%i){if(!r[n])continue;let t=s[n]<<1,i=e[t],a=e[t+1];if(ui.positiveArea(p,m,c,u,i,a)&&ui.positiveArea(c,u,d,f,i,a)&&ui.positiveArea(d,f,p,m,i,a))break t}break}if(0==o){do{if(!r[a])break;a--}while(a>0);break}t=a,a=o,o=(o+1)%i}n.push(s[(i+a-1)%i]),n.push(s[a]),n.push(s[(a+1)%i]),s.splice(a,1),r.splice(a,1),i--;let h=(i+a-1)%i,l=a==i?0:a;r[h]=ui.isConcave(h,i,e,s),r[l]=ui.isConcave(l,i,e,s)}return 3==i&&(n.push(s[2]),n.push(s[0]),n.push(s[1])),n}decompose(t,e){let i=t,s=this.convexPolygons;this.polygonPool.freeAll(s),s.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let n=this.polygonIndicesPool.obtain();n.length=0;let a=this.polygonPool.obtain();a.length=0;let o=-1,h=0;for(let t=0,l=e.length;t0?(s.push(a),r.push(n)):(this.polygonPool.free(a),this.polygonIndicesPool.free(n)),a=this.polygonPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),a.push(m),a.push(g),a.push(x),n=this.polygonIndicesPool.obtain(),n.length=0,n.push(l),n.push(c),n.push(u),h=ui.winding(d,f,p,m,g,x),o=l)}a.length>0&&(s.push(a),r.push(n));for(let t=0,e=s.length;t=0;t--)a=s[t],0==a.length&&(s.splice(t,1),this.polygonPool.free(a),n=r[t],r.splice(t,1),this.polygonIndicesPool.free(n));return s}static isConcave(t,e,i,s){let r=s[(e+t-1)%e]<<1,n=s[t]<<1,a=s[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[n],i[n+1],i[a],i[a+1])}static positiveArea(t,e,i,s,r,n){return t*(n-s)+i*(e-n)+r*(s-e)>=0}static winding(t,e,i,s,r,n){let a=i-t,o=s-e;return r*o-n*a+a*e-t*o>=0?1:-1}},di=class{constructor(){this.triangulator=new ui,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}clipStart(t,e){if(this.clipAttachment)return 0;this.clipAttachment=e;let i=e.worldVerticesLength,s=m.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,s,0,2);let r=this.clippingPolygon;di.makeClockwise(r);let n=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let t=0,e=n.length;t>1,C=this.clipOutput,R=m.setArraySize(l,e+k*f);for(let h=0;h=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(s),h.push(r),h.push(n),h.push(t),h.push(e),o.length=0;let u=a,d=a.length-4;for(let t=0;;t+=2){let e=u[t],i=u[t+1],s=u[t+2],r=u[t+3],n=e-s,a=i-r,f=h,p=h.length-2,m=o.length;for(let t=0;t0;if(n*(l-r)-a*(h-s)>0){if(p){o.push(u),o.push(d);continue}let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i)}else if(p){let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i);o.push(u),o.push(d)}c=!0}if(m==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),t==d)break;let g=o;(o=h).length=0,h=g}if(l!=o){l.length=0;for(let t=0,e=o.length-2;t>1;t=0;e--)-1==o[e]&&(o[e]=t[--r])}e.setFrame(n,wi(a,"time",0),o)}r.push(e)}if(t.events){let e=new vt(t.events.length),s=0;for(let r=0;rnew yi(t)),t,e)}},Ai=m.newFloatArray(8),Si=class{constructor(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=m.newFloatArray(8192),this.tempColor=new h,this.ctx=t}draw(t){this.triangleRendering?this.drawTriangles(t):this.drawImages(t)}drawImages(t){let e=this.ctx,i=this.tempColor,s=t.color,r=t.drawOrder;this.debugRendering&&(e.strokeStyle="green");for(let t=0,n=r.length;t{if(n&&"object"==typeof n||"function"==typeof n)for(let h of i(n))s.call(r,h)||h===a||t(r,h,{get:()=>n[h],enumerable:!(o=e(n,h))||o.enumerable});return r})(t({},"__esModule",{value:!0}),vi)})();t.exports=e}).call(window)},7518:t=>{(function(){"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r={};((e,i)=>{for(var s in i)t(e,s,{get:i[s],enumerable:!0})})(r,{AlphaTimeline:()=>ft,Animation:()=>k,AnimationState:()=>Rt,AnimationStateAdapter:()=>Xt,AnimationStateData:()=>_t,AssetManager:()=>Mi,AssetManagerBase:()=>ce,AtlasAttachmentLoader:()=>ne,Attachment:()=>b,AttachmentTimeline:()=>gt,BinaryInput:()=>Pe,BlendMode:()=>Re,Bone:()=>he,BoneData:()=>ae,BoundingBoxAttachment:()=>Ut,CURRENT:()=>Nt,CameraController:()=>ji,ClippingAttachment:()=>Wt,Color:()=>h,Color2Attribute:()=>is,ColorAttribute:()=>es,ConstraintData:()=>le,CurveTimeline:()=>Q,CurveTimeline1:()=>$,CurveTimeline2:()=>tt,DebugUtils:()=>g,DeformTimeline:()=>xt,Downloader:()=>ue,DrawOrderTimeline:()=>bt,Event:()=>de,EventData:()=>fe,EventQueue:()=>Yt,EventTimeline:()=>vt,EventType:()=>Pt,FIRST:()=>Ot,FakeTexture:()=>Zt,GLTexture:()=>Si,HOLD_FIRST:()=>Bt,HOLD_MIX:()=>Vt,HOLD_SUBSEQUENT:()=>Dt,IkConstraint:()=>pe,IkConstraintData:()=>me,IkConstraintTimeline:()=>At,Input:()=>qi,IntSet:()=>n,Interpolation:()=>u,LoadingScreen:()=>As,M00:()=>Ei,M01:()=>Ti,M02:()=>ki,M03:()=>Ci,M10:()=>Ri,M11:()=>Fi,M12:()=>Yi,M13:()=>Pi,M20:()=>Xi,M21:()=>Li,M22:()=>Oi,M23:()=>Di,M30:()=>Bi,M31:()=>Vi,M32:()=>zi,M33:()=>Ni,ManagedWebGLRenderingContext:()=>vi,MathUtils:()=>c,Matrix4:()=>Ui,Mesh:()=>Ki,MeshAttachment:()=>te,MixBlend:()=>C,MixDirection:()=>R,OrthoCamera:()=>Wi,PathAttachment:()=>ee,PathConstraint:()=>be,PathConstraintData:()=>ge,PathConstraintMixTimeline:()=>Et,PathConstraintPositionTimeline:()=>Mt,PathConstraintSpacingTimeline:()=>It,PointAttachment:()=>ie,PolygonBatcher:()=>ns,Pool:()=>x,Position2Attribute:()=>Qi,Position3Attribute:()=>$i,PositionMode:()=>xe,Pow:()=>d,PowOut:()=>f,RGB2Timeline:()=>mt,RGBA2Timeline:()=>pt,RGBATimeline:()=>ut,RGBTimeline:()=>dt,RegionAttachment:()=>re,ResizeMode:()=>vs,RotateMode:()=>ve,RotateTimeline:()=>et,SETUP:()=>zt,SUBSEQUENT:()=>Lt,ScaleTimeline:()=>nt,ScaleXTimeline:()=>at,ScaleYTimeline:()=>ot,SceneRenderer:()=>ws,SequenceTimeline:()=>kt,Shader:()=>Zi,ShapeRenderer:()=>as,ShapeType:()=>os,ShearTimeline:()=>ht,ShearXTimeline:()=>lt,ShearYTimeline:()=>ct,Skeleton:()=>Ie,SkeletonBinary:()=>Ye,SkeletonBounds:()=>ci,SkeletonClipping:()=>di,SkeletonData:()=>Ee,SkeletonDebugRenderer:()=>ls,SkeletonJson:()=>fi,SkeletonRenderer:()=>us,Skin:()=>ke,SkinEntry:()=>Te,Slot:()=>Ae,SlotData:()=>Ce,SpacingMode:()=>we,SpineCanvas:()=>Is,StringSet:()=>a,TexCoordAttribute:()=>ts,Texture:()=>qt,TextureAtlas:()=>Kt,TextureAtlasPage:()=>Qt,TextureAtlasRegion:()=>$t,TextureFilter:()=>Gt,TextureRegion:()=>Ht,TextureWrap:()=>jt,TimeKeeper:()=>v,Timeline:()=>J,Touch:()=>Gi,TrackEntry:()=>Ft,TransformConstraint:()=>Se,TransformConstraintData:()=>Fe,TransformConstraintTimeline:()=>St,TransformMode:()=>oe,TranslateTimeline:()=>it,TranslateXTimeline:()=>st,TranslateYTimeline:()=>rt,Triangulator:()=>ui,Utils:()=>m,Vector2:()=>w,Vector3:()=>Ii,VertexAttachment:()=>S,VertexAttribute:()=>Ji,VertexAttributeType:()=>ss,WebGLBlendModeConverter:()=>bi,WindowedMean:()=>y});var n=class{constructor(){this.array=new Array}add(t){let e=this.contains(t);return this.array[0|t]=0|t,!e}contains(t){return null!=this.array[0|t]}remove(t){this.array[0|t]=void 0}clear(){this.array.length=0}},a=class{constructor(){this.entries={},this.size=0}add(t){let e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){let e=this.size;for(var i=0,s=t.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}static rgb888ToColor(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}static fromString(t){return(new o).setFromString(t)}},h=o;h.WHITE=new o(1,1,1,1),h.RED=new o(1,0,0,1),h.GREEN=new o(0,1,0,1),h.BLUE=new o(0,0,1,1),h.MAGENTA=new o(1,0,1,1);var l=class{static clamp(t,e,i){return ti?i:t}static cosDeg(t){return Math.cos(t*l.degRad)}static sinDeg(t){return Math.sin(t*l.degRad)}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){let e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return l.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,i){let s=Math.random(),r=e-t;return s<=(i-t)/r?t+Math.sqrt(s*r*(i-t)):e-Math.sqrt((1-s)*r*(e-i))}static isPowerOfTwo(t){return t&&0==(t&t-1)}},c=l;c.PI=3.1415927,c.PI2=2*l.PI,c.radiansToDegrees=180/l.PI,c.radDeg=l.radiansToDegrees,c.degreesToRadians=l.PI/180,c.degRad=l.degreesToRadians;var u=class{apply(t,e,i){return t+(e-t)*this.applyInternal(i)}},d=class extends u{constructor(t){super(),this.power=2,this.power=t}applyInternal(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}},f=class extends d{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}},p=class{static arrayCopy(t,e,i,s,r){for(let n=e,a=s;n=e?t:p.setArraySize(t,e,i)}static newArray(t,e){let i=new Array(t);for(let s=0;s0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},y=class{constructor(t=32){this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e>1)*n;let a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(!l){o.length>0&&(h=o);let a=t.bone,l=a.worldX,c=a.worldY,u=a.a,d=a.b,f=a.c,p=a.d;for(let t=e,a=r;a=this.regions.length&&(i=this.regions.length-1);let s=this.regions[i];e.region!=s&&(e.region=s,e.updateRegion())}getPath(t,e){let i=t,s=(this.start+e).toString();for(let t=this.digits-s.length;t>0;t--)i+="0";return i+=s,i}static nextID(){return M._nextID++}},I=M;I._nextID=0;var E=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(E||{}),T=[0,1,2,3,4,5,6],k=class{constructor(t,e,i){if(this.timelines=[],this.timelineIds=new a,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=i}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));let h=this.timelines;for(let s=0,l=h.length;s(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(C||{}),R=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(R||{}),F=0,Y=1,P=2,X=3,L=4,O=5,D=6,B=7,V=8,z=9,N=10,_=11,U=12,W=13,q=14,G=15,j=16,H=17,Z=18,K=19,J=class{constructor(t,e){this.propertyIds=e,this.frames=m.newFloatArray(t*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(t,e){let i=t.length;for(let s=1;se)return s-1;return i-1}static search(t,e,i){let s=t.length;for(let r=i;re)return r-i;return s-i}},Q=class extends J{constructor(t,e,i){super(t,i),this.curves=m.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let e=this.getFrameCount()+18*t;if(this.curves.length>e){let t=m.newFloatArray(e);m.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,i,s,r,n,a,o,h,l,c){let u=this.curves,d=this.getFrameCount()+18*t;0==i&&(u[e]=2+d);let f=.03*(s-2*n+o),p=.03*(r-2*a+h),m=.006*(3*(n-o)-s+l),g=.006*(3*(a-h)-r+c),x=2*f+m,w=2*p+g,v=.3*(n-s)+f+.16666667*m,y=.3*(a-r)+p+.16666667*g,b=s+v,A=r+y;for(let t=d+18;dt){let n=this.frames[e],a=this.frames[e+i];return a+(t-n)/(r[s]-n)*(r[s+1]-a)}let n=s+18;for(s+=2;s=t){let e=r[s-2],i=r[s-1];return i+(t-e)/(r[s]-e)*(r[s+1]-i)}e+=this.getFrameEntries();let a=r[n-2],o=r[n-1];return o+(t-a)/(this.frames[e]-a)*(this.frames[e+i]-o)}},$=class extends Q{constructor(t,e,i){super(t,e,[i])}getFrameEntries(){return 2}setFrame(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+1]=i}getCurveValue(t){let e=this.frames,i=e.length-2;for(let s=2;s<=i;s+=2)if(e[s]>t){i=s-2;break}let s=this.curves[i>>1];switch(s){case 0:let s=e[i],r=e[i+1];return r+(t-s)/(e[i+2]-s)*(e[i+2+1]-r);case 1:return e[i+1]}return this.getBezierValue(t,i,1,s-2)}},tt=class extends Q{constructor(t,e,i,s){super(t,e,[i,s])}getFrameEntries(){return 3}setFrame(t,e,i,s){t*=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s}},et=class extends ${constructor(t,e,i){super(t,e,F+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i>2];switch(p){case 0:let t=h[f];c=h[f+1],u=h[f+2],d=h[f+3];let e=(i-t)/(h[f+4]-t);c+=(h[f+4+1]-c)*e,u+=(h[f+4+2]-u)*e,d+=(h[f+4+3]-d)*e;break;case 1:c=h[f+1],u=h[f+2],d=h[f+3];break;default:c=this.getBezierValue(i,f,1,p-2),u=this.getBezierValue(i,f,2,p+18-2),d=this.getBezierValue(i,f,3,p+36-2)}if(1==r)l.r=c,l.g=u,l.b=d;else{if(0==n){let t=o.data.color;l.r=t.r,l.g=t.g,l.b=t.b}l.r+=(c-l.r)*r,l.g+=(u-l.g)*r,l.b+=(d-l.b)*r}}},ft=class extends ${constructor(t,e,i){super(t,e,V+"|"+i),this.slotIndex=0,this.slotIndex=i}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.color;if(i>3];switch(v){case 0:let t=h[w];u=h[w+1],d=h[w+2],f=h[w+3],p=h[w+4],m=h[w+5],g=h[w+6],x=h[w+7];let e=(i-t)/(h[w+8]-t);u+=(h[w+8+1]-u)*e,d+=(h[w+8+2]-d)*e,f+=(h[w+8+3]-f)*e,p+=(h[w+8+4]-p)*e,m+=(h[w+8+5]-m)*e,g+=(h[w+8+6]-g)*e,x+=(h[w+8+7]-x)*e;break;case 1:u=h[w+1],d=h[w+2],f=h[w+3],p=h[w+4],m=h[w+5],g=h[w+6],x=h[w+7];break;default:u=this.getBezierValue(i,w,1,v-2),d=this.getBezierValue(i,w,2,v+18-2),f=this.getBezierValue(i,w,3,v+36-2),p=this.getBezierValue(i,w,4,v+54-2),m=this.getBezierValue(i,w,5,v+72-2),g=this.getBezierValue(i,w,6,v+90-2),x=this.getBezierValue(i,w,7,v+108-2)}if(1==r)l.set(u,d,f,p),c.r=m,c.g=g,c.b=x;else{if(0==n){l.setFromColor(o.data.color);let t=o.data.darkColor;c.r=t.r,c.g=t.g,c.b=t.b}l.add((u-l.r)*r,(d-l.g)*r,(f-l.b)*r,(p-l.a)*r),c.r+=(m-c.r)*r,c.g+=(g-c.g)*r,c.b+=(x-c.b)*r}}},mt=class extends Q{constructor(t,e,i){super(t,e,[B+"|"+i,z+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,s,r,n,a,o){t*=7,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n,this.frames[t+5]=a,this.frames[t+6]=o}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,c=o.darkColor;if(it){let r=this.frames[e];return i[s+1]*(t-r)/(i[s]-r)}let r=s+18;for(s+=2;s=t){let e=i[s-2],r=i[s-1];return r+(t-e)/(i[s]-e)*(i[s+1]-r)}let n=i[r-2],a=i[r-1];return a+(1-a)*(t-n)/(this.frames[e+this.getFrameEntries()]-n)}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.getAttachment();if(!h)return;if(!(h instanceof S)||h.timelineAttachment!=this.attachment)return;let l=o.deform;0==l.length&&(n=0);let c=this.vertices,u=c[0].length,d=this.frames;if(i=d[d.length-1]){let t=c[d.length-1];if(1==r)if(3==n){let e=h;if(e.bones)for(let e=0;ei)this.apply(t,e,Number.MAX_VALUE,s,r,n,a),e=-1;else if(e>=o[h-1])return;if(i0&&o[l-1]==t;)l--}for(;l=o[l];l++)s.push(this.events[l])}},vt=wt;vt.propertyIds=[""+U];var yt=class extends J{constructor(t){super(t,yt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.drawOrders[t]=i}apply(t,e,i,s,r,n,a){if(1==a)return void(0==n&&m.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(i>2];switch(f){case 0:let t=u[d];h=u[d+1],l=u[d+2],c=u[d+3];let e=(i-t)/(u[d+4]-t);h+=(u[d+4+1]-h)*e,l+=(u[d+4+2]-l)*e,c+=(u[d+4+3]-c)*e;break;case 1:h=u[d+1],l=u[d+2],c=u[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),c=this.getBezierValue(i,d,3,f+36-2)}if(0==n){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*r,o.mixX=t.mixX+(l-t.mixX)*r,o.mixY=t.mixY+(c-t.mixY)*r}else o.mixRotate+=(h-o.mixRotate)*r,o.mixX+=(l-o.mixX)*r,o.mixY+=(c-o.mixY)*r}},Tt=class extends J{constructor(t,e,i){super(t,[K+"|"+e+"|"+i.sequence.id]),this.slotIndex=e,this.attachment=i}getFrameEntries(){return Tt.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,i,s,r){let n=this.frames;n[t*=Tt.ENTRIES]=e,n[t+Tt.MODE]=i|s<<4,n[t+Tt.DELAY]=r}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.attachment,l=this.attachment;if(!(h==l||h instanceof S&&h.timelineAttachment==l))return;let c=this.frames;if(i>4,g=this.attachment.sequence.regions.length,x=T[15&f];if(0!=x)switch(m+=(i-d)/p+1e-5|0,x){case 1:m=Math.min(g-1,m);break;case 2:m%=g;break;case 3:{let t=(g<<1)-2;m=0==t?0:m%t,m>=g&&(m=t-m);break}case 4:m=Math.max(g-1-m,0);break;case 5:m=g-1-m%g;break;case 6:{let t=(g<<1)-2;m=0==t?0:(m+g-1)%t,m>=g&&(m=t-m)}}o.sequenceIndex=m}},kt=Tt;kt.ENTRIES=3,kt.MODE=1,kt.DELAY=2;var Ct=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Yt(this),this.propertyIDs=new a,this.animationsChanged=!1,this.trackEntryPool=new x((()=>new Ft)),this.data=t}static emptyAnimation(){return Ct._emptyAnimation}update(t){t*=this.timeScale;let e=this.tracks;for(let i=0,s=e.length;i0){if(s.delay-=r,s.delay>0)continue;r=-s.delay,s.delay=0}let n=s.next;if(n){let e=s.trackLast-n.delay;if(e>=0){for(n.delay=0,n.trackTime+=0==s.timeScale?0:(e/s.timeScale+t)*n.timeScale,s.trackTime+=r,this.setCurrent(i,n,!0);n.mixingFrom;)n.mixTime+=t,n=n.mixingFrom;continue}}else if(s.trackLast>=s.trackEnd&&!s.mixingFrom){e[i]=null,this.queue.end(s),this.clearNext(s);continue}if(s.mixingFrom&&this.updateMixingFrom(s,t)){let t=s.mixingFrom;for(s.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}s.trackTime+=r}this.queue.drain()}updateMixingFrom(t,e){let i=t.mixingFrom;if(!i)return!0;let s=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),s):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let e=this.events,i=this.tracks,s=!1;for(let n=0,a=i.length;n0)continue;s=!0;let o=0==n?1:a.mixBlend,h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let l=a.animationLast,c=a.getAnimationTime(),u=c,d=e;a.reverse&&(u=a.animation.duration-u,d=null);let f=a.animation.timelines,p=f.length;if(0==n&&1==h||3==o)for(let e=0;e1&&(r=1),1!=i&&(i=s.mixBlend));let n=r0&&this.queueEvents(s,d),this.events.length=0,s.nextAnimationLast=d,s.nextTrackLast=s.trackTime,r}applyAttachmentTimeline(t,e,i,s,r){var n=e.slots[t.slotIndex];n.bone.active&&(i0,s=t>=0;c.signum(e)!=c.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*c.signum(t)),s=i),d=f+t-t%360,s!=i&&(d+=360*c.signum(t)),n[a]=d}n[a+1]=f,h.rotation=l+d*s}queueEvents(t,e){let i=t.animationStart,s=t.animationEnd,r=s-i,n=t.trackLast%r,a=this.events,o=0,h=a.length;for(;os||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==r||n>t.trackTime%r:e>=s&&t.animationLast=this.tracks.length)return;let e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let i=e;for(;;){let t=i.mixingFrom;if(!t)break;this.queue.end(t),i.mixingFrom=null,i.mixingTo=null,i=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,i){let s=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,s&&(i&&this.queue.interrupt(s),e.mixingFrom=s,s.mixingTo=e,e.mixTime=0,s.mixingFrom&&s.mixDuration>0&&(e.interruptAlpha*=Math.min(1,s.mixTime/s.mixDuration)),s.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,i=!1){let s=this.data.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,s,i)}setAnimationWith(t,e,i=!1){if(!e)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));let n=this.trackEntry(t,e,i,r);return this.setCurrent(t,n,s),this.queue.drain(),n}addAnimation(t,e,i=!1,s=0){let r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,s)}addAnimationWith(t,e,i=!1,s=0){if(!e)throw new Error("animation cannot be null.");let r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;let n=this.trackEntry(t,e,i,r);return r?(r.next=n,n.previous=r,s<=0&&(s+=r.getTrackComplete()-n.mixDuration)):(this.setCurrent(t,n,!0),this.queue.drain()),n.delay=s,n}setEmptyAnimation(t,e=0){let i=this.setAnimationWith(t,Ct.emptyAnimation(),!1);return i.mixDuration=e,i.trackEnd=e,i}addEmptyAnimation(t,e=0,i=0){let s=this.addAnimationWith(t,Ct.emptyAnimation(),!1,i);return i<=0&&(s.delay+=s.mixDuration-e),s.mixDuration=e,s.trackEnd=e,s}setEmptyAnimations(t=0){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,i=this.tracks.length;e0){r[o]=Vt,n[o]=i;continue t}break}r[o]=Bt}else r[o]=Lt}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},Rt=Ct;Rt._emptyAnimation=new k("",[],0);var Ft=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=2,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(t){this.animationLast=t,this.nextAnimationLast=t}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime(t[t.start=0]="start",t[t.interrupt=1]="interrupt",t[t.end=2]="end",t[t.dispose=3]="dispose",t[t.complete=4]="complete",t[t.event=5]="event",t))(Pt||{}),Xt=class{start(t){}interrupt(t){}end(t){}dispose(t){}complete(t){}event(t,e){}},Lt=0,Ot=1,Dt=2,Bt=3,Vt=4,zt=1,Nt=2,_t=class{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,i){let s=this.skeletonData.findAnimation(t);if(!s)throw new Error("Animation not found: "+t);let r=this.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);this.setMixWith(s,r,i)}setMixWith(t,e,i){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");let s=t.name+"."+e.name;this.animationToMixTime[s]=i}getMix(t,e){let i=t.name+"."+e.name,s=this.animationToMixTime[i];return void 0===s?this.defaultMix:s}},Ut=class extends S{constructor(t){super(t),this.color=new h(1,1,1,1)}copy(){let t=new Ut(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}},Wt=class extends S{constructor(t){super(t),this.endSlot=null,this.color=new h(.2275,.2275,.8078,1)}copy(){let t=new Wt(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}},qt=class{constructor(t){this._image=t}getImage(){return this._image}},Gt=(t=>(t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear",t))(Gt||{}),jt=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(jt||{}),Ht=class{constructor(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}},Zt=class extends qt{setFilters(t,e){}setWraps(t,e){}dispose(){}},Kt=class{constructor(t){this.pages=new Array,this.regions=new Array;let e=new Jt(t),i=new Array(4),s={size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},format:()=>{},filter:t=>{t.minFilter=m.enumValue(Gt,i[1]),t.magFilter=m.enumValue(Gt,i[2])},repeat:t=>{-1!=i[1].indexOf("x")&&(t.uWrap=10497),-1!=i[1].indexOf("y")&&(t.vWrap=10497)},pma:t=>{t.pma="true"==i[1]}};var r={xy:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2])},size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},bounds:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2]),t.width=parseInt(i[3]),t.height=parseInt(i[4])},offset:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2])},orig:t=>{t.originalWidth=parseInt(i[1]),t.originalHeight=parseInt(i[2])},offsets:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2]),t.originalWidth=parseInt(i[3]),t.originalHeight=parseInt(i[4])},rotate:t=>{let e=i[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:t=>{t.index=parseInt(i[1])}};let n=e.readLine();for(;n&&0==n.trim().length;)n=e.readLine();for(;n&&0!=n.trim().length&&0!=e.readEntry(i,n);)n=e.readLine();let a=null,o=null,h=null;for(;null!==n;)if(0==n.trim().length)a=null,n=e.readLine();else if(a){let t=new $t(a,n);for(;;){let s=e.readEntry(i,n=e.readLine());if(0==s)break;let a=r[i[0]];if(a)a(t);else{o||(o=[]),h||(h=[]),o.push(i[0]);let t=[];for(let e=0;e0&&h&&h.length>0&&(t.names=o,t.values=h,o=null,h=null),t.u=t.x/a.width,t.v=t.y/a.height,90==t.degrees?(t.u2=(t.x+t.height)/a.width,t.v2=(t.y+t.width)/a.height):(t.u2=(t.x+t.width)/a.width,t.v2=(t.y+t.height)/a.height),this.regions.push(t)}else{for(a=new Qt(n.trim());0!=e.readEntry(i,n=e.readLine());){let t=s[i[0]];t&&t(a)}this.pages.push(a)}}findRegion(t){for(let e=0;e=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;let i=e.indexOf(":");if(-1==i)return 0;t[0]=e.substr(0,i).trim();for(let s=1,r=i+1;;s++){let i=e.indexOf(",",r);if(-1==i)return t[s]=e.substr(r).trim(),s;if(t[s]=e.substr(r,i-r).trim(),r=i+1,4==s)return 4}}},Qt=class{constructor(t){this.minFilter=9728,this.magFilter=9728,this.uWrap=33071,this.vWrap=33071,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.name=t}setTexture(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}},$t=class extends Ht{constructor(t,e){super(),this.x=0,this.y=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.index=0,this.degrees=0,this.names=null,this.values=null,this.page=t,this.name=e}},te=class extends S{constructor(t,e){super(t),this.region=null,this.regionUVs=[],this.uvs=[],this.triangles=[],this.color=new h(1,1,1,1),this.width=0,this.height=0,this.hullLength=0,this.edges=[],this.parentMesh=null,this.sequence=null,this.tempColor=new h(0,0,0,0),this.path=e}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=m.newFloatArray(t.length));let e=this.uvs,i=this.uvs.length,s=this.region.u,r=this.region.v,n=0,a=0;if(this.region instanceof $t){let o=this.region,h=o.page.texture.getImage(),l=h.width,c=h.height;switch(o.degrees){case 90:s-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/c,n=o.originalHeight/l,a=o.originalWidth/c;for(let o=0;o= 0.");if(!e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}},oe=(t=>(t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection",t))(oe||{}),he=class{constructor(t,e,i){if(this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}isActive(){return this.active}update(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(t,e,i,s,r,n,a){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=s,this.ascaleY=r,this.ashearX=n,this.ashearY=a;let o=this.parent;if(!o){let o=this.skeleton,h=i+90+a,l=o.scaleX,u=o.scaleY;return this.a=c.cosDeg(i+n)*s*l,this.b=c.cosDeg(h)*r*l,this.c=c.sinDeg(i+n)*s*u,this.d=c.sinDeg(h)*r*u,this.worldX=t*l+o.x,void(this.worldY=e*u+o.y)}let h=o.a,l=o.b,u=o.c,d=o.d;switch(this.worldX=h*t+l*e+o.worldX,this.worldY=u*t+d*e+o.worldY,this.data.transformMode){case 0:{let t=i+90+a,e=c.cosDeg(i+n)*s,o=c.cosDeg(t)*r,f=c.sinDeg(i+n)*s,p=c.sinDeg(t)*r;return this.a=h*e+l*f,this.b=h*o+l*p,this.c=u*e+d*f,void(this.d=u*o+d*p)}case 1:{let t=i+90+a;this.a=c.cosDeg(i+n)*s,this.b=c.cosDeg(t)*r,this.c=c.sinDeg(i+n)*s,this.d=c.sinDeg(t)*r;break}case 2:{let t=h*h+u*u,e=0;t>1e-4?(t=Math.abs(h*d-l*u)/t,h/=this.skeleton.scaleX,u/=this.skeleton.scaleY,l=u*t,d=h*t,e=Math.atan2(u,h)*c.radDeg):(h=0,u=0,e=90-Math.atan2(d,l)*c.radDeg);let o=i+n-e,f=i+a-e+90,p=c.cosDeg(o)*s,m=c.cosDeg(f)*r,g=c.sinDeg(o)*s,x=c.sinDeg(f)*r;this.a=h*p-l*g,this.b=h*m-l*x,this.c=u*p+d*g,this.d=u*m+d*x;break}case 3:case 4:{let t=c.cosDeg(i),e=c.sinDeg(i),o=(h*t+l*e)/this.skeleton.scaleX,f=(u*t+d*e)/this.skeleton.scaleY,p=Math.sqrt(o*o+f*f);p>1e-5&&(p=1/p),o*=p,f*=p,p=Math.sqrt(o*o+f*f),3==this.data.transformMode&&h*d-l*u<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(p=-p);let m=Math.PI/2+Math.atan2(f,o),g=Math.cos(m)*p,x=Math.sin(m)*p,w=c.cosDeg(n)*s,v=c.cosDeg(90+a)*r,y=c.sinDeg(n)*s,b=c.sinDeg(90+a)*r;this.a=o*w+g*y,this.b=o*v+g*b,this.c=f*w+x*y,this.d=f*v+x*b;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}getWorldRotationX(){return Math.atan2(this.c,this.a)*c.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*c.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}updateAppliedTransform(){let t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*c.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*c.radDeg);let e=t.a,i=t.b,s=t.c,r=t.d,n=1/(e*r-i*s),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*n-o*i*n,this.ay=o*e*n-a*s*n;let h=n*r,l=n*e,u=n*i,d=n*s,f=h*this.a-u*this.c,p=h*this.b-u*this.d,m=l*this.c-d*this.a,g=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+m*m),this.ascaleX>1e-4){let t=f*g-p*m;this.ascaleY=t/this.ascaleX,this.ashearY=Math.atan2(f*p+m*g,t)*c.radDeg,this.arotation=Math.atan2(m,f)*c.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*c.radDeg}worldToLocal(t){let e=1/(this.a*this.d-this.b*this.c),i=t.x-this.worldX,s=t.y-this.worldY;return t.x=i*this.d*e-s*this.b*e,t.y=s*this.a*e-i*this.c*e,t}localToWorld(t){let e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t}worldToLocalRotation(t){let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*c.radDeg+this.rotation-this.shearX}localToWorldRotation(t){t-=this.rotation-this.shearX;let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*c.radDeg}rotateWorld(t){let e=this.a,i=this.b,s=this.c,r=this.d,n=c.cosDeg(t),a=c.sinDeg(t);this.a=n*e-a*s,this.b=n*i-a*r,this.c=a*e+n*s,this.d=a*i+n*r}},le=class{constructor(t,e,i){this.name=t,this.order=e,this.skinRequired=i}},ce=class{constructor(t,e="",i=new ue){this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=t,this.pathPrefix=e,this.downloader=i}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,i){this.toLoad--,this.loaded++,this.assets[e]=i,t&&t(e,i)}error(t,e,i){this.toLoad--,this.loaded++,this.errors[e]=i,t&&t(e,i)}loadAll(){return new Promise(((t,e)=>{let i=()=>{this.isLoadingComplete()?this.hasErrors()?e(this.errors):t(this):requestAnimationFrame(i)};requestAnimationFrame(i)}))}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadBinary(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load binary ${t}: status ${e}, ${s}`)}))}loadText(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadText(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load text ${t}: status ${e}, ${s}`)}))}loadJson(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadJson(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load JSON ${t}: status ${e}, ${s}`)}))}loadTexture(t,e=(()=>{}),i=(()=>{})){if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then((e=>e.ok?e.blob():(this.error(i,t,`Couldn't load image: ${t}`),null))).then((t=>t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null)).then((i=>{i&&this.success(e,t,this.textureLoader(i))}));else{let s=new Image;s.crossOrigin="anonymous",s.onload=()=>{this.success(e,t,this.textureLoader(s))},s.onerror=()=>{this.error(i,t,`Couldn't load image: ${t}`)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),s.src=t}}loadTextureAtlas(t,e=(()=>{}),i=(()=>{}),s){let r=t.lastIndexOf("/"),n=r>=0?t.substring(0,r+1):"";t=this.start(t),this.downloader.downloadText(t,(r=>{try{let a=new Kt(r),o=a.pages.length,h=!1;for(let r of a.pages)this.loadTexture(s?s[r.name]:n+r.name,((i,s)=>{h||(r.setTexture(s),0==--o&&this.success(e,t,a))}),((e,s)=>{h||this.error(i,t,`Couldn't load texture atlas ${t} page image: ${e}`),h=!0}))}catch(e){this.error(i,t,`Couldn't parse texture atlas ${t}: ${e.message}`)}}),((e,s)=>{this.error(i,t,`Couldn't load texture atlas ${t}: status ${e}, ${s}`)}))}get(t){return this.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;let e=this.assets[t];if(e)return e;let i=this.errors[t];throw Error("Asset not found: "+t+(i?"\n"+i:""))}remove(t){t=this.pathPrefix+t;let e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}removeAll(){for(let t in this.assets){let e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}isLoadingComplete(){return 0==this.toLoad}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}},ue=class{constructor(){this.callbacks={},this.rawDataUris={}}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return-1!=e?(e+="base64,".length,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){for(var e=window.atob(t),i=e.length,s=new Uint8Array(i),r=0;r{this.finish(t,s.status,s.responseText)};s.onload=r,s.onerror=r,s.send()}downloadJson(t,e,i){this.downloadText(t,(t=>{e(JSON.parse(t))}),i)}downloadBinary(t,e,i){if(this.start(t,e,i))return;if(this.rawDataUris[t]){try{let e=this.rawDataUris[t];this.finish(t,200,this.dataUriToUint8Array(e))}catch(e){this.finish(t,400,JSON.stringify(e))}return}let s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer";let r=()=>{this.finish(t,s.status,s.response)};s.onload=()=>{200==s.status||0==s.status?this.finish(t,200,new Uint8Array(s.response)):r()},s.onerror=r,s.send()}start(t,e,i){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,i)}}finish(t,e,i){let s=this.callbacks[t];delete this.callbacks[t];let r=200==e||0==e?[i]:[e,i];for(let t=r.length-1,e=s.length;t180?f-=360:f<-180&&(f+=360);let g=t.ascaleX,x=t.ascaleY;if(s||r){switch(t.data.transformMode){case 3:case 4:p=e-t.worldX,m=i-t.worldY}let o=t.data.length*g,h=Math.sqrt(p*p+m*m);if(s&&ho&&o>1e-4){let t=(h/o-1)*a+1;g*=t,n&&(x*=t)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,g,x,t.ashearX,t.ashearY)}apply2(t,e,i,s,r,n,a,o,h){let l=t.ax,u=t.ay,d=t.ascaleX,f=t.ascaleY,p=d,m=f,g=e.ascaleX,x=0,w=0,v=0;d<0?(d=-d,x=180,v=-1):(x=0,v=1),f<0&&(f=-f,v=-v),g<0?(g=-g,w=180):w=0;let y=e.ax,b=0,A=0,S=0,M=t.a,I=t.b,E=t.c,T=t.d,k=Math.abs(d-f)<=1e-4;!k||n?(b=0,A=M*y+t.worldX,S=E*y+t.worldY):(b=e.ay,A=M*y+I*b+t.worldX,S=E*y+T*b+t.worldY);let C=t.parent;if(!C)throw new Error("IK parent must itself have a parent.");M=C.a,I=C.b,E=C.c,T=C.d;let R,F,Y=1/(M*T-I*E),P=A-C.worldX,X=S-C.worldY,L=(P*T-X*I)*Y-l,O=(X*M-P*E)*Y-u,D=Math.sqrt(L*L+O*O),B=e.data.length*g;if(D<1e-4)return this.apply1(t,i,s,!1,n,!1,h),void e.updateWorldTransformWith(y,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);P=i-C.worldX,X=s-C.worldY;let V=(P*T-X*I)*Y-l,z=(X*M-P*E)*Y-u,N=V*V+z*z;if(0!=o){o*=d*(g+1)*.5;let t=Math.sqrt(N),e=t-D-B*d+o;if(e>0){let i=Math.min(1,e/(2*o))-1;i=(e-o*(1-i*i))/t,V-=i*V,z-=i*z,N=V*V+z*z}}t:if(k){B*=d;let t=(N-D*D-B*B)/(2*D*B);t<-1?(t=-1,F=Math.PI*r):t>1?(t=1,F=0,n&&(M=(Math.sqrt(N)/(D+B)-1)*h+1,p*=M,a&&(m*=M))):F=Math.acos(t)*r,M=D+B*t,I=B*Math.sin(F),R=Math.atan2(z*M-V*I,V*M+z*I)}else{M=d*B,I=f*B;let t=M*M,e=I*I,i=Math.atan2(z,V);E=e*D*D+t*N-t*e;let s=-2*e*D,n=e-t;if(T=s*s-4*n*E,T>=0){let t=Math.sqrt(T);s<0&&(t=-t),t=.5*-(s+t);let e=t/n,a=E/t,o=Math.abs(e)=-1&&E<=1&&(E=Math.acos(E),P=M*Math.cos(E)+D,X=I*Math.sin(E),T=P*P+X*X,Tm&&(u=E,m=T,p=P,g=X)),N<=.5*(h+m)?(R=i-Math.atan2(l*r,o),F=a*r):(R=i-Math.atan2(g*r,p),F=u*r)}let _=Math.atan2(b,y)*v,U=t.arotation;R=(R-_)*c.radDeg+x-U,R>180?R-=360:R<-180&&(R+=360),t.updateWorldTransformWith(l,u,U+R*h,p,m,0,0),U=e.arotation,F=((F+_)*c.radDeg-e.ashearX)*v+w-U,F>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(y,b,U+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}},me=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.softness=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},ge=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.positionMode=xe.Fixed,this.spacingMode=we.Fixed,this.rotateMode=ve.Chain,this.offsetRotation=0,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}},xe=(t=>(t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent",t))(xe||{}),we=(t=>(t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional",t))(we||{}),ve=(t=>(t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale",t))(ve||{}),ye=class{constructor(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(let i=0,s=t.bones.length;i0){t=l/t*f;for(let e=1;e0?c.degRad:-c.degRad}for(let t=0,r=3;t0){let i=h.a,s=h.b,a=h.c,o=h.d,l=0,d=0,f=0;if(l=n?p[r-1]:0==u[t+1]?p[r+2]:Math.atan2(y,m),l-=Math.atan2(a,i),v){d=Math.cos(l),f=Math.sin(l);let t=h.data.length;g+=(t*(d*i-f*a)-m)*e,x+=(t*(f*i+d*a)-y)*e}else l+=w;l>c.PI?l-=c.PI2:l<-c.PI&&(l+=c.PI2),l*=e,d=Math.cos(l),f=Math.sin(l),h.a=d*i-f*a,h.b=d*s-f*o,h.c=f*i+d*a,h.d=f*s+d*o}h.updateAppliedTransform()}}computeWorldPositions(t,e,i){let s=this.target,r=this.position,n=this.spaces,a=m.setArraySize(this.positions,3*e+2),o=this.world,h=t.closed,l=t.worldVerticesLength,c=l/6,u=ye.NONE;if(!t.constantSpeed){let d=t.lengths;c-=h?1:2;let f,p=d[c];switch(1==this.data.positionMode&&(r*=p),this.data.spacingMode){case 2:f=p;break;case 3:f=p/e;break;default:f=1}o=m.setArraySize(this.world,8);for(let m=0,g=0,x=0;mp){u!=ye.AFTER&&(u=ye.AFTER,t.computeWorldVertices(s,l-6,4,o,0,2)),this.addAfterPosition(w-p,o,0,a,g);continue}}for(;;x++){let t=d[x];if(!(w>t)){if(0==x)w/=t;else{let e=d[x-1];w=(w-e)/(t-e)}break}}x!=u&&(u=x,h&&x==c?(t.computeWorldVertices(s,l-4,4,o,0,2),t.computeWorldVertices(s,0,4,o,4,2)):t.computeWorldVertices(s,6*x+2,8,o,0,2)),this.addCurvePosition(w,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],a,g,i||m>0&&0==e)}return a}h?(l+=2,o=m.setArraySize(this.world,l),t.computeWorldVertices(s,2,l-4,o,0,2),t.computeWorldVertices(s,0,2,o,l-4,2),o[l-2]=o[0],o[l-1]=o[1]):(c--,l-=4,o=m.setArraySize(this.world,l),t.computeWorldVertices(s,2,l,o,0,2));let d,f=m.setArraySize(this.curves,c),p=0,g=o[0],x=o[1],w=0,v=0,y=0,b=0,A=0,S=0,M=0,I=0,E=0,T=0,k=0,C=0,R=0,F=0;for(let t=0,e=2;tp){this.addAfterPosition(X-p,o,l-4,a,s);continue}}for(;;c++){let t=f[c];if(!(X>t)){if(0==c)X/=t;else{let e=f[c-1];X=(X-e)/(t-e)}break}}if(c!=u){u=c;let t=6*c;for(g=o[t],x=o[t+1],w=o[t+2],v=o[t+3],y=o[t+4],b=o[t+5],A=o[t+6],S=o[t+7],M=.03*(g-2*w+y),I=.03*(x-2*v+b),E=.006*(3*(w-y)-g+A),T=.006*(3*(v-b)-x+S),k=2*M+E,C=2*I+T,R=.3*(w-g)+M+.16666667*E,F=.3*(v-x)+I+.16666667*T,P=Math.sqrt(R*R+F*F),Y[0]=P,t=1;t<8;t++)R+=k,F+=C,k+=E,C+=T,P+=Math.sqrt(R*R+F*F),Y[t]=P;R+=k,F+=C,P+=Math.sqrt(R*R+F*F),Y[8]=P,R+=k+E,F+=C+T,P+=Math.sqrt(R*R+F*F),Y[9]=P,m=0}for(X*=P;;m++){let t=Y[m];if(!(X>t)){if(0==m)X/=t;else{let e=Y[m-1];X=m+(X-e)/(t-e)}break}}this.addCurvePosition(.1*X,g,x,w,v,y,b,A,S,a,s,i||t>0&&0==e)}return a}addBeforePosition(t,e,i,s,r){let n=e[i],a=e[i+1],o=e[i+2]-n,h=e[i+3]-a,l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addAfterPosition(t,e,i,s,r){let n=e[i+2],a=e[i+3],o=n-e[i],h=a-e[i+1],l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addCurvePosition(t,e,i,s,r,n,a,o,h,l,c,u){if(0==t||isNaN(t))return l[c]=e,l[c+1]=i,void(l[c+2]=Math.atan2(r-i,s-e));let d=t*t,f=d*t,p=1-t,m=p*p,g=m*p,x=p*t,w=3*x,v=p*w,y=w*t,b=e*g+s*v+n*y+o*f,A=i*g+r*v+a*y+h*f;l[c]=b,l[c+1]=A,u&&(l[c+2]=t<.001?Math.atan2(r-i,s-e):Math.atan2(A-(i*m+r*x*2+a*d),b-(e*m+s*x*2+n*d)))}},be=ye;be.NONE=-1,be.BEFORE=-2,be.AFTER=-3,be.epsilon=1e-5;var Ae=class{constructor(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(t instanceof S&&this.attachment instanceof S&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},Se=class{constructor(t,e){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new w,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(let i=0;i0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=(t.x-x.worldX)*e,x.worldY+=(t.y-x.worldY)*i}if(0!=s){let t=Math.sqrt(x.a*x.a+x.c*x.c);0!=t&&(t=(t+(Math.sqrt(h*h+u*u)-t+this.data.offsetScaleX)*s)/t),x.a*=t,x.c*=t}if(0!=r){let t=Math.sqrt(x.b*x.b+x.d*x.d);0!=t&&(t=(t+(Math.sqrt(l*l+d*d)-t+this.data.offsetScaleY)*r)/t),x.b*=t,x.d*=t}if(n>0){let t=x.b,e=x.d,i=Math.atan2(e,t),s=Math.atan2(d,l)-Math.atan2(u,h)-(i-Math.atan2(x.c,x.a));s>c.PI?s-=c.PI2:s<-c.PI&&(s+=c.PI2),s=i+(s+m)*n;let r=Math.sqrt(t*t+e*e);x.b=Math.cos(s)*r,x.d=Math.sin(s)*r}x.updateAppliedTransform()}}applyRelativeWorld(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=0!=e||0!=i,o=this.target,h=o.a,l=o.b,u=o.c,d=o.d,f=h*d-l*u>0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=t.x*e,x.worldY+=t.y*i}if(0!=s){let t=(Math.sqrt(h*h+u*u)-1+this.data.offsetScaleX)*s+1;x.a*=t,x.c*=t}if(0!=r){let t=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*r+1;x.b*=t,x.d*=t}if(n>0){let t=Math.atan2(d,l)-Math.atan2(u,h);t>c.PI?t-=c.PI2:t<-c.PI&&(t+=c.PI2);let e=x.b,i=x.d;t=Math.atan2(i,e)+(t-c.PI/2+m)*n;let s=Math.sqrt(e*e+i*i);x.b=Math.cos(t)*s,x.d=Math.sin(t)*s}x.updateAppliedTransform()}}applyAbsoluteLocal(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=this.target,o=this.bones;for(let h=0,l=o.length;h=s.length&&(s.length=t+1),s[t]||(s[t]={}),s[t][e]=i}addSkin(t){for(let e=0;e= 0.");if(!e)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}},Re=(t=>(t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen",t))(Re||{}),Fe=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Ye=class{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){let e=this.scale,i=new Ee;i.name="";let s=new Pe(t),r=s.readInt32(),n=s.readInt32();i.hash=0==n&&0==r?null:n.toString(16)+r.toString(16),i.version=s.readString(),i.x=s.readFloat(),i.y=s.readFloat(),i.width=s.readFloat(),i.height=s.readFloat();let a=s.readBoolean();a&&(i.fps=s.readFloat(),i.imagesPath=s.readString(),i.audioPath=s.readString());let o=0;o=s.readInt(!0);for(let t=0;t>4,t.readFloat())}s.push(e);break}}}}}let n=t.readInt(!0);if(n>0){let e=new bt(n),r=i.slots.length;for(let i=0;i=0;t--)a[t]=-1;let o=m.newArray(r-n,0),h=0,l=0;for(let e=0;e=0;t--)-1==a[t]&&(a[t]=o[--l]);e.setFrame(i,s,a)}s.push(e)}let a=t.readInt(!0);if(a>0){let e=new vt(a);for(let s=0;s>>1^-(1&i)}readStringRef(){let t=this.readInt(!0);return 0==t?null:this.strings[t-1]}readString(){let t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;let e="";for(let i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(t),i++}}return e}readFloat(){let t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}},Xe=class{constructor(t,e,i,s,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=s,this.inheritTimeline=r}},Le=class{constructor(t=null,e=null){this.bones=t,this.vertices=e}},Oe=(t=>(t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping",t))(Oe||{});function De(t,e,i){let s=t.readFloat(),r=t.readFloat()*i;for(let n=0,a=0,o=e.getFrameCount()-1;e.setFrame(n,s,r),n!=o;n++){let o=t.readFloat(),h=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(n);break;case li:Ve(t,e,a++,n,0,s,o,r,h,i)}s=o,r=h}return e}function Be(t,e,i){let s=t.readFloat(),r=t.readFloat()*i,n=t.readFloat()*i;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,s,r,n),a!=h;a++){let h=t.readFloat(),l=t.readFloat()*i,c=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(a);break;case li:Ve(t,e,o++,a,0,s,h,r,l,i),Ve(t,e,o++,a,1,s,h,n,c,i)}s=h,r=l,n=c}return e}function Ve(t,e,i,s,r,n,a,o,h,l){e.setBezier(i,s,r,n,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,a,h)}var ze,Ne=0,_e=1,Ue=2,We=3,qe=4,Ge=5,je=6,He=7,Ze=8,Ke=9,Je=0,Qe=1,$e=2,ti=3,ei=4,ii=5,si=0,ri=1,ni=0,ai=1,oi=2,hi=1,li=2,ci=class{constructor(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new x((()=>m.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");let i=this.boundingBoxes,s=this.polygons,r=this.polygonPool,n=t.slots,a=n.length;i.length=0,r.freeAll(s),s.length=0;for(let t=0;t=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,i,s){let r=this.minX,n=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=n&&s<=n||t>=a&&i>=a||e>=o&&s>=o)return!1;let h=(s-e)/(i-t),l=h*(r-t)+e;if(l>n&&ln&&lr&&cr&&ct.minX&&this.minYt.minY}containsPoint(t,e){let i=this.polygons;for(let s=0,r=i.length;s=i||o=i){let h=s[t];h+(i-r)/(o-r)*(s[n]-h)=c&&x<=a||x>=a&&x<=c)&&(x>=e&&x<=s||x>=s&&x<=e)){let t=(l*m-h*f)/g;if((t>=u&&t<=d||t>=d&&t<=u)&&(t>=i&&t<=r||t>=r&&t<=i))return!0}c=a,u=d}return!1}getPolygon(t){if(!t)throw new Error("boundingBox cannot be null.");let e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}},ui=class{constructor(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new x((()=>new Array)),this.polygonIndicesPool=new x((()=>new Array))}triangulate(t){let e=t,i=t.length>>1,s=this.indicesArray;s.length=0;for(let t=0;t3;){let t=i-1,a=0,o=1;for(;;){t:if(!r[a]){let n=s[t]<<1,h=s[a]<<1,l=s[o]<<1,c=e[n],u=e[n+1],d=e[h],f=e[h+1],p=e[l],m=e[l+1];for(let n=(o+1)%i;n!=t;n=(n+1)%i){if(!r[n])continue;let t=s[n]<<1,i=e[t],a=e[t+1];if(ui.positiveArea(p,m,c,u,i,a)&&ui.positiveArea(c,u,d,f,i,a)&&ui.positiveArea(d,f,p,m,i,a))break t}break}if(0==o){do{if(!r[a])break;a--}while(a>0);break}t=a,a=o,o=(o+1)%i}n.push(s[(i+a-1)%i]),n.push(s[a]),n.push(s[(a+1)%i]),s.splice(a,1),r.splice(a,1),i--;let h=(i+a-1)%i,l=a==i?0:a;r[h]=ui.isConcave(h,i,e,s),r[l]=ui.isConcave(l,i,e,s)}return 3==i&&(n.push(s[2]),n.push(s[0]),n.push(s[1])),n}decompose(t,e){let i=t,s=this.convexPolygons;this.polygonPool.freeAll(s),s.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let n=this.polygonIndicesPool.obtain();n.length=0;let a=this.polygonPool.obtain();a.length=0;let o=-1,h=0;for(let t=0,l=e.length;t0?(s.push(a),r.push(n)):(this.polygonPool.free(a),this.polygonIndicesPool.free(n)),a=this.polygonPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),a.push(m),a.push(g),a.push(x),n=this.polygonIndicesPool.obtain(),n.length=0,n.push(l),n.push(c),n.push(u),h=ui.winding(d,f,p,m,g,x),o=l)}a.length>0&&(s.push(a),r.push(n));for(let t=0,e=s.length;t=0;t--)a=s[t],0==a.length&&(s.splice(t,1),this.polygonPool.free(a),n=r[t],r.splice(t,1),this.polygonIndicesPool.free(n));return s}static isConcave(t,e,i,s){let r=s[(e+t-1)%e]<<1,n=s[t]<<1,a=s[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[n],i[n+1],i[a],i[a+1])}static positiveArea(t,e,i,s,r,n){return t*(n-s)+i*(e-n)+r*(s-e)>=0}static winding(t,e,i,s,r,n){let a=i-t,o=s-e;return r*o-n*a+a*e-t*o>=0?1:-1}},di=class{constructor(){this.triangulator=new ui,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}clipStart(t,e){if(this.clipAttachment)return 0;this.clipAttachment=e;let i=e.worldVerticesLength,s=m.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,s,0,2);let r=this.clippingPolygon;di.makeClockwise(r);let n=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let t=0,e=n.length;t>1,C=this.clipOutput,R=m.setArraySize(l,e+k*f);for(let h=0;h=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(s),h.push(r),h.push(n),h.push(t),h.push(e),o.length=0;let u=a,d=a.length-4;for(let t=0;;t+=2){let e=u[t],i=u[t+1],s=u[t+2],r=u[t+3],n=e-s,a=i-r,f=h,p=h.length-2,m=o.length;for(let t=0;t0;if(n*(l-r)-a*(h-s)>0){if(p){o.push(u),o.push(d);continue}let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i)}else if(p){let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i);o.push(u),o.push(d)}c=!0}if(m==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),t==d)break;let g=o;(o=h).length=0,h=g}if(l!=o){l.length=0;for(let t=0,e=o.length-2;t>1;t=0;e--)-1==o[e]&&(o[e]=t[--r])}e.setFrame(n,wi(a,"time",0),o)}r.push(e)}if(t.events){let e=new vt(t.events.length),s=0;for(let r=0;r{t&&t.preventDefault()})),i.addEventListener("webglcontextrestored",(t=>{for(let t=0,e=this.restorables.length;t-1&&this.restorables.splice(e,1)}},yi=771,bi=class{static getDestGLBlendMode(t){switch(t){case 0:case 2:case 3:return yi;case 1:return 1;default:throw new Error("Unknown blend mode: "+t)}}static getSourceColorGLBlendMode(t,e=!1){switch(t){case 0:case 1:return e?1:770;case 2:return 774;case 3:return 1;default:throw new Error("Unknown blend mode: "+t)}}static getSourceAlphaGLBlendMode(t){switch(t){case 0:case 1:return 1;case 2:return yi;case 3:return 769;default:throw new Error("Unknown blend mode: "+t)}}},Ai=class extends qt{constructor(t,e,i=!1){super(e),this.texture=null,this.boundUnit=0,this.useMipMaps=!1,this.context=t instanceof vi?t:new vi(t),this.useMipMaps=i,this.restore(),this.context.addRestorable(this)}setFilters(t,e){let i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,Ai.validateMagFilter(e)),this.useMipMaps=Ai.usesMipMaps(t),this.useMipMaps&&i.generateMipmap(i.TEXTURE_2D)}static validateMagFilter(t){switch(t){case 9987:case 9987:case 9985:case 9986:case 9984:return 9729;default:return t}}static usesMipMaps(t){switch(t){case 9987:case 9987:case 9985:case 9986:case 9984:return!0;default:return!1}}setWraps(t,e){let i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e)}update(t){let e=this.context.gl;this.texture||(this.texture=this.context.gl.createTexture()),this.bind(),Ai.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL&&e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this._image),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t&&e.generateMipmap(e.TEXTURE_2D)}restore(){this.texture=null,this.update(this.useMipMaps)}bind(t=0){let e=this.context.gl;this.boundUnit=t,e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)}unbind(){let t=this.context.gl;t.activeTexture(t.TEXTURE0+this.boundUnit),t.bindTexture(t.TEXTURE_2D,null)}dispose(){this.context.removeRestorable(this),this.context.gl.deleteTexture(this.texture)}},Si=Ai;Si.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL=!1;var Mi=class extends ce{constructor(t,e="",i=new ue){super((e=>new Si(t,e)),e,i)}},Ii=class{constructor(t=0,e=0,i=0){this.x=0,this.y=0,this.z=0,this.x=t,this.y=e,this.z=i}setFrom(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}set(t,e,i){return this.x=t,this.y=e,this.z=i,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}scale(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(){let t=this.length();return 0==t||(t=1/t,this.x*=t,this.y*=t,this.z*=t),this}cross(t){return this.set(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)}multiply(t){let e=t.values;return this.set(this.x*e[Ei]+this.y*e[Ti]+this.z*e[ki]+e[Ci],this.x*e[Ri]+this.y*e[Fi]+this.z*e[Yi]+e[Pi],this.x*e[Xi]+this.y*e[Li]+this.z*e[Oi]+e[Di])}project(t){let e=t.values,i=1/(this.x*e[Bi]+this.y*e[Vi]+this.z*e[zi]+e[Ni]);return this.set((this.x*e[Ei]+this.y*e[Ti]+this.z*e[ki]+e[Ci])*i,(this.x*e[Ri]+this.y*e[Fi]+this.z*e[Yi]+e[Pi])*i,(this.x*e[Xi]+this.y*e[Li]+this.z*e[Oi]+e[Di])*i)}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}distance(t){let e=t.x-this.x,i=t.y-this.y,s=t.z-this.z;return Math.sqrt(e*e+i*i+s*s)}},Ei=0,Ti=4,ki=8,Ci=12,Ri=1,Fi=5,Yi=9,Pi=13,Xi=2,Li=6,Oi=10,Di=14,Bi=3,Vi=7,zi=11,Ni=15,_i=class{constructor(){this.temp=new Float32Array(16),this.values=new Float32Array(16);let t=this.values;t[Ei]=1,t[Fi]=1,t[Oi]=1,t[Ni]=1}set(t){return this.values.set(t),this}transpose(){let t=this.temp,e=this.values;return t[Ei]=e[Ei],t[Ti]=e[Ri],t[ki]=e[Xi],t[Ci]=e[Bi],t[Ri]=e[Ti],t[Fi]=e[Fi],t[Yi]=e[Li],t[Pi]=e[Vi],t[Xi]=e[ki],t[Li]=e[Yi],t[Oi]=e[Oi],t[Di]=e[zi],t[Bi]=e[Ci],t[Vi]=e[Pi],t[zi]=e[Di],t[Ni]=e[Ni],this.set(t)}identity(){let t=this.values;return t[Ei]=1,t[Ti]=0,t[ki]=0,t[Ci]=0,t[Ri]=0,t[Fi]=1,t[Yi]=0,t[Pi]=0,t[Xi]=0,t[Li]=0,t[Oi]=1,t[Di]=0,t[Bi]=0,t[Vi]=0,t[zi]=0,t[Ni]=1,this}invert(){let t=this.values,e=this.temp,i=t[Bi]*t[Li]*t[Yi]*t[Ci]-t[Xi]*t[Vi]*t[Yi]*t[Ci]-t[Bi]*t[Fi]*t[Oi]*t[Ci]+t[Ri]*t[Vi]*t[Oi]*t[Ci]+t[Xi]*t[Fi]*t[zi]*t[Ci]-t[Ri]*t[Li]*t[zi]*t[Ci]-t[Bi]*t[Li]*t[ki]*t[Pi]+t[Xi]*t[Vi]*t[ki]*t[Pi]+t[Bi]*t[Ti]*t[Oi]*t[Pi]-t[Ei]*t[Vi]*t[Oi]*t[Pi]-t[Xi]*t[Ti]*t[zi]*t[Pi]+t[Ei]*t[Li]*t[zi]*t[Pi]+t[Bi]*t[Fi]*t[ki]*t[Di]-t[Ri]*t[Vi]*t[ki]*t[Di]-t[Bi]*t[Ti]*t[Yi]*t[Di]+t[Ei]*t[Vi]*t[Yi]*t[Di]+t[Ri]*t[Ti]*t[zi]*t[Di]-t[Ei]*t[Fi]*t[zi]*t[Di]-t[Xi]*t[Fi]*t[ki]*t[Ni]+t[Ri]*t[Li]*t[ki]*t[Ni]+t[Xi]*t[Ti]*t[Yi]*t[Ni]-t[Ei]*t[Li]*t[Yi]*t[Ni]-t[Ri]*t[Ti]*t[Oi]*t[Ni]+t[Ei]*t[Fi]*t[Oi]*t[Ni];if(0==i)throw new Error("non-invertible matrix");let s=1/i;return e[Ei]=t[Yi]*t[Di]*t[Vi]-t[Pi]*t[Oi]*t[Vi]+t[Pi]*t[Li]*t[zi]-t[Fi]*t[Di]*t[zi]-t[Yi]*t[Li]*t[Ni]+t[Fi]*t[Oi]*t[Ni],e[Ti]=t[Ci]*t[Oi]*t[Vi]-t[ki]*t[Di]*t[Vi]-t[Ci]*t[Li]*t[zi]+t[Ti]*t[Di]*t[zi]+t[ki]*t[Li]*t[Ni]-t[Ti]*t[Oi]*t[Ni],e[ki]=t[ki]*t[Pi]*t[Vi]-t[Ci]*t[Yi]*t[Vi]+t[Ci]*t[Fi]*t[zi]-t[Ti]*t[Pi]*t[zi]-t[ki]*t[Fi]*t[Ni]+t[Ti]*t[Yi]*t[Ni],e[Ci]=t[Ci]*t[Yi]*t[Li]-t[ki]*t[Pi]*t[Li]-t[Ci]*t[Fi]*t[Oi]+t[Ti]*t[Pi]*t[Oi]+t[ki]*t[Fi]*t[Di]-t[Ti]*t[Yi]*t[Di],e[Ri]=t[Pi]*t[Oi]*t[Bi]-t[Yi]*t[Di]*t[Bi]-t[Pi]*t[Xi]*t[zi]+t[Ri]*t[Di]*t[zi]+t[Yi]*t[Xi]*t[Ni]-t[Ri]*t[Oi]*t[Ni],e[Fi]=t[ki]*t[Di]*t[Bi]-t[Ci]*t[Oi]*t[Bi]+t[Ci]*t[Xi]*t[zi]-t[Ei]*t[Di]*t[zi]-t[ki]*t[Xi]*t[Ni]+t[Ei]*t[Oi]*t[Ni],e[Yi]=t[Ci]*t[Yi]*t[Bi]-t[ki]*t[Pi]*t[Bi]-t[Ci]*t[Ri]*t[zi]+t[Ei]*t[Pi]*t[zi]+t[ki]*t[Ri]*t[Ni]-t[Ei]*t[Yi]*t[Ni],e[Pi]=t[ki]*t[Pi]*t[Xi]-t[Ci]*t[Yi]*t[Xi]+t[Ci]*t[Ri]*t[Oi]-t[Ei]*t[Pi]*t[Oi]-t[ki]*t[Ri]*t[Di]+t[Ei]*t[Yi]*t[Di],e[Xi]=t[Fi]*t[Di]*t[Bi]-t[Pi]*t[Li]*t[Bi]+t[Pi]*t[Xi]*t[Vi]-t[Ri]*t[Di]*t[Vi]-t[Fi]*t[Xi]*t[Ni]+t[Ri]*t[Li]*t[Ni],e[Li]=t[Ci]*t[Li]*t[Bi]-t[Ti]*t[Di]*t[Bi]-t[Ci]*t[Xi]*t[Vi]+t[Ei]*t[Di]*t[Vi]+t[Ti]*t[Xi]*t[Ni]-t[Ei]*t[Li]*t[Ni],e[Oi]=t[Ti]*t[Pi]*t[Bi]-t[Ci]*t[Fi]*t[Bi]+t[Ci]*t[Ri]*t[Vi]-t[Ei]*t[Pi]*t[Vi]-t[Ti]*t[Ri]*t[Ni]+t[Ei]*t[Fi]*t[Ni],e[Di]=t[Ci]*t[Fi]*t[Xi]-t[Ti]*t[Pi]*t[Xi]-t[Ci]*t[Ri]*t[Li]+t[Ei]*t[Pi]*t[Li]+t[Ti]*t[Ri]*t[Di]-t[Ei]*t[Fi]*t[Di],e[Bi]=t[Yi]*t[Li]*t[Bi]-t[Fi]*t[Oi]*t[Bi]-t[Yi]*t[Xi]*t[Vi]+t[Ri]*t[Oi]*t[Vi]+t[Fi]*t[Xi]*t[zi]-t[Ri]*t[Li]*t[zi],e[Vi]=t[Ti]*t[Oi]*t[Bi]-t[ki]*t[Li]*t[Bi]+t[ki]*t[Xi]*t[Vi]-t[Ei]*t[Oi]*t[Vi]-t[Ti]*t[Xi]*t[zi]+t[Ei]*t[Li]*t[zi],e[zi]=t[ki]*t[Fi]*t[Bi]-t[Ti]*t[Yi]*t[Bi]-t[ki]*t[Ri]*t[Vi]+t[Ei]*t[Yi]*t[Vi]+t[Ti]*t[Ri]*t[zi]-t[Ei]*t[Fi]*t[zi],e[Ni]=t[Ti]*t[Yi]*t[Xi]-t[ki]*t[Fi]*t[Xi]+t[ki]*t[Ri]*t[Li]-t[Ei]*t[Yi]*t[Li]-t[Ti]*t[Ri]*t[Oi]+t[Ei]*t[Fi]*t[Oi],t[Ei]=e[Ei]*s,t[Ti]=e[Ti]*s,t[ki]=e[ki]*s,t[Ci]=e[Ci]*s,t[Ri]=e[Ri]*s,t[Fi]=e[Fi]*s,t[Yi]=e[Yi]*s,t[Pi]=e[Pi]*s,t[Xi]=e[Xi]*s,t[Li]=e[Li]*s,t[Oi]=e[Oi]*s,t[Di]=e[Di]*s,t[Bi]=e[Bi]*s,t[Vi]=e[Vi]*s,t[zi]=e[zi]*s,t[Ni]=e[Ni]*s,this}determinant(){let t=this.values;return t[Bi]*t[Li]*t[Yi]*t[Ci]-t[Xi]*t[Vi]*t[Yi]*t[Ci]-t[Bi]*t[Fi]*t[Oi]*t[Ci]+t[Ri]*t[Vi]*t[Oi]*t[Ci]+t[Xi]*t[Fi]*t[zi]*t[Ci]-t[Ri]*t[Li]*t[zi]*t[Ci]-t[Bi]*t[Li]*t[ki]*t[Pi]+t[Xi]*t[Vi]*t[ki]*t[Pi]+t[Bi]*t[Ti]*t[Oi]*t[Pi]-t[Ei]*t[Vi]*t[Oi]*t[Pi]-t[Xi]*t[Ti]*t[zi]*t[Pi]+t[Ei]*t[Li]*t[zi]*t[Pi]+t[Bi]*t[Fi]*t[ki]*t[Di]-t[Ri]*t[Vi]*t[ki]*t[Di]-t[Bi]*t[Ti]*t[Yi]*t[Di]+t[Ei]*t[Vi]*t[Yi]*t[Di]+t[Ri]*t[Ti]*t[zi]*t[Di]-t[Ei]*t[Fi]*t[zi]*t[Di]-t[Xi]*t[Fi]*t[ki]*t[Ni]+t[Ri]*t[Li]*t[ki]*t[Ni]+t[Xi]*t[Ti]*t[Yi]*t[Ni]-t[Ei]*t[Li]*t[Yi]*t[Ni]-t[Ri]*t[Ti]*t[Oi]*t[Ni]+t[Ei]*t[Fi]*t[Oi]*t[Ni]}translate(t,e,i){let s=this.values;return s[Ci]+=t,s[Pi]+=e,s[Di]+=i,this}copy(){return(new _i).set(this.values)}projection(t,e,i,s){this.identity();let r=1/Math.tan(i*(Math.PI/180)/2),n=(e+t)/(t-e),a=2*e*t/(t-e),o=this.values;return o[Ei]=r/s,o[Ri]=0,o[Xi]=0,o[Bi]=0,o[Ti]=0,o[Fi]=r,o[Li]=0,o[Vi]=0,o[ki]=0,o[Yi]=0,o[Oi]=n,o[zi]=-1,o[Ci]=0,o[Pi]=0,o[Di]=a,o[Ni]=0,this}ortho2d(t,e,i,s){return this.ortho(t,t+i,e,e+s,0,1)}ortho(t,e,i,s,r,n){this.identity();let a=2/(e-t),o=2/(s-i),h=-2/(n-r),l=-(e+t)/(e-t),c=-(s+i)/(s-i),u=-(n+r)/(n-r),d=this.values;return d[Ei]=a,d[Ri]=0,d[Xi]=0,d[Bi]=0,d[Ti]=0,d[Fi]=o,d[Li]=0,d[Vi]=0,d[ki]=0,d[Yi]=0,d[Oi]=h,d[zi]=0,d[Ci]=l,d[Pi]=c,d[Di]=u,d[Ni]=1,this}multiply(t){let e=this.temp,i=this.values,s=t.values;return e[Ei]=i[Ei]*s[Ei]+i[Ti]*s[Ri]+i[ki]*s[Xi]+i[Ci]*s[Bi],e[Ti]=i[Ei]*s[Ti]+i[Ti]*s[Fi]+i[ki]*s[Li]+i[Ci]*s[Vi],e[ki]=i[Ei]*s[ki]+i[Ti]*s[Yi]+i[ki]*s[Oi]+i[Ci]*s[zi],e[Ci]=i[Ei]*s[Ci]+i[Ti]*s[Pi]+i[ki]*s[Di]+i[Ci]*s[Ni],e[Ri]=i[Ri]*s[Ei]+i[Fi]*s[Ri]+i[Yi]*s[Xi]+i[Pi]*s[Bi],e[Fi]=i[Ri]*s[Ti]+i[Fi]*s[Fi]+i[Yi]*s[Li]+i[Pi]*s[Vi],e[Yi]=i[Ri]*s[ki]+i[Fi]*s[Yi]+i[Yi]*s[Oi]+i[Pi]*s[zi],e[Pi]=i[Ri]*s[Ci]+i[Fi]*s[Pi]+i[Yi]*s[Di]+i[Pi]*s[Ni],e[Xi]=i[Xi]*s[Ei]+i[Li]*s[Ri]+i[Oi]*s[Xi]+i[Di]*s[Bi],e[Li]=i[Xi]*s[Ti]+i[Li]*s[Fi]+i[Oi]*s[Li]+i[Di]*s[Vi],e[Oi]=i[Xi]*s[ki]+i[Li]*s[Yi]+i[Oi]*s[Oi]+i[Di]*s[zi],e[Di]=i[Xi]*s[Ci]+i[Li]*s[Pi]+i[Oi]*s[Di]+i[Di]*s[Ni],e[Bi]=i[Bi]*s[Ei]+i[Vi]*s[Ri]+i[zi]*s[Xi]+i[Ni]*s[Bi],e[Vi]=i[Bi]*s[Ti]+i[Vi]*s[Fi]+i[zi]*s[Li]+i[Ni]*s[Vi],e[zi]=i[Bi]*s[ki]+i[Vi]*s[Yi]+i[zi]*s[Oi]+i[Ni]*s[zi],e[Ni]=i[Bi]*s[Ci]+i[Vi]*s[Pi]+i[zi]*s[Di]+i[Ni]*s[Ni],this.set(this.temp)}multiplyLeft(t){let e=this.temp,i=this.values,s=t.values;return e[Ei]=s[Ei]*i[Ei]+s[Ti]*i[Ri]+s[ki]*i[Xi]+s[Ci]*i[Bi],e[Ti]=s[Ei]*i[Ti]+s[Ti]*i[Fi]+s[ki]*i[Li]+s[Ci]*i[Vi],e[ki]=s[Ei]*i[ki]+s[Ti]*i[Yi]+s[ki]*i[Oi]+s[Ci]*i[zi],e[Ci]=s[Ei]*i[Ci]+s[Ti]*i[Pi]+s[ki]*i[Di]+s[Ci]*i[Ni],e[Ri]=s[Ri]*i[Ei]+s[Fi]*i[Ri]+s[Yi]*i[Xi]+s[Pi]*i[Bi],e[Fi]=s[Ri]*i[Ti]+s[Fi]*i[Fi]+s[Yi]*i[Li]+s[Pi]*i[Vi],e[Yi]=s[Ri]*i[ki]+s[Fi]*i[Yi]+s[Yi]*i[Oi]+s[Pi]*i[zi],e[Pi]=s[Ri]*i[Ci]+s[Fi]*i[Pi]+s[Yi]*i[Di]+s[Pi]*i[Ni],e[Xi]=s[Xi]*i[Ei]+s[Li]*i[Ri]+s[Oi]*i[Xi]+s[Di]*i[Bi],e[Li]=s[Xi]*i[Ti]+s[Li]*i[Fi]+s[Oi]*i[Li]+s[Di]*i[Vi],e[Oi]=s[Xi]*i[ki]+s[Li]*i[Yi]+s[Oi]*i[Oi]+s[Di]*i[zi],e[Di]=s[Xi]*i[Ci]+s[Li]*i[Pi]+s[Oi]*i[Di]+s[Di]*i[Ni],e[Bi]=s[Bi]*i[Ei]+s[Vi]*i[Ri]+s[zi]*i[Xi]+s[Ni]*i[Bi],e[Vi]=s[Bi]*i[Ti]+s[Vi]*i[Fi]+s[zi]*i[Li]+s[Ni]*i[Vi],e[zi]=s[Bi]*i[ki]+s[Vi]*i[Yi]+s[zi]*i[Oi]+s[Ni]*i[zi],e[Ni]=s[Bi]*i[Ci]+s[Vi]*i[Pi]+s[zi]*i[Di]+s[Ni]*i[Ni],this.set(this.temp)}lookAt(t,e,i){let s=_i.xAxis,r=_i.yAxis,n=_i.zAxis;n.setFrom(e).normalize(),s.setFrom(e).normalize(),s.cross(i).normalize(),r.setFrom(s).cross(n).normalize(),this.identity();let a=this.values;return a[Ei]=s.x,a[Ti]=s.y,a[ki]=s.z,a[Ri]=r.x,a[Fi]=r.y,a[Yi]=r.z,a[Xi]=-n.x,a[Li]=-n.y,a[Oi]=-n.z,_i.tmpMatrix.identity(),_i.tmpMatrix.values[Ci]=-t.x,_i.tmpMatrix.values[Pi]=-t.y,_i.tmpMatrix.values[Di]=-t.z,this.multiply(_i.tmpMatrix),this}},Ui=_i;Ui.xAxis=new Ii,Ui.yAxis=new Ii,Ui.zAxis=new Ii,Ui.tmpMatrix=new _i;var Wi=class{constructor(t,e){this.position=new Ii(0,0,0),this.direction=new Ii(0,0,-1),this.up=new Ii(0,1,0),this.near=0,this.far=100,this.zoom=1,this.viewportWidth=0,this.viewportHeight=0,this.projectionView=new Ui,this.inverseProjectionView=new Ui,this.projection=new Ui,this.view=new Ui,this.viewportWidth=t,this.viewportHeight=e,this.update()}update(){let t=this.projection,e=this.view,i=this.projectionView,s=this.inverseProjectionView,r=this.zoom,n=this.viewportWidth,a=this.viewportHeight;t.ortho(r*(-n/2),r*(n/2),r*(-a/2),r*(a/2),this.near,this.far),e.lookAt(this.position,this.direction,this.up),i.set(t.values),i.multiply(e),s.set(i.values).invert()}screenToWorld(t,e,i){let s=t.x,r=i-t.y-1;return t.x=2*s/e-1,t.y=2*r/i-1,t.z=2*t.z-1,t.project(this.inverseProjectionView),t}worldToScreen(t,e,i){return t.project(this.projectionView),t.x=e*(t.x+1)/2,t.y=i*(t.y+1)/2,t.z=(t.z+1)/2,t}setViewport(t,e){this.viewportWidth=t,this.viewportHeight=e}},qi=class{constructor(t){this.mouseX=0,this.mouseY=0,this.buttonDown=!1,this.touch0=null,this.touch1=null,this.initialPinchDistance=0,this.listeners=new Array,this.eventListeners=[],this.element=t,this.setupCallbacks(t)}setupCallbacks(t){let e=e=>{if(e instanceof MouseEvent){let i=t.getBoundingClientRect();this.mouseX=e.clientX-i.left,this.mouseY=e.clientY-i.top,this.listeners.map((t=>{this.buttonDown?t.dragged&&t.dragged(this.mouseX,this.mouseY):t.moved&&t.moved(this.mouseX,this.mouseY)}))}},i=s=>{if(s instanceof MouseEvent){let r=t.getBoundingClientRect();this.mouseX=s.clientX-r.left,this.mouseY=s.clientY-r.top,this.buttonDown=!1,this.listeners.map((t=>{t.up&&t.up(this.mouseX,this.mouseY)})),document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",i)}};t.addEventListener("mousedown",(s=>{if(s instanceof MouseEvent){let r=t.getBoundingClientRect();this.mouseX=s.clientX-r.left,this.mouseY=s.clientY-r.top,this.buttonDown=!0,this.listeners.map((t=>{t.down&&t.down(this.mouseX,this.mouseY)})),document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}}),!0),t.addEventListener("mousemove",e,!0),t.addEventListener("mouseup",i,!0),t.addEventListener("wheel",(t=>{t.preventDefault();let e=t.deltaY;t.deltaMode==WheelEvent.DOM_DELTA_LINE&&(e*=8),t.deltaMode==WheelEvent.DOM_DELTA_PAGE&&(e*=24),this.listeners.map((e=>{e.wheel&&e.wheel(t.deltaY)}))}),!0),t.addEventListener("touchstart",(e=>{if(!this.touch0||!this.touch1){let i=e.changedTouches.item(0);if(!i)return;let s=t.getBoundingClientRect(),r=i.clientX-s.left,n=i.clientY-s.top,a=new Gi(i.identifier,r,n);if(this.mouseX=r,this.mouseY=n,this.buttonDown=!0,this.touch0){if(!this.touch1){this.touch1=a;let t=this.touch1.x-this.touch0.x,e=this.touch1.x-this.touch0.x;this.initialPinchDistance=Math.sqrt(t*t+e*e),this.listeners.map((t=>{t.zoom&&t.zoom(this.initialPinchDistance,this.initialPinchDistance)}))}}else this.touch0=a,this.listeners.map((t=>{t.down&&t.down(a.x,a.y)}))}e.preventDefault()}),!1),t.addEventListener("touchmove",(e=>{if(this.touch0){var i=e.changedTouches;let n=t.getBoundingClientRect();for(var s=0;s{i.dragged&&i.dragged(t,e)}))),this.touch1&&this.touch1.identifier===r.identifier&&(this.touch1.x=this.mouseX=t,this.touch1.y=this.mouseY=e)}if(this.touch0&&this.touch1){let t=this.touch1.x-this.touch0.x,e=this.touch1.x-this.touch0.x,i=Math.sqrt(t*t+e*e);this.listeners.map((t=>{t.zoom&&t.zoom(this.initialPinchDistance,i)}))}}e.preventDefault()}),!1);let s=e=>{if(this.touch0){var i=e.changedTouches;let n=t.getBoundingClientRect();for(var s=0;s{i.up&&i.up(t,e)})),!this.touch1){this.buttonDown=!1;break}this.touch0=this.touch1,this.touch1=null,this.mouseX=this.touch0.x,this.mouseX=this.touch0.x,this.buttonDown=!0,this.listeners.map((t=>{t.down&&t.down(this.touch0.x,this.touch0.y)}))}this.touch1&&this.touch1.identifier&&(this.touch1=null)}}e.preventDefault()};t.addEventListener("touchend",s,!1),t.addEventListener("touchcancel",s)}addListener(t){this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>-1&&this.listeners.splice(e,1)}},Gi=class{constructor(t,e,i){this.identifier=t,this.x=e,this.y=i}},ji=class{constructor(t,e){this.canvas=t,this.camera=e;let i=0,s=0,r=0,n=0,a=0,o=0,h=0;new qi(t).addListener({down:(t,l)=>{i=e.position.x,s=e.position.y,r=a=t,n=o=l,h=e.zoom},dragged:(h,l)=>{let c=h-r,u=l-n,d=e.screenToWorld(new Ii(0,0),t.clientWidth,t.clientHeight),f=e.screenToWorld(new Ii(c,u),t.clientWidth,t.clientHeight).sub(d);e.position.set(i-f.x,s-f.y,0),e.update(),a=h,o=l},wheel:i=>{let s=i/200*e.zoom,r=e.zoom+s;if(r>0){let s=0,n=0;if(i<0)s=a,n=o;else{let e=new Ii(t.clientWidth/2+15,t.clientHeight/2),i=a-e.x,r=t.clientHeight-1-o-e.y;s=e.x-i,n=t.clientHeight-1-e.y+r}let h=e.screenToWorld(new Ii(s,n),t.clientWidth,t.clientHeight);e.zoom=r,e.update();let l=e.screenToWorld(new Ii(s,n),t.clientWidth,t.clientHeight);e.position.add(h.sub(l)),e.update()}},zoom:(t,i)=>{let s=t/i;e.zoom=h*s},up:(t,e)=>{a=t,o=e},moved:(t,e)=>{a=t,o=e}})}},Hi=class{constructor(t,e,i){this.vertexShader=e,this.fragmentShader=i,this.vs=null,this.fs=null,this.program=null,this.tmp2x2=new Float32Array(4),this.tmp3x3=new Float32Array(9),this.tmp4x4=new Float32Array(16),this.vsSource=e,this.fsSource=i,this.context=t instanceof vi?t:new vi(t),this.context.addRestorable(this),this.compile()}getProgram(){return this.program}getVertexShader(){return this.vertexShader}getFragmentShader(){return this.fragmentShader}getVertexShaderSource(){return this.vsSource}getFragmentSource(){return this.fsSource}compile(){let t=this.context.gl;try{if(this.vs=this.compileShader(t.VERTEX_SHADER,this.vertexShader),!this.vs)throw new Error("Couldn't compile vertex shader.");if(this.fs=this.compileShader(t.FRAGMENT_SHADER,this.fragmentShader),!this.fs)throw new Error("Couldn#t compile fragment shader.");this.program=this.compileProgram(this.vs,this.fs)}catch(t){throw this.dispose(),t}}compileShader(t,e){let i=this.context.gl,s=i.createShader(t);if(!s)throw new Error("Couldn't create shader.");if(i.shaderSource(s,e),i.compileShader(s),!i.getShaderParameter(s,i.COMPILE_STATUS)){let t="Couldn't compile shader: "+i.getShaderInfoLog(s);if(i.deleteShader(s),!i.isContextLost())throw new Error(t)}return s}compileProgram(t,e){let i=this.context.gl,s=i.createProgram();if(!s)throw new Error("Couldn't compile program.");if(i.attachShader(s,t),i.attachShader(s,e),i.linkProgram(s),!i.getProgramParameter(s,i.LINK_STATUS)){let t="Couldn't compile shader program: "+i.getProgramInfoLog(s);if(i.deleteProgram(s),!i.isContextLost())throw new Error(t)}return s}restore(){this.compile()}bind(){this.context.gl.useProgram(this.program)}unbind(){this.context.gl.useProgram(null)}setUniformi(t,e){this.context.gl.uniform1i(this.getUniformLocation(t),e)}setUniformf(t,e){this.context.gl.uniform1f(this.getUniformLocation(t),e)}setUniform2f(t,e,i){this.context.gl.uniform2f(this.getUniformLocation(t),e,i)}setUniform3f(t,e,i,s){this.context.gl.uniform3f(this.getUniformLocation(t),e,i,s)}setUniform4f(t,e,i,s,r){this.context.gl.uniform4f(this.getUniformLocation(t),e,i,s,r)}setUniform2x2f(t,e){let i=this.context.gl;this.tmp2x2.set(e),i.uniformMatrix2fv(this.getUniformLocation(t),!1,this.tmp2x2)}setUniform3x3f(t,e){let i=this.context.gl;this.tmp3x3.set(e),i.uniformMatrix3fv(this.getUniformLocation(t),!1,this.tmp3x3)}setUniform4x4f(t,e){let i=this.context.gl;this.tmp4x4.set(e),i.uniformMatrix4fv(this.getUniformLocation(t),!1,this.tmp4x4)}getUniformLocation(t){let e=this.context.gl;if(!this.program)throw new Error("Shader not compiled.");let i=e.getUniformLocation(this.program,t);if(!i&&!e.isContextLost())throw new Error(`Couldn't find location for uniform ${t}`);return i}getAttributeLocation(t){let e=this.context.gl;if(!this.program)throw new Error("Shader not compiled.");let i=e.getAttribLocation(this.program,t);if(-1==i&&!e.isContextLost())throw new Error(`Couldn't find location for attribute ${t}`);return i}dispose(){this.context.removeRestorable(this);let t=this.context.gl;this.vs&&(t.deleteShader(this.vs),this.vs=null),this.fs&&(t.deleteShader(this.fs),this.fs=null),this.program&&(t.deleteProgram(this.program),this.program=null)}static newColoredTextured(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tattribute vec2 ${Hi.TEXCOORDS};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = ${Hi.COLOR};\n\t\t\t\t\tv_texCoords = ${Hi.TEXCOORDS};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t")}static newTwoColoredTextured(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tattribute vec4 ${Hi.COLOR2};\n\t\t\t\tattribute vec2 ${Hi.TEXCOORDS};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_light;\n\t\t\t\tvarying vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_light = ${Hi.COLOR};\n\t\t\t\t\tv_dark = ${Hi.COLOR2};\n\t\t\t\t\tv_texCoords = ${Hi.TEXCOORDS};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_light;\n\t\t\t\tvarying LOWP vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tvec4 texColor = texture2D(u_texture, v_texCoords);\n\t\t\t\t\tgl_FragColor.a = texColor.a * v_light.a;\n\t\t\t\t\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n\t\t\t\t}\n\t\t\t")}static newColored(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = ${Hi.COLOR};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t")}},Zi=Hi;Zi.MVP_MATRIX="u_projTrans",Zi.POSITION="a_position",Zi.COLOR="a_color",Zi.COLOR2="a_color2",Zi.TEXCOORDS="a_texCoords",Zi.SAMPLER="u_texture";var Ki=class{constructor(t,e,i,s){this.attributes=e,this.verticesBuffer=null,this.verticesLength=0,this.dirtyVertices=!1,this.indicesBuffer=null,this.indicesLength=0,this.dirtyIndices=!1,this.elementsPerVertex=0,this.context=t instanceof vi?t:new vi(t),this.elementsPerVertex=0;for(let t=0;tthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length}setIndices(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length}draw(t,e){this.drawWithOffset(t,e,0,this.indicesLength>0?this.indicesLength:this.verticesLength/this.elementsPerVertex)}drawWithOffset(t,e,i,s){let r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,s,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,s),this.unbind(t)}bind(t){let e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);let i=0;for(let s=0;s0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)}unbind(t){let e=this.context.gl;for(let i=0;i0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}update(){let t=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=t.createBuffer()),t.bindBuffer(t.ARRAY_BUFFER,this.verticesBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),t.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=t.createBuffer()),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),t.DYNAMIC_DRAW),this.dirtyIndices=!1)}restore(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()}dispose(){this.context.removeRestorable(this);let t=this.context.gl;t.deleteBuffer(this.verticesBuffer),t.deleteBuffer(this.indicesBuffer)}},Ji=class{constructor(t,e,i){this.name=t,this.type=e,this.numElements=i}},Qi=class extends Ji{constructor(){super(Zi.POSITION,ss.Float,2)}},$i=class extends Ji{constructor(){super(Zi.POSITION,ss.Float,3)}},ts=class extends Ji{constructor(t=0){super(Zi.TEXCOORDS+(0==t?"":t),ss.Float,2)}},es=class extends Ji{constructor(){super(Zi.COLOR,ss.Float,4)}},is=class extends Ji{constructor(){super(Zi.COLOR2,ss.Float,4)}},ss=(t=>(t[t.Float=0]="Float",t))(ss||{}),rs=class{constructor(t,e=!0,i=10920){if(this.drawCalls=0,this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,this.cullWasEnabled=!1,i>10920)throw new Error("Can't have more than 10920 triangles per batch: "+i);this.context=t instanceof vi?t:new vi(t);let s=e?[new Qi,new es,new ts,new is]:[new Qi,new es,new ts];this.mesh=new Ki(t,s,i,3*i);let r=this.context.gl;this.srcColorBlend=r.SRC_ALPHA,this.srcAlphaBlend=r.ONE,this.dstBlend=r.ONE_MINUS_SRC_ALPHA}begin(t){if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=t,this.lastTexture=null,this.isDrawing=!0;let e=this.context.gl;e.enable(e.BLEND),e.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend),this.cullWasEnabled=e.isEnabled(e.CULL_FACE),this.cullWasEnabled&&e.disable(e.CULL_FACE)}setBlendMode(t,e,i){if((this.srcColorBlend!=t||this.srcAlphaBlend!=e||this.dstBlend!=i)&&(this.srcColorBlend=t,this.srcAlphaBlend=e,this.dstBlend=i,this.isDrawing)){this.flush(),this.context.gl.blendFuncSeparate(t,i,e,i)}}draw(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.mesh.getVertices().length||this.indicesLength+i.length>this.mesh.getIndices().length)&&this.flush();let s=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);let r=this.mesh.getIndices();for(let t=this.indicesLength,e=0;e0||this.indicesLength>0)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1;let t=this.context.gl;t.disable(t.BLEND),this.cullWasEnabled&&t.enable(t.CULL_FACE)}getDrawCalls(){return this.drawCalls}static getAndResetGlobalDrawCalls(){let t=rs.globalDrawCalls;return rs.globalDrawCalls=0,t}dispose(){this.mesh.dispose()}},ns=rs;ns.globalDrawCalls=0;var as=class{constructor(t,e=10920){if(this.isDrawing=!1,this.shapeType=os.Filled,this.color=new h(1,1,1,1),this.shader=null,this.vertexIndex=0,this.tmp=new w,e>10920)throw new Error("Can't have more than 10920 triangles per batch: "+e);this.context=t instanceof vi?t:new vi(t),this.mesh=new Ki(t,[new Qi,new es],e,0);let i=this.context.gl;this.srcColorBlend=i.SRC_ALPHA,this.srcAlphaBlend=i.ONE,this.dstBlend=i.ONE_MINUS_SRC_ALPHA}begin(t){if(this.isDrawing)throw new Error("ShapeRenderer.begin() has already been called");this.shader=t,this.vertexIndex=0,this.isDrawing=!0;let e=this.context.gl;e.enable(e.BLEND),e.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend)}setBlendMode(t,e,i){if(this.srcColorBlend=t,this.srcAlphaBlend=e,this.dstBlend=i,this.isDrawing){this.flush(),this.context.gl.blendFuncSeparate(t,i,e,i)}}setColor(t){this.color.setFromColor(t)}setColorWith(t,e,i,s){this.color.set(t,e,i,s)}point(t,e,i){this.check(os.Point,1),i||(i=this.color),this.vertex(t,e,i)}line(t,e,i,s,r){this.check(os.Line,2);this.mesh.getVertices(),this.vertexIndex;r||(r=this.color),this.vertex(t,e,r),this.vertex(i,s,r)}triangle(t,e,i,s,r,n,a,o,h,l){this.check(t?os.Filled:os.Line,3);this.mesh.getVertices(),this.vertexIndex;o||(o=this.color),h||(h=this.color),l||(l=this.color),t?(this.vertex(e,i,o),this.vertex(s,r,h),this.vertex(n,a,l)):(this.vertex(e,i,o),this.vertex(s,r,h),this.vertex(s,r,o),this.vertex(n,a,h),this.vertex(n,a,o),this.vertex(e,i,h))}quad(t,e,i,s,r,n,a,o,h,l,c,u,d){this.check(t?os.Filled:os.Line,3);this.mesh.getVertices(),this.vertexIndex;l||(l=this.color),c||(c=this.color),u||(u=this.color),d||(d=this.color),t?(this.vertex(e,i,l),this.vertex(s,r,c),this.vertex(n,a,u),this.vertex(n,a,u),this.vertex(o,h,d),this.vertex(e,i,l)):(this.vertex(e,i,l),this.vertex(s,r,c),this.vertex(s,r,c),this.vertex(n,a,u),this.vertex(n,a,u),this.vertex(o,h,d),this.vertex(o,h,d),this.vertex(e,i,l))}rect(t,e,i,s,r,n){this.quad(t,e,i,e+s,i,e+s,i+r,e,i+r,n,n,n,n)}rectLine(t,e,i,s,r,n,a){this.check(t?os.Filled:os.Line,8),a||(a=this.color);let o=this.tmp.set(r-i,e-s);o.normalize(),n*=.5;let h=o.x*n,l=o.y*n;t?(this.vertex(e+h,i+l,a),this.vertex(e-h,i-l,a),this.vertex(s+h,r+l,a),this.vertex(s-h,r-l,a),this.vertex(s+h,r+l,a),this.vertex(e-h,i-l,a)):(this.vertex(e+h,i+l,a),this.vertex(e-h,i-l,a),this.vertex(s+h,r+l,a),this.vertex(s-h,r-l,a),this.vertex(s+h,r+l,a),this.vertex(e+h,i+l,a),this.vertex(s-h,r-l,a),this.vertex(e-h,i-l,a))}x(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)}polygon(t,e,i,s){if(i<3)throw new Error("Polygon must contain at least 3 vertices");this.check(os.Line,2*i),s||(s=this.color);this.mesh.getVertices(),this.vertexIndex;i<<=1;let r=t[e<<=1],n=t[e+1],a=e+i;for(let o=e,h=e+i-2;o=a?(h=r,l=n):(h=t[o+2],l=t[o+3]),this.vertex(e,i,s),this.vertex(h,l,s)}}circle(t,e,i,s,r,n=0){if(0==n&&(n=Math.max(1,6*c.cbrt(s)|0)),n<=0)throw new Error("segments must be > 0.");r||(r=this.color);let a=2*c.PI/n,o=Math.cos(a),h=Math.sin(a),l=s,u=0;if(t){this.check(os.Filled,3*n+3),n--;for(let t=0;t0;)this.vertex(b,A,l),b+=S,A+=M,S+=I,M+=E,I+=T,E+=k,this.vertex(b,A,l);this.vertex(b,A,l),this.vertex(a,o,l)}vertex(t,e,i){let s=this.vertexIndex,r=this.mesh.getVertices();r[s++]=t,r[s++]=e,r[s++]=i.r,r[s++]=i.g,r[s++]=i.b,r[s++]=i.a,this.vertexIndex=s}end(){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.flush();let t=this.context.gl;t.disable(t.BLEND),this.isDrawing=!1}flush(){if(0!=this.vertexIndex){if(!this.shader)throw new Error("No shader set.");this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0}}check(t,e){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");if(this.shapeType==t){if(!(this.mesh.maxVertices()-this.mesh.numVertices()(t[t.Point=0]="Point",t[t.Line=1]="Line",t[t.Filled=4]="Filled",t))(os||{}),hs=class{constructor(t){this.boneLineColor=new h(1,0,0,1),this.boneOriginColor=new h(0,1,0,1),this.attachmentLineColor=new h(0,0,1,.5),this.triangleLineColor=new h(1,.64,0,.5),this.pathColor=(new h).setFromString("FF7F00"),this.clipColor=new h(.8,0,0,2),this.aabbColor=new h(0,1,0,.5),this.drawBones=!0,this.drawRegionAttachments=!0,this.drawBoundingBoxes=!0,this.drawMeshHull=!0,this.drawMeshTriangles=!0,this.drawPaths=!0,this.drawSkeletonXY=!1,this.drawClipping=!0,this.premultipliedAlpha=!1,this.scale=1,this.boneWidth=2,this.bounds=new ci,this.temp=new Array,this.vertices=m.newFloatArray(2048),this.context=t instanceof vi?t:new vi(t)}draw(t,e,i){let s=e.x,r=e.y,n=this.context.gl,a=this.premultipliedAlpha?n.ONE:n.SRC_ALPHA;t.setBlendMode(a,n.ONE,n.ONE_MINUS_SRC_ALPHA);let o=e.bones;if(this.drawBones){t.setColor(this.boneLineColor);for(let e=0,s=o.length;e-1)continue;if(!s.parent)continue;let r=s.data.length*s.a+s.worldX,n=s.data.length*s.c+s.worldY;t.rectLine(!0,s.worldX,s.worldY,r,n,this.boneWidth*this.scale)}this.drawSkeletonXY&&t.x(s,r,4*this.scale)}if(this.drawRegionAttachments){t.setColor(this.attachmentLineColor);let i=e.slots;for(let e=0,s=i.length;e0){t.setColor(this.attachmentLineColor),h=2*(h>>1);let e=a[h-2],i=a[h-1];for(let s=0,r=h;s-1||t.circle(!0,s.worldX,s.worldY,3*this.scale,this.boneOriginColor,8)}}if(this.drawClipping){let i=e.slots;t.setColor(this.clipColor);for(let e=0,s=i.length;e=0&&i==v.data.index&&(x=!0),!x){h.clipEndWithSlot(v);continue}s>=0&&s==v.data.index&&(x=!1);let y,b=v.getAttachment();if(b instanceof re){let t=b;d.vertices=this.vertices,d.numVertices=4,d.numFloats=w<<2,t.computeWorldVertices(v,d.vertices,0,w),a=cs.QUAD_TRIANGLES,n=t.uvs,y=t.region.renderObject.page.texture,o=t.color}else{if(!(b instanceof te)){if(b instanceof Wt){let t=b;h.clipStart(v,t);continue}h.clipEndWithSlot(v);continue}{let t=b;d.vertices=this.vertices,d.numVertices=t.worldVerticesLength>>1,d.numFloats=d.numVertices*w,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=m.newFloatArray(d.numFloats)),t.computeWorldVertices(v,0,t.worldVerticesLength,d.vertices,0,w),a=t.triangles,y=t.region.renderObject.page.texture,n=t.uvs,o=t.color}}if(y){let e=v.color,i=this.tempColor;i.r=p.r*e.r*o.r,i.g=p.g*e.g*o.g,i.b=p.b*e.b*o.b,i.a=p.a*e.a*o.a,l&&(i.r*=i.a,i.g*=i.a,i.b*=i.a);let s=this.tempColor2;v.darkColor?(l?(s.r=v.darkColor.r*i.a,s.g=v.darkColor.g*i.a,s.b=v.darkColor.b*i.a):s.setFromColor(v.darkColor),s.a=l?1:0):s.set(0,0,0,1);let f=v.data.blendMode;if(f!=u&&(u=f,t.setBlendMode(bi.getSourceColorGLBlendMode(u,l),bi.getSourceAlphaGLBlendMode(u),bi.getDestGLBlendMode(u))),h.isClipping()){h.clipTriangles(d.vertices,d.numFloats,a,a.length,n,i,s,c);let e=new Float32Array(h.clippedVertices),o=h.clippedTriangles;r&&r(d.vertices,d.numFloats,g),t.draw(y,e,o)}else{let e=d.vertices;if(c)for(let t=2,r=0,a=d.numFloats;t(t[t.Stretch=0]="Stretch",t[t.Expand=1]="Expand",t[t.Fit=2]="Fit",t))(vs||{}),ys=0,bs=163,As=class{constructor(t){if(this.logo=null,this.spinner=null,this.angle=0,this.fadeOut=0,this.fadeIn=0,this.timeKeeper=new v,this.backgroundColor=new h(.135,.135,.135,1),this.tempColor=new h,this.renderer=t,this.timeKeeper.maxDelta=9,!fs){let t=navigator.userAgent.indexOf("Safari")>-1,e=()=>ys++;(fs=new Image).src=Ms,t||(fs.crossOrigin="anonymous"),fs.onload=e,(ds=new Image).src=Ss,t||(ds.crossOrigin="anonymous"),ds.onload=e}}dispose(){var t,e;null==(t=this.logo)||t.dispose(),null==(e=this.spinner)||e.dispose()}draw(t=!1){if(ys<2||t&&this.fadeOut>1)return;this.timeKeeper.update();let e=Math.abs(Math.sin(this.timeKeeper.totalTime+.25));this.angle-=200*this.timeKeeper.delta*(1+1.5*Math.pow(e,5));let i=this.tempColor,s=this.renderer,r=s.canvas,n=s.context.gl;if(s.resize(1),s.camera.position.set(r.width/2,r.height/2,0),s.batcher.setBlendMode(n.ONE,n.ONE,n.ONE_MINUS_SRC_ALPHA),t){if(this.fadeOut+=this.timeKeeper.delta*(this.timeKeeper.totalTime<1?2:1),this.fadeOut>1)return;i.setFromColor(this.backgroundColor),e=1-this.fadeOut/1,e=1-(e-1)*(e-1),i.a*=e,i.a>0&&(s.camera.zoom=1,s.begin(),s.quad(!0,0,0,r.width,0,r.width,r.height,0,r.height,i,i,i,i),s.end())}else this.fadeIn+=this.timeKeeper.delta,this.backgroundColor.a>0&&(n.clearColor(this.backgroundColor.r,this.backgroundColor.g,this.backgroundColor.b,this.backgroundColor.a),n.clear(n.COLOR_BUFFER_BIT)),e=1;e*=Math.min(this.fadeIn/1,1),i.set(e,e,e,e),this.logo||(this.logo=new Si(s.context,fs),this.spinner=new Si(s.context,ds)),s.camera.zoom=Math.max(1,bs/r.height),s.begin(),s.drawTexture(this.logo,(r.width-165)/2,(r.height-108)/2,165,108,i),this.spinner&&s.drawTextureRotated(this.spinner,(r.width-bs)/2,(r.height-bs)/2,bs,bs,81.5,81.5,this.angle,i),s.end()}},Ss="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAALKElEQVR42u2de2iW5R/GPzuqcwfnnKfNmafl5tTNHWzqNi3DEMQykcAoJSsySkspjSIk0iD/07Kf4R+FnVBDUTshZGpWUEJaaiWFgZlUFmXmIe3HNXthyebeZ77P9H13ffBG8Y8H7ut7vff93N/7fu4vGGPiFZiez/Qtw9lytJajfzfw9z/j+efPOv7cV8W+lUNY2a8T/ayTCRsWFLJA5rtUO1LLkV5p9LJeJizQiHeqnlOtmVFtdTGrrZkJCxYXsTgaI6r9MY4/UpNItW4mFDaXsTlaM6qVZlBq3UwofFrJp0HMWJ9DvXUzobCznJ1BzFjWlTLrZkJh/TDWBzFjTgo51s2EgnKI0Rrx+FiOWzNzVaym91Syx5qZsGBWb2ZFa0ZN6dbMhAWTcpkUrRmXD2K5NTNhgVbH0Zpxbl/mWjMTFvRIo0e0ZpzcncnWzISKtvmiMWNRJ4qslwmVXRXsas2Ix8ZwzFqZsGFREYtaM+Oaa1ljrUzYkJ9G/ok6TlzKjJWZVFor0y7c1Zu7WjLiqiGsskamXdHopyT4vALmzS9k/t19uHtKHlOSIMn6xAtARjIZ1sFcUSZ0Y4La+G6M18hS2IlCn4a+WoC0JNL0d/dUupdnUj40g6EJ2VEdMnhrOG/p5f/jUXz8SgmvaGU6KpNRNsLVQV0OdXf24s63h/P2gWoOrBjMCr2GJFQnnxnIM3q5P1PPmaYv+4ev4/C6UtbpV2gzXCkgL5W8Bwt48OIc6ul6Tp+s4+SyASxLiI4+PYCn1bHzDZxvaQW6vZzto7MYnQIpNkf7kp5EuozYUroqEjcNKHHd0Tl9mBPN1pk+hFeieGBnBtog7UXjsj9pWg+m6duecw2cay1OC/uxMC47KmP9OIYfoz1YoC20J/rzRG4quTZK2EAyJGs20qwUbYw0aNRmUxtvfUW/uEtNzc1NB1/X8LVyd15hh82F43AvD+VlXcsSJEZa1CQ3ejleAO7oxR3RDP0XN91X4+NXYb8nkv7UNTwV7e0YTdu7I3g33t7tuaEbNwSZpps2fSyvs4M2Tjhot+jb0Xzbltj8r5j/xVt/6Z1Ob93U1ZYO691EhhzchcHeXosVjcNZysyezLw4xRZt05R+fTeuj8vOj+zKyG0j2aZcVVs6v+QalnjrMFZASQYl2nBoSyz06e3j/Xk8rgWYmMvEICu2pm1HOTuc7okV8FgRj0XukwzanhvCc/F+72TjoQjdObN1OFuDLmh0xP+WHtxiI10ukJlCprb4guiv1fP+avZrS1C7NAkliHZjDtZwMMgqbukAltpMlwuMy2FcEBPqvfLLar5Uqi0hBdEwryy+Mv5n6zkbjTBa+dlMlwvUZFETZKGiFM7tvbhdJ3gSVRO0wzIjnxmvl/J6a6JsGMYGrahtpssFeqbR841S3mhN80OjOaSDEdqd6SjaMKgzgzRK7q1ib3PT9sYyNo7JZoyNFNvRcVMZmy7WOvIuryv/Zvdmdt90+nY0bRp3AvROohFwdwW7dTG7RFlbwlqdrbOBYg005NAQmZU0HWt1rXMBH1Xw0dQ8pmqzoaPmdhun7bHZjNVe9qP9eFQfO1VkUmHjhAVUZ1GtnKFSbjrkrPfy4i4UW5t/6ZxM54J0CqxFe81KpGsQyE4h23oYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjLna+bdOy+IiFquIpGq16Pb79cNYv3IIK/X/ugx+Ui6TVKvYVU9Nc8gX8od8Ir/IN/KPfCQ/yVfyl/6/pfJvLChkQdD6wyqntquCXYuKWJSfRr6D0dEAxV3xlw/khyD+kd/ku/88cHo+09tS3LBpO1HHCVUqcIA6CqB4K+6X6x35L/JM2loXurlWmUmlA5XogOIcK8/If5HncrSWo7F6cKIWPjT/RXGOlWfkv8hzaWsN4uaaysE6WIkOKM6x8oz8F3kusXqo2vxC5jtYiQ4ozrH0TeS5qIZcrB7qkrwdA8U5Vp6R/yLPZV8V+2L14Cl5THGwEh1QnGPlGfkv8lyUlIzFQ1cNYVVHrcjZ0VCcFe9Y+Eb+izy3ceclUl43aFN52DXXssYpnY6a4qFS8ZcP2uIf+e7inRh6pdFrdTGrm8uiHx/L8T2V7NGWzvJBLJ/bl7mTuzO5qBNFDoiJID/IF/KHfCK/yDfyT3O7d/KbfNfS80hNIrU0g9L6HOq1x5iTQo6FNpeLfCQ/yVfyl3xmXYwxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHNk9z4JwJ0SqKTdQkbyEwhU393T6V7zzR6pieR3tE1ITeVXImhe6BXDGZFdRbVeank2TBhcaEMr0rwbixj49IBLL2/L/ffmMuNHfqO9tFZjJYBd1ewO3Lx+IcVfKhqna5nHZYR6XFPH+5R3eeI5t9fx/fvjeC9Jdew5OKZKqFR/RDVKL6vL/f9PJafmyvHsL+a/ff24V6NmjZQbGchVbY6UM2BluqHv1rCqzVZ1KQlkZboepCdQvacPsz5bjTfXao+yMEaDt7Wk9tSIMVGig3TejCtJSM2bSpkPjWPqd1S6Zao+lORSYWmgkOjORRNwZqd5ezMSiHLRooNr5XwWjS6/1XHX9vL2T67N7M1iyXa9JCrYjVrS1gbpJyw6hBfsmiNCYT0P9/A+Wj1/6qGr5YNYFlJBiWJogEzezLz/ZG8/9s4fgtSyuvNYbyp1IONFBtu7sHNv4/j9yAxUHWrdaWsG9+N8XHd+YxkMpSy+aySz841cC5oXbmHCnnI74yxAgZ3YbDeB4PEQCOpBpFNZWwa2ZWRcdnxLsl00crtRB0n2lLg8JNRfDKoM4NsolgBSmw/UMADba1+qpmqfyf6x1u/0a/og3I+aEunP6/i86osqmygcGarF4p54dex/Bo0LqfqOfVwIQ/HW5/RSkwV1oN2WLlHTc82TljAwM4M1O5LWwYKZTjibYXNS0N5KcjKTe10PadfLObFuJwK4ozp+UzXDBTUjL+M5ZcBnRkQV53dMIwNQTu6bSTbVEzbi5awuVByd2E/FgaN0Tc1fKOzBHHV2aAdVSdv6s5NNkp7cSH/++xAng2yyHx+CM/H21YhfdPp+0U1X0TbSZnXx8faG9Aop0MS0cToh1p+iLcpOkLj9t/JOk5eqoPHxnDsyf486an5yqCDK7XZ1O4oZ4dWyy3FSXHUAYq47uyYbMZoGmhpG3DlEFb6uNiVBhpyaHhnBO8oJmfqOROJjzIiP43hJ8UxITqqX56S2Hur2KsOnq3nrE6PPNKPRwrSKbAZrjTQNZmuE7oxYXMZmxWbw9dxWFu4W4ezVedOE6qzI7oyYkY+M7TPeWsPbk2UX1qioSN+E3OZqOR2cReKE+qQRFN0Pi7y73g/UawU1KzezJpXwLz5hczX1ueUPKYkNb6GJQZ+j7/aAfRZREsv+quGsMoamXZBW2Gt5eU0alorEzYsKmJRa/m4NdeyxlqZsCGa84DKnVorEzboC7podis69DfIJmwufHMc7famvvmxZiYsKOtKWbRm1OcW1syEBboSJFozLh/EcmtmwgIluaM14/phrLdmJixYXMTiaM24p5I91syEBTphFOR7Y2tmwgJNvUFOr+tov3UzoaAv44KYUatv62ZCoemdhtG0+hzqrZsJBR08DWLG0gxKrZu50qvpxos3U5NItW4mFPp1ot+lPlpq2lYXs9qamVBZUMiC1ox4pJYjvlfStAu6GmTLcLboMtPIV4/6im5fFfuUi9QIap2MiWP+D96R1vPmsD/fAAAAAElFTkSuQmCC",Ms="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAABsCAYAAAALzHKmAAAQ7klEQVR42u3da4xdVRUA4D0zd2Y6nZY59DVtZ1puS9+lzC0YAi2UQ8AAQczFpPgA9VIeIQbirRqJ0cBUBVGjDr/QCKSNRSMmpuODxAdxqhgwxkhFjf6Sxh/+UUNVNGJCzR7uTvas7LXX2q9zzp3em6y0gTN3Zu75utZe5+yztxC9V+/Ve5X9En1Vjd7J6SFbLNF7naPw+l2jh7YHMBWssqMHtlsRdim4qsLtIawaPiHEQOLoNrA9iIkQDnRrVA1qD2LZ8ISoxYqKo13sQAtBWBayQWZUAXGRQM9JjCngDVY0UqJNDbQrMcaGmArdUKpIjbYiQLsCZCyIMQBy8QwnilR4Q5AuCpxFYvRFmBLbEiwKwpsSaWycVQGZBKMrwBjA9BhxDe57u2L2hOoKNCbOrgAZitEVYUxoKSMErQvSxYIzCkguRg5EF4AUhqUlhy/YUKSxcRaKsioYOQhD4I0yYxkR3PcJBcuFysmgsXAWBTMJyBCMIQh9kGGxXIXvexCQXbHGAMrBWTbM2CCpMSMLIxehC77lSJwXGth7M0FzoVJIXXDWQnGmhOkL0ic7YhhtWdGGkAuPAjUWGoF4faCmwBkbZmyUqUCyMqMLRA4+E6IsdTjidUHKBYrh9CnpRcH0ypKxsyOGEYNIIeTCOz91OIJ1QYoB5eAMyZo+MFNnyVTZ0YiRC9EGEMOyAgshxErHsL2XK1gOUgwohtM1a5YNM7Rsu4K0ZkcbRm4mpPBRwFZ5hg9eCqkrUB+csWGGogzNkqEgrdnRhpGLkINudaLgwvVB6oqzCjCTZElb2Y4B0gUjBtEG0ARnDRLjjoG9DwcshtQGlIPTljVjwUySLWNkyRCQVHa0ZUUTRAwgF91a33BEy0VKAcVwwqwZC2bqbOlUurllOxQkJzNyINoAYqjWhYYjWg5SCiiG05Q1U8FMjTIoS8YE6YORi1BHtJ4KIcQEEtTXUWAxpK44YVlPBdO1jCdFWTZIE8bVGEYMIRPcZGBw4HKQcoBiOE1ZMzbMgVQwU6JMAdKEEcuIJogUvg1YCCE2gsCO42DlIIVAKZwpYJaSLVNnSU6XjYHUmxhTmXaFaMO3EYkLqMC+FsLlIoVAKZzMrEnBhJeLfLNlKMrYWRIDCbOkFSSVHbHM6AKRC6/ODUewNqQ+OLlZkxpjUmV8MBbMUJSxyzY3Q1IgTRgxiBRCHdem0KDAUkBh9sRwwjEnAXMMgTnKhFlUtiwkS5rGka4g9SaGgxFmRC7AzTCEEBcyA36dDSsXqAtOLkysjGMwY5XxVChjZ0kuSCo7YlkRQsQQYtDEFsegsLoCxUp7Kpgps2UslFGzJGccSYHUmxhOZqwzEZqAbfUMCisHKIZzgsCpl3MTzMwTpi1bYp2477gyFKUxS7qWbdjY2EBS2dGE0QQRA7gNCyHEdhjE8RhUDlBT9tzgmjWZMFNlSy+Urk1OzCyJlW0XkK4YOQh1cDtcgwBrQmoDWkdgboBZE8mYsJSHlnFbJ+5bwmOPJ7lZkirbC8aRsMvmgtTHjBhGE0QbwJ2egUE1ITVlUC5OmDVdYNrKuN70xM6WoShjlW4464dbtiFIWK6x7GjESEHUUe0iYncnbMdQSE0Z1ITTNOb0hRmjjLtmS9dmJ2rp1jtuKktyyrb6YLEMCUHq2dGG0QQRQ7f72kzc+cJecerne8Wvv7JNPHPvenEkz8Sh3UtFc92QyGt9Yko/HgOLAIUZlItTz5ouMF3KuE+2jFLCQ1D6lm6fLMkBacuOJowYRBUXyfjuHjF3NhdnsfjvAfH6E9vFt9XxKgikEKgJZyyYalzOLeMu2bLbULI6bh+QGwmQ+rgRlumdGEQAao+K56bEL2woVUwOiev0r8OAUjiJrMmFCbvykGxZRAmPitK1dHM7bohyMsuyi/I8f0+e57fJYIKEZXpXo9E4mOf5XTKyLLvCBLETF8uY2SKepkC+dpX4T02Ivepr4HvZcOZ5fmee54fyPL+DmTUhzAs6n4n8bN5dr9f3YdkSg8nsxG0lPBVKVpNjG0/aGhzfLDmRZdnumZmZp8+c+cdZPV555fSr7Xb7s0jJ3i5Pcue4MxKkPPkvvXTqz/B92u32l0wYOzG1fkhcd/py8Rcbyq/vFM/KY1WA95h/3zzP71bfU6JsNpsfgj+P/FlbrdaDGExYyuXvLz8H+DudODH700ajcSM3W6Yu4alQ1spCOTd38jcKocTZbh9+9NixY99XJ8AEUkcpo9W64yH197m5k7+bnZ19QT+J09NHntQhwji/Jg58qi6++ofLxJ8gSFneVw2Ka4QQDfh1Ok4dZavVmtZ/nrm5k7/Vf55O1tRhboUw5+ZOvqyOl5+R/FyOHj32PYVU/tloNG5IXcKrhJIzngwp3fNjomazea/64BuNxts646f50lWv169utw9/DmtqdJQyZFaSJVuV6nq9fqMEof5/vV6/CYBqgJDlee+yAbF/+4i4ZWqZeNfaIfHWzn+Hx0KcEuU9+s8jv3ej0bhVlXOZydX/k0iRMeb8P0D5e6tj8zy/Xb9UJIc56h/yqVOnXul8lmuZ2bJslKmbHG7XrbpCmCXFRLvdfqQD6jTS3Jiy5I4OykM6ADV+1Eu1DmV6evopBORexzDi1L+X/HnGxsb2w3Hm9PSRJ9QxWPOTZdmlKht2hi+w6dkox5bqffI8fye3hDteGqKaHVsHXihKl0tB+h0cY+lute54AGRKDCW89LNTRynHb7ChUWVVjetOnJh9EYBUyPZeNCoOtsbFQwdXi4/esELcd+tq8cCHJ8UXp+viy9efLz7AgamjlKXc1AA1m83DoIRDlFubzeb96hhZLVTlgJ24gttutx+ONa50bHZKRenaeTs1OfpAfnr6yOOdE7EZdNwmlKocntXLNkA5JTGq47Ds+Lf94lWsyfnXleLfnIwJUN4DOnNYwuUxh2A3Ln9XULrfK8t3J27Tu3BVwiOjXJqoAy8UZej1yclGo3GTLN+gu3w+z/P3YaWbQqk3Ne12e4ZC+c8rxWsYytcPiP9RpZxCqWDKnxOiBNlyAUpOnGsoh4tA2Rm8X9xqtT6md5wyZmYe+0YRKL+1S/wYQ3n8zctBl5SBUv5djivfjMOPduIzcizeiYfr9foVvUwZG+XCuzibZKnSceZ5/v4QlKp8y7ElhnJlTeTP7BI/kllRYfzrfvHqFy4UX1vaL/aVlSmROzwbwdS29T2UcEwZF+V8ozM2lu1VY812u/15akypGh3TmFJesJbHHD167IdUxz3YJy5bNySuX1mbvy55CbMLtzU6tjGlsdFptVqfUMc0Go23F4wy1l2dSnbfvpMwVPe9WWVLDsrOJaF9MFu2Wq1PqmNkGce67xiXhTjdNwdlvV6/BgxfbPfBfVCetxi6b9/rlCup65QzM48dl2OjLMv26CibzeZ96sTIzEFdpwQXz9U1yrtVlpR/Zll2Fec65Y6l4pbbx8XHH9kknvzJlPjlHy8Tp29eKT5ou0aJoIT3w3dBlLDzVpfAJEZ1XOdaJZxnOSlvPMjPzxFljIvng914RwebsjYO7uhMyHu46sOfnf3Oz2TXDW6vvYxdFoIXz3Wc8J5zs9n8iOn2IrxTc2BM3Glqdp7dI553uaOjxrhwcob+MyuUpjs6WZZdon8OcigjPx8V+u+GTWFTSWEx3WYcdJ225jNDSE4q0GHCzlueHOyujn6bUWYgeb9ZZUaQPe+GzQ+Gc8+oOGhC+c1d4gfI16n3XDAhQ7+9qE9l01E2Go132GYKyXE1NiFDTcpoNpv3LOYJGWXNErJNW9sEp63p2RKiVPMn1bS1DgxsyhoGdGpmizj+xtXiDYnx7/vFmce3iWdW1cTVGEY4hQ2ZW0nNq8Qm/M6XbXm3S100lwGedFybuvNOibLI+ZS2ceU4eAxiEuvCkfmU8ycToDxETe6FgCBQHeqyAbFvfEhcO7BwDuXFCEbTZF840XeHK0jYcbs2OIGle0mVJ/mmnClEPQqxyTY5I8/zFhif7fSZee4bnrPOU4AssnRXHaVTCTd14dRDY3UbTIiSeFhsN/aMjgnqthFx880rxX3yATL5p3y4LPXzOaBkUyBjZMlYpbtQlIOBD475ZEusjMNSvkXe6VEoJVDkeZ2dzIfIFsRzU+JF2OyM9M9fTC/6SUYOyFQPjQ2nWiUjxnPfw5EeHqMWIqAeIFsAU847lJM2JM6xsewt1OIDLs99P7ZFHNdB/upS8XtPiD7PfLuCXJNolYyyFiNI/Zit65ItrOVafFbHcFohY7hPTN21Tjz4uc3iqfsnxKdX1MTl1OoYRFaMsToGB6Trw2JFP/OdZC2hJZ7ZkrMoAbbSGmelDJ91hFKuJeS7jlBMkJnrAqqJlgMUZS/dArPlGHNdSg5M3xXXtvquuEatvIYtDRhpxbUJuIgqsU5lGWtUploK0KuEU9mSW8YpmFQ556xNuYW7NiW13B+FkMiKHIy+C6eGgBxJvMR0oSv5hi6+z4HJyZoU0M2RVvDlrOQbcxVfX5AhZbuqy0v7ZstYMLHlAVlLTF9ALLbvu9Y5Zylpn/XOsd0ibIvxr2KCLHpp6SCUIdnSZSF+WzfOhem6GD+1KwR3Z4jNjrtDpNoZwmWd8yrupZN6Hx3fbMmFSe0Swdq2ZIPjxk1112Duo8OBGLrBkw/IoncdK2XHsdC9dHz204m50xh3tzFq1zFqtzHXrfCw7OgDsqyNnZLszVijsmXgrmNcmGtS78lIoMX2aJz03fKO2sDJddPQSCDPiQ1DfWBycY6XtXstc2PQKuxgG2McmXTPb9/9vmuJYXKyJrWjbeg+3xPM4O73nWqvbyw7xgZZSJbEUBa157cNJjdr2vb+5iA1YV3HxYscj30PDCEHIgcjtfm8K8hSsmRotkwFk5s1TTghUAopB6xrjHMBBkI0YYTZ0dZlxwLpkiWDULpmy5gwqayZgZNkA7oKQQCxctByYg0XIIEQQuRitGVHblMTA2ShKGPDpC6wu+DEgJqg2rDGDBtAF4Q6RAojp1xXGmSMbImVcR+YWNY04eQCtUG1ofUJ2/uvcETIgUhhdAE5GAlkKShjwHTNmhhODKgJqQ2sC14uOgyfD0IbRF+MlQaZAiZWyn2yJsTJATqGnHQO2Jhh+xlsACFCG0QbRtdyzQFZCZSxYPpmTS7Q5cjJHYNBYIkZpu99HoUQ/o4QIYSIZUZfjJ4ZMjZI32wZBDMU5yhy8pZTULl4XYP5fagMyEVoy4oupTpGduwnkloSlKEwY+AcQU4MhRTD6ovXBRwFzwWgCSEF0QVjJUGmgEllTS5OLlCIlIN1mS9mx/cZ5eLDALpCTI2RAhkTZQqYoTgpoCPECbaBHQ2ETL3PUl98ECAXYijG0OyYAmQoTG7W5ODkAF1CnVgm2JQx4okPA+gCMTbGskBGgRmaOblAh5GTORIrfKFx4VH4EIAxIXIxlg2SBbMvECY3e7oApbDaIgQu5/2HmeEKEINYiwSRi7EQkLFgumZOCuggctKGI4ULZN/vMeSLj0AYMytWEqMLzFg4fYDaoKaC6wvOFR4FkIPQFaILxrJAOsHsc/zlfYDWXE8qF22s8Pz5KHxcgEVALBtjJXBSSEOwFhk1Zgy4hitCT4hVw+gFs8/zwxqIBbUgyK7fcyA0PD9XX4iVxhiC0xdof6STWCsoBmKF7+cVCWFXQYyBMxRpf+STX1b0x45AhN0OMSrOGEirhrY/dfQAdjvS7oy+WCF6r1RIFxXWvlTRg1YVqFWBmxZbD99ig9pt0YPQw9rD1nstVri9V+/Ve3XrS/wfim4P5fIFxLoAAAAASUVORK5CYII=",Is=class{constructor(t,e){this.time=new v,e.pathPrefix||(e.pathPrefix=""),e.app||(e.app={loadAssets:()=>{},initialize:()=>{},update:()=>{},render:()=>{},error:()=>{}}),e.webglConfig&&(e.webglConfig={alpha:!0}),this.htmlCanvas=t,this.context=new vi(t,e.webglConfig),this.renderer=new ws(t,this.context),this.gl=this.context.gl,this.assetManager=new Mi(this.context,e.pathPrefix),this.input=new qi(t),e.app.loadAssets&&e.app.loadAssets(this);let i=()=>{requestAnimationFrame(i),this.time.update(),e.app.update&&e.app.update(this,this.time.delta),e.app.render&&e.app.render(this)},s=()=>{this.assetManager.isLoadingComplete()?this.assetManager.hasErrors()?e.app.error&&e.app.error(this,this.assetManager.getErrors()):(e.app.initialize&&e.app.initialize(this),i()):requestAnimationFrame(s)};requestAnimationFrame(s)}clear(t,e,i,s){this.gl.clearColor(t,e,i,s),this.gl.clear(this.gl.COLOR_BUFFER_BIT)}};return ps=r,((r,n,a,o)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let h of i(n))s.call(r,h)||h===a||t(r,h,{get:()=>n[h],enumerable:!(o=e(n,h))||o.enumerable});return r})(t({},"__esModule",{value:!0}),ps)})();t.exports=e}).call(window)},3524:(t,e,i)=>{var s=i(7473),r=i(4597),n=i(6732),a=i(2482),o=i(704),h=i(3137),l=i(1192),c=new s({Extends:h,initialize:function(t,e,i,s,n,c,u){var d,f,p,m=[],g=t.cacheManager.custom.spine;if(a(e)){var x=e;for(e=r(x,"key"),f=new o(t,{key:e,url:r(x,"jsonURL"),extension:r(x,"jsonExtension","json"),xhrSettings:r(x,"jsonXhrSettings")}),s=r(x,"atlasURL"),n=r(x,"preMultipliedAlpha"),Array.isArray(s)||(s=[s]),d=0;d{var s=i(2494),r=i(7473),n=i(5851),a=i(3527),o=i(5722),h={canvas:i(5159),webgl:i(7518)},l=i(3524),c=i(8332),u=i(5782),d=i(1984),f=new r({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:d,postRender:d,render:d,destroy:d});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,s,r,n){var a=this.scene.sys[i],o=new c(this.scene,a,t,e,s,r,n);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var r=n(t,"key",null),a=n(t,"animationName",null),o=n(t,"loop",!1),h=this.scene.sys[i],l=new c(this.scene,h,0,0,r,a,o);void 0!==e&&(t.add=e),s(this.scene,l,t);var u=n(t,"skinName",!1);u&&l.setSkinByName(u);var d=n(t,"slotName",!1),f=n(t,"attachmentName",null);return d&&l.setAttachment(d,f),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,s){var r=this.scene.sys[i],n=new u(this.scene,r,t,e,s);return this.displayList.add(n),n}),(function(t,e){void 0===t&&(t={});var r=n(t,"x",0),a=n(t,"y",0),o=n(t,"children",null),h=this.scene.sys[i],l=new u(this.scene,h,r,a,o);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(a,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=this.renderer.spineSceneRenderer;t||(t=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0),this.renderer.spineSceneRenderer=t),this.sceneRenderer=t,this.skeletonRenderer=t.skeletonRenderer,this.skeletonDebugRenderer=t.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures;i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures,n=this.sceneRenderer.context.gl;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(n,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,s,r,n,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h{var s=i(7473),r=i(7361),n=i(7738),a=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n){r.call(this,t,i,s,n),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},8064:t=>{t.exports=function(t,e,i,s){var r=e.list;if(0!==r.length){i.addToRenderList(e);var n=e.localTransform;s?(n.loadIdentity(),n.multiply(s),n.translate(e.x,e.y),n.rotate(e.rotation),n.scale(e.scaleX,e.scaleY)):n.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c{var s=i(1984),r=i(1984);s=i(434),r=i(8064),t.exports={renderWebGL:s,renderCanvas:r}},434:t=>{t.exports=function(t,e,i,s){var r=e.plugin.sceneRenderer,n=e.list;if(0!==n.length){i.addToRenderList(e);var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.newType&&(t.pipelines.clear(),r.begin());var o=t.nextTypeMatch;t.nextTypeMatch=!0,t.newType=!1;for(var h=0;h{t.exports="complete"},8621:t=>{t.exports="dispose"},8944:t=>{t.exports="end"},7494:t=>{t.exports="event"},1908:t=>{t.exports="interrupted"},5591:t=>{t.exports="start"},5146:(t,e,i)=>{t.exports={COMPLETE:i(6576),DISPOSE:i(8621),END:i(8944),EVENT:i(7494),INTERRUPTED:i(1908),START:i(5591)}},8332:(t,e,i)=>{var s=i(6412),r=i(2915),n=i(7473),a=i(1991),o=i(3131),h=i(9660),l=i(4627),c=i(3212),u=i(8414),d=i(3426),f=i(7149),p=i(2273),m=i(4208),g=i(5146),x=i(2762),w=new n({Extends:p,Mixins:[a,o,h,l,c,u,x],initialize:function(t,e,i,s,r,n,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,s),r&&this.setSkeleton(r,n,a)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var s=this.plugin,r=s.sceneRenderer;s.gl&&r.batcher.isDrawing&&(r.end(),s.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,s=(t>>8&255)/255,r=(255&t)/255,n=t>16777215?(t>>>24)/255:null,a=this.skeleton;if(e){var o=this.findSlot(e);o&&(a=o)}return a.color.r=i,a.color.g=s,a.color.b=r,null!==n&&(a.color.a=n),this},setSkeletonFromJSON:function(t,e,i,s){return this.setSkeleton(t,e,i,s)},setSkeleton:function(t,e,i,s){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,s);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var n=r.skeleton;return n.setSkin(),n.setToSetupPose(),this.skeleton=n,r=this.plugin.createAnimationState(n),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(d(this.rotation))+90),this.state.apply(n),n.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=m(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,s){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===s&&(s=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-s,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,s=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=i,t.scaleY=s,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i{var s=i(3426),r=i(4208),n=i(8445);t.exports=function(t,e,i,a){var o=t.currentContext,h=e.plugin,l=e.skeleton,c=h.skeletonRenderer,u=t._tempMatrix1,d=t._tempMatrix2,f=t._tempMatrix3;i.addToRenderList(e),d.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),u.copyFrom(i.matrix),a?(u.multiplyWithOffset(a,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),d.e=e.x,d.f=e.y,u.multiply(d,f)):(d.e-=i.scrollX*e.scrollFactorX,d.f-=i.scrollY*e.scrollFactorY,u.multiply(d,f)),l.x=f.tx,l.y=f.ty,l.scaleX=f.scaleX,l.scaleY=-1*f.scaleY,e.scaleX<0?(l.scaleX*=-1,e.root.rotation=r(f.rotationNormalized)):e.root.rotation=n(r(s(f.rotationNormalized))+90,0,360),e.scaleY<0&&(l.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*r(f.rotationNormalized):e.root.rotation+=2*r(f.rotationNormalized)),i.renderToTexture&&(l.y=f.ty,l.scaleY*=-1),l.updateWorldTransform(),c.ctx=o,c.debugRendering=h.drawDebug||e.drawDebug,o.save(),c.draw(l),o.restore()}},2762:(t,e,i)=>{var s=i(1984),r=i(1984),n=i(1984);s=i(4290),n=i(780),r=i(2753),t.exports={renderWebGL:s,renderCanvas:r,renderDirect:n}},780:(t,e,i)=>{var s=i(2915),r=i(3426),n=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var c=e.plugin,u=e.skeleton,d=c.sceneRenderer;t.pipelines.clear(),d.begin();var f=e.scrollFactorX,p=e.scrollFactorY,m=u.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,u.color.a=s(m*l.alpha,0,1)),i.addToRenderList(e);var g=n(e,i,h).calc,x=t.height;if(u.x=g.tx,u.y=x-g.ty,u.scaleX=g.scaleX,u.scaleY=g.scaleY,e.scaleX<0?(u.scaleX*=-1,e.root.rotation=o(a(g.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(u.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(g.rotationNormalized):e.root.rotation+=2*a(g.rotationNormalized)),u.updateWorldTransform(),d.drawSkeleton(u,e.preMultipliedAlpha),l&&(e.scrollFactorX=f,e.scrollFactorY=p,u.color.a=m),c.drawDebug||e.drawDebug){var w=u.x,v=u.y;u.x=0,u.y=0,d.drawSkeletonDebug(u,e.preMultipliedAlpha),u.x=w,u.y=v}d.end(),t.pipelines.rebind()}},4290:(t,e,i)=>{var s=i(2915),r=i(3426),n=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var c=e.plugin,u=e.skeleton,d=c.sceneRenderer;t.newType&&(t.pipelines.clear(),d.begin());var f=e.scrollFactorX,p=e.scrollFactorY,m=u.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,u.color.a=s(m*l.alpha,0,1)),i.addToRenderList(e);var g=n(e,i,h).calc,x=t.height;if(u.x=g.tx,u.y=x-g.ty,u.scaleX=g.scaleX,u.scaleY=g.scaleY,e.scaleX<0?(u.scaleX*=-1,e.root.rotation=o(a(g.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(u.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(g.rotationNormalized):e.root.rotation+=2*a(g.rotationNormalized)),u.updateWorldTransform(),d.drawSkeleton(u,e.preMultipliedAlpha),l&&(e.scrollFactorX=f,e.scrollFactorY=p,u.color.a=m),c.drawDebug||e.drawDebug){var w=u.x,v=u.y;u.x=0,u.y=0,d.drawSkeletonDebug(u,e.preMultipliedAlpha),u.x=w,u.y=v}t.nextTypeMatch||(d.end(),t.pipelines.rebind())}},9454:(t,e,i)=>{var s={VERSION:"3.60.0",BlendModes:i(8351),ScaleModes:i(8196),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},1081:(t,e,i)=>{var s=i(7473),r=i(6748),n=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{t.exports="changedata"},7801:t=>{t.exports="changedata-"},4873:t=>{t.exports="destroy"},9966:t=>{t.exports="removedata"},4586:t=>{t.exports="setdata"},6748:(t,e,i)=>{t.exports={CHANGE_DATA:i(9044),CHANGE_DATA_KEY:i(7801),DESTROY:i(4873),REMOVE_DATA:i(9966),SET_DATA:i(4586)}},3004:(t,e,i)=>{var s=i(2776),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(r.ogg=i('ogg; codecs="vorbis"'),r.opus=i('ogg; codecs="opus"',"opus"),r.mp3=i("mpeg"),r.wav=i("wav"),r.m4a=i("x-m4a"),r.aac=i("aac"),r.flac=i("flac","x-flac"),r.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)r.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var n=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===n&&a>=11||n>10)&&(r.dolby=!0)}}}catch(t){}return r}()},2776:(t,e,i)=>{var s,r=i(5203),n={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edg\/\d+/.test(s)?(n.edge=!0,n.es2019=!0):/OPR/.test(s)?(n.opera=!0,n.es2019=!0):/Chrome\/(\d+)/.test(s)&&!r.windowsPhone?(n.chrome=!0,n.chromeVersion=parseInt(RegExp.$1,10),n.es2019=n.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(n.firefox=!0,n.firefoxVersion=parseInt(RegExp.$1,10),n.es2019=n.firefoxVersion>10):/AppleWebKit/.test(s)&&r.iOS?n.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(n.ie=!0,n.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(s)&&!r.windowsPhone?(n.safari=!0,n.safariVersion=parseInt(RegExp.$1,10),n.es2019=n.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(n.ie=!0,n.trident=!0,n.tridentVersion=parseInt(RegExp.$1,10),n.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(n.silk=!0),n)},6505:(t,e,i)=>{var s,r,n,a=i(8073),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(n=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(n,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+r},n.src=s+"AP804Oa6"+r,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return a.remove(this),s}()),o)},6543:(t,e,i)=>{var s=i(5203),r=i(2776),n=i(8073),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=n.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=n.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=s.data instanceof Uint8ClampedArray,n.remove(t),n.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(a.getUserMedia=!1),!s.iOS&&(r.ie||r.firefox||r.chrome)&&(a.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},3922:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",r=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(2776),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},5203:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},2131:(t,e,i)=>{var s=i(4597),r={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};t.exports=function(){if("function"==typeof importScripts)return r;var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(r.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(r.h264=!0,r.mp4=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(r.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(r.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(r.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,"")&&(r.hls=!0))}catch(t){}return t.parentNode&&t.parentNode.removeChild(t),r.getVideoURL=function(t){Array.isArray(t)||(t=[t]);for(var e=0;e{t.exports={os:i(5203),browser:i(2776),features:i(6543),input:i(1454),audio:i(3004),video:i(2131),fullscreen:i(3922),canvasFeatures:i(6505)}},5686:(t,e,i)=>{var s=i(7473),r=new Float32Array(20),n=new s({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(t){return this._matrix.set(t),this._dirty=!0,this},reset:function(){var t=this._matrix;return t.fill(0),t[0]=1,t[6]=1,t[12]=1,t[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var t=this._data;return this._dirty&&(t.set(this._matrix),t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._dirty=!1),t},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),r=.213,n=.715,a=.072;return this.multiply([r+.787*i+s*-r,n+i*-n+s*-n,a+i*-a+.928*s,0,0,r+i*-r+.143*s,n+i*(1-n)+.14*s,a+i*-a+-.283*s,0,0,r+i*-r+-.787*s,n+i*-n+s*n,a+.928*i+s*a,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply(n.BLACK_WHITE,t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply(n.NEGATIVE,t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply(n.DESATURATE_LUMINANCE,t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply(n.SEPIA,t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply(n.LSD,t)},brown:function(t){return void 0===t&&(t=!1),this.multiply(n.BROWN,t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply(n.VINTAGE,t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply(n.KODACHROME,t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply(n.TECHNICOLOR,t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply(n.POLAROID,t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply(n.SHIFT_BGR,t)},multiply:function(t,e){void 0===e&&(e=!1),e||this.reset();var i=this._matrix,s=r;return s.set(i),i.set([s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19]]),this._dirty=!0,this}});n.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],n.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],n.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],n.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],n.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],n.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],n.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],n.KODACHROME=[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],n.TECHNICOLOR=[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],n.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],n.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t.exports=n},8073:(t,e,i)=>{var s,r,n,a=i(9454),o=i(2150),h=[],l=!1;t.exports=(n=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,a.CANVAS)},create:s=function(t,e,i,s,n){var c;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=a.CANVAS),void 0===n&&(n=!1);var u=r(s);return null===u?(u={parent:t,canvas:document.createElement("canvas"),type:s},s===a.CANVAS&&h.push(u),c=u.canvas):(u.parent=t,c=u.canvas),n&&(u.parent=c),c.width=e,c.height=i,l&&s===a.CANVAS&&o.disable(c.getContext("2d",{willReadFrequently:!1})),c},createWebGL:function(t,e,i){return s(t,e,i,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{var s=i(7473),r=i(3649),n=new s({initialize:function(t,e,i,s,r,n){e||(e=t.sys.make.image({x:i,y:s,key:r,frame:n,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,i,s,r){return new n(this.scene,t,e,i,s,r)})),t.exports=n},6726:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,r=this.geometryMask,n=t.maskCount,a=255;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,n,a),s.stencilOp(s.KEEP,s.KEEP,s.INCR),n++):(s.stencilFunc(s.EQUAL,n+1,a),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),this.level=n,r.renderWebGL(t,r,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),this.invertAlpha?s.stencilFunc(s.NOTEQUAL,n,a):s.stencilFunc(s.EQUAL,n,a)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},7340:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.BARREL,t),this.amount=e}});t.exports=a},5170:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===i&&(i=1),void 0===s&&(s=1),void 0===a&&(a=1),void 0===o&&(o=1),void 0===h&&(h=4),r.call(this,n.BLOOM,t),this.steps=h,this.offsetX=i,this.offsetY=s,this.blurStrength=a,this.strength=o,this.glcolor=[1,1,1],null!=e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},4199:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===e&&(e=0),void 0===i&&(i=2),void 0===s&&(s=2),void 0===a&&(a=1),void 0===h&&(h=4),r.call(this,n.BLUR,t),this.quality=0,this.x=i,this.y=s,this.steps=h,this.strength=a,this.glcolor=[1,1,1],null!=o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},3132:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=.5),void 0===i&&(i=1),void 0===s&&(s=.2),void 0===a&&(a=!1),void 0===o&&(o=1),void 0===h&&(h=1),void 0===l&&(l=1),r.call(this,n.BOKEH,t),this.radius=e,this.amount=i,this.contrast=s,this.isTiltShift=a,this.strength=l,this.blurX=o,this.blurY=h}});t.exports=a},6610:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o){void 0===e&&(e=8),void 0===a&&(a=1),void 0===o&&(o=.005),r.call(this,n.CIRCLE,t),this.scale=a,this.feather=o,this.thickness=e,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=i&&(this.color=i),null!=s&&(this.backgroundColor=s)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundColor:{get:function(){var t=this.glcolor2;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor2;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},4931:(t,e,i)=>{var s=i(7473),r=i(5686),n=i(1571),a=new s({Extends:r,initialize:function(t){r.call(this),this.type=n.COLOR_MATRIX,this.gameObject=t,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});t.exports=a},6128:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.type=t,this.gameObject=e,this.active=!0},setActive:function(t){return this.active=t,this},destroy:function(){this.gameObject=null,this.active=!1}});t.exports=s},9195:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s){void 0===e&&(e="__WHITE"),void 0===i&&(i=.005),void 0===s&&(s=.005),r.call(this,n.DISPLACEMENT,t),this.x=i,this.y=s,this.glTexture,this.setTexture(e)},setTexture:function(t){var e=this.gameObject.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this}});t.exports=a},445:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===i&&(i=4),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.GLOW,t),this.outerStrength=i,this.innerStrength=s,this.knockout=a,this.glcolor=[1,1,1,1],void 0!==e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},7724:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l,c){void 0===s&&(s=.2),void 0===a&&(a=0),void 0===o&&(o=0),void 0===h&&(h=0),void 0===l&&(l=1),void 0===c&&(c=0),r.call(this,n.GRADIENT,t),this.alpha=s,this.size=c,this.fromX=a,this.fromY=o,this.toX=h,this.toY=l,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=e&&(this.color1=e),null!=i&&(this.color2=i)},color1:{get:function(){var t=this.glcolor1;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor1;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}},color2:{get:function(){var t=this.glcolor2;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor2;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}}});t.exports=a},4412:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.PIXELATE,t),this.amount=e}});t.exports=a},75:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.1),void 0===a&&(a=1),void 0===h&&(h=6),void 0===l&&(l=1),r.call(this,n.SHADOW,t),this.x=e,this.y=i,this.decay=s,this.power=a,this.glcolor=[0,0,0,1],this.samples=h,this.intensity=l,void 0!==o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},8734:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=3),void 0===a&&(a=!1),r.call(this,n.SHINE,t),this.speed=e,this.lineWidth=i,this.gradient=s,this.reveal=a}});t.exports=a},2437:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=.5),void 0===a&&(a=.5),r.call(this,n.VIGNETTE,t),this.x=e,this.y=i,this.radius=s,this.strength=a}});t.exports=a},5984:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.WIPE,t),this.progress=0,this.wipeWidth=e,this.direction=i,this.axis=s,this.reveal=a}});t.exports=a},1571:t=>{t.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},7347:(t,e,i)=>{var s=i(1030),r=i(1571),n={Barrel:i(7340),Controller:i(6128),Bloom:i(5170),Blur:i(4199),Bokeh:i(3132),Circle:i(6610),ColorMatrix:i(4931),Displacement:i(9195),Glow:i(445),Gradient:i(7724),Pixelate:i(4412),Shadow:i(75),Shine:i(8734),Vignette:i(2437),Wipe:i(5984)};n=s(!1,n,r),t.exports=n},2494:(t,e,i)=>{var s=i(8351),r=i(8361);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var n=r(i,"scale",null);"number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=r(n,"x",1),e.scaleY=r(n,"y",1));var a=r(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(i,"rotation",0);var o=r(i,"angle",null);null!==o&&(e.angle=o),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),c=r(h,"y",.5);e.setOrigin(l,c)}return e.blendMode=r(i,"blendMode",s.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},2273:(t,e,i)=>{var s=i(7473),r=i(6125),n=i(1081),a=i(4399),o=i(3389),h=i(204),l=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(t,e){return this.data||(this.data=new n(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new n(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new n(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new n(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},3649:(t,e,i)=>{var s=i(7473),r=i(8456),n=i(204),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(n.DESTROY,this.destroy,this)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},r.register("GameObjectFactory",a,"add"),t.exports=a},2208:(t,e,i)=>{var s=i(4227),r=new s,n=new s,a=new s,o={camera:r,sprite:n,calc:a};t.exports=function(t,e,i){var s=r,h=n,l=a;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),o}},4344:(t,e,i)=>{var s=i(2915),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},4518:(t,e,i)=>{var s=i(2915),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},5173:(t,e,i)=>{var s=i(8351),r={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},1991:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},8305:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},3131:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},1626:(t,e,i)=>{var s=i(7473),r=i(7347),n=i(8935),a=new s({initialize:function(t,e){this.gameObject=t,this.isPost=e,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(t){return void 0===t&&(t=0),this.padding=t,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(t){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,void 0!==t&&(this.padding=t),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var t=this.list,e=0;e{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},3671:(t,e,i)=>{var s=i(1392),r=i(9876),n=i(2529),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t,e){return void 0===t&&(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getTopLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,n,a,o,h,l;if(void 0===t&&(t=new s),this.parentContainer){var c=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),c.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),c.transformPoint(t.x,t.y,t),r=t.x,n=t.y,this.getBottomLeft(t),c.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),c.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,n=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(i,n,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(i,n,o,l)-t.y,t}};t.exports=a},2246:(t,e,i)=>{var s=i(7499),r=i(6726),n={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,r,n){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,r,n)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=n},5085:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},77:(t,e,i)=>{var s=i(7149),r=i(1864),n=i(5851),a=i(3747),o=i(2529),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=n(t,"from",0),t.to=n(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=n(t,"rotationOffset",0);var l=n(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var c=this.path.getPoint(.1);this.rotation=Math.atan2(c.y-this.y,c.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var n=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-n,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},986:(t,e,i)=>{var s=i(3911),r={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(t){this.pipelineData={};var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){var a=n.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?s(e):e)}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},resetPipeline:function(t){return void 0===t&&(t=!1),this.pipeline=this.defaultPipeline,t&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=r},4461:(t,e,i)=>{var s=i(3911),r=i(1626),n=i(8935),a={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(t){this.postPipelines=[],this.postPipelineData={},this.postFX=new r(this,!0),t&&(this.preFX=new r(this,!1))},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPostPipelineData:function(t,e){var i=this.postPipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],r=0;r=0;s--){var r=i[s];(e&&r.name===t||!e&&r===t)&&(r.destroy(),n(i,s))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};t.exports=a},4627:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},1868:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},4976:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},9243:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=r},5693:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},6125:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},3212:(t,e,i)=>{var s=i(7425),r=i(4227),n=i(7556),a=i(3692),o=i(2820),h=i(2529),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return o(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(e||(e=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var r=s.scrollX,a=s.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):n(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},4227:(t,e,i)=>{var s=i(7473),r=i(7425),n=i(2529),a=new s({initialize:function(t,e,i,s,r,n){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===r&&(r=0),void 0===n&&(n=0),this.matrix=new Float32Array([t,e,i,s,r,n,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||n?r.TAU-(n>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3];return s[0]=r*i+a*e,s[1]=n*i+o*e,s[2]=r*-e+a*i,s[3]=n*-e+o*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,r=i[0],n=i[1],a=i[2],o=i[3],h=i[4],l=i[5],c=s[0],u=s[1],d=s[2],f=s[3],p=s[4],m=s[5],g=void 0===e?i:e.matrix;return g[0]=c*r+u*a,g[1]=c*n+u*o,g[2]=d*r+f*a,g[3]=d*n+f*o,g[4]=p*r+m*a+h,g[5]=p*n+m*o+l,g},multiplyWithOffset:function(t,e,i){var s=this.matrix,r=t.matrix,n=s[0],a=s[1],o=s[2],h=s[3],l=e*n+i*o+s[4],c=e*a+i*h+s[5],u=r[0],d=r[1],f=r[2],p=r[3],m=r[4],g=r[5];return s[0]=u*n+d*o,s[1]=u*a+d*h,s[2]=f*n+p*o,s[3]=f*a+p*h,s[4]=m*n+g*o+l,s[5]=m*a+g*h+c,this},transform:function(t,e,i,s,r,n){var a=this.matrix,o=a[0],h=a[1],l=a[2],c=a[3],u=a[4],d=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*c,a[2]=i*o+s*l,a[3]=i*h+s*c,a[4]=r*o+n*l+u,a[5]=r*h+n*c+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3],h=s[4],l=s[5];return i.x=t*r+e*a+h,i.y=t*n+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=e*r-i*s;return t[0]=r/o,t[1]=-i/o,t[2]=-s/o,t[3]=e/o,t[4]=(s*a-r*n)/o,t[5]=-(e*a-i*n)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,r,n){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=s,a[4]=r,a[5]=n,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],r=e[2],n=e[3],a=i*n-s*r;if(t.translateX=e[4],t.translateY=e[5],i||s){var o=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/o):-Math.acos(i/o),t.scaleX=o,t.scaleY=a/o}else if(r||n){var h=Math.sqrt(r*r+n*n);t.rotation=.5*Math.PI-(n>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,r){var n=this.matrix,a=Math.sin(i),o=Math.cos(i);return n[4]=t,n[5]=e,n[0]=o*s,n[1]=a*s,n[2]=-a*r,n[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new n);var s=this.matrix,r=s[0],a=s[1],o=s[2],h=s[3],l=s[4],c=s[5],u=1/(r*h+o*-a);return i.x=h*u*t+-o*u*e+(c*o-l*h)*u,i.y=r*u*e+-a*u*t+(-c*r+l*a)*u,i},setQuad:function(t,e,i,s,r,n){void 0===n&&(n=this.quad);var a=this.matrix,o=a[0],h=a[1],l=a[2],c=a[3],u=a[4],d=a[5];return n[0]=t*o+e*l+u,n[1]=t*h+e*c+d,n[2]=t*o+s*l+u,n[3]=t*h+s*c+d,n[4]=i*o+s*l+u,n[5]=i*h+s*c+d,n[6]=i*o+e*l+u,n[7]=i*h+e*c+d,r&&n.forEach((function(t,e){n[e]=Math.round(t)})),n},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},8414:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},4286:(t,e,i)=>{t.exports={Alpha:i(4344),AlphaSingle:i(4518),BlendMode:i(5173),ComputedSize:i(1991),Crop:i(8305),Depth:i(3131),Flip:i(9660),FX:i(1626),GetBounds:i(3671),Mask:i(2246),Origin:i(5085),PathFollower:i(77),Pipeline:i(986),PostPipeline:i(4461),ScrollFactor:i(4627),Size:i(1868),Texture:i(4976),TextureCrop:i(9243),Tint:i(5693),ToJSON:i(6125),Transform:i(3212),TransformMatrix:i(4227),Visible:i(8414)}},7361:(t,e,i)=>{var s=i(1953),r=i(8351),n=i(7473),a=i(4286),o=i(3389),h=i(2273),l=i(1392),c=i(3232),u=i(9422),d=i(2529),f=new n({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.PostPipeline,a.Transform,a.Visible,c],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(e,i),this.setBlendMode(r.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,r=!1;t.setEmpty();for(var n=0;n-1},setAll:function(t,e,i,r){return s.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,s=[null],r=this.list.slice(),n=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},2840:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var r=e.list;if(0!==r.length){var n=e.localTransform;s?(n.loadIdentity(),n.multiply(s),n.translate(e.x,e.y),n.rotate(e.rotation),n.scale(e.scaleX,e.scaleY)):n.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c{var s=i(1984),r=s,n=s;r=i(4343),n=i(2840),t.exports={renderWebGL:r,renderCanvas:n}},4343:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var r=e.list,n=r.length;if(0!==n){var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,c=e.scrollFactorY,u=0;u{t.exports="addedtoscene"},4265:t=>{t.exports="destroy"},8671:t=>{t.exports="removedfromscene"},3420:t=>{t.exports="complete"},601:t=>{t.exports="created"},7919:t=>{t.exports="error"},6231:t=>{t.exports="locked"},5241:t=>{t.exports="loop"},8325:t=>{t.exports="playing"},3356:t=>{t.exports="play"},7513:t=>{t.exports="seeked"},5788:t=>{t.exports="seeking"},7111:t=>{t.exports="stalled"},8118:t=>{t.exports="stop"},9184:t=>{t.exports="textureready"},4287:t=>{t.exports="unlocked"},857:t=>{t.exports="unsupported"},3389:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(6608),DESTROY:i(4265),REMOVED_FROM_SCENE:i(8671),VIDEO_COMPLETE:i(3420),VIDEO_CREATED:i(601),VIDEO_ERROR:i(7919),VIDEO_LOCKED:i(6231),VIDEO_LOOP:i(5241),VIDEO_PLAY:i(3356),VIDEO_PLAYING:i(8325),VIDEO_SEEKED:i(7513),VIDEO_SEEKING:i(5788),VIDEO_STALLED:i(7111),VIDEO_STOP:i(8118),VIDEO_TEXTURE:i(9184),VIDEO_UNLOCKED:i(4287),VIDEO_UNSUPPORTED:i(857)}},1643:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},8881:(t,e,i)=>{var s=i(7655);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},4479:(t,e,i)=>{var s=i(4771),r=i(7655);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=s(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,c=0;c{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},284:(t,e,i)=>{var s=i(7473),r=i(8881),n=i(4479),a=i(1643),o=i(3915),h=i(2529),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return n(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},3915:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},7655:(t,e,i)=>{var s=i(7473),r=i(1643),n=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=n},5956:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},716:(t,e,i)=>{var s=i(7120),r=i(7655);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var n=s(t)*e;return e>.5?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width)),i}},8151:(t,e,i)=>{var s=i(716),r=i(7120);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=r(t)/i);for(var a=0;a{t.exports=function(t){return 2*(t.width+t.height)}},2161:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},1392:(t,e,i)=>{var s=i(7473),r=i(5956),n=i(716),a=i(8151),o=i(1643),h=i(284),l=i(2161),c=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=c},9422:(t,e,i)=>{var s=i(1392);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=Math.min(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-n;return i.setTo(r,n,a,o)}},1593:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=i(4597),o=i(5593),h=i(7410),l=i(5874),c=i(707),u=new s({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=a(e,"url");void 0===s?s=t.path+i+"."+a(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=c(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(n.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(n.FILE_COMPLETE,e,i,t),this.loader.emit(n.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});u.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},u.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=u},9845:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},5593:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},7410:(t,e,i)=>{var s=i(1030),r=i(707);t.exports=function(t,e){var i=void 0===t?r():s({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},3137:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=new s({initialize:function(t,e,i,s){var n=[];s.forEach((function(t){t&&n.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=n,this.state=r.FILE_PENDING,this.complete=!1,this.pending=n.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a{var s=i(7410);t.exports=function(t,e){var i=s(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var n in i.headers)r.setRequestHeader(n,i.headers[n]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},707:t=>{t.exports=function(t,e,i,s,r,n){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===r&&(r=0),void 0===n&&(n=!1),{responseType:t,async:e,user:i,password:s,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}}},4359:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},462:t=>{t.exports="addfile"},7297:t=>{t.exports="complete"},8660:t=>{t.exports="filecomplete"},6484:t=>{t.exports="filecomplete-"},7972:t=>{t.exports="loaderror"},1906:t=>{t.exports="load"},1441:t=>{t.exports="fileprogress"},1072:t=>{t.exports="postprocess"},1927:t=>{t.exports="progress"},6597:t=>{t.exports="start"},1179:(t,e,i)=>{t.exports={ADD:i(462),COMPLETE:i(7297),FILE_COMPLETE:i(8660),FILE_KEY_COMPLETE:i(6484),FILE_LOAD_ERROR:i(7972),FILE_LOAD:i(1906),FILE_PROGRESS:i(1441),POST_PROCESS:i(1072),PROGRESS:i(1927),START:i(6597)}},6732:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=i(5593),c=new s({Extends:n,initialize:function t(e,i,s,r,a){var l,c="png";if(h(i)){var u=i;i=o(u,"key"),s=o(u,"url"),l=o(u,"normalMap"),r=o(u,"xhrSettings"),c=o(u,"extension",c),a=o(u,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:c,responseType:"blob",key:i,url:s,xhrSettings:r,config:a};if(n.call(this,e,d),l){var f=new t(e,this.key,l,r,a);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){n.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){n.revokeObjectURL(t.data),t.onProcessError()},n.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(5851),l=i(2482),c=new s({Extends:n,initialize:function(t,e,i,s,a){var c="json";if(l(e)){var u=e;e=o(u,"key"),i=o(u,"url"),s=o(u,"xhrSettings"),c=o(u,"extension",c),a=o(u,"dataKey",a)}var d={type:"json",cache:t.cacheManager.json,extension:c,responseType:"text",key:e,url:i,xhrSettings:s,config:a};n.call(this,t,d),l(i)&&(this.data=a?h(i,a):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=new s({Extends:n,initialize:function(t,e,i,s){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var c=e;e=o(c,"key"),i=o(c,"url"),s=o(c,"xhrSettings"),a=o(c,"extension",a),r=o(c,"type",r),l=o(c,"cache",l)}var u={type:r,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports=function(t){for(var e=0,i=0;i{var s=i(3916);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},7025:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},48:t=>{t.exports=function(t,e,i,s,r){var n=.5*(s-e),a=.5*(r-i),o=t*t;return(2*i-2*s+n+a)*(t*o)+(-3*i+3*s-2*n-a)*o+n*t+i}},5035:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},2915:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},7149:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.DEG_TO_RAD}},2975:t=>{t.exports=function(t,e){return Math.abs(t-e)}},2107:(t,e,i)=>{var s=i(2915),r=i(7473),n=i(9652),a=i(1984),o=new n,h=new r({initialize:function t(e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,n=r[0],a=r[4],o=r[8],h=r[1],l=r[5],c=r[9],u=r[2],d=r[6],f=r[10],p=0,m=0,g=0,x=.99999;switch(e){case"XYZ":m=Math.asin(s(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},104:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},4941:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},1555:(t,e,i)=>{var s=i(2915);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},5005:t=>{t.exports=function(t,e){return t/e/1e3}},3702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},8820:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},1743:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},3416:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},2149:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=l*n-a*h,u=-l*r+a*o,d=h*r-n*o,f=e*c+i*u+s*d;return f?(f=1/f,t[0]=c*f,t[1]=(-l*i+s*h)*f,t[2]=(a*i-s*n)*f,t[3]=u*f,t[4]=(l*e-s*o)*f,t[5]=(-a*e+s*r)*f,t[6]=d*f,t[7]=(-h*e+i*o)*f,t[8]=(n*e-i*r)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=n*l-a*h,t[1]=s*h-i*l,t[2]=i*a-s*n,t[3]=a*o-r*l,t[4]=e*l-s*o,t[5]=s*r-e*a,t[6]=r*h-n*o,t[7]=i*o-e*h,t[8]=e*n-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*n-a*h)+i*(-l*r+a*o)+s*(h*r-n*o)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],c=e[8],u=t.val,d=u[0],f=u[1],p=u[2],m=u[3],g=u[4],x=u[5],w=u[6],v=u[7],y=u[8];return e[0]=d*i+f*n+p*h,e[1]=d*s+f*a+p*l,e[2]=d*r+f*o+p*c,e[3]=m*i+g*n+x*h,e[4]=m*s+g*a+x*l,e[5]=m*r+g*o+x*c,e[6]=w*i+v*n+y*h,e[7]=w*s+v*a+y*l,e[8]=w*r+v*o+y*c,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*n,e[1]=l*s+h*a,e[2]=l*r+h*o,e[3]=l*n-h*i,e[4]=l*a-h*s,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,r=t.w,n=e+e,a=i+i,o=s+s,h=e*n,l=e*a,c=e*o,u=i*a,d=i*o,f=s*o,p=r*n,m=r*a,g=r*o,x=this.val;return x[0]=1-(u+f),x[3]=l+g,x[6]=c-m,x[1]=l-g,x[4]=1-(h+f),x[7]=d+p,x[2]=c+m,x[5]=d-p,x[8]=1-(h+u),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],r=e[1],n=e[2],a=e[3],o=e[4],h=e[5],l=e[6],c=e[7],u=e[8],d=e[9],f=e[10],p=e[11],m=e[12],g=e[13],x=e[14],w=e[15],v=s*h-r*o,y=s*l-n*o,b=s*c-a*o,A=r*l-n*h,S=r*c-a*h,M=n*c-a*l,I=u*g-d*m,E=u*x-f*m,T=u*w-p*m,k=d*x-f*g,C=d*w-p*g,R=f*w-p*x,F=v*R-y*C+b*k+A*T-S*E+M*I;return F?(F=1/F,i[0]=(h*R-l*C+c*k)*F,i[1]=(l*T-o*R-c*E)*F,i[2]=(o*C-h*T+c*I)*F,i[3]=(n*C-r*R-a*k)*F,i[4]=(s*R-n*T+a*E)*F,i[5]=(r*T-s*C-a*I)*F,i[6]=(g*M-x*S+w*A)*F,i[7]=(x*b-m*M-w*y)*F,i[8]=(m*S-g*b+w*v)*F,this):null}});t.exports=s},9652:(t,e,i)=>{var s=i(7473),r=i(5689),n=1e-6,a=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,r,n,a,o,h,l,c,u,d,f,p,m){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=s,g[4]=r,g[5]=n,g[6]=a,g[7]=o,g[8]=h,g[9]=l,g[10]=c,g[11]=u,g[12]=d,g[13]=f,g[14]=p,g[15]=m,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=o.fromQuat(i).val,r=e.x,n=e.y,a=e.z;return this.setValues(s[0]*r,s[1]*r,s[2]*r,0,s[4]*n,s[5]*n,s[6]*n,0,s[8]*a,s[9]*a,s[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],r=t[6],n=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=r,t[11]=t[14],t[12]=s,t[13]=n,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15],x=e*a-i*n,w=e*o-s*n,v=e*h-r*n,y=i*o-s*a,b=i*h-r*a,A=s*h-r*o,S=l*p-c*f,M=l*m-u*f,I=l*g-d*f,E=c*m-u*p,T=c*g-d*p,k=u*g-d*m,C=x*k-w*T+v*E+y*I-b*M+A*S;return C?(C=1/C,this.setValues((a*k-o*T+h*E)*C,(s*T-i*k-r*E)*C,(p*A-m*b+g*y)*C,(u*b-c*A-d*y)*C,(o*I-n*k-h*M)*C,(e*k-s*I+r*M)*C,(m*v-f*A-g*w)*C,(l*A-u*v+d*w)*C,(n*T-a*I+h*S)*C,(i*I-e*T-r*S)*C,(f*b-p*v+g*x)*C,(c*v-l*b-d*x)*C,(a*M-n*E-o*S)*C,(e*E-i*M+s*S)*C,(p*w-f*y-m*x)*C,(l*y-c*w+u*x)*C)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return this.setValues(a*(u*g-d*m)-c*(o*g-h*m)+p*(o*d-h*u),-(i*(u*g-d*m)-c*(s*g-r*m)+p*(s*d-r*u)),i*(o*g-h*m)-a*(s*g-r*m)+p*(s*h-r*o),-(i*(o*d-h*u)-a*(s*d-r*u)+c*(s*h-r*o)),-(n*(u*g-d*m)-l*(o*g-h*m)+f*(o*d-h*u)),e*(u*g-d*m)-l*(s*g-r*m)+f*(s*d-r*u),-(e*(o*g-h*m)-n*(s*g-r*m)+f*(s*h-r*o)),e*(o*d-h*u)-n*(s*d-r*u)+l*(s*h-r*o),n*(c*g-d*p)-l*(a*g-h*p)+f*(a*d-h*c),-(e*(c*g-d*p)-l*(i*g-r*p)+f*(i*d-r*c)),e*(a*g-h*p)-n*(i*g-r*p)+f*(i*h-r*a),-(e*(a*d-h*c)-n*(i*d-r*c)+l*(i*h-r*a)),-(n*(c*m-u*p)-l*(a*m-o*p)+f*(a*u-o*c)),e*(c*m-u*p)-l*(i*m-s*p)+f*(i*u-s*c),-(e*(a*m-o*p)-n*(i*m-s*p)+f*(i*o-s*a)),e*(a*u-o*c)-n*(i*u-s*c)+l*(i*o-s*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*a-i*n)*(u*g-d*m)-(e*o-s*n)*(c*g-d*p)+(e*h-r*n)*(c*m-u*p)+(i*o-s*a)*(l*g-d*f)-(i*h-r*a)*(l*m-u*f)+(s*h-r*o)*(l*p-c*f)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],c=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],x=e[15],w=t.val,v=w[0],y=w[1],b=w[2],A=w[3];return e[0]=v*i+y*a+b*c+A*p,e[1]=v*s+y*o+b*u+A*m,e[2]=v*r+y*h+b*d+A*g,e[3]=v*n+y*l+b*f+A*x,v=w[4],y=w[5],b=w[6],A=w[7],e[4]=v*i+y*a+b*c+A*p,e[5]=v*s+y*o+b*u+A*m,e[6]=v*r+y*h+b*d+A*g,e[7]=v*n+y*l+b*f+A*x,v=w[8],y=w[9],b=w[10],A=w[11],e[8]=v*i+y*a+b*c+A*p,e[9]=v*s+y*o+b*u+A*m,e[10]=v*r+y*h+b*d+A*g,e[11]=v*n+y*l+b*f+A*x,v=w[12],y=w[13],b=w[14],A=w[15],e[12]=v*i+y*a+b*c+A*p,e[13]=v*s+y*o+b*u+A*m,e[14]=v*r+y*h+b*d+A*g,e[15]=v*n+y*l+b*f+A*x,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,r=i[0],n=i[4],a=i[8],o=i[12],h=i[1],l=i[5],c=i[9],u=i[13],d=i[2],f=i[6],p=i[10],m=i[14],g=i[3],x=i[7],w=i[11],v=i[15],y=s[0],b=s[4],A=s[8],S=s[12],M=s[1],I=s[5],E=s[9],T=s[13],k=s[2],C=s[6],R=s[10],F=s[14],Y=s[3],P=s[7],X=s[11],L=s[15];return this.setValues(r*y+n*M+a*k+o*Y,h*y+l*M+c*k+u*Y,d*y+f*M+p*k+m*Y,g*y+x*M+w*k+v*Y,r*b+n*I+a*C+o*P,h*b+l*I+c*C+u*P,d*b+f*I+p*C+m*P,g*b+x*I+w*C+v*P,r*A+n*E+a*R+o*X,h*A+l*E+c*R+u*X,d*A+f*E+p*R+m*X,g*A+x*E+w*R+v*X,r*S+n*T+a*F+o*L,h*S+l*T+c*F+u*L,d*S+f*T+p*F+m*L,g*S+x*T+w*F+v*L)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),r=1-i,n=t.x,a=t.y,o=t.z,h=r*n,l=r*a;return this.setValues(h*n+i,h*a-s*o,h*o+s*a,0,h*a+s*o,l*a+i,l*o-s*n,0,h*o-s*a,l*o+s*n,r*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,r=e.y,a=e.z,o=Math.sqrt(s*s+r*r+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},44:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},5385:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},8585:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==s?(r=(s-t)/(s-i))<0&&(r=0):r=1:r<0&&(r=0),r}},372:(t,e,i)=>{var s=i(7473),r=i(2149),n=i(1984),a=i(5689),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),c=new a(1,0,0),u=new a(0,1,0),d=new a,f=new r,p=new s({initialize:function(t,e,i,s){this.onChangeCallback=n,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=s*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),r+e*(t.z-r),n+e*(t.w-n))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(c).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=f.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*n+i*o-s*a,i*h+r*a+s*n-e*o,s*h+r*o+e*a-i*n,r*h-e*n-i*a-s*o)},slerp:function(t,e){var i=this.x,s=this.y,r=this.z,n=this.w,a=t.x,h=t.y,l=t.z,c=t.w,u=i*a+s*h+r*l+n*c;u<0&&(u=-u,a=-a,h=-h,l=-l,c=-c);var d=1-e,f=e;if(1-u>o){var p=Math.acos(u),m=Math.sin(p);d=Math.sin((1-e)*p)/m,f=Math.sin(e*p)/m}return this.set(d*i+f*a,d*s+f*h,d*r+f*l,d*n+f*c)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s,n=r?1/r:0;return this.set(-t*n,-e*n,-i*n,s*n)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*n,i*a+s*n,s*a-i*n,r*a-e*n)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a-s*n,i*a+r*n,s*a+e*n,r*a-i*n)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*n,i*a-e*n,s*a+r*n,r*a-s*n)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,r=t.z/2,n=Math.cos(i),a=Math.cos(s),o=Math.cos(r),h=Math.sin(i),l=Math.sin(s),c=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+n*l*c,n*l*o-h*a*c,n*a*c+h*l*o,n*a*o-h*l*c,e);break;case"YXZ":this.set(h*a*o+n*l*c,n*l*o-h*a*c,n*a*c-h*l*o,n*a*o+h*l*c,e);break;case"ZXY":this.set(h*a*o-n*l*c,n*l*o+h*a*c,n*a*c+h*l*o,n*a*o-h*l*c,e);break;case"ZYX":this.set(h*a*o-n*l*c,n*l*o+h*a*c,n*a*c-h*l*o,n*a*o+h*l*c,e);break;case"YZX":this.set(h*a*o+n*l*c,n*l*o+h*a*c,n*a*c-h*l*o,n*a*o-h*l*c,e);break;case"XZY":this.set(h*a*o-n*l*c,n*l*o-h*a*c,n*a*c+h*l*o,n*a*o+h*l*c,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],r=i[4],n=i[8],a=i[1],o=i[5],h=i[9],l=i[2],c=i[6],u=i[10],d=s+o+u;return d>0?(e=.5/Math.sqrt(d+1),this.set((c-h)*e,(n-l)*e,(a-r)*e,.25/e)):s>o&&s>u?(e=2*Math.sqrt(1+s-o-u),this.set(.25*e,(r+a)/e,(n+l)/e,(c-h)/e)):o>u?(e=2*Math.sqrt(1+o-s-u),this.set((r+a)/e,.25*e,(h+c)/e,(n-l)/e)):(e=2*Math.sqrt(1+u-s-o),this.set((n+l)/e,(h+c)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var n=h[r],a=h[n];e=Math.sqrt(i[3*r+r]-i[3*n+n]-i[3*a+a]+1),l[r]=.5*e,e=.5/e,l[n]=(i[3*n+r]+i[3*r+n])*e,l[a]=(i[3*a+r]+i[3*r+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+n]-i[3*n+a])*e}return this.onChangeCallback(this),this}});t.exports=p},4208:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.RAD_TO_DEG}},1705:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},6650:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,r=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=s*e,t}},2037:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},6283:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},9876:t=>{t.exports=function(t,e,i,s){var r=Math.cos(s),n=Math.sin(s),a=t.x-e,o=t.y-i;return t.x=a*r-o*n+e,t.y=a*n+o*r+i,t}},8348:t=>{t.exports=function(t,e,i,s,r){var n=s+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},4497:t=>{t.exports=function(t,e,i,s,r){return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},9640:(t,e,i)=>{var s=i(5689),r=i(9652),n=i(372),a=new r,o=new n,h=new s;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},4078:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},855:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},4936:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var r=[],n=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},278:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},163:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r){void 0===r&&(r=new s);var n=0,a=0;return t>0&&t<=e*i&&(n=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(n,a)}},7556:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r,n,a,o,h){void 0===h&&(h=new s);var l=Math.sin(n),c=Math.cos(n),u=c*a,d=l*a,f=-l*o,p=c*o,m=1/(u*p+f*-d);return h.x=p*m*t+-f*m*e+(r*f-i*p)*m,h.y=u*m*e+-d*m*t+(-r*u+i*d)*m,h}},2529:(t,e,i)=>{var s=i(7473),r=i(12),n=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new n(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},5689:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,r=t.z,n=e.x,a=e.y,o=e.z;return this.x=s*o-r*a,this.y=r*n-i*o,this.z=i*a-s*n,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z;return this.x=i*a-s*n,this.y=s*r-e*a,this.z=e*n-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*s,this.y=r[1]*e+r[4]*i+r[7]*s,this.z=r[2]*e+r[5]*i+r[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=1/(r[3]*e+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*s+r[12])*n,this.y=(r[1]*e+r[5]*i+r[9]*s+r[13])*n,this.z=(r[2]*e+r[6]*i+r[10]*s+r[14])*n,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+s*r[6],this.y=e*r[1]+i*r[4]+s*r[7],this.z=e*r[2]+i*r[5]+s*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12],this.y=r[1]*e+r[5]*i+r[9]*s+r[13],this.z=r[2]*e+r[6]*i+r[10]*s+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=e*r[0]+i*r[4]+s*r[8]+r[12],a=e*r[1]+i*r[5]+s*r[9]+r[13],o=e*r[2]+i*r[6]+s*r[10]+r[14],h=e*r[3]+i*r[7]+s*r[11]+r[15];return this.x=n/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,c=o*s+r*i-n*e,u=-r*e-n*i-a*s;return this.x=h*o+u*-r+l*-a-c*-n,this.y=l*o+u*-n+c*-r-h*-a,this.z=c*o+u*-a+h*-n-l*-r,this},project:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=r[0],a=r[1],o=r[2],h=r[3],l=r[4],c=r[5],u=r[6],d=r[7],f=r[8],p=r[9],m=r[10],g=r[11],x=r[12],w=r[13],v=r[14],y=1/(e*h+i*d+s*g+r[15]);return this.x=(e*n+i*l+s*f+x)*y,this.y=(e*a+i*c+s*p+w)*y,this.z=(e*o+i*u+s*m+v)*y,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,r=t.z,n=t.w,a=this.x-i,o=n-this.y-1-s,h=this.z;return this.x=2*a/r-1,this.y=2*o/n-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},9279:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=s*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this.w=n+e*(t.w-n),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+s*s+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12]*r,this.y=n[1]*e+n[5]*i+n[9]*s+n[13]*r,this.z=n[2]*e+n[6]*i+n[10]*s+n[14]*r,this.w=n[3]*e+n[7]*i+n[11]*s+n[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,c=o*s+r*i-n*e,u=-r*e-n*i-a*s;return this.x=h*o+u*-r+l*-a-c*-n,this.y=l*o+u*-n+c*-r-h*-a,this.z=c*o+u*-a+h*-n-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},4119:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},8445:t=>{t.exports=function(t,e,i){if(t>=e&&t<=i)return t;var s=i-e;return e+((t-e)%s+s)%s}},6412:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},760:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},6909:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},6947:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},3426:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},6906:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},3270:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-Math.PI,Math.PI)}},2748:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-180,180)}},936:(t,e,i)=>{var s=i(6906);t.exports=function(t){return s(t+Math.PI)}},1935:(t,e,i)=>{var s=i(7425);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},3692:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},2820:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-180,180)}},1833:(t,e,i)=>{t.exports={Between:i(6412),BetweenPoints:i(760),BetweenPointsY:i(6909),BetweenY:i(6947),CounterClockwise:i(3426),Normalize:i(6906),Random:i(3270),RandomDegrees:i(2748),Reverse:i(936),RotateTo:i(1935),ShortestBetween:i(5393),Wrap:i(3692),WrapDegrees:i(2820)}},7425:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},1518:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return Math.sqrt(r*r+n*n)}},5372:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},4430:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},4361:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},7798:t=>{t.exports=function(t,e,i,s,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(s-e,r))}},8290:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},3788:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return r*r+n*n}},6338:(t,e,i)=>{t.exports={Between:i(1518),BetweenPoints:i(5372),BetweenPointsSquared:i(4430),Chebyshev:i(4361),Power:i(7798),Snake:i(8290),Squared:i(3788)}},5751:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},6203:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},9103:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},4938:(t,e,i)=>{t.exports={In:i(5751),Out:i(9103),InOut:i(6203)}},8677:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},4649:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},504:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},8872:(t,e,i)=>{t.exports={In:i(8677),Out:i(504),InOut:i(4649)}},3170:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},2627:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},1349:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},5006:(t,e,i)=>{t.exports={In:i(3170),Out:i(1349),InOut:i(2627)}},6046:t=>{t.exports=function(t){return t*t*t}},9531:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},4836:t=>{t.exports=function(t){return--t*t*t+1}},875:(t,e,i)=>{t.exports={In:i(6046),Out:i(4836),InOut:i(9531)}},7619:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},7437:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},8119:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},2884:(t,e,i)=>{t.exports={In:i(7619),Out:i(8119),InOut:i(7437)}},5456:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},3461:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},2711:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},6287:(t,e,i)=>{t.exports={In:i(5456),Out:i(2711),InOut:i(3461)}},8613:(t,e,i)=>{t.exports={Back:i(4938),Bounce:i(8872),Circular:i(5006),Cubic:i(875),Elastic:i(2884),Expo:i(6287),Linear:i(4233),Quadratic:i(6341),Quartic:i(762),Quintic:i(345),Sine:i(8698),Stepped:i(7051)}},744:t=>{t.exports=function(t){return t}},4233:(t,e,i)=>{t.exports=i(744)},9810:t=>{t.exports=function(t){return t*t}},8163:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},6123:t=>{t.exports=function(t){return t*(2-t)}},6341:(t,e,i)=>{t.exports={In:i(9810),Out:i(6123),InOut:i(8163)}},7337:t=>{t.exports=function(t){return t*t*t*t}},4878:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},9012:t=>{t.exports=function(t){return 1- --t*t*t*t}},762:(t,e,i)=>{t.exports={In:i(7337),Out:i(9012),InOut:i(4878)}},303:t=>{t.exports=function(t){return t*t*t*t*t}},553:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},1632:t=>{t.exports=function(t){return--t*t*t*t*t+1}},345:(t,e,i)=>{t.exports={In:i(303),Out:i(1632),InOut:i(553)}},8455:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},1844:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},990:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},8698:(t,e,i)=>{t.exports={In:i(8455),Out:i(990),InOut:i(1844)}},6745:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},7051:(t,e,i)=>{t.exports=i(6745)},3158:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},12:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},7373:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},2622:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(3158),Equal:i(12),Floor:i(1326),GreaterThan:i(7373),LessThan:i(2622)}},4675:(t,e,i)=>{var s=i(7425),r=i(1030),n={Angle:i(1833),Distance:i(6338),Easing:i(8613),Fuzzy:i(7927),Interpolation:i(2140),Pow2:i(7897),Snap:i(3943),RandomDataGenerator:i(6957),Average:i(3136),Bernstein:i(785),Between:i(7025),CatmullRom:i(48),CeilTo:i(5035),Clamp:i(2915),DegToRad:i(7149),Difference:i(2975),Euler:i(2107),Factorial:i(3916),FloatBetween:i(104),FloorTo:i(4941),FromPercent:i(1555),GetSpeed:i(5005),IsEven:i(3702),IsEvenStrict:i(8820),Linear:i(1743),LinearXY:i(3416),MaxAdd:i(3733),Median:i(44),MinSub:i(5385),Percent:i(8585),RadToDeg:i(4208),RandomXY:i(1705),RandomXYZ:i(6650),RandomXYZW:i(2037),Rotate:i(6283),RotateAround:i(9876),RotateAroundDistance:i(8348),RotateTo:i(4497),RoundAwayFromZero:i(4078),RoundTo:i(855),SinCosTableGenerator:i(4936),SmootherStep:i(278),SmoothStep:i(2733),ToXY:i(163),TransformXY:i(7556),Within:i(4119),Wrap:i(8445),Vector2:i(2529),Vector3:i(5689),Vector4:i(9279),Matrix3:i(2149),Matrix4:i(9652),Quaternion:i(372),RotateVec3:i(9640)};n=r(!1,n,s),t.exports=n},1640:(t,e,i)=>{var s=i(785);t.exports=function(t,e){for(var i=0,r=t.length-1,n=0;n<=r;n++)i+=Math.pow(1-e,r-n)*Math.pow(e,n)*t[n]*s(r,n);return i}},6105:(t,e,i)=>{var s=i(48);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return t[0]===t[i]?(e<0&&(n=Math.floor(r=i*(1+e))),s(r-n,t[(n-1+i)%i],t[n],t[(n+1)%i],t[(n+2)%i])):e<0?t[0]-(s(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(r-n,t[n?n-1:0],t[n],t[i{t.exports=function(t,e,i,s,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,r)}},6765:(t,e,i)=>{var s=i(1743);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return e<0?s(t[0],t[1],r):e>1?s(t[i],t[i-1],i-r):s(t[n],t[n+1>i?i:n+1],r-n)}},6388:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},5735:(t,e,i)=>{var s=i(2733);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},8705:(t,e,i)=>{var s=i(278);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},2140:(t,e,i)=>{t.exports={Bezier:i(1640),CatmullRom:i(6105),CubicBezier:i(4002),Linear:i(6765),QuadraticBezier:i(6388),SmoothStep:i(5735),SmootherStep:i(8705)}},5443:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},167:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},7897:(t,e,i)=>{t.exports={GetNext:i(5443),IsSize:i(725),IsValue:i(167)}},6957:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},5659:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},5461:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},5131:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},3943:(t,e,i)=>{t.exports={Ceil:i(5659),Floor:i(5461),To:i(5131)}},8666:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},8456:t=>{var e={},i={},s={register:function(t,i,s,r){void 0===r&&(r=!1),e[t]={plugin:i,mapping:s,custom:r}},registerCustom:function(t,e,s,r){i[t]={plugin:e,mapping:s,data:r}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},5722:(t,e,i)=>{var s=i(8666),r=i(7473),n=i(204),a=new r({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(n.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},8351:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},8196:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},3527:t=>{t.exports="resize"},8618:t=>{t.exports="addedtoscene"},4328:t=>{t.exports="boot"},6099:t=>{t.exports="create"},7645:t=>{t.exports="destroy"},2710:t=>{t.exports="pause"},2547:t=>{t.exports="postupdate"},8577:t=>{t.exports="prerender"},8197:t=>{t.exports="preupdate"},8997:t=>{t.exports="ready"},7604:t=>{t.exports="removedfromscene"},8999:t=>{t.exports="render"},9742:t=>{t.exports="resume"},3667:t=>{t.exports="shutdown"},3468:t=>{t.exports="sleep"},7840:t=>{t.exports="start"},9896:t=>{t.exports="transitioncomplete"},5103:t=>{t.exports="transitioninit"},3162:t=>{t.exports="transitionout"},7841:t=>{t.exports="transitionstart"},6454:t=>{t.exports="transitionwake"},6536:t=>{t.exports="update"},3875:t=>{t.exports="wake"},204:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(8618),BOOT:i(4328),CREATE:i(6099),DESTROY:i(7645),PAUSE:i(2710),POST_UPDATE:i(2547),PRE_RENDER:i(8577),PRE_UPDATE:i(8197),READY:i(8997),REMOVED_FROM_SCENE:i(7604),RENDER:i(8999),RESUME:i(9742),SHUTDOWN:i(3667),SLEEP:i(3468),START:i(7840),TRANSITION_COMPLETE:i(9896),TRANSITION_INIT:i(5103),TRANSITION_OUT:i(3162),TRANSITION_START:i(7841),TRANSITION_WAKE:i(6454),UPDATE:i(6536),WAKE:i(3875)}},2362:(t,e,i)=>{var s=i(7473),r=i(2915),n=i(1030),a=new s({initialize:function(t,e,i,s,r,n,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(n,a,s,r)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,n=r.cut;n.x=i,n.y=s,n.w=t,n.h=e,n.r=i+t,n.b=s+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var a=r.drawImage;return a.x=i,a.y=s,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,i,s,r,n){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=s,o.w=r,o.h=n,o.r=i+r,o.b=s+n,this.x=i,this.y=s,this.width=r,this.height=n,this.halfWidth=.5*r,this.halfHeight=.5*n,this.centerX=Math.floor(r/2),this.centerY=Math.floor(n/2),this.updateUVs()},setCropUVs:function(t,e,i,s,n,a,o){var h=this.cutX,l=this.cutY,c=this.cutWidth,u=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=r(e,0,d)),m=l+(i=r(i,0,f)),g=s=r(s,0,d-e),x=n=r(n,0,f-i),w=this.data;if(w.trim){var v=w.spriteSourceSize,y=e+(s=r(s,0,c-e)),b=i+(n=r(n,0,u-i));if(!(v.ry||v.y>b)){var A=Math.max(v.x,e),S=Math.max(v.y,i),M=Math.min(v.r,y)-A,I=Math.min(v.b,b)-S;g=M,x=I,p=a?h+(c-(A-v.x)-M):h+(A-v.x),m=o?l+(u-(S-v.y)-I):l+(S-v.y),e=A,i=S,s=M,n=I}else p=0,m=0,g=0,x=0}else a&&(p=h+(c-e-s)),o&&(m=l+(u-i-n));var E=this.source.width,T=this.source.height;return t.u0=Math.max(0,p/E),t.v0=Math.max(0,m/T),t.u1=Math.min(1,(p+g)/E),t.v1=Math.min(1,(m+x)/T),t.x=e,t.y=i,t.cx=p,t.cy=m,t.cw=g,t.ch=x,t.width=s,t.height=n,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,r,n){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=i,this.v0=s,this.u1=r,this.v1=n,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,r=this.data.drawImage;r.width=i,r.height=s;var n=this.source.width,a=this.source.height;return this.u0=t/n,this.v0=e/a,this.u1=(t+i)/n,this.v1=(e+s)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=n(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=a},1864:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},3747:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},7473:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,r,a){for(var o in s)if(s.hasOwnProperty(o)){var h=e(s,o,r);if(!1!==h){if(i((a||t).prototype,o)){if(n.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=s[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},1792:t=>{t.exports=function(t,e,i,s,r){if(void 0===r&&(r=t),i>0){var n=i-t.length;if(n<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>n&&(e.splice(n),a=n);for(var o=0;o{t.exports=function(t,e,i,s,r,n){if(void 0===i&&(i=0),void 0===n&&(n=t),s>0){var a=s-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;s>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(n,l)}return e}},2513:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=0;if(s(t,r,n))for(var o=r;o{t.exports=function(t,e,i){var s,r=[null];for(s=3;s{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,r,n=1;if(i){if(te.length&&(n=e.length),i?(s=e[n-1][i],(r=e[n][i])-t<=t-s?e[n]:e[n-1]):(s=e[n-1],(r=e[n])-t<=t-s?r:s)}},4493:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=[];if(s(t,r,n))for(var o=r;o{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},8683:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s>r||(t.splice(s,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},546:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],r=t.indexOf(s);t[i]=s,t[r]=e}return t}},1419:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},6512:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var r,n=[],a=!1;if((i||s)&&(a=!0,i||(i=""),s||(s="")),e=e;r--)a?n.push(i+r.toString()+s):n.push(r);else for(r=t;r<=e;r++)a?n.push(i+r.toString()+s):n.push(r);return n}},1316:(t,e,i)=>{var s=i(4078);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],n=Math.max(s((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,r,n,a,o){for(void 0===n&&(n=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>n;){if(a-n>600){var h=a-n+1,l=r-n+1,c=Math.log(h),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(h-u)/h)*(l-h/2<0?-1:1),f=Math.max(n,Math.floor(r-l*u/h+d)),p=Math.min(a,Math.floor(r+(h-l)*u/h+d));s(t,r,f,p,o)}var m=t[r],g=n,x=a;for(e(t,n,r),o(t[a],m)>0&&e(t,n,a);g0;)x--}0===o(t[n],m)?e(t,n,x):e(t,++x,a),x<=r&&(n=x+1),r<=x&&(a=x-1)}};t.exports=s},9703:(t,e,i)=>{var s=i(5851),r=i(4912),n=function(t,e,i){for(var s=[],r=0;r{var s=i(8935);t.exports=function(t,e,i,r){var n;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(n=t.indexOf(e))?(s(t,n),i&&i.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(n=t.indexOf(h))&&(s(t,n),o.push(h),i&&i.call(r,h)),a--}return o}},4725:(t,e,i)=>{var s=i(8935);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var n=s(t,e);return i&&i.call(r,n),n}},8780:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===n&&(n=t),s(t,e,i)){var a=i-e,o=t.splice(e,a);if(r)for(var h=0;h{var s=i(8935);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return s(t,r)}},6960:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),r=t.indexOf(i);return-1!==s&&-1===r&&(t[s]=i,!0)}},1021:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var r=t.length;if(e<0||e>r||e>=i||i>r){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},5361:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},3718:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},2071:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},8935:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],r=e;r{var s=i(9356);function r(t,e){return String(t).localeCompare(e)}function n(t,e,i,s){var r,n,a,o,h,l=t.length,c=0,u=2*i;for(r=0;rl&&(n=l),a>l&&(a=l),o=r,h=n;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[r]=e,t}},1953:(t,e,i)=>{t.exports={Matrix:i(1237),Add:i(1792),AddAt:i(2280),BringToTop:i(2513),CountAllMatching:i(1771),Each:i(7883),EachInRange:i(5856),FindClosestInSorted:i(3957),Flatten:i(4493),GetAll:i(6245),GetFirst:i(1647),GetRandom:i(5301),MoveDown:i(1842),MoveTo:i(1419),MoveUp:i(6512),MoveAbove:i(8683),MoveBelow:i(546),NumberArray:i(4130),NumberArrayStep:i(1316),QuickSelect:i(9465),Range:i(9703),Remove:i(7161),RemoveAt:i(4725),RemoveBetween:i(8780),RemoveRandomElement:i(5744),Replace:i(6960),RotateLeft:i(1021),RotateRight:i(4027),SafeRange:i(2497),SendToBack:i(5361),SetAll:i(3718),Shuffle:i(4912),SortByDigits:i(2071),SpliceOne:i(8935),StableSort:i(9992),Swap:i(2372)}},1816:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(7222),r=i(1816);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},6063:t=>{t.exports=function(t){for(var e=0;e{var s=i(7116);t.exports=function(t){return s(t,180)}},2597:(t,e,i)=>{var s=i(7116);t.exports=function(t){return s(t,90)}},7116:(t,e,i)=>{var s=i(1816),r=i(4780);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(7116);t.exports=function(t){return s(t,-90)}},7711:(t,e,i)=>{var s=i(1021),r=i(4027);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):r(t,i)),0!==e)for(var n=0;n{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),r=0;r-1;n--)s[r][n]=t[n][r]}return s}},1237:(t,e,i)=>{t.exports={CheckMatrix:i(1816),MatrixToString:i(6655),ReverseColumns:i(582),ReverseRows:i(6063),Rotate180:i(8321),RotateLeft:i(2597),RotateMatrix:i(7116),RotateRight:i(6285),Translate:i(7711),TransposeMatrix:i(4780)}},3911:t=>{var e=function(t){var i,s,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)s=t[r],i[r]=e(s);return i};t.exports=e},1030:(t,e,i)=>{var s=i(2482),r=function(){var t,e,i,n,a,o,h=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof h&&(u=h,h=arguments[1]||{},l=2),c===l&&(h=this,--l);l{var s=i(4675),r=i(5851);t.exports=function(t,e,i){var n=r(t,e,null);if(null===n)return i;if(Array.isArray(n))return s.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return s.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return s.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(e);return n}},4597:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},5851:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),n=t,a=s,o=i,h=i,l=!0,c=!0,u=0;u{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},7222:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var r=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var n=Math.ceil((r=e-t.length)/2);t=new Array(r-n+1).join(i)+t+new Array(n+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}}},e={};var i=function i(s){var r=e[s];if(void 0!==r)return r.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}(4513);window.SpinePlugin=i})(); \ No newline at end of file +(()=>{var t={4399:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,s,n,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new r(s,n||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,r=[];if(0===this._eventsCount)return r;for(s in t=this._events)e.call(t,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,n=s.length,a=new Array(n);r{(function(){"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r={};((e,i)=>{for(var s in i)t(e,s,{get:i[s],enumerable:!0})})(r,{AlphaTimeline:()=>ft,Animation:()=>k,AnimationState:()=>Rt,AnimationStateAdapter:()=>Xt,AnimationStateData:()=>_t,AssetManager:()=>bi,AssetManagerBase:()=>ce,AtlasAttachmentLoader:()=>ne,Attachment:()=>b,AttachmentTimeline:()=>gt,BinaryInput:()=>Pe,BlendMode:()=>Re,Bone:()=>he,BoneData:()=>ae,BoundingBoxAttachment:()=>Ut,CURRENT:()=>Nt,CanvasTexture:()=>yi,ClippingAttachment:()=>Wt,Color:()=>h,ConstraintData:()=>le,CurveTimeline:()=>Q,CurveTimeline1:()=>$,CurveTimeline2:()=>tt,DebugUtils:()=>g,DeformTimeline:()=>xt,Downloader:()=>ue,DrawOrderTimeline:()=>bt,Event:()=>de,EventData:()=>fe,EventQueue:()=>Yt,EventTimeline:()=>vt,EventType:()=>Pt,FIRST:()=>Ot,FakeTexture:()=>Zt,HOLD_FIRST:()=>Bt,HOLD_MIX:()=>Vt,HOLD_SUBSEQUENT:()=>Dt,IkConstraint:()=>pe,IkConstraintData:()=>me,IkConstraintTimeline:()=>At,IntSet:()=>n,Interpolation:()=>u,MathUtils:()=>c,MeshAttachment:()=>te,MixBlend:()=>C,MixDirection:()=>R,PathAttachment:()=>ee,PathConstraint:()=>be,PathConstraintData:()=>ge,PathConstraintMixTimeline:()=>Et,PathConstraintPositionTimeline:()=>Mt,PathConstraintSpacingTimeline:()=>It,PointAttachment:()=>ie,Pool:()=>x,PositionMode:()=>xe,Pow:()=>d,PowOut:()=>f,RGB2Timeline:()=>mt,RGBA2Timeline:()=>pt,RGBATimeline:()=>ut,RGBTimeline:()=>dt,RegionAttachment:()=>re,RotateMode:()=>ve,RotateTimeline:()=>et,SETUP:()=>zt,SUBSEQUENT:()=>Lt,ScaleTimeline:()=>nt,ScaleXTimeline:()=>at,ScaleYTimeline:()=>ot,SequenceTimeline:()=>kt,ShearTimeline:()=>ht,ShearXTimeline:()=>lt,ShearYTimeline:()=>ct,Skeleton:()=>Ie,SkeletonBinary:()=>Ye,SkeletonBounds:()=>ci,SkeletonClipping:()=>di,SkeletonData:()=>Ee,SkeletonJson:()=>fi,SkeletonRenderer:()=>Mi,Skin:()=>ke,SkinEntry:()=>Te,Slot:()=>Ae,SlotData:()=>Ce,SpacingMode:()=>we,StringSet:()=>a,Texture:()=>qt,TextureAtlas:()=>Kt,TextureAtlasPage:()=>Qt,TextureAtlasRegion:()=>$t,TextureFilter:()=>Gt,TextureRegion:()=>Ht,TextureWrap:()=>jt,TimeKeeper:()=>v,Timeline:()=>J,TrackEntry:()=>Ft,TransformConstraint:()=>Se,TransformConstraintData:()=>Fe,TransformConstraintTimeline:()=>St,TransformMode:()=>oe,TranslateTimeline:()=>it,TranslateXTimeline:()=>st,TranslateYTimeline:()=>rt,Triangulator:()=>ui,Utils:()=>m,Vector2:()=>w,VertexAttachment:()=>S,WindowedMean:()=>y});var n=class{constructor(){this.array=new Array}add(t){let e=this.contains(t);return this.array[0|t]=0|t,!e}contains(t){return null!=this.array[0|t]}remove(t){this.array[0|t]=void 0}clear(){this.array.length=0}},a=class{constructor(){this.entries={},this.size=0}add(t){let e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){let e=this.size;for(var i=0,s=t.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}static rgb888ToColor(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}static fromString(t){return(new o).setFromString(t)}},h=o;h.WHITE=new o(1,1,1,1),h.RED=new o(1,0,0,1),h.GREEN=new o(0,1,0,1),h.BLUE=new o(0,0,1,1),h.MAGENTA=new o(1,0,1,1);var l=class{static clamp(t,e,i){return ti?i:t}static cosDeg(t){return Math.cos(t*l.degRad)}static sinDeg(t){return Math.sin(t*l.degRad)}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){let e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return l.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,i){let s=Math.random(),r=e-t;return s<=(i-t)/r?t+Math.sqrt(s*r*(i-t)):e-Math.sqrt((1-s)*r*(e-i))}static isPowerOfTwo(t){return t&&0==(t&t-1)}},c=l;c.PI=3.1415927,c.PI2=2*l.PI,c.radiansToDegrees=180/l.PI,c.radDeg=l.radiansToDegrees,c.degreesToRadians=l.PI/180,c.degRad=l.degreesToRadians;var u=class{apply(t,e,i){return t+(e-t)*this.applyInternal(i)}},d=class extends u{constructor(t){super(),this.power=2,this.power=t}applyInternal(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}},f=class extends d{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}},p=class{static arrayCopy(t,e,i,s,r){for(let n=e,a=s;n=e?t:p.setArraySize(t,e,i)}static newArray(t,e){let i=new Array(t);for(let s=0;s0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},y=class{constructor(t=32){this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e>1)*n;let a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(!l){o.length>0&&(h=o);let a=t.bone,l=a.worldX,c=a.worldY,u=a.a,d=a.b,f=a.c,p=a.d;for(let t=e,a=r;a=this.regions.length&&(i=this.regions.length-1);let s=this.regions[i];e.region!=s&&(e.region=s,e.updateRegion())}getPath(t,e){let i=t,s=(this.start+e).toString();for(let t=this.digits-s.length;t>0;t--)i+="0";return i+=s,i}static nextID(){return M._nextID++}},I=M;I._nextID=0;var E=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(E||{}),T=[0,1,2,3,4,5,6],k=class{constructor(t,e,i){if(this.timelines=[],this.timelineIds=new a,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=i}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));let h=this.timelines;for(let s=0,l=h.length;s(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(C||{}),R=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(R||{}),F=0,Y=1,P=2,X=3,L=4,O=5,D=6,B=7,V=8,z=9,N=10,_=11,U=12,W=13,q=14,G=15,j=16,H=17,Z=18,K=19,J=class{constructor(t,e){this.propertyIds=e,this.frames=m.newFloatArray(t*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(t,e){let i=t.length;for(let s=1;se)return s-1;return i-1}static search(t,e,i){let s=t.length;for(let r=i;re)return r-i;return s-i}},Q=class extends J{constructor(t,e,i){super(t,i),this.curves=m.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let e=this.getFrameCount()+18*t;if(this.curves.length>e){let t=m.newFloatArray(e);m.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,i,s,r,n,a,o,h,l,c){let u=this.curves,d=this.getFrameCount()+18*t;0==i&&(u[e]=2+d);let f=.03*(s-2*n+o),p=.03*(r-2*a+h),m=.006*(3*(n-o)-s+l),g=.006*(3*(a-h)-r+c),x=2*f+m,w=2*p+g,v=.3*(n-s)+f+.16666667*m,y=.3*(a-r)+p+.16666667*g,b=s+v,A=r+y;for(let t=d+18;dt){let n=this.frames[e],a=this.frames[e+i];return a+(t-n)/(r[s]-n)*(r[s+1]-a)}let n=s+18;for(s+=2;s=t){let e=r[s-2],i=r[s-1];return i+(t-e)/(r[s]-e)*(r[s+1]-i)}e+=this.getFrameEntries();let a=r[n-2],o=r[n-1];return o+(t-a)/(this.frames[e]-a)*(this.frames[e+i]-o)}},$=class extends Q{constructor(t,e,i){super(t,e,[i])}getFrameEntries(){return 2}setFrame(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+1]=i}getCurveValue(t){let e=this.frames,i=e.length-2;for(let s=2;s<=i;s+=2)if(e[s]>t){i=s-2;break}let s=this.curves[i>>1];switch(s){case 0:let s=e[i],r=e[i+1];return r+(t-s)/(e[i+2]-s)*(e[i+2+1]-r);case 1:return e[i+1]}return this.getBezierValue(t,i,1,s-2)}},tt=class extends Q{constructor(t,e,i,s){super(t,e,[i,s])}getFrameEntries(){return 3}setFrame(t,e,i,s){t*=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s}},et=class extends ${constructor(t,e,i){super(t,e,F+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i>2];switch(p){case 0:let t=h[f];c=h[f+1],u=h[f+2],d=h[f+3];let e=(i-t)/(h[f+4]-t);c+=(h[f+4+1]-c)*e,u+=(h[f+4+2]-u)*e,d+=(h[f+4+3]-d)*e;break;case 1:c=h[f+1],u=h[f+2],d=h[f+3];break;default:c=this.getBezierValue(i,f,1,p-2),u=this.getBezierValue(i,f,2,p+18-2),d=this.getBezierValue(i,f,3,p+36-2)}if(1==r)l.r=c,l.g=u,l.b=d;else{if(0==n){let t=o.data.color;l.r=t.r,l.g=t.g,l.b=t.b}l.r+=(c-l.r)*r,l.g+=(u-l.g)*r,l.b+=(d-l.b)*r}}},ft=class extends ${constructor(t,e,i){super(t,e,V+"|"+i),this.slotIndex=0,this.slotIndex=i}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.color;if(i>3];switch(v){case 0:let t=h[w];u=h[w+1],d=h[w+2],f=h[w+3],p=h[w+4],m=h[w+5],g=h[w+6],x=h[w+7];let e=(i-t)/(h[w+8]-t);u+=(h[w+8+1]-u)*e,d+=(h[w+8+2]-d)*e,f+=(h[w+8+3]-f)*e,p+=(h[w+8+4]-p)*e,m+=(h[w+8+5]-m)*e,g+=(h[w+8+6]-g)*e,x+=(h[w+8+7]-x)*e;break;case 1:u=h[w+1],d=h[w+2],f=h[w+3],p=h[w+4],m=h[w+5],g=h[w+6],x=h[w+7];break;default:u=this.getBezierValue(i,w,1,v-2),d=this.getBezierValue(i,w,2,v+18-2),f=this.getBezierValue(i,w,3,v+36-2),p=this.getBezierValue(i,w,4,v+54-2),m=this.getBezierValue(i,w,5,v+72-2),g=this.getBezierValue(i,w,6,v+90-2),x=this.getBezierValue(i,w,7,v+108-2)}if(1==r)l.set(u,d,f,p),c.r=m,c.g=g,c.b=x;else{if(0==n){l.setFromColor(o.data.color);let t=o.data.darkColor;c.r=t.r,c.g=t.g,c.b=t.b}l.add((u-l.r)*r,(d-l.g)*r,(f-l.b)*r,(p-l.a)*r),c.r+=(m-c.r)*r,c.g+=(g-c.g)*r,c.b+=(x-c.b)*r}}},mt=class extends Q{constructor(t,e,i){super(t,e,[B+"|"+i,z+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,s,r,n,a,o){t*=7,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n,this.frames[t+5]=a,this.frames[t+6]=o}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,c=o.darkColor;if(it){let r=this.frames[e];return i[s+1]*(t-r)/(i[s]-r)}let r=s+18;for(s+=2;s=t){let e=i[s-2],r=i[s-1];return r+(t-e)/(i[s]-e)*(i[s+1]-r)}let n=i[r-2],a=i[r-1];return a+(1-a)*(t-n)/(this.frames[e+this.getFrameEntries()]-n)}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.getAttachment();if(!h)return;if(!(h instanceof S)||h.timelineAttachment!=this.attachment)return;let l=o.deform;0==l.length&&(n=0);let c=this.vertices,u=c[0].length,d=this.frames;if(i=d[d.length-1]){let t=c[d.length-1];if(1==r)if(3==n){let e=h;if(e.bones)for(let e=0;ei)this.apply(t,e,Number.MAX_VALUE,s,r,n,a),e=-1;else if(e>=o[h-1])return;if(i0&&o[l-1]==t;)l--}for(;l=o[l];l++)s.push(this.events[l])}},vt=wt;vt.propertyIds=[""+U];var yt=class extends J{constructor(t){super(t,yt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.drawOrders[t]=i}apply(t,e,i,s,r,n,a){if(1==a)return void(0==n&&m.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(i>2];switch(f){case 0:let t=u[d];h=u[d+1],l=u[d+2],c=u[d+3];let e=(i-t)/(u[d+4]-t);h+=(u[d+4+1]-h)*e,l+=(u[d+4+2]-l)*e,c+=(u[d+4+3]-c)*e;break;case 1:h=u[d+1],l=u[d+2],c=u[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),c=this.getBezierValue(i,d,3,f+36-2)}if(0==n){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*r,o.mixX=t.mixX+(l-t.mixX)*r,o.mixY=t.mixY+(c-t.mixY)*r}else o.mixRotate+=(h-o.mixRotate)*r,o.mixX+=(l-o.mixX)*r,o.mixY+=(c-o.mixY)*r}},Tt=class extends J{constructor(t,e,i){super(t,[K+"|"+e+"|"+i.sequence.id]),this.slotIndex=e,this.attachment=i}getFrameEntries(){return Tt.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,i,s,r){let n=this.frames;n[t*=Tt.ENTRIES]=e,n[t+Tt.MODE]=i|s<<4,n[t+Tt.DELAY]=r}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.attachment,l=this.attachment;if(!(h==l||h instanceof S&&h.timelineAttachment==l))return;let c=this.frames;if(i>4,g=this.attachment.sequence.regions.length,x=T[15&f];if(0!=x)switch(m+=(i-d)/p+1e-5|0,x){case 1:m=Math.min(g-1,m);break;case 2:m%=g;break;case 3:{let t=(g<<1)-2;m=0==t?0:m%t,m>=g&&(m=t-m);break}case 4:m=Math.max(g-1-m,0);break;case 5:m=g-1-m%g;break;case 6:{let t=(g<<1)-2;m=0==t?0:(m+g-1)%t,m>=g&&(m=t-m)}}o.sequenceIndex=m}},kt=Tt;kt.ENTRIES=3,kt.MODE=1,kt.DELAY=2;var Ct=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Yt(this),this.propertyIDs=new a,this.animationsChanged=!1,this.trackEntryPool=new x((()=>new Ft)),this.data=t}static emptyAnimation(){return Ct._emptyAnimation}update(t){t*=this.timeScale;let e=this.tracks;for(let i=0,s=e.length;i0){if(s.delay-=r,s.delay>0)continue;r=-s.delay,s.delay=0}let n=s.next;if(n){let e=s.trackLast-n.delay;if(e>=0){for(n.delay=0,n.trackTime+=0==s.timeScale?0:(e/s.timeScale+t)*n.timeScale,s.trackTime+=r,this.setCurrent(i,n,!0);n.mixingFrom;)n.mixTime+=t,n=n.mixingFrom;continue}}else if(s.trackLast>=s.trackEnd&&!s.mixingFrom){e[i]=null,this.queue.end(s),this.clearNext(s);continue}if(s.mixingFrom&&this.updateMixingFrom(s,t)){let t=s.mixingFrom;for(s.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}s.trackTime+=r}this.queue.drain()}updateMixingFrom(t,e){let i=t.mixingFrom;if(!i)return!0;let s=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),s):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let e=this.events,i=this.tracks,s=!1;for(let n=0,a=i.length;n0)continue;s=!0;let o=0==n?1:a.mixBlend,h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let l=a.animationLast,c=a.getAnimationTime(),u=c,d=e;a.reverse&&(u=a.animation.duration-u,d=null);let f=a.animation.timelines,p=f.length;if(0==n&&1==h||3==o)for(let e=0;e1&&(r=1),1!=i&&(i=s.mixBlend));let n=r0&&this.queueEvents(s,d),this.events.length=0,s.nextAnimationLast=d,s.nextTrackLast=s.trackTime,r}applyAttachmentTimeline(t,e,i,s,r){var n=e.slots[t.slotIndex];n.bone.active&&(i0,s=t>=0;c.signum(e)!=c.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*c.signum(t)),s=i),d=f+t-t%360,s!=i&&(d+=360*c.signum(t)),n[a]=d}n[a+1]=f,h.rotation=l+d*s}queueEvents(t,e){let i=t.animationStart,s=t.animationEnd,r=s-i,n=t.trackLast%r,a=this.events,o=0,h=a.length;for(;os||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==r||n>t.trackTime%r:e>=s&&t.animationLast=this.tracks.length)return;let e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let i=e;for(;;){let t=i.mixingFrom;if(!t)break;this.queue.end(t),i.mixingFrom=null,i.mixingTo=null,i=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,i){let s=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,s&&(i&&this.queue.interrupt(s),e.mixingFrom=s,s.mixingTo=e,e.mixTime=0,s.mixingFrom&&s.mixDuration>0&&(e.interruptAlpha*=Math.min(1,s.mixTime/s.mixDuration)),s.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,i=!1){let s=this.data.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,s,i)}setAnimationWith(t,e,i=!1){if(!e)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));let n=this.trackEntry(t,e,i,r);return this.setCurrent(t,n,s),this.queue.drain(),n}addAnimation(t,e,i=!1,s=0){let r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,s)}addAnimationWith(t,e,i=!1,s=0){if(!e)throw new Error("animation cannot be null.");let r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;let n=this.trackEntry(t,e,i,r);return r?(r.next=n,n.previous=r,s<=0&&(s+=r.getTrackComplete()-n.mixDuration)):(this.setCurrent(t,n,!0),this.queue.drain()),n.delay=s,n}setEmptyAnimation(t,e=0){let i=this.setAnimationWith(t,Ct.emptyAnimation(),!1);return i.mixDuration=e,i.trackEnd=e,i}addEmptyAnimation(t,e=0,i=0){let s=this.addAnimationWith(t,Ct.emptyAnimation(),!1,i);return i<=0&&(s.delay+=s.mixDuration-e),s.mixDuration=e,s.trackEnd=e,s}setEmptyAnimations(t=0){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,i=this.tracks.length;e0){r[o]=Vt,n[o]=i;continue t}break}r[o]=Bt}else r[o]=Lt}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},Rt=Ct;Rt._emptyAnimation=new k("",[],0);var Ft=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=2,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(t){this.animationLast=t,this.nextAnimationLast=t}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime(t[t.start=0]="start",t[t.interrupt=1]="interrupt",t[t.end=2]="end",t[t.dispose=3]="dispose",t[t.complete=4]="complete",t[t.event=5]="event",t))(Pt||{}),Xt=class{start(t){}interrupt(t){}end(t){}dispose(t){}complete(t){}event(t,e){}},Lt=0,Ot=1,Dt=2,Bt=3,Vt=4,zt=1,Nt=2,_t=class{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,i){let s=this.skeletonData.findAnimation(t);if(!s)throw new Error("Animation not found: "+t);let r=this.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);this.setMixWith(s,r,i)}setMixWith(t,e,i){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");let s=t.name+"."+e.name;this.animationToMixTime[s]=i}getMix(t,e){let i=t.name+"."+e.name,s=this.animationToMixTime[i];return void 0===s?this.defaultMix:s}},Ut=class extends S{constructor(t){super(t),this.color=new h(1,1,1,1)}copy(){let t=new Ut(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}},Wt=class extends S{constructor(t){super(t),this.endSlot=null,this.color=new h(.2275,.2275,.8078,1)}copy(){let t=new Wt(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}},qt=class{constructor(t){this._image=t}getImage(){return this._image}},Gt=(t=>(t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear",t))(Gt||{}),jt=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(jt||{}),Ht=class{constructor(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}},Zt=class extends qt{setFilters(t,e){}setWraps(t,e){}dispose(){}},Kt=class{constructor(t){this.pages=new Array,this.regions=new Array;let e=new Jt(t),i=new Array(4),s={size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},format:()=>{},filter:t=>{t.minFilter=m.enumValue(Gt,i[1]),t.magFilter=m.enumValue(Gt,i[2])},repeat:t=>{-1!=i[1].indexOf("x")&&(t.uWrap=10497),-1!=i[1].indexOf("y")&&(t.vWrap=10497)},pma:t=>{t.pma="true"==i[1]}};var r={xy:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2])},size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},bounds:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2]),t.width=parseInt(i[3]),t.height=parseInt(i[4])},offset:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2])},orig:t=>{t.originalWidth=parseInt(i[1]),t.originalHeight=parseInt(i[2])},offsets:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2]),t.originalWidth=parseInt(i[3]),t.originalHeight=parseInt(i[4])},rotate:t=>{let e=i[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:t=>{t.index=parseInt(i[1])}};let n=e.readLine();for(;n&&0==n.trim().length;)n=e.readLine();for(;n&&0!=n.trim().length&&0!=e.readEntry(i,n);)n=e.readLine();let a=null,o=null,h=null;for(;null!==n;)if(0==n.trim().length)a=null,n=e.readLine();else if(a){let t=new $t(a,n);for(;;){let s=e.readEntry(i,n=e.readLine());if(0==s)break;let a=r[i[0]];if(a)a(t);else{o||(o=[]),h||(h=[]),o.push(i[0]);let t=[];for(let e=0;e0&&h&&h.length>0&&(t.names=o,t.values=h,o=null,h=null),t.u=t.x/a.width,t.v=t.y/a.height,90==t.degrees?(t.u2=(t.x+t.height)/a.width,t.v2=(t.y+t.width)/a.height):(t.u2=(t.x+t.width)/a.width,t.v2=(t.y+t.height)/a.height),this.regions.push(t)}else{for(a=new Qt(n.trim());0!=e.readEntry(i,n=e.readLine());){let t=s[i[0]];t&&t(a)}this.pages.push(a)}}findRegion(t){for(let e=0;e=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;let i=e.indexOf(":");if(-1==i)return 0;t[0]=e.substr(0,i).trim();for(let s=1,r=i+1;;s++){let i=e.indexOf(",",r);if(-1==i)return t[s]=e.substr(r).trim(),s;if(t[s]=e.substr(r,i-r).trim(),r=i+1,4==s)return 4}}},Qt=class{constructor(t){this.minFilter=9728,this.magFilter=9728,this.uWrap=33071,this.vWrap=33071,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.name=t}setTexture(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}},$t=class extends Ht{constructor(t,e){super(),this.x=0,this.y=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.index=0,this.degrees=0,this.names=null,this.values=null,this.page=t,this.name=e}},te=class extends S{constructor(t,e){super(t),this.region=null,this.regionUVs=[],this.uvs=[],this.triangles=[],this.color=new h(1,1,1,1),this.width=0,this.height=0,this.hullLength=0,this.edges=[],this.parentMesh=null,this.sequence=null,this.tempColor=new h(0,0,0,0),this.path=e}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=m.newFloatArray(t.length));let e=this.uvs,i=this.uvs.length,s=this.region.u,r=this.region.v,n=0,a=0;if(this.region instanceof $t){let o=this.region,h=o.page.texture.getImage(),l=h.width,c=h.height;switch(o.degrees){case 90:s-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/c,n=o.originalHeight/l,a=o.originalWidth/c;for(let o=0;o= 0.");if(!e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}},oe=(t=>(t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection",t))(oe||{}),he=class{constructor(t,e,i){if(this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}isActive(){return this.active}update(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(t,e,i,s,r,n,a){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=s,this.ascaleY=r,this.ashearX=n,this.ashearY=a;let o=this.parent;if(!o){let o=this.skeleton,h=i+90+a,l=o.scaleX,u=o.scaleY;return this.a=c.cosDeg(i+n)*s*l,this.b=c.cosDeg(h)*r*l,this.c=c.sinDeg(i+n)*s*u,this.d=c.sinDeg(h)*r*u,this.worldX=t*l+o.x,void(this.worldY=e*u+o.y)}let h=o.a,l=o.b,u=o.c,d=o.d;switch(this.worldX=h*t+l*e+o.worldX,this.worldY=u*t+d*e+o.worldY,this.data.transformMode){case 0:{let t=i+90+a,e=c.cosDeg(i+n)*s,o=c.cosDeg(t)*r,f=c.sinDeg(i+n)*s,p=c.sinDeg(t)*r;return this.a=h*e+l*f,this.b=h*o+l*p,this.c=u*e+d*f,void(this.d=u*o+d*p)}case 1:{let t=i+90+a;this.a=c.cosDeg(i+n)*s,this.b=c.cosDeg(t)*r,this.c=c.sinDeg(i+n)*s,this.d=c.sinDeg(t)*r;break}case 2:{let t=h*h+u*u,e=0;t>1e-4?(t=Math.abs(h*d-l*u)/t,h/=this.skeleton.scaleX,u/=this.skeleton.scaleY,l=u*t,d=h*t,e=Math.atan2(u,h)*c.radDeg):(h=0,u=0,e=90-Math.atan2(d,l)*c.radDeg);let o=i+n-e,f=i+a-e+90,p=c.cosDeg(o)*s,m=c.cosDeg(f)*r,g=c.sinDeg(o)*s,x=c.sinDeg(f)*r;this.a=h*p-l*g,this.b=h*m-l*x,this.c=u*p+d*g,this.d=u*m+d*x;break}case 3:case 4:{let t=c.cosDeg(i),e=c.sinDeg(i),o=(h*t+l*e)/this.skeleton.scaleX,f=(u*t+d*e)/this.skeleton.scaleY,p=Math.sqrt(o*o+f*f);p>1e-5&&(p=1/p),o*=p,f*=p,p=Math.sqrt(o*o+f*f),3==this.data.transformMode&&h*d-l*u<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(p=-p);let m=Math.PI/2+Math.atan2(f,o),g=Math.cos(m)*p,x=Math.sin(m)*p,w=c.cosDeg(n)*s,v=c.cosDeg(90+a)*r,y=c.sinDeg(n)*s,b=c.sinDeg(90+a)*r;this.a=o*w+g*y,this.b=o*v+g*b,this.c=f*w+x*y,this.d=f*v+x*b;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}getWorldRotationX(){return Math.atan2(this.c,this.a)*c.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*c.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}updateAppliedTransform(){let t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*c.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*c.radDeg);let e=t.a,i=t.b,s=t.c,r=t.d,n=1/(e*r-i*s),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*n-o*i*n,this.ay=o*e*n-a*s*n;let h=n*r,l=n*e,u=n*i,d=n*s,f=h*this.a-u*this.c,p=h*this.b-u*this.d,m=l*this.c-d*this.a,g=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+m*m),this.ascaleX>1e-4){let t=f*g-p*m;this.ascaleY=t/this.ascaleX,this.ashearY=Math.atan2(f*p+m*g,t)*c.radDeg,this.arotation=Math.atan2(m,f)*c.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*c.radDeg}worldToLocal(t){let e=1/(this.a*this.d-this.b*this.c),i=t.x-this.worldX,s=t.y-this.worldY;return t.x=i*this.d*e-s*this.b*e,t.y=s*this.a*e-i*this.c*e,t}localToWorld(t){let e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t}worldToLocalRotation(t){let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*c.radDeg+this.rotation-this.shearX}localToWorldRotation(t){t-=this.rotation-this.shearX;let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*c.radDeg}rotateWorld(t){let e=this.a,i=this.b,s=this.c,r=this.d,n=c.cosDeg(t),a=c.sinDeg(t);this.a=n*e-a*s,this.b=n*i-a*r,this.c=a*e+n*s,this.d=a*i+n*r}},le=class{constructor(t,e,i){this.name=t,this.order=e,this.skinRequired=i}},ce=class{constructor(t,e="",i=new ue){this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=t,this.pathPrefix=e,this.downloader=i}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,i){this.toLoad--,this.loaded++,this.assets[e]=i,t&&t(e,i)}error(t,e,i){this.toLoad--,this.loaded++,this.errors[e]=i,t&&t(e,i)}loadAll(){return new Promise(((t,e)=>{let i=()=>{this.isLoadingComplete()?this.hasErrors()?e(this.errors):t(this):requestAnimationFrame(i)};requestAnimationFrame(i)}))}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadBinary(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load binary ${t}: status ${e}, ${s}`)}))}loadText(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadText(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load text ${t}: status ${e}, ${s}`)}))}loadJson(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadJson(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load JSON ${t}: status ${e}, ${s}`)}))}loadTexture(t,e=(()=>{}),i=(()=>{})){if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then((e=>e.ok?e.blob():(this.error(i,t,`Couldn't load image: ${t}`),null))).then((t=>t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null)).then((i=>{i&&this.success(e,t,this.textureLoader(i))}));else{let s=new Image;s.crossOrigin="anonymous",s.onload=()=>{this.success(e,t,this.textureLoader(s))},s.onerror=()=>{this.error(i,t,`Couldn't load image: ${t}`)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),s.src=t}}loadTextureAtlas(t,e=(()=>{}),i=(()=>{}),s){let r=t.lastIndexOf("/"),n=r>=0?t.substring(0,r+1):"";t=this.start(t),this.downloader.downloadText(t,(r=>{try{let a=new Kt(r),o=a.pages.length,h=!1;for(let r of a.pages)this.loadTexture(s?s[r.name]:n+r.name,((i,s)=>{h||(r.setTexture(s),0==--o&&this.success(e,t,a))}),((e,s)=>{h||this.error(i,t,`Couldn't load texture atlas ${t} page image: ${e}`),h=!0}))}catch(e){this.error(i,t,`Couldn't parse texture atlas ${t}: ${e.message}`)}}),((e,s)=>{this.error(i,t,`Couldn't load texture atlas ${t}: status ${e}, ${s}`)}))}get(t){return this.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;let e=this.assets[t];if(e)return e;let i=this.errors[t];throw Error("Asset not found: "+t+(i?"\n"+i:""))}remove(t){t=this.pathPrefix+t;let e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}removeAll(){for(let t in this.assets){let e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}isLoadingComplete(){return 0==this.toLoad}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}},ue=class{constructor(){this.callbacks={},this.rawDataUris={}}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return-1!=e?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){for(var e=window.atob(t),i=e.length,s=new Uint8Array(i),r=0;r{this.finish(t,s.status,s.responseText)};s.onload=r,s.onerror=r,s.send()}downloadJson(t,e,i){this.downloadText(t,(t=>{e(JSON.parse(t))}),i)}downloadBinary(t,e,i){if(this.start(t,e,i))return;if(this.rawDataUris[t]){try{let e=this.rawDataUris[t];this.finish(t,200,this.dataUriToUint8Array(e))}catch(e){this.finish(t,400,JSON.stringify(e))}return}let s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer";let r=()=>{this.finish(t,s.status,s.response)};s.onload=()=>{200==s.status||0==s.status?this.finish(t,200,new Uint8Array(s.response)):r()},s.onerror=r,s.send()}start(t,e,i){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,i)}}finish(t,e,i){let s=this.callbacks[t];delete this.callbacks[t];let r=200==e||0==e?[i]:[e,i];for(let t=r.length-1,e=s.length;t180?f-=360:f<-180&&(f+=360);let g=t.ascaleX,x=t.ascaleY;if(s||r){switch(t.data.transformMode){case 3:case 4:p=e-t.worldX,m=i-t.worldY}let o=t.data.length*g,h=Math.sqrt(p*p+m*m);if(s&&ho&&o>1e-4){let t=(h/o-1)*a+1;g*=t,n&&(x*=t)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,g,x,t.ashearX,t.ashearY)}apply2(t,e,i,s,r,n,a,o,h){let l=t.ax,u=t.ay,d=t.ascaleX,f=t.ascaleY,p=d,m=f,g=e.ascaleX,x=0,w=0,v=0;d<0?(d=-d,x=180,v=-1):(x=0,v=1),f<0&&(f=-f,v=-v),g<0?(g=-g,w=180):w=0;let y=e.ax,b=0,A=0,S=0,M=t.a,I=t.b,E=t.c,T=t.d,k=Math.abs(d-f)<=1e-4;!k||n?(b=0,A=M*y+t.worldX,S=E*y+t.worldY):(b=e.ay,A=M*y+I*b+t.worldX,S=E*y+T*b+t.worldY);let C=t.parent;if(!C)throw new Error("IK parent must itself have a parent.");M=C.a,I=C.b,E=C.c,T=C.d;let R,F,Y=1/(M*T-I*E),P=A-C.worldX,X=S-C.worldY,L=(P*T-X*I)*Y-l,O=(X*M-P*E)*Y-u,D=Math.sqrt(L*L+O*O),B=e.data.length*g;if(D<1e-4)return this.apply1(t,i,s,!1,n,!1,h),void e.updateWorldTransformWith(y,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);P=i-C.worldX,X=s-C.worldY;let V=(P*T-X*I)*Y-l,z=(X*M-P*E)*Y-u,N=V*V+z*z;if(0!=o){o*=d*(g+1)*.5;let t=Math.sqrt(N),e=t-D-B*d+o;if(e>0){let i=Math.min(1,e/(2*o))-1;i=(e-o*(1-i*i))/t,V-=i*V,z-=i*z,N=V*V+z*z}}t:if(k){B*=d;let t=(N-D*D-B*B)/(2*D*B);t<-1?(t=-1,F=Math.PI*r):t>1?(t=1,F=0,n&&(M=(Math.sqrt(N)/(D+B)-1)*h+1,p*=M,a&&(m*=M))):F=Math.acos(t)*r,M=D+B*t,I=B*Math.sin(F),R=Math.atan2(z*M-V*I,V*M+z*I)}else{M=d*B,I=f*B;let t=M*M,e=I*I,i=Math.atan2(z,V);E=e*D*D+t*N-t*e;let s=-2*e*D,n=e-t;if(T=s*s-4*n*E,T>=0){let t=Math.sqrt(T);s<0&&(t=-t),t=.5*-(s+t);let e=t/n,a=E/t,o=Math.abs(e)=-1&&E<=1&&(E=Math.acos(E),P=M*Math.cos(E)+D,X=I*Math.sin(E),T=P*P+X*X,Tm&&(u=E,m=T,p=P,g=X)),N<=.5*(h+m)?(R=i-Math.atan2(l*r,o),F=a*r):(R=i-Math.atan2(g*r,p),F=u*r)}let _=Math.atan2(b,y)*v,U=t.arotation;R=(R-_)*c.radDeg+x-U,R>180?R-=360:R<-180&&(R+=360),t.updateWorldTransformWith(l,u,U+R*h,p,m,0,0),U=e.arotation,F=((F+_)*c.radDeg-e.ashearX)*v+w-U,F>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(y,b,U+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}},me=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.softness=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},ge=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.positionMode=xe.Fixed,this.spacingMode=we.Fixed,this.rotateMode=ve.Chain,this.offsetRotation=0,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}},xe=(t=>(t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent",t))(xe||{}),we=(t=>(t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional",t))(we||{}),ve=(t=>(t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale",t))(ve||{}),ye=class{constructor(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(let i=0,s=t.bones.length;i0){t=l/t*f;for(let e=1;e0?c.degRad:-c.degRad}for(let t=0,r=3;t0){let i=h.a,s=h.b,a=h.c,o=h.d,l=0,d=0,f=0;if(l=n?p[r-1]:0==u[t+1]?p[r+2]:Math.atan2(y,m),l-=Math.atan2(a,i),v){d=Math.cos(l),f=Math.sin(l);let t=h.data.length;g+=(t*(d*i-f*a)-m)*e,x+=(t*(f*i+d*a)-y)*e}else l+=w;l>c.PI?l-=c.PI2:l<-c.PI&&(l+=c.PI2),l*=e,d=Math.cos(l),f=Math.sin(l),h.a=d*i-f*a,h.b=d*s-f*o,h.c=f*i+d*a,h.d=f*s+d*o}h.updateAppliedTransform()}}computeWorldPositions(t,e,i){let s=this.target,r=this.position,n=this.spaces,a=m.setArraySize(this.positions,3*e+2),o=this.world,h=t.closed,l=t.worldVerticesLength,c=l/6,u=ye.NONE;if(!t.constantSpeed){let d=t.lengths;c-=h?1:2;let f,p=d[c];switch(1==this.data.positionMode&&(r*=p),this.data.spacingMode){case 2:f=p;break;case 3:f=p/e;break;default:f=1}o=m.setArraySize(this.world,8);for(let m=0,g=0,x=0;mp){u!=ye.AFTER&&(u=ye.AFTER,t.computeWorldVertices(s,l-6,4,o,0,2)),this.addAfterPosition(w-p,o,0,a,g);continue}}for(;;x++){let t=d[x];if(!(w>t)){if(0==x)w/=t;else{let e=d[x-1];w=(w-e)/(t-e)}break}}x!=u&&(u=x,h&&x==c?(t.computeWorldVertices(s,l-4,4,o,0,2),t.computeWorldVertices(s,0,4,o,4,2)):t.computeWorldVertices(s,6*x+2,8,o,0,2)),this.addCurvePosition(w,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],a,g,i||m>0&&0==e)}return a}h?(l+=2,o=m.setArraySize(this.world,l),t.computeWorldVertices(s,2,l-4,o,0,2),t.computeWorldVertices(s,0,2,o,l-4,2),o[l-2]=o[0],o[l-1]=o[1]):(c--,l-=4,o=m.setArraySize(this.world,l),t.computeWorldVertices(s,2,l,o,0,2));let d,f=m.setArraySize(this.curves,c),p=0,g=o[0],x=o[1],w=0,v=0,y=0,b=0,A=0,S=0,M=0,I=0,E=0,T=0,k=0,C=0,R=0,F=0;for(let t=0,e=2;tp){this.addAfterPosition(X-p,o,l-4,a,s);continue}}for(;;c++){let t=f[c];if(!(X>t)){if(0==c)X/=t;else{let e=f[c-1];X=(X-e)/(t-e)}break}}if(c!=u){u=c;let t=6*c;for(g=o[t],x=o[t+1],w=o[t+2],v=o[t+3],y=o[t+4],b=o[t+5],A=o[t+6],S=o[t+7],M=.03*(g-2*w+y),I=.03*(x-2*v+b),E=.006*(3*(w-y)-g+A),T=.006*(3*(v-b)-x+S),k=2*M+E,C=2*I+T,R=.3*(w-g)+M+.16666667*E,F=.3*(v-x)+I+.16666667*T,P=Math.sqrt(R*R+F*F),Y[0]=P,t=1;t<8;t++)R+=k,F+=C,k+=E,C+=T,P+=Math.sqrt(R*R+F*F),Y[t]=P;R+=k,F+=C,P+=Math.sqrt(R*R+F*F),Y[8]=P,R+=k+E,F+=C+T,P+=Math.sqrt(R*R+F*F),Y[9]=P,m=0}for(X*=P;;m++){let t=Y[m];if(!(X>t)){if(0==m)X/=t;else{let e=Y[m-1];X=m+(X-e)/(t-e)}break}}this.addCurvePosition(.1*X,g,x,w,v,y,b,A,S,a,s,i||t>0&&0==e)}return a}addBeforePosition(t,e,i,s,r){let n=e[i],a=e[i+1],o=e[i+2]-n,h=e[i+3]-a,l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addAfterPosition(t,e,i,s,r){let n=e[i+2],a=e[i+3],o=n-e[i],h=a-e[i+1],l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addCurvePosition(t,e,i,s,r,n,a,o,h,l,c,u){if(0==t||isNaN(t))return l[c]=e,l[c+1]=i,void(l[c+2]=Math.atan2(r-i,s-e));let d=t*t,f=d*t,p=1-t,m=p*p,g=m*p,x=p*t,w=3*x,v=p*w,y=w*t,b=e*g+s*v+n*y+o*f,A=i*g+r*v+a*y+h*f;l[c]=b,l[c+1]=A,u&&(l[c+2]=t<.001?Math.atan2(r-i,s-e):Math.atan2(A-(i*m+r*x*2+a*d),b-(e*m+s*x*2+n*d)))}},be=ye;be.NONE=-1,be.BEFORE=-2,be.AFTER=-3,be.epsilon=1e-5;var Ae=class{constructor(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(t instanceof S&&this.attachment instanceof S&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},Se=class{constructor(t,e){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new w,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(let i=0;i0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=(t.x-x.worldX)*e,x.worldY+=(t.y-x.worldY)*i}if(0!=s){let t=Math.sqrt(x.a*x.a+x.c*x.c);0!=t&&(t=(t+(Math.sqrt(h*h+u*u)-t+this.data.offsetScaleX)*s)/t),x.a*=t,x.c*=t}if(0!=r){let t=Math.sqrt(x.b*x.b+x.d*x.d);0!=t&&(t=(t+(Math.sqrt(l*l+d*d)-t+this.data.offsetScaleY)*r)/t),x.b*=t,x.d*=t}if(n>0){let t=x.b,e=x.d,i=Math.atan2(e,t),s=Math.atan2(d,l)-Math.atan2(u,h)-(i-Math.atan2(x.c,x.a));s>c.PI?s-=c.PI2:s<-c.PI&&(s+=c.PI2),s=i+(s+m)*n;let r=Math.sqrt(t*t+e*e);x.b=Math.cos(s)*r,x.d=Math.sin(s)*r}x.updateAppliedTransform()}}applyRelativeWorld(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=0!=e||0!=i,o=this.target,h=o.a,l=o.b,u=o.c,d=o.d,f=h*d-l*u>0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=t.x*e,x.worldY+=t.y*i}if(0!=s){let t=(Math.sqrt(h*h+u*u)-1+this.data.offsetScaleX)*s+1;x.a*=t,x.c*=t}if(0!=r){let t=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*r+1;x.b*=t,x.d*=t}if(n>0){let t=Math.atan2(d,l)-Math.atan2(u,h);t>c.PI?t-=c.PI2:t<-c.PI&&(t+=c.PI2);let e=x.b,i=x.d;t=Math.atan2(i,e)+(t-c.PI/2+m)*n;let s=Math.sqrt(e*e+i*i);x.b=Math.cos(t)*s,x.d=Math.sin(t)*s}x.updateAppliedTransform()}}applyAbsoluteLocal(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=this.target,o=this.bones;for(let h=0,l=o.length;h=s.length&&(s.length=t+1),s[t]||(s[t]={}),s[t][e]=i}addSkin(t){for(let e=0;e= 0.");if(!e)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}},Re=(t=>(t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen",t))(Re||{}),Fe=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Ye=class{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){let e=this.scale,i=new Ee;i.name="";let s=new Pe(t),r=s.readInt32(),n=s.readInt32();i.hash=0==n&&0==r?null:n.toString(16)+r.toString(16),i.version=s.readString(),i.x=s.readFloat(),i.y=s.readFloat(),i.width=s.readFloat(),i.height=s.readFloat();let a=s.readBoolean();a&&(i.fps=s.readFloat(),i.imagesPath=s.readString(),i.audioPath=s.readString());let o=0;o=s.readInt(!0);for(let t=0;t>4,t.readFloat())}s.push(e);break}}}}}let n=t.readInt(!0);if(n>0){let e=new bt(n),r=i.slots.length;for(let i=0;i=0;t--)a[t]=-1;let o=m.newArray(r-n,0),h=0,l=0;for(let e=0;e=0;t--)-1==a[t]&&(a[t]=o[--l]);e.setFrame(i,s,a)}s.push(e)}let a=t.readInt(!0);if(a>0){let e=new vt(a);for(let s=0;s>>1^-(1&i)}readStringRef(){let t=this.readInt(!0);return 0==t?null:this.strings[t-1]}readString(){let t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;let e="";for(let i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(t),i++}}return e}readFloat(){let t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}},Xe=class{constructor(t,e,i,s,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=s,this.inheritTimeline=r}},Le=class{constructor(t=null,e=null){this.bones=t,this.vertices=e}},Oe=(t=>(t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping",t))(Oe||{});function De(t,e,i){let s=t.readFloat(),r=t.readFloat()*i;for(let n=0,a=0,o=e.getFrameCount()-1;e.setFrame(n,s,r),n!=o;n++){let o=t.readFloat(),h=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(n);break;case li:Ve(t,e,a++,n,0,s,o,r,h,i)}s=o,r=h}return e}function Be(t,e,i){let s=t.readFloat(),r=t.readFloat()*i,n=t.readFloat()*i;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,s,r,n),a!=h;a++){let h=t.readFloat(),l=t.readFloat()*i,c=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(a);break;case li:Ve(t,e,o++,a,0,s,h,r,l,i),Ve(t,e,o++,a,1,s,h,n,c,i)}s=h,r=l,n=c}return e}function Ve(t,e,i,s,r,n,a,o,h,l){e.setBezier(i,s,r,n,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,a,h)}var ze,Ne=0,_e=1,Ue=2,We=3,qe=4,Ge=5,je=6,He=7,Ze=8,Ke=9,Je=0,Qe=1,$e=2,ti=3,ei=4,ii=5,si=0,ri=1,ni=0,ai=1,oi=2,hi=1,li=2,ci=class{constructor(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new x((()=>m.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");let i=this.boundingBoxes,s=this.polygons,r=this.polygonPool,n=t.slots,a=n.length;i.length=0,r.freeAll(s),s.length=0;for(let t=0;t=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,i,s){let r=this.minX,n=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=n&&s<=n||t>=a&&i>=a||e>=o&&s>=o)return!1;let h=(s-e)/(i-t),l=h*(r-t)+e;if(l>n&&ln&&lr&&cr&&ct.minX&&this.minYt.minY}containsPoint(t,e){let i=this.polygons;for(let s=0,r=i.length;s=i||o=i){let h=s[t];h+(i-r)/(o-r)*(s[n]-h)=c&&x<=a||x>=a&&x<=c)&&(x>=e&&x<=s||x>=s&&x<=e)){let t=(l*m-h*f)/g;if((t>=u&&t<=d||t>=d&&t<=u)&&(t>=i&&t<=r||t>=r&&t<=i))return!0}c=a,u=d}return!1}getPolygon(t){if(!t)throw new Error("boundingBox cannot be null.");let e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}},ui=class{constructor(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new x((()=>new Array)),this.polygonIndicesPool=new x((()=>new Array))}triangulate(t){let e=t,i=t.length>>1,s=this.indicesArray;s.length=0;for(let t=0;t3;){let t=i-1,a=0,o=1;for(;;){t:if(!r[a]){let n=s[t]<<1,h=s[a]<<1,l=s[o]<<1,c=e[n],u=e[n+1],d=e[h],f=e[h+1],p=e[l],m=e[l+1];for(let n=(o+1)%i;n!=t;n=(n+1)%i){if(!r[n])continue;let t=s[n]<<1,i=e[t],a=e[t+1];if(ui.positiveArea(p,m,c,u,i,a)&&ui.positiveArea(c,u,d,f,i,a)&&ui.positiveArea(d,f,p,m,i,a))break t}break}if(0==o){do{if(!r[a])break;a--}while(a>0);break}t=a,a=o,o=(o+1)%i}n.push(s[(i+a-1)%i]),n.push(s[a]),n.push(s[(a+1)%i]),s.splice(a,1),r.splice(a,1),i--;let h=(i+a-1)%i,l=a==i?0:a;r[h]=ui.isConcave(h,i,e,s),r[l]=ui.isConcave(l,i,e,s)}return 3==i&&(n.push(s[2]),n.push(s[0]),n.push(s[1])),n}decompose(t,e){let i=t,s=this.convexPolygons;this.polygonPool.freeAll(s),s.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let n=this.polygonIndicesPool.obtain();n.length=0;let a=this.polygonPool.obtain();a.length=0;let o=-1,h=0;for(let t=0,l=e.length;t0?(s.push(a),r.push(n)):(this.polygonPool.free(a),this.polygonIndicesPool.free(n)),a=this.polygonPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),a.push(m),a.push(g),a.push(x),n=this.polygonIndicesPool.obtain(),n.length=0,n.push(l),n.push(c),n.push(u),h=ui.winding(d,f,p,m,g,x),o=l)}a.length>0&&(s.push(a),r.push(n));for(let t=0,e=s.length;t=0;t--)a=s[t],0==a.length&&(s.splice(t,1),this.polygonPool.free(a),n=r[t],r.splice(t,1),this.polygonIndicesPool.free(n));return s}static isConcave(t,e,i,s){let r=s[(e+t-1)%e]<<1,n=s[t]<<1,a=s[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[n],i[n+1],i[a],i[a+1])}static positiveArea(t,e,i,s,r,n){return t*(n-s)+i*(e-n)+r*(s-e)>=0}static winding(t,e,i,s,r,n){let a=i-t,o=s-e;return r*o-n*a+a*e-t*o>=0?1:-1}},di=class{constructor(){this.triangulator=new ui,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}clipStart(t,e){if(this.clipAttachment)return 0;this.clipAttachment=e;let i=e.worldVerticesLength,s=m.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,s,0,2);let r=this.clippingPolygon;di.makeClockwise(r);let n=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let t=0,e=n.length;t>1,C=this.clipOutput,R=m.setArraySize(l,e+k*f);for(let h=0;h=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(s),h.push(r),h.push(n),h.push(t),h.push(e),o.length=0;let u=a,d=a.length-4;for(let t=0;;t+=2){let e=u[t],i=u[t+1],s=u[t+2],r=u[t+3],n=e-s,a=i-r,f=h,p=h.length-2,m=o.length;for(let t=0;t0;if(n*(l-r)-a*(h-s)>0){if(p){o.push(u),o.push(d);continue}let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i)}else if(p){let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i);o.push(u),o.push(d)}c=!0}if(m==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),t==d)break;let g=o;(o=h).length=0,h=g}if(l!=o){l.length=0;for(let t=0,e=o.length-2;t>1;t=0;e--)-1==o[e]&&(o[e]=t[--r])}e.setFrame(n,wi(a,"time",0),o)}r.push(e)}if(t.events){let e=new vt(t.events.length),s=0;for(let r=0;rnew yi(t)),t,e)}},Ai=m.newFloatArray(8),Si=class{constructor(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=m.newFloatArray(8192),this.tempColor=new h,this.ctx=t}draw(t){this.triangleRendering?this.drawTriangles(t):this.drawImages(t)}drawImages(t){let e=this.ctx,i=this.tempColor,s=t.color,r=t.drawOrder;this.debugRendering&&(e.strokeStyle="green");for(let t=0,n=r.length;t{if(n&&"object"==typeof n||"function"==typeof n)for(let h of i(n))s.call(r,h)||h===a||t(r,h,{get:()=>n[h],enumerable:!(o=e(n,h))||o.enumerable});return r})(t({},"__esModule",{value:!0}),vi)})();t.exports=e}).call(window)},7518:t=>{(function(){"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r={};((e,i)=>{for(var s in i)t(e,s,{get:i[s],enumerable:!0})})(r,{AlphaTimeline:()=>ft,Animation:()=>k,AnimationState:()=>Rt,AnimationStateAdapter:()=>Xt,AnimationStateData:()=>_t,AssetManager:()=>Mi,AssetManagerBase:()=>ce,AtlasAttachmentLoader:()=>ne,Attachment:()=>b,AttachmentTimeline:()=>gt,BinaryInput:()=>Pe,BlendMode:()=>Re,Bone:()=>he,BoneData:()=>ae,BoundingBoxAttachment:()=>Ut,CURRENT:()=>Nt,CameraController:()=>ji,ClippingAttachment:()=>Wt,Color:()=>h,Color2Attribute:()=>is,ColorAttribute:()=>es,ConstraintData:()=>le,CurveTimeline:()=>Q,CurveTimeline1:()=>$,CurveTimeline2:()=>tt,DebugUtils:()=>g,DeformTimeline:()=>xt,Downloader:()=>ue,DrawOrderTimeline:()=>bt,Event:()=>de,EventData:()=>fe,EventQueue:()=>Yt,EventTimeline:()=>vt,EventType:()=>Pt,FIRST:()=>Ot,FakeTexture:()=>Zt,GLTexture:()=>Si,HOLD_FIRST:()=>Bt,HOLD_MIX:()=>Vt,HOLD_SUBSEQUENT:()=>Dt,IkConstraint:()=>pe,IkConstraintData:()=>me,IkConstraintTimeline:()=>At,Input:()=>qi,IntSet:()=>n,Interpolation:()=>u,LoadingScreen:()=>Ss,M00:()=>Ei,M01:()=>Ti,M02:()=>ki,M03:()=>Ci,M10:()=>Ri,M11:()=>Fi,M12:()=>Yi,M13:()=>Pi,M20:()=>Xi,M21:()=>Li,M22:()=>Oi,M23:()=>Di,M30:()=>Bi,M31:()=>Vi,M32:()=>zi,M33:()=>Ni,ManagedWebGLRenderingContext:()=>vi,MathUtils:()=>c,Matrix4:()=>Ui,Mesh:()=>Ki,MeshAttachment:()=>te,MixBlend:()=>C,MixDirection:()=>R,OrthoCamera:()=>Wi,PathAttachment:()=>ee,PathConstraint:()=>be,PathConstraintData:()=>ge,PathConstraintMixTimeline:()=>Et,PathConstraintPositionTimeline:()=>Mt,PathConstraintSpacingTimeline:()=>It,PointAttachment:()=>ie,PolygonBatcher:()=>ns,Pool:()=>x,Position2Attribute:()=>Qi,Position3Attribute:()=>$i,PositionMode:()=>xe,Pow:()=>d,PowOut:()=>f,RGB2Timeline:()=>mt,RGBA2Timeline:()=>pt,RGBATimeline:()=>ut,RGBTimeline:()=>dt,RegionAttachment:()=>re,ResizeMode:()=>ys,RotateMode:()=>ve,RotateTimeline:()=>et,SETUP:()=>zt,SUBSEQUENT:()=>Lt,ScaleTimeline:()=>nt,ScaleXTimeline:()=>at,ScaleYTimeline:()=>ot,SceneRenderer:()=>vs,SequenceTimeline:()=>kt,Shader:()=>Zi,ShapeRenderer:()=>as,ShapeType:()=>os,ShearTimeline:()=>ht,ShearXTimeline:()=>lt,ShearYTimeline:()=>ct,Skeleton:()=>Ie,SkeletonBinary:()=>Ye,SkeletonBounds:()=>ci,SkeletonClipping:()=>di,SkeletonData:()=>Ee,SkeletonDebugRenderer:()=>ls,SkeletonJson:()=>fi,SkeletonRenderer:()=>ds,Skin:()=>ke,SkinEntry:()=>Te,Slot:()=>Ae,SlotData:()=>Ce,SpacingMode:()=>we,SpineCanvas:()=>Es,StringSet:()=>a,TexCoordAttribute:()=>ts,Texture:()=>qt,TextureAtlas:()=>Kt,TextureAtlasPage:()=>Qt,TextureAtlasRegion:()=>$t,TextureFilter:()=>Gt,TextureRegion:()=>Ht,TextureWrap:()=>jt,TimeKeeper:()=>v,Timeline:()=>J,Touch:()=>Gi,TrackEntry:()=>Ft,TransformConstraint:()=>Se,TransformConstraintData:()=>Fe,TransformConstraintTimeline:()=>St,TransformMode:()=>oe,TranslateTimeline:()=>it,TranslateXTimeline:()=>st,TranslateYTimeline:()=>rt,Triangulator:()=>ui,Utils:()=>m,Vector2:()=>w,Vector3:()=>Ii,VertexAttachment:()=>S,VertexAttribute:()=>Ji,VertexAttributeType:()=>ss,WebGLBlendModeConverter:()=>bi,WindowedMean:()=>y});var n=class{constructor(){this.array=new Array}add(t){let e=this.contains(t);return this.array[0|t]=0|t,!e}contains(t){return null!=this.array[0|t]}remove(t){this.array[0|t]=void 0}clear(){this.array.length=0}},a=class{constructor(){this.entries={},this.size=0}add(t){let e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){let e=this.size;for(var i=0,s=t.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}static rgb888ToColor(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}static fromString(t){return(new o).setFromString(t)}},h=o;h.WHITE=new o(1,1,1,1),h.RED=new o(1,0,0,1),h.GREEN=new o(0,1,0,1),h.BLUE=new o(0,0,1,1),h.MAGENTA=new o(1,0,1,1);var l=class{static clamp(t,e,i){return ti?i:t}static cosDeg(t){return Math.cos(t*l.degRad)}static sinDeg(t){return Math.sin(t*l.degRad)}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){let e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return l.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,i){let s=Math.random(),r=e-t;return s<=(i-t)/r?t+Math.sqrt(s*r*(i-t)):e-Math.sqrt((1-s)*r*(e-i))}static isPowerOfTwo(t){return t&&0==(t&t-1)}},c=l;c.PI=3.1415927,c.PI2=2*l.PI,c.radiansToDegrees=180/l.PI,c.radDeg=l.radiansToDegrees,c.degreesToRadians=l.PI/180,c.degRad=l.degreesToRadians;var u=class{apply(t,e,i){return t+(e-t)*this.applyInternal(i)}},d=class extends u{constructor(t){super(),this.power=2,this.power=t}applyInternal(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}},f=class extends d{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}},p=class{static arrayCopy(t,e,i,s,r){for(let n=e,a=s;n=e?t:p.setArraySize(t,e,i)}static newArray(t,e){let i=new Array(t);for(let s=0;s0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},y=class{constructor(t=32){this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e>1)*n;let a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(!l){o.length>0&&(h=o);let a=t.bone,l=a.worldX,c=a.worldY,u=a.a,d=a.b,f=a.c,p=a.d;for(let t=e,a=r;a=this.regions.length&&(i=this.regions.length-1);let s=this.regions[i];e.region!=s&&(e.region=s,e.updateRegion())}getPath(t,e){let i=t,s=(this.start+e).toString();for(let t=this.digits-s.length;t>0;t--)i+="0";return i+=s,i}static nextID(){return M._nextID++}},I=M;I._nextID=0;var E=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(E||{}),T=[0,1,2,3,4,5,6],k=class{constructor(t,e,i){if(this.timelines=[],this.timelineIds=new a,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=i}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));let h=this.timelines;for(let s=0,l=h.length;s(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(C||{}),R=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(R||{}),F=0,Y=1,P=2,X=3,L=4,O=5,D=6,B=7,V=8,z=9,N=10,_=11,U=12,W=13,q=14,G=15,j=16,H=17,Z=18,K=19,J=class{constructor(t,e){this.propertyIds=e,this.frames=m.newFloatArray(t*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(t,e){let i=t.length;for(let s=1;se)return s-1;return i-1}static search(t,e,i){let s=t.length;for(let r=i;re)return r-i;return s-i}},Q=class extends J{constructor(t,e,i){super(t,i),this.curves=m.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let e=this.getFrameCount()+18*t;if(this.curves.length>e){let t=m.newFloatArray(e);m.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,i,s,r,n,a,o,h,l,c){let u=this.curves,d=this.getFrameCount()+18*t;0==i&&(u[e]=2+d);let f=.03*(s-2*n+o),p=.03*(r-2*a+h),m=.006*(3*(n-o)-s+l),g=.006*(3*(a-h)-r+c),x=2*f+m,w=2*p+g,v=.3*(n-s)+f+.16666667*m,y=.3*(a-r)+p+.16666667*g,b=s+v,A=r+y;for(let t=d+18;dt){let n=this.frames[e],a=this.frames[e+i];return a+(t-n)/(r[s]-n)*(r[s+1]-a)}let n=s+18;for(s+=2;s=t){let e=r[s-2],i=r[s-1];return i+(t-e)/(r[s]-e)*(r[s+1]-i)}e+=this.getFrameEntries();let a=r[n-2],o=r[n-1];return o+(t-a)/(this.frames[e]-a)*(this.frames[e+i]-o)}},$=class extends Q{constructor(t,e,i){super(t,e,[i])}getFrameEntries(){return 2}setFrame(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+1]=i}getCurveValue(t){let e=this.frames,i=e.length-2;for(let s=2;s<=i;s+=2)if(e[s]>t){i=s-2;break}let s=this.curves[i>>1];switch(s){case 0:let s=e[i],r=e[i+1];return r+(t-s)/(e[i+2]-s)*(e[i+2+1]-r);case 1:return e[i+1]}return this.getBezierValue(t,i,1,s-2)}},tt=class extends Q{constructor(t,e,i,s){super(t,e,[i,s])}getFrameEntries(){return 3}setFrame(t,e,i,s){t*=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s}},et=class extends ${constructor(t,e,i){super(t,e,F+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i>2];switch(p){case 0:let t=h[f];c=h[f+1],u=h[f+2],d=h[f+3];let e=(i-t)/(h[f+4]-t);c+=(h[f+4+1]-c)*e,u+=(h[f+4+2]-u)*e,d+=(h[f+4+3]-d)*e;break;case 1:c=h[f+1],u=h[f+2],d=h[f+3];break;default:c=this.getBezierValue(i,f,1,p-2),u=this.getBezierValue(i,f,2,p+18-2),d=this.getBezierValue(i,f,3,p+36-2)}if(1==r)l.r=c,l.g=u,l.b=d;else{if(0==n){let t=o.data.color;l.r=t.r,l.g=t.g,l.b=t.b}l.r+=(c-l.r)*r,l.g+=(u-l.g)*r,l.b+=(d-l.b)*r}}},ft=class extends ${constructor(t,e,i){super(t,e,V+"|"+i),this.slotIndex=0,this.slotIndex=i}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.color;if(i>3];switch(v){case 0:let t=h[w];u=h[w+1],d=h[w+2],f=h[w+3],p=h[w+4],m=h[w+5],g=h[w+6],x=h[w+7];let e=(i-t)/(h[w+8]-t);u+=(h[w+8+1]-u)*e,d+=(h[w+8+2]-d)*e,f+=(h[w+8+3]-f)*e,p+=(h[w+8+4]-p)*e,m+=(h[w+8+5]-m)*e,g+=(h[w+8+6]-g)*e,x+=(h[w+8+7]-x)*e;break;case 1:u=h[w+1],d=h[w+2],f=h[w+3],p=h[w+4],m=h[w+5],g=h[w+6],x=h[w+7];break;default:u=this.getBezierValue(i,w,1,v-2),d=this.getBezierValue(i,w,2,v+18-2),f=this.getBezierValue(i,w,3,v+36-2),p=this.getBezierValue(i,w,4,v+54-2),m=this.getBezierValue(i,w,5,v+72-2),g=this.getBezierValue(i,w,6,v+90-2),x=this.getBezierValue(i,w,7,v+108-2)}if(1==r)l.set(u,d,f,p),c.r=m,c.g=g,c.b=x;else{if(0==n){l.setFromColor(o.data.color);let t=o.data.darkColor;c.r=t.r,c.g=t.g,c.b=t.b}l.add((u-l.r)*r,(d-l.g)*r,(f-l.b)*r,(p-l.a)*r),c.r+=(m-c.r)*r,c.g+=(g-c.g)*r,c.b+=(x-c.b)*r}}},mt=class extends Q{constructor(t,e,i){super(t,e,[B+"|"+i,z+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,s,r,n,a,o){t*=7,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n,this.frames[t+5]=a,this.frames[t+6]=o}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,c=o.darkColor;if(it){let r=this.frames[e];return i[s+1]*(t-r)/(i[s]-r)}let r=s+18;for(s+=2;s=t){let e=i[s-2],r=i[s-1];return r+(t-e)/(i[s]-e)*(i[s+1]-r)}let n=i[r-2],a=i[r-1];return a+(1-a)*(t-n)/(this.frames[e+this.getFrameEntries()]-n)}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.getAttachment();if(!h)return;if(!(h instanceof S)||h.timelineAttachment!=this.attachment)return;let l=o.deform;0==l.length&&(n=0);let c=this.vertices,u=c[0].length,d=this.frames;if(i=d[d.length-1]){let t=c[d.length-1];if(1==r)if(3==n){let e=h;if(e.bones)for(let e=0;ei)this.apply(t,e,Number.MAX_VALUE,s,r,n,a),e=-1;else if(e>=o[h-1])return;if(i0&&o[l-1]==t;)l--}for(;l=o[l];l++)s.push(this.events[l])}},vt=wt;vt.propertyIds=[""+U];var yt=class extends J{constructor(t){super(t,yt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.drawOrders[t]=i}apply(t,e,i,s,r,n,a){if(1==a)return void(0==n&&m.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(i>2];switch(f){case 0:let t=u[d];h=u[d+1],l=u[d+2],c=u[d+3];let e=(i-t)/(u[d+4]-t);h+=(u[d+4+1]-h)*e,l+=(u[d+4+2]-l)*e,c+=(u[d+4+3]-c)*e;break;case 1:h=u[d+1],l=u[d+2],c=u[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),c=this.getBezierValue(i,d,3,f+36-2)}if(0==n){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*r,o.mixX=t.mixX+(l-t.mixX)*r,o.mixY=t.mixY+(c-t.mixY)*r}else o.mixRotate+=(h-o.mixRotate)*r,o.mixX+=(l-o.mixX)*r,o.mixY+=(c-o.mixY)*r}},Tt=class extends J{constructor(t,e,i){super(t,[K+"|"+e+"|"+i.sequence.id]),this.slotIndex=e,this.attachment=i}getFrameEntries(){return Tt.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,i,s,r){let n=this.frames;n[t*=Tt.ENTRIES]=e,n[t+Tt.MODE]=i|s<<4,n[t+Tt.DELAY]=r}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.attachment,l=this.attachment;if(!(h==l||h instanceof S&&h.timelineAttachment==l))return;let c=this.frames;if(i>4,g=this.attachment.sequence.regions.length,x=T[15&f];if(0!=x)switch(m+=(i-d)/p+1e-5|0,x){case 1:m=Math.min(g-1,m);break;case 2:m%=g;break;case 3:{let t=(g<<1)-2;m=0==t?0:m%t,m>=g&&(m=t-m);break}case 4:m=Math.max(g-1-m,0);break;case 5:m=g-1-m%g;break;case 6:{let t=(g<<1)-2;m=0==t?0:(m+g-1)%t,m>=g&&(m=t-m)}}o.sequenceIndex=m}},kt=Tt;kt.ENTRIES=3,kt.MODE=1,kt.DELAY=2;var Ct=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Yt(this),this.propertyIDs=new a,this.animationsChanged=!1,this.trackEntryPool=new x((()=>new Ft)),this.data=t}static emptyAnimation(){return Ct._emptyAnimation}update(t){t*=this.timeScale;let e=this.tracks;for(let i=0,s=e.length;i0){if(s.delay-=r,s.delay>0)continue;r=-s.delay,s.delay=0}let n=s.next;if(n){let e=s.trackLast-n.delay;if(e>=0){for(n.delay=0,n.trackTime+=0==s.timeScale?0:(e/s.timeScale+t)*n.timeScale,s.trackTime+=r,this.setCurrent(i,n,!0);n.mixingFrom;)n.mixTime+=t,n=n.mixingFrom;continue}}else if(s.trackLast>=s.trackEnd&&!s.mixingFrom){e[i]=null,this.queue.end(s),this.clearNext(s);continue}if(s.mixingFrom&&this.updateMixingFrom(s,t)){let t=s.mixingFrom;for(s.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}s.trackTime+=r}this.queue.drain()}updateMixingFrom(t,e){let i=t.mixingFrom;if(!i)return!0;let s=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),s):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let e=this.events,i=this.tracks,s=!1;for(let n=0,a=i.length;n0)continue;s=!0;let o=0==n?1:a.mixBlend,h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let l=a.animationLast,c=a.getAnimationTime(),u=c,d=e;a.reverse&&(u=a.animation.duration-u,d=null);let f=a.animation.timelines,p=f.length;if(0==n&&1==h||3==o)for(let e=0;e1&&(r=1),1!=i&&(i=s.mixBlend));let n=r0&&this.queueEvents(s,d),this.events.length=0,s.nextAnimationLast=d,s.nextTrackLast=s.trackTime,r}applyAttachmentTimeline(t,e,i,s,r){var n=e.slots[t.slotIndex];n.bone.active&&(i0,s=t>=0;c.signum(e)!=c.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*c.signum(t)),s=i),d=f+t-t%360,s!=i&&(d+=360*c.signum(t)),n[a]=d}n[a+1]=f,h.rotation=l+d*s}queueEvents(t,e){let i=t.animationStart,s=t.animationEnd,r=s-i,n=t.trackLast%r,a=this.events,o=0,h=a.length;for(;os||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==r||n>t.trackTime%r:e>=s&&t.animationLast=this.tracks.length)return;let e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let i=e;for(;;){let t=i.mixingFrom;if(!t)break;this.queue.end(t),i.mixingFrom=null,i.mixingTo=null,i=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,i){let s=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,s&&(i&&this.queue.interrupt(s),e.mixingFrom=s,s.mixingTo=e,e.mixTime=0,s.mixingFrom&&s.mixDuration>0&&(e.interruptAlpha*=Math.min(1,s.mixTime/s.mixDuration)),s.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,i=!1){let s=this.data.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,s,i)}setAnimationWith(t,e,i=!1){if(!e)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));let n=this.trackEntry(t,e,i,r);return this.setCurrent(t,n,s),this.queue.drain(),n}addAnimation(t,e,i=!1,s=0){let r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,s)}addAnimationWith(t,e,i=!1,s=0){if(!e)throw new Error("animation cannot be null.");let r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;let n=this.trackEntry(t,e,i,r);return r?(r.next=n,n.previous=r,s<=0&&(s+=r.getTrackComplete()-n.mixDuration)):(this.setCurrent(t,n,!0),this.queue.drain()),n.delay=s,n}setEmptyAnimation(t,e=0){let i=this.setAnimationWith(t,Ct.emptyAnimation(),!1);return i.mixDuration=e,i.trackEnd=e,i}addEmptyAnimation(t,e=0,i=0){let s=this.addAnimationWith(t,Ct.emptyAnimation(),!1,i);return i<=0&&(s.delay+=s.mixDuration-e),s.mixDuration=e,s.trackEnd=e,s}setEmptyAnimations(t=0){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,i=this.tracks.length;e0){r[o]=Vt,n[o]=i;continue t}break}r[o]=Bt}else r[o]=Lt}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},Rt=Ct;Rt._emptyAnimation=new k("",[],0);var Ft=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=2,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(t){this.animationLast=t,this.nextAnimationLast=t}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime(t[t.start=0]="start",t[t.interrupt=1]="interrupt",t[t.end=2]="end",t[t.dispose=3]="dispose",t[t.complete=4]="complete",t[t.event=5]="event",t))(Pt||{}),Xt=class{start(t){}interrupt(t){}end(t){}dispose(t){}complete(t){}event(t,e){}},Lt=0,Ot=1,Dt=2,Bt=3,Vt=4,zt=1,Nt=2,_t=class{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,i){let s=this.skeletonData.findAnimation(t);if(!s)throw new Error("Animation not found: "+t);let r=this.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);this.setMixWith(s,r,i)}setMixWith(t,e,i){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");let s=t.name+"."+e.name;this.animationToMixTime[s]=i}getMix(t,e){let i=t.name+"."+e.name,s=this.animationToMixTime[i];return void 0===s?this.defaultMix:s}},Ut=class extends S{constructor(t){super(t),this.color=new h(1,1,1,1)}copy(){let t=new Ut(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}},Wt=class extends S{constructor(t){super(t),this.endSlot=null,this.color=new h(.2275,.2275,.8078,1)}copy(){let t=new Wt(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}},qt=class{constructor(t){this._image=t}getImage(){return this._image}},Gt=(t=>(t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear",t))(Gt||{}),jt=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(jt||{}),Ht=class{constructor(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}},Zt=class extends qt{setFilters(t,e){}setWraps(t,e){}dispose(){}},Kt=class{constructor(t){this.pages=new Array,this.regions=new Array;let e=new Jt(t),i=new Array(4),s={size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},format:()=>{},filter:t=>{t.minFilter=m.enumValue(Gt,i[1]),t.magFilter=m.enumValue(Gt,i[2])},repeat:t=>{-1!=i[1].indexOf("x")&&(t.uWrap=10497),-1!=i[1].indexOf("y")&&(t.vWrap=10497)},pma:t=>{t.pma="true"==i[1]}};var r={xy:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2])},size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},bounds:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2]),t.width=parseInt(i[3]),t.height=parseInt(i[4])},offset:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2])},orig:t=>{t.originalWidth=parseInt(i[1]),t.originalHeight=parseInt(i[2])},offsets:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2]),t.originalWidth=parseInt(i[3]),t.originalHeight=parseInt(i[4])},rotate:t=>{let e=i[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:t=>{t.index=parseInt(i[1])}};let n=e.readLine();for(;n&&0==n.trim().length;)n=e.readLine();for(;n&&0!=n.trim().length&&0!=e.readEntry(i,n);)n=e.readLine();let a=null,o=null,h=null;for(;null!==n;)if(0==n.trim().length)a=null,n=e.readLine();else if(a){let t=new $t(a,n);for(;;){let s=e.readEntry(i,n=e.readLine());if(0==s)break;let a=r[i[0]];if(a)a(t);else{o||(o=[]),h||(h=[]),o.push(i[0]);let t=[];for(let e=0;e0&&h&&h.length>0&&(t.names=o,t.values=h,o=null,h=null),t.u=t.x/a.width,t.v=t.y/a.height,90==t.degrees?(t.u2=(t.x+t.height)/a.width,t.v2=(t.y+t.width)/a.height):(t.u2=(t.x+t.width)/a.width,t.v2=(t.y+t.height)/a.height),this.regions.push(t)}else{for(a=new Qt(n.trim());0!=e.readEntry(i,n=e.readLine());){let t=s[i[0]];t&&t(a)}this.pages.push(a)}}findRegion(t){for(let e=0;e=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;let i=e.indexOf(":");if(-1==i)return 0;t[0]=e.substr(0,i).trim();for(let s=1,r=i+1;;s++){let i=e.indexOf(",",r);if(-1==i)return t[s]=e.substr(r).trim(),s;if(t[s]=e.substr(r,i-r).trim(),r=i+1,4==s)return 4}}},Qt=class{constructor(t){this.minFilter=9728,this.magFilter=9728,this.uWrap=33071,this.vWrap=33071,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.name=t}setTexture(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}},$t=class extends Ht{constructor(t,e){super(),this.x=0,this.y=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.index=0,this.degrees=0,this.names=null,this.values=null,this.page=t,this.name=e}},te=class extends S{constructor(t,e){super(t),this.region=null,this.regionUVs=[],this.uvs=[],this.triangles=[],this.color=new h(1,1,1,1),this.width=0,this.height=0,this.hullLength=0,this.edges=[],this.parentMesh=null,this.sequence=null,this.tempColor=new h(0,0,0,0),this.path=e}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=m.newFloatArray(t.length));let e=this.uvs,i=this.uvs.length,s=this.region.u,r=this.region.v,n=0,a=0;if(this.region instanceof $t){let o=this.region,h=o.page.texture.getImage(),l=h.width,c=h.height;switch(o.degrees){case 90:s-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/c,n=o.originalHeight/l,a=o.originalWidth/c;for(let o=0;o= 0.");if(!e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}},oe=(t=>(t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection",t))(oe||{}),he=class{constructor(t,e,i){if(this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}isActive(){return this.active}update(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(t,e,i,s,r,n,a){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=s,this.ascaleY=r,this.ashearX=n,this.ashearY=a;let o=this.parent;if(!o){let o=this.skeleton,h=i+90+a,l=o.scaleX,u=o.scaleY;return this.a=c.cosDeg(i+n)*s*l,this.b=c.cosDeg(h)*r*l,this.c=c.sinDeg(i+n)*s*u,this.d=c.sinDeg(h)*r*u,this.worldX=t*l+o.x,void(this.worldY=e*u+o.y)}let h=o.a,l=o.b,u=o.c,d=o.d;switch(this.worldX=h*t+l*e+o.worldX,this.worldY=u*t+d*e+o.worldY,this.data.transformMode){case 0:{let t=i+90+a,e=c.cosDeg(i+n)*s,o=c.cosDeg(t)*r,f=c.sinDeg(i+n)*s,p=c.sinDeg(t)*r;return this.a=h*e+l*f,this.b=h*o+l*p,this.c=u*e+d*f,void(this.d=u*o+d*p)}case 1:{let t=i+90+a;this.a=c.cosDeg(i+n)*s,this.b=c.cosDeg(t)*r,this.c=c.sinDeg(i+n)*s,this.d=c.sinDeg(t)*r;break}case 2:{let t=h*h+u*u,e=0;t>1e-4?(t=Math.abs(h*d-l*u)/t,h/=this.skeleton.scaleX,u/=this.skeleton.scaleY,l=u*t,d=h*t,e=Math.atan2(u,h)*c.radDeg):(h=0,u=0,e=90-Math.atan2(d,l)*c.radDeg);let o=i+n-e,f=i+a-e+90,p=c.cosDeg(o)*s,m=c.cosDeg(f)*r,g=c.sinDeg(o)*s,x=c.sinDeg(f)*r;this.a=h*p-l*g,this.b=h*m-l*x,this.c=u*p+d*g,this.d=u*m+d*x;break}case 3:case 4:{let t=c.cosDeg(i),e=c.sinDeg(i),o=(h*t+l*e)/this.skeleton.scaleX,f=(u*t+d*e)/this.skeleton.scaleY,p=Math.sqrt(o*o+f*f);p>1e-5&&(p=1/p),o*=p,f*=p,p=Math.sqrt(o*o+f*f),3==this.data.transformMode&&h*d-l*u<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(p=-p);let m=Math.PI/2+Math.atan2(f,o),g=Math.cos(m)*p,x=Math.sin(m)*p,w=c.cosDeg(n)*s,v=c.cosDeg(90+a)*r,y=c.sinDeg(n)*s,b=c.sinDeg(90+a)*r;this.a=o*w+g*y,this.b=o*v+g*b,this.c=f*w+x*y,this.d=f*v+x*b;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}getWorldRotationX(){return Math.atan2(this.c,this.a)*c.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*c.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}updateAppliedTransform(){let t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*c.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*c.radDeg);let e=t.a,i=t.b,s=t.c,r=t.d,n=1/(e*r-i*s),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*n-o*i*n,this.ay=o*e*n-a*s*n;let h=n*r,l=n*e,u=n*i,d=n*s,f=h*this.a-u*this.c,p=h*this.b-u*this.d,m=l*this.c-d*this.a,g=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+m*m),this.ascaleX>1e-4){let t=f*g-p*m;this.ascaleY=t/this.ascaleX,this.ashearY=Math.atan2(f*p+m*g,t)*c.radDeg,this.arotation=Math.atan2(m,f)*c.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*c.radDeg}worldToLocal(t){let e=1/(this.a*this.d-this.b*this.c),i=t.x-this.worldX,s=t.y-this.worldY;return t.x=i*this.d*e-s*this.b*e,t.y=s*this.a*e-i*this.c*e,t}localToWorld(t){let e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t}worldToLocalRotation(t){let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*c.radDeg+this.rotation-this.shearX}localToWorldRotation(t){t-=this.rotation-this.shearX;let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*c.radDeg}rotateWorld(t){let e=this.a,i=this.b,s=this.c,r=this.d,n=c.cosDeg(t),a=c.sinDeg(t);this.a=n*e-a*s,this.b=n*i-a*r,this.c=a*e+n*s,this.d=a*i+n*r}},le=class{constructor(t,e,i){this.name=t,this.order=e,this.skinRequired=i}},ce=class{constructor(t,e="",i=new ue){this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=t,this.pathPrefix=e,this.downloader=i}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,i){this.toLoad--,this.loaded++,this.assets[e]=i,t&&t(e,i)}error(t,e,i){this.toLoad--,this.loaded++,this.errors[e]=i,t&&t(e,i)}loadAll(){return new Promise(((t,e)=>{let i=()=>{this.isLoadingComplete()?this.hasErrors()?e(this.errors):t(this):requestAnimationFrame(i)};requestAnimationFrame(i)}))}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadBinary(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load binary ${t}: status ${e}, ${s}`)}))}loadText(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadText(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load text ${t}: status ${e}, ${s}`)}))}loadJson(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadJson(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load JSON ${t}: status ${e}, ${s}`)}))}loadTexture(t,e=(()=>{}),i=(()=>{})){if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then((e=>e.ok?e.blob():(this.error(i,t,`Couldn't load image: ${t}`),null))).then((t=>t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null)).then((i=>{i&&this.success(e,t,this.textureLoader(i))}));else{let s=new Image;s.crossOrigin="anonymous",s.onload=()=>{this.success(e,t,this.textureLoader(s))},s.onerror=()=>{this.error(i,t,`Couldn't load image: ${t}`)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),s.src=t}}loadTextureAtlas(t,e=(()=>{}),i=(()=>{}),s){let r=t.lastIndexOf("/"),n=r>=0?t.substring(0,r+1):"";t=this.start(t),this.downloader.downloadText(t,(r=>{try{let a=new Kt(r),o=a.pages.length,h=!1;for(let r of a.pages)this.loadTexture(s?s[r.name]:n+r.name,((i,s)=>{h||(r.setTexture(s),0==--o&&this.success(e,t,a))}),((e,s)=>{h||this.error(i,t,`Couldn't load texture atlas ${t} page image: ${e}`),h=!0}))}catch(e){this.error(i,t,`Couldn't parse texture atlas ${t}: ${e.message}`)}}),((e,s)=>{this.error(i,t,`Couldn't load texture atlas ${t}: status ${e}, ${s}`)}))}get(t){return this.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;let e=this.assets[t];if(e)return e;let i=this.errors[t];throw Error("Asset not found: "+t+(i?"\n"+i:""))}remove(t){t=this.pathPrefix+t;let e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}removeAll(){for(let t in this.assets){let e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}isLoadingComplete(){return 0==this.toLoad}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}},ue=class{constructor(){this.callbacks={},this.rawDataUris={}}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return-1!=e?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){for(var e=window.atob(t),i=e.length,s=new Uint8Array(i),r=0;r{this.finish(t,s.status,s.responseText)};s.onload=r,s.onerror=r,s.send()}downloadJson(t,e,i){this.downloadText(t,(t=>{e(JSON.parse(t))}),i)}downloadBinary(t,e,i){if(this.start(t,e,i))return;if(this.rawDataUris[t]){try{let e=this.rawDataUris[t];this.finish(t,200,this.dataUriToUint8Array(e))}catch(e){this.finish(t,400,JSON.stringify(e))}return}let s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer";let r=()=>{this.finish(t,s.status,s.response)};s.onload=()=>{200==s.status||0==s.status?this.finish(t,200,new Uint8Array(s.response)):r()},s.onerror=r,s.send()}start(t,e,i){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,i)}}finish(t,e,i){let s=this.callbacks[t];delete this.callbacks[t];let r=200==e||0==e?[i]:[e,i];for(let t=r.length-1,e=s.length;t180?f-=360:f<-180&&(f+=360);let g=t.ascaleX,x=t.ascaleY;if(s||r){switch(t.data.transformMode){case 3:case 4:p=e-t.worldX,m=i-t.worldY}let o=t.data.length*g,h=Math.sqrt(p*p+m*m);if(s&&ho&&o>1e-4){let t=(h/o-1)*a+1;g*=t,n&&(x*=t)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,g,x,t.ashearX,t.ashearY)}apply2(t,e,i,s,r,n,a,o,h){let l=t.ax,u=t.ay,d=t.ascaleX,f=t.ascaleY,p=d,m=f,g=e.ascaleX,x=0,w=0,v=0;d<0?(d=-d,x=180,v=-1):(x=0,v=1),f<0&&(f=-f,v=-v),g<0?(g=-g,w=180):w=0;let y=e.ax,b=0,A=0,S=0,M=t.a,I=t.b,E=t.c,T=t.d,k=Math.abs(d-f)<=1e-4;!k||n?(b=0,A=M*y+t.worldX,S=E*y+t.worldY):(b=e.ay,A=M*y+I*b+t.worldX,S=E*y+T*b+t.worldY);let C=t.parent;if(!C)throw new Error("IK parent must itself have a parent.");M=C.a,I=C.b,E=C.c,T=C.d;let R,F,Y=1/(M*T-I*E),P=A-C.worldX,X=S-C.worldY,L=(P*T-X*I)*Y-l,O=(X*M-P*E)*Y-u,D=Math.sqrt(L*L+O*O),B=e.data.length*g;if(D<1e-4)return this.apply1(t,i,s,!1,n,!1,h),void e.updateWorldTransformWith(y,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);P=i-C.worldX,X=s-C.worldY;let V=(P*T-X*I)*Y-l,z=(X*M-P*E)*Y-u,N=V*V+z*z;if(0!=o){o*=d*(g+1)*.5;let t=Math.sqrt(N),e=t-D-B*d+o;if(e>0){let i=Math.min(1,e/(2*o))-1;i=(e-o*(1-i*i))/t,V-=i*V,z-=i*z,N=V*V+z*z}}t:if(k){B*=d;let t=(N-D*D-B*B)/(2*D*B);t<-1?(t=-1,F=Math.PI*r):t>1?(t=1,F=0,n&&(M=(Math.sqrt(N)/(D+B)-1)*h+1,p*=M,a&&(m*=M))):F=Math.acos(t)*r,M=D+B*t,I=B*Math.sin(F),R=Math.atan2(z*M-V*I,V*M+z*I)}else{M=d*B,I=f*B;let t=M*M,e=I*I,i=Math.atan2(z,V);E=e*D*D+t*N-t*e;let s=-2*e*D,n=e-t;if(T=s*s-4*n*E,T>=0){let t=Math.sqrt(T);s<0&&(t=-t),t=.5*-(s+t);let e=t/n,a=E/t,o=Math.abs(e)=-1&&E<=1&&(E=Math.acos(E),P=M*Math.cos(E)+D,X=I*Math.sin(E),T=P*P+X*X,Tm&&(u=E,m=T,p=P,g=X)),N<=.5*(h+m)?(R=i-Math.atan2(l*r,o),F=a*r):(R=i-Math.atan2(g*r,p),F=u*r)}let _=Math.atan2(b,y)*v,U=t.arotation;R=(R-_)*c.radDeg+x-U,R>180?R-=360:R<-180&&(R+=360),t.updateWorldTransformWith(l,u,U+R*h,p,m,0,0),U=e.arotation,F=((F+_)*c.radDeg-e.ashearX)*v+w-U,F>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(y,b,U+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}},me=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.softness=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},ge=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.positionMode=xe.Fixed,this.spacingMode=we.Fixed,this.rotateMode=ve.Chain,this.offsetRotation=0,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}},xe=(t=>(t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent",t))(xe||{}),we=(t=>(t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional",t))(we||{}),ve=(t=>(t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale",t))(ve||{}),ye=class{constructor(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(let i=0,s=t.bones.length;i0){t=l/t*f;for(let e=1;e0?c.degRad:-c.degRad}for(let t=0,r=3;t0){let i=h.a,s=h.b,a=h.c,o=h.d,l=0,d=0,f=0;if(l=n?p[r-1]:0==u[t+1]?p[r+2]:Math.atan2(y,m),l-=Math.atan2(a,i),v){d=Math.cos(l),f=Math.sin(l);let t=h.data.length;g+=(t*(d*i-f*a)-m)*e,x+=(t*(f*i+d*a)-y)*e}else l+=w;l>c.PI?l-=c.PI2:l<-c.PI&&(l+=c.PI2),l*=e,d=Math.cos(l),f=Math.sin(l),h.a=d*i-f*a,h.b=d*s-f*o,h.c=f*i+d*a,h.d=f*s+d*o}h.updateAppliedTransform()}}computeWorldPositions(t,e,i){let s=this.target,r=this.position,n=this.spaces,a=m.setArraySize(this.positions,3*e+2),o=this.world,h=t.closed,l=t.worldVerticesLength,c=l/6,u=ye.NONE;if(!t.constantSpeed){let d=t.lengths;c-=h?1:2;let f,p=d[c];switch(1==this.data.positionMode&&(r*=p),this.data.spacingMode){case 2:f=p;break;case 3:f=p/e;break;default:f=1}o=m.setArraySize(this.world,8);for(let m=0,g=0,x=0;mp){u!=ye.AFTER&&(u=ye.AFTER,t.computeWorldVertices(s,l-6,4,o,0,2)),this.addAfterPosition(w-p,o,0,a,g);continue}}for(;;x++){let t=d[x];if(!(w>t)){if(0==x)w/=t;else{let e=d[x-1];w=(w-e)/(t-e)}break}}x!=u&&(u=x,h&&x==c?(t.computeWorldVertices(s,l-4,4,o,0,2),t.computeWorldVertices(s,0,4,o,4,2)):t.computeWorldVertices(s,6*x+2,8,o,0,2)),this.addCurvePosition(w,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],a,g,i||m>0&&0==e)}return a}h?(l+=2,o=m.setArraySize(this.world,l),t.computeWorldVertices(s,2,l-4,o,0,2),t.computeWorldVertices(s,0,2,o,l-4,2),o[l-2]=o[0],o[l-1]=o[1]):(c--,l-=4,o=m.setArraySize(this.world,l),t.computeWorldVertices(s,2,l,o,0,2));let d,f=m.setArraySize(this.curves,c),p=0,g=o[0],x=o[1],w=0,v=0,y=0,b=0,A=0,S=0,M=0,I=0,E=0,T=0,k=0,C=0,R=0,F=0;for(let t=0,e=2;tp){this.addAfterPosition(X-p,o,l-4,a,s);continue}}for(;;c++){let t=f[c];if(!(X>t)){if(0==c)X/=t;else{let e=f[c-1];X=(X-e)/(t-e)}break}}if(c!=u){u=c;let t=6*c;for(g=o[t],x=o[t+1],w=o[t+2],v=o[t+3],y=o[t+4],b=o[t+5],A=o[t+6],S=o[t+7],M=.03*(g-2*w+y),I=.03*(x-2*v+b),E=.006*(3*(w-y)-g+A),T=.006*(3*(v-b)-x+S),k=2*M+E,C=2*I+T,R=.3*(w-g)+M+.16666667*E,F=.3*(v-x)+I+.16666667*T,P=Math.sqrt(R*R+F*F),Y[0]=P,t=1;t<8;t++)R+=k,F+=C,k+=E,C+=T,P+=Math.sqrt(R*R+F*F),Y[t]=P;R+=k,F+=C,P+=Math.sqrt(R*R+F*F),Y[8]=P,R+=k+E,F+=C+T,P+=Math.sqrt(R*R+F*F),Y[9]=P,m=0}for(X*=P;;m++){let t=Y[m];if(!(X>t)){if(0==m)X/=t;else{let e=Y[m-1];X=m+(X-e)/(t-e)}break}}this.addCurvePosition(.1*X,g,x,w,v,y,b,A,S,a,s,i||t>0&&0==e)}return a}addBeforePosition(t,e,i,s,r){let n=e[i],a=e[i+1],o=e[i+2]-n,h=e[i+3]-a,l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addAfterPosition(t,e,i,s,r){let n=e[i+2],a=e[i+3],o=n-e[i],h=a-e[i+1],l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addCurvePosition(t,e,i,s,r,n,a,o,h,l,c,u){if(0==t||isNaN(t))return l[c]=e,l[c+1]=i,void(l[c+2]=Math.atan2(r-i,s-e));let d=t*t,f=d*t,p=1-t,m=p*p,g=m*p,x=p*t,w=3*x,v=p*w,y=w*t,b=e*g+s*v+n*y+o*f,A=i*g+r*v+a*y+h*f;l[c]=b,l[c+1]=A,u&&(l[c+2]=t<.001?Math.atan2(r-i,s-e):Math.atan2(A-(i*m+r*x*2+a*d),b-(e*m+s*x*2+n*d)))}},be=ye;be.NONE=-1,be.BEFORE=-2,be.AFTER=-3,be.epsilon=1e-5;var Ae=class{constructor(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(t instanceof S&&this.attachment instanceof S&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},Se=class{constructor(t,e){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new w,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(let i=0;i0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=(t.x-x.worldX)*e,x.worldY+=(t.y-x.worldY)*i}if(0!=s){let t=Math.sqrt(x.a*x.a+x.c*x.c);0!=t&&(t=(t+(Math.sqrt(h*h+u*u)-t+this.data.offsetScaleX)*s)/t),x.a*=t,x.c*=t}if(0!=r){let t=Math.sqrt(x.b*x.b+x.d*x.d);0!=t&&(t=(t+(Math.sqrt(l*l+d*d)-t+this.data.offsetScaleY)*r)/t),x.b*=t,x.d*=t}if(n>0){let t=x.b,e=x.d,i=Math.atan2(e,t),s=Math.atan2(d,l)-Math.atan2(u,h)-(i-Math.atan2(x.c,x.a));s>c.PI?s-=c.PI2:s<-c.PI&&(s+=c.PI2),s=i+(s+m)*n;let r=Math.sqrt(t*t+e*e);x.b=Math.cos(s)*r,x.d=Math.sin(s)*r}x.updateAppliedTransform()}}applyRelativeWorld(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=0!=e||0!=i,o=this.target,h=o.a,l=o.b,u=o.c,d=o.d,f=h*d-l*u>0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=t.x*e,x.worldY+=t.y*i}if(0!=s){let t=(Math.sqrt(h*h+u*u)-1+this.data.offsetScaleX)*s+1;x.a*=t,x.c*=t}if(0!=r){let t=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*r+1;x.b*=t,x.d*=t}if(n>0){let t=Math.atan2(d,l)-Math.atan2(u,h);t>c.PI?t-=c.PI2:t<-c.PI&&(t+=c.PI2);let e=x.b,i=x.d;t=Math.atan2(i,e)+(t-c.PI/2+m)*n;let s=Math.sqrt(e*e+i*i);x.b=Math.cos(t)*s,x.d=Math.sin(t)*s}x.updateAppliedTransform()}}applyAbsoluteLocal(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=this.target,o=this.bones;for(let h=0,l=o.length;h=s.length&&(s.length=t+1),s[t]||(s[t]={}),s[t][e]=i}addSkin(t){for(let e=0;e= 0.");if(!e)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}},Re=(t=>(t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen",t))(Re||{}),Fe=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Ye=class{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){let e=this.scale,i=new Ee;i.name="";let s=new Pe(t),r=s.readInt32(),n=s.readInt32();i.hash=0==n&&0==r?null:n.toString(16)+r.toString(16),i.version=s.readString(),i.x=s.readFloat(),i.y=s.readFloat(),i.width=s.readFloat(),i.height=s.readFloat();let a=s.readBoolean();a&&(i.fps=s.readFloat(),i.imagesPath=s.readString(),i.audioPath=s.readString());let o=0;o=s.readInt(!0);for(let t=0;t>4,t.readFloat())}s.push(e);break}}}}}let n=t.readInt(!0);if(n>0){let e=new bt(n),r=i.slots.length;for(let i=0;i=0;t--)a[t]=-1;let o=m.newArray(r-n,0),h=0,l=0;for(let e=0;e=0;t--)-1==a[t]&&(a[t]=o[--l]);e.setFrame(i,s,a)}s.push(e)}let a=t.readInt(!0);if(a>0){let e=new vt(a);for(let s=0;s>>1^-(1&i)}readStringRef(){let t=this.readInt(!0);return 0==t?null:this.strings[t-1]}readString(){let t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;let e="";for(let i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(t),i++}}return e}readFloat(){let t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}},Xe=class{constructor(t,e,i,s,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=s,this.inheritTimeline=r}},Le=class{constructor(t=null,e=null){this.bones=t,this.vertices=e}},Oe=(t=>(t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping",t))(Oe||{});function De(t,e,i){let s=t.readFloat(),r=t.readFloat()*i;for(let n=0,a=0,o=e.getFrameCount()-1;e.setFrame(n,s,r),n!=o;n++){let o=t.readFloat(),h=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(n);break;case li:Ve(t,e,a++,n,0,s,o,r,h,i)}s=o,r=h}return e}function Be(t,e,i){let s=t.readFloat(),r=t.readFloat()*i,n=t.readFloat()*i;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,s,r,n),a!=h;a++){let h=t.readFloat(),l=t.readFloat()*i,c=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(a);break;case li:Ve(t,e,o++,a,0,s,h,r,l,i),Ve(t,e,o++,a,1,s,h,n,c,i)}s=h,r=l,n=c}return e}function Ve(t,e,i,s,r,n,a,o,h,l){e.setBezier(i,s,r,n,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,a,h)}var ze,Ne=0,_e=1,Ue=2,We=3,qe=4,Ge=5,je=6,He=7,Ze=8,Ke=9,Je=0,Qe=1,$e=2,ti=3,ei=4,ii=5,si=0,ri=1,ni=0,ai=1,oi=2,hi=1,li=2,ci=class{constructor(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new x((()=>m.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");let i=this.boundingBoxes,s=this.polygons,r=this.polygonPool,n=t.slots,a=n.length;i.length=0,r.freeAll(s),s.length=0;for(let t=0;t=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,i,s){let r=this.minX,n=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=n&&s<=n||t>=a&&i>=a||e>=o&&s>=o)return!1;let h=(s-e)/(i-t),l=h*(r-t)+e;if(l>n&&ln&&lr&&cr&&ct.minX&&this.minYt.minY}containsPoint(t,e){let i=this.polygons;for(let s=0,r=i.length;s=i||o=i){let h=s[t];h+(i-r)/(o-r)*(s[n]-h)=c&&x<=a||x>=a&&x<=c)&&(x>=e&&x<=s||x>=s&&x<=e)){let t=(l*m-h*f)/g;if((t>=u&&t<=d||t>=d&&t<=u)&&(t>=i&&t<=r||t>=r&&t<=i))return!0}c=a,u=d}return!1}getPolygon(t){if(!t)throw new Error("boundingBox cannot be null.");let e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}},ui=class{constructor(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new x((()=>new Array)),this.polygonIndicesPool=new x((()=>new Array))}triangulate(t){let e=t,i=t.length>>1,s=this.indicesArray;s.length=0;for(let t=0;t3;){let t=i-1,a=0,o=1;for(;;){t:if(!r[a]){let n=s[t]<<1,h=s[a]<<1,l=s[o]<<1,c=e[n],u=e[n+1],d=e[h],f=e[h+1],p=e[l],m=e[l+1];for(let n=(o+1)%i;n!=t;n=(n+1)%i){if(!r[n])continue;let t=s[n]<<1,i=e[t],a=e[t+1];if(ui.positiveArea(p,m,c,u,i,a)&&ui.positiveArea(c,u,d,f,i,a)&&ui.positiveArea(d,f,p,m,i,a))break t}break}if(0==o){do{if(!r[a])break;a--}while(a>0);break}t=a,a=o,o=(o+1)%i}n.push(s[(i+a-1)%i]),n.push(s[a]),n.push(s[(a+1)%i]),s.splice(a,1),r.splice(a,1),i--;let h=(i+a-1)%i,l=a==i?0:a;r[h]=ui.isConcave(h,i,e,s),r[l]=ui.isConcave(l,i,e,s)}return 3==i&&(n.push(s[2]),n.push(s[0]),n.push(s[1])),n}decompose(t,e){let i=t,s=this.convexPolygons;this.polygonPool.freeAll(s),s.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let n=this.polygonIndicesPool.obtain();n.length=0;let a=this.polygonPool.obtain();a.length=0;let o=-1,h=0;for(let t=0,l=e.length;t0?(s.push(a),r.push(n)):(this.polygonPool.free(a),this.polygonIndicesPool.free(n)),a=this.polygonPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),a.push(m),a.push(g),a.push(x),n=this.polygonIndicesPool.obtain(),n.length=0,n.push(l),n.push(c),n.push(u),h=ui.winding(d,f,p,m,g,x),o=l)}a.length>0&&(s.push(a),r.push(n));for(let t=0,e=s.length;t=0;t--)a=s[t],0==a.length&&(s.splice(t,1),this.polygonPool.free(a),n=r[t],r.splice(t,1),this.polygonIndicesPool.free(n));return s}static isConcave(t,e,i,s){let r=s[(e+t-1)%e]<<1,n=s[t]<<1,a=s[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[n],i[n+1],i[a],i[a+1])}static positiveArea(t,e,i,s,r,n){return t*(n-s)+i*(e-n)+r*(s-e)>=0}static winding(t,e,i,s,r,n){let a=i-t,o=s-e;return r*o-n*a+a*e-t*o>=0?1:-1}},di=class{constructor(){this.triangulator=new ui,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}clipStart(t,e){if(this.clipAttachment)return 0;this.clipAttachment=e;let i=e.worldVerticesLength,s=m.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,s,0,2);let r=this.clippingPolygon;di.makeClockwise(r);let n=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let t=0,e=n.length;t>1,C=this.clipOutput,R=m.setArraySize(l,e+k*f);for(let h=0;h=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(s),h.push(r),h.push(n),h.push(t),h.push(e),o.length=0;let u=a,d=a.length-4;for(let t=0;;t+=2){let e=u[t],i=u[t+1],s=u[t+2],r=u[t+3],n=e-s,a=i-r,f=h,p=h.length-2,m=o.length;for(let t=0;t0;if(n*(l-r)-a*(h-s)>0){if(p){o.push(u),o.push(d);continue}let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i)}else if(p){let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i);o.push(u),o.push(d)}c=!0}if(m==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),t==d)break;let g=o;(o=h).length=0,h=g}if(l!=o){l.length=0;for(let t=0,e=o.length-2;t>1;t=0;e--)-1==o[e]&&(o[e]=t[--r])}e.setFrame(n,wi(a,"time",0),o)}r.push(e)}if(t.events){let e=new vt(t.events.length),s=0;for(let r=0;r{t&&t.preventDefault()})),i.addEventListener("webglcontextrestored",(t=>{for(let t=0,e=this.restorables.length;t-1&&this.restorables.splice(e,1)}},yi=771,bi=class{static getDestGLBlendMode(t){switch(t){case 0:case 2:case 3:return yi;case 1:return 1;default:throw new Error("Unknown blend mode: "+t)}}static getSourceColorGLBlendMode(t,e=!1){switch(t){case 0:case 1:return e?1:770;case 2:return 774;case 3:return 1;default:throw new Error("Unknown blend mode: "+t)}}static getSourceAlphaGLBlendMode(t){switch(t){case 0:case 1:return 1;case 2:return yi;case 3:return 769;default:throw new Error("Unknown blend mode: "+t)}}},Ai=class extends qt{constructor(t,e,i=!1){super(e),this.texture=null,this.boundUnit=0,this.useMipMaps=!1,this.context=t instanceof vi?t:new vi(t),this.useMipMaps=i,this.restore(),this.context.addRestorable(this)}setFilters(t,e){let i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,Ai.validateMagFilter(e)),this.useMipMaps=Ai.usesMipMaps(t),this.useMipMaps&&i.generateMipmap(i.TEXTURE_2D)}static validateMagFilter(t){switch(t){case 9987:case 9987:case 9985:case 9986:case 9984:return 9729;default:return t}}static usesMipMaps(t){switch(t){case 9987:case 9987:case 9985:case 9986:case 9984:return!0;default:return!1}}setWraps(t,e){let i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e)}update(t){let e=this.context.gl;this.texture||(this.texture=this.context.gl.createTexture()),this.bind(),Ai.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL&&e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this._image),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t&&e.generateMipmap(e.TEXTURE_2D)}restore(){this.texture=null,this.update(this.useMipMaps)}bind(t=0){let e=this.context.gl;this.boundUnit=t,e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)}unbind(){let t=this.context.gl;t.activeTexture(t.TEXTURE0+this.boundUnit),t.bindTexture(t.TEXTURE_2D,null)}dispose(){this.context.removeRestorable(this),this.context.gl.deleteTexture(this.texture)}},Si=Ai;Si.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL=!1;var Mi=class extends ce{constructor(t,e="",i=new ue){super((e=>new Si(t,e)),e,i)}},Ii=class{constructor(t=0,e=0,i=0){this.x=0,this.y=0,this.z=0,this.x=t,this.y=e,this.z=i}setFrom(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}set(t,e,i){return this.x=t,this.y=e,this.z=i,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}scale(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(){let t=this.length();return 0==t||(t=1/t,this.x*=t,this.y*=t,this.z*=t),this}cross(t){return this.set(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)}multiply(t){let e=t.values;return this.set(this.x*e[Ei]+this.y*e[Ti]+this.z*e[ki]+e[Ci],this.x*e[Ri]+this.y*e[Fi]+this.z*e[Yi]+e[Pi],this.x*e[Xi]+this.y*e[Li]+this.z*e[Oi]+e[Di])}project(t){let e=t.values,i=1/(this.x*e[Bi]+this.y*e[Vi]+this.z*e[zi]+e[Ni]);return this.set((this.x*e[Ei]+this.y*e[Ti]+this.z*e[ki]+e[Ci])*i,(this.x*e[Ri]+this.y*e[Fi]+this.z*e[Yi]+e[Pi])*i,(this.x*e[Xi]+this.y*e[Li]+this.z*e[Oi]+e[Di])*i)}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}distance(t){let e=t.x-this.x,i=t.y-this.y,s=t.z-this.z;return Math.sqrt(e*e+i*i+s*s)}},Ei=0,Ti=4,ki=8,Ci=12,Ri=1,Fi=5,Yi=9,Pi=13,Xi=2,Li=6,Oi=10,Di=14,Bi=3,Vi=7,zi=11,Ni=15,_i=class{constructor(){this.temp=new Float32Array(16),this.values=new Float32Array(16);let t=this.values;t[Ei]=1,t[Fi]=1,t[Oi]=1,t[Ni]=1}set(t){return this.values.set(t),this}transpose(){let t=this.temp,e=this.values;return t[Ei]=e[Ei],t[Ti]=e[Ri],t[ki]=e[Xi],t[Ci]=e[Bi],t[Ri]=e[Ti],t[Fi]=e[Fi],t[Yi]=e[Li],t[Pi]=e[Vi],t[Xi]=e[ki],t[Li]=e[Yi],t[Oi]=e[Oi],t[Di]=e[zi],t[Bi]=e[Ci],t[Vi]=e[Pi],t[zi]=e[Di],t[Ni]=e[Ni],this.set(t)}identity(){let t=this.values;return t[Ei]=1,t[Ti]=0,t[ki]=0,t[Ci]=0,t[Ri]=0,t[Fi]=1,t[Yi]=0,t[Pi]=0,t[Xi]=0,t[Li]=0,t[Oi]=1,t[Di]=0,t[Bi]=0,t[Vi]=0,t[zi]=0,t[Ni]=1,this}invert(){let t=this.values,e=this.temp,i=t[Bi]*t[Li]*t[Yi]*t[Ci]-t[Xi]*t[Vi]*t[Yi]*t[Ci]-t[Bi]*t[Fi]*t[Oi]*t[Ci]+t[Ri]*t[Vi]*t[Oi]*t[Ci]+t[Xi]*t[Fi]*t[zi]*t[Ci]-t[Ri]*t[Li]*t[zi]*t[Ci]-t[Bi]*t[Li]*t[ki]*t[Pi]+t[Xi]*t[Vi]*t[ki]*t[Pi]+t[Bi]*t[Ti]*t[Oi]*t[Pi]-t[Ei]*t[Vi]*t[Oi]*t[Pi]-t[Xi]*t[Ti]*t[zi]*t[Pi]+t[Ei]*t[Li]*t[zi]*t[Pi]+t[Bi]*t[Fi]*t[ki]*t[Di]-t[Ri]*t[Vi]*t[ki]*t[Di]-t[Bi]*t[Ti]*t[Yi]*t[Di]+t[Ei]*t[Vi]*t[Yi]*t[Di]+t[Ri]*t[Ti]*t[zi]*t[Di]-t[Ei]*t[Fi]*t[zi]*t[Di]-t[Xi]*t[Fi]*t[ki]*t[Ni]+t[Ri]*t[Li]*t[ki]*t[Ni]+t[Xi]*t[Ti]*t[Yi]*t[Ni]-t[Ei]*t[Li]*t[Yi]*t[Ni]-t[Ri]*t[Ti]*t[Oi]*t[Ni]+t[Ei]*t[Fi]*t[Oi]*t[Ni];if(0==i)throw new Error("non-invertible matrix");let s=1/i;return e[Ei]=t[Yi]*t[Di]*t[Vi]-t[Pi]*t[Oi]*t[Vi]+t[Pi]*t[Li]*t[zi]-t[Fi]*t[Di]*t[zi]-t[Yi]*t[Li]*t[Ni]+t[Fi]*t[Oi]*t[Ni],e[Ti]=t[Ci]*t[Oi]*t[Vi]-t[ki]*t[Di]*t[Vi]-t[Ci]*t[Li]*t[zi]+t[Ti]*t[Di]*t[zi]+t[ki]*t[Li]*t[Ni]-t[Ti]*t[Oi]*t[Ni],e[ki]=t[ki]*t[Pi]*t[Vi]-t[Ci]*t[Yi]*t[Vi]+t[Ci]*t[Fi]*t[zi]-t[Ti]*t[Pi]*t[zi]-t[ki]*t[Fi]*t[Ni]+t[Ti]*t[Yi]*t[Ni],e[Ci]=t[Ci]*t[Yi]*t[Li]-t[ki]*t[Pi]*t[Li]-t[Ci]*t[Fi]*t[Oi]+t[Ti]*t[Pi]*t[Oi]+t[ki]*t[Fi]*t[Di]-t[Ti]*t[Yi]*t[Di],e[Ri]=t[Pi]*t[Oi]*t[Bi]-t[Yi]*t[Di]*t[Bi]-t[Pi]*t[Xi]*t[zi]+t[Ri]*t[Di]*t[zi]+t[Yi]*t[Xi]*t[Ni]-t[Ri]*t[Oi]*t[Ni],e[Fi]=t[ki]*t[Di]*t[Bi]-t[Ci]*t[Oi]*t[Bi]+t[Ci]*t[Xi]*t[zi]-t[Ei]*t[Di]*t[zi]-t[ki]*t[Xi]*t[Ni]+t[Ei]*t[Oi]*t[Ni],e[Yi]=t[Ci]*t[Yi]*t[Bi]-t[ki]*t[Pi]*t[Bi]-t[Ci]*t[Ri]*t[zi]+t[Ei]*t[Pi]*t[zi]+t[ki]*t[Ri]*t[Ni]-t[Ei]*t[Yi]*t[Ni],e[Pi]=t[ki]*t[Pi]*t[Xi]-t[Ci]*t[Yi]*t[Xi]+t[Ci]*t[Ri]*t[Oi]-t[Ei]*t[Pi]*t[Oi]-t[ki]*t[Ri]*t[Di]+t[Ei]*t[Yi]*t[Di],e[Xi]=t[Fi]*t[Di]*t[Bi]-t[Pi]*t[Li]*t[Bi]+t[Pi]*t[Xi]*t[Vi]-t[Ri]*t[Di]*t[Vi]-t[Fi]*t[Xi]*t[Ni]+t[Ri]*t[Li]*t[Ni],e[Li]=t[Ci]*t[Li]*t[Bi]-t[Ti]*t[Di]*t[Bi]-t[Ci]*t[Xi]*t[Vi]+t[Ei]*t[Di]*t[Vi]+t[Ti]*t[Xi]*t[Ni]-t[Ei]*t[Li]*t[Ni],e[Oi]=t[Ti]*t[Pi]*t[Bi]-t[Ci]*t[Fi]*t[Bi]+t[Ci]*t[Ri]*t[Vi]-t[Ei]*t[Pi]*t[Vi]-t[Ti]*t[Ri]*t[Ni]+t[Ei]*t[Fi]*t[Ni],e[Di]=t[Ci]*t[Fi]*t[Xi]-t[Ti]*t[Pi]*t[Xi]-t[Ci]*t[Ri]*t[Li]+t[Ei]*t[Pi]*t[Li]+t[Ti]*t[Ri]*t[Di]-t[Ei]*t[Fi]*t[Di],e[Bi]=t[Yi]*t[Li]*t[Bi]-t[Fi]*t[Oi]*t[Bi]-t[Yi]*t[Xi]*t[Vi]+t[Ri]*t[Oi]*t[Vi]+t[Fi]*t[Xi]*t[zi]-t[Ri]*t[Li]*t[zi],e[Vi]=t[Ti]*t[Oi]*t[Bi]-t[ki]*t[Li]*t[Bi]+t[ki]*t[Xi]*t[Vi]-t[Ei]*t[Oi]*t[Vi]-t[Ti]*t[Xi]*t[zi]+t[Ei]*t[Li]*t[zi],e[zi]=t[ki]*t[Fi]*t[Bi]-t[Ti]*t[Yi]*t[Bi]-t[ki]*t[Ri]*t[Vi]+t[Ei]*t[Yi]*t[Vi]+t[Ti]*t[Ri]*t[zi]-t[Ei]*t[Fi]*t[zi],e[Ni]=t[Ti]*t[Yi]*t[Xi]-t[ki]*t[Fi]*t[Xi]+t[ki]*t[Ri]*t[Li]-t[Ei]*t[Yi]*t[Li]-t[Ti]*t[Ri]*t[Oi]+t[Ei]*t[Fi]*t[Oi],t[Ei]=e[Ei]*s,t[Ti]=e[Ti]*s,t[ki]=e[ki]*s,t[Ci]=e[Ci]*s,t[Ri]=e[Ri]*s,t[Fi]=e[Fi]*s,t[Yi]=e[Yi]*s,t[Pi]=e[Pi]*s,t[Xi]=e[Xi]*s,t[Li]=e[Li]*s,t[Oi]=e[Oi]*s,t[Di]=e[Di]*s,t[Bi]=e[Bi]*s,t[Vi]=e[Vi]*s,t[zi]=e[zi]*s,t[Ni]=e[Ni]*s,this}determinant(){let t=this.values;return t[Bi]*t[Li]*t[Yi]*t[Ci]-t[Xi]*t[Vi]*t[Yi]*t[Ci]-t[Bi]*t[Fi]*t[Oi]*t[Ci]+t[Ri]*t[Vi]*t[Oi]*t[Ci]+t[Xi]*t[Fi]*t[zi]*t[Ci]-t[Ri]*t[Li]*t[zi]*t[Ci]-t[Bi]*t[Li]*t[ki]*t[Pi]+t[Xi]*t[Vi]*t[ki]*t[Pi]+t[Bi]*t[Ti]*t[Oi]*t[Pi]-t[Ei]*t[Vi]*t[Oi]*t[Pi]-t[Xi]*t[Ti]*t[zi]*t[Pi]+t[Ei]*t[Li]*t[zi]*t[Pi]+t[Bi]*t[Fi]*t[ki]*t[Di]-t[Ri]*t[Vi]*t[ki]*t[Di]-t[Bi]*t[Ti]*t[Yi]*t[Di]+t[Ei]*t[Vi]*t[Yi]*t[Di]+t[Ri]*t[Ti]*t[zi]*t[Di]-t[Ei]*t[Fi]*t[zi]*t[Di]-t[Xi]*t[Fi]*t[ki]*t[Ni]+t[Ri]*t[Li]*t[ki]*t[Ni]+t[Xi]*t[Ti]*t[Yi]*t[Ni]-t[Ei]*t[Li]*t[Yi]*t[Ni]-t[Ri]*t[Ti]*t[Oi]*t[Ni]+t[Ei]*t[Fi]*t[Oi]*t[Ni]}translate(t,e,i){let s=this.values;return s[Ci]+=t,s[Pi]+=e,s[Di]+=i,this}copy(){return(new _i).set(this.values)}projection(t,e,i,s){this.identity();let r=1/Math.tan(i*(Math.PI/180)/2),n=(e+t)/(t-e),a=2*e*t/(t-e),o=this.values;return o[Ei]=r/s,o[Ri]=0,o[Xi]=0,o[Bi]=0,o[Ti]=0,o[Fi]=r,o[Li]=0,o[Vi]=0,o[ki]=0,o[Yi]=0,o[Oi]=n,o[zi]=-1,o[Ci]=0,o[Pi]=0,o[Di]=a,o[Ni]=0,this}ortho2d(t,e,i,s){return this.ortho(t,t+i,e,e+s,0,1)}ortho(t,e,i,s,r,n){this.identity();let a=2/(e-t),o=2/(s-i),h=-2/(n-r),l=-(e+t)/(e-t),c=-(s+i)/(s-i),u=-(n+r)/(n-r),d=this.values;return d[Ei]=a,d[Ri]=0,d[Xi]=0,d[Bi]=0,d[Ti]=0,d[Fi]=o,d[Li]=0,d[Vi]=0,d[ki]=0,d[Yi]=0,d[Oi]=h,d[zi]=0,d[Ci]=l,d[Pi]=c,d[Di]=u,d[Ni]=1,this}multiply(t){let e=this.temp,i=this.values,s=t.values;return e[Ei]=i[Ei]*s[Ei]+i[Ti]*s[Ri]+i[ki]*s[Xi]+i[Ci]*s[Bi],e[Ti]=i[Ei]*s[Ti]+i[Ti]*s[Fi]+i[ki]*s[Li]+i[Ci]*s[Vi],e[ki]=i[Ei]*s[ki]+i[Ti]*s[Yi]+i[ki]*s[Oi]+i[Ci]*s[zi],e[Ci]=i[Ei]*s[Ci]+i[Ti]*s[Pi]+i[ki]*s[Di]+i[Ci]*s[Ni],e[Ri]=i[Ri]*s[Ei]+i[Fi]*s[Ri]+i[Yi]*s[Xi]+i[Pi]*s[Bi],e[Fi]=i[Ri]*s[Ti]+i[Fi]*s[Fi]+i[Yi]*s[Li]+i[Pi]*s[Vi],e[Yi]=i[Ri]*s[ki]+i[Fi]*s[Yi]+i[Yi]*s[Oi]+i[Pi]*s[zi],e[Pi]=i[Ri]*s[Ci]+i[Fi]*s[Pi]+i[Yi]*s[Di]+i[Pi]*s[Ni],e[Xi]=i[Xi]*s[Ei]+i[Li]*s[Ri]+i[Oi]*s[Xi]+i[Di]*s[Bi],e[Li]=i[Xi]*s[Ti]+i[Li]*s[Fi]+i[Oi]*s[Li]+i[Di]*s[Vi],e[Oi]=i[Xi]*s[ki]+i[Li]*s[Yi]+i[Oi]*s[Oi]+i[Di]*s[zi],e[Di]=i[Xi]*s[Ci]+i[Li]*s[Pi]+i[Oi]*s[Di]+i[Di]*s[Ni],e[Bi]=i[Bi]*s[Ei]+i[Vi]*s[Ri]+i[zi]*s[Xi]+i[Ni]*s[Bi],e[Vi]=i[Bi]*s[Ti]+i[Vi]*s[Fi]+i[zi]*s[Li]+i[Ni]*s[Vi],e[zi]=i[Bi]*s[ki]+i[Vi]*s[Yi]+i[zi]*s[Oi]+i[Ni]*s[zi],e[Ni]=i[Bi]*s[Ci]+i[Vi]*s[Pi]+i[zi]*s[Di]+i[Ni]*s[Ni],this.set(this.temp)}multiplyLeft(t){let e=this.temp,i=this.values,s=t.values;return e[Ei]=s[Ei]*i[Ei]+s[Ti]*i[Ri]+s[ki]*i[Xi]+s[Ci]*i[Bi],e[Ti]=s[Ei]*i[Ti]+s[Ti]*i[Fi]+s[ki]*i[Li]+s[Ci]*i[Vi],e[ki]=s[Ei]*i[ki]+s[Ti]*i[Yi]+s[ki]*i[Oi]+s[Ci]*i[zi],e[Ci]=s[Ei]*i[Ci]+s[Ti]*i[Pi]+s[ki]*i[Di]+s[Ci]*i[Ni],e[Ri]=s[Ri]*i[Ei]+s[Fi]*i[Ri]+s[Yi]*i[Xi]+s[Pi]*i[Bi],e[Fi]=s[Ri]*i[Ti]+s[Fi]*i[Fi]+s[Yi]*i[Li]+s[Pi]*i[Vi],e[Yi]=s[Ri]*i[ki]+s[Fi]*i[Yi]+s[Yi]*i[Oi]+s[Pi]*i[zi],e[Pi]=s[Ri]*i[Ci]+s[Fi]*i[Pi]+s[Yi]*i[Di]+s[Pi]*i[Ni],e[Xi]=s[Xi]*i[Ei]+s[Li]*i[Ri]+s[Oi]*i[Xi]+s[Di]*i[Bi],e[Li]=s[Xi]*i[Ti]+s[Li]*i[Fi]+s[Oi]*i[Li]+s[Di]*i[Vi],e[Oi]=s[Xi]*i[ki]+s[Li]*i[Yi]+s[Oi]*i[Oi]+s[Di]*i[zi],e[Di]=s[Xi]*i[Ci]+s[Li]*i[Pi]+s[Oi]*i[Di]+s[Di]*i[Ni],e[Bi]=s[Bi]*i[Ei]+s[Vi]*i[Ri]+s[zi]*i[Xi]+s[Ni]*i[Bi],e[Vi]=s[Bi]*i[Ti]+s[Vi]*i[Fi]+s[zi]*i[Li]+s[Ni]*i[Vi],e[zi]=s[Bi]*i[ki]+s[Vi]*i[Yi]+s[zi]*i[Oi]+s[Ni]*i[zi],e[Ni]=s[Bi]*i[Ci]+s[Vi]*i[Pi]+s[zi]*i[Di]+s[Ni]*i[Ni],this.set(this.temp)}lookAt(t,e,i){let s=_i.xAxis,r=_i.yAxis,n=_i.zAxis;n.setFrom(e).normalize(),s.setFrom(e).normalize(),s.cross(i).normalize(),r.setFrom(s).cross(n).normalize(),this.identity();let a=this.values;return a[Ei]=s.x,a[Ti]=s.y,a[ki]=s.z,a[Ri]=r.x,a[Fi]=r.y,a[Yi]=r.z,a[Xi]=-n.x,a[Li]=-n.y,a[Oi]=-n.z,_i.tmpMatrix.identity(),_i.tmpMatrix.values[Ci]=-t.x,_i.tmpMatrix.values[Pi]=-t.y,_i.tmpMatrix.values[Di]=-t.z,this.multiply(_i.tmpMatrix),this}},Ui=_i;Ui.xAxis=new Ii,Ui.yAxis=new Ii,Ui.zAxis=new Ii,Ui.tmpMatrix=new _i;var Wi=class{constructor(t,e){this.position=new Ii(0,0,0),this.direction=new Ii(0,0,-1),this.up=new Ii(0,1,0),this.near=0,this.far=100,this.zoom=1,this.viewportWidth=0,this.viewportHeight=0,this.projectionView=new Ui,this.inverseProjectionView=new Ui,this.projection=new Ui,this.view=new Ui,this.viewportWidth=t,this.viewportHeight=e,this.update()}update(){let t=this.projection,e=this.view,i=this.projectionView,s=this.inverseProjectionView,r=this.zoom,n=this.viewportWidth,a=this.viewportHeight;t.ortho(r*(-n/2),r*(n/2),r*(-a/2),r*(a/2),this.near,this.far),e.lookAt(this.position,this.direction,this.up),i.set(t.values),i.multiply(e),s.set(i.values).invert()}screenToWorld(t,e,i){let s=t.x,r=i-t.y-1;return t.x=2*s/e-1,t.y=2*r/i-1,t.z=2*t.z-1,t.project(this.inverseProjectionView),t}worldToScreen(t,e,i){return t.project(this.projectionView),t.x=e*(t.x+1)/2,t.y=i*(t.y+1)/2,t.z=(t.z+1)/2,t}setViewport(t,e){this.viewportWidth=t,this.viewportHeight=e}},qi=class{constructor(t){this.mouseX=0,this.mouseY=0,this.buttonDown=!1,this.touch0=null,this.touch1=null,this.initialPinchDistance=0,this.listeners=new Array,this.eventListeners=[],this.element=t,this.setupCallbacks(t)}setupCallbacks(t){let e=e=>{if(e instanceof MouseEvent){let i=t.getBoundingClientRect();this.mouseX=e.clientX-i.left,this.mouseY=e.clientY-i.top,this.listeners.map((t=>{this.buttonDown?t.dragged&&t.dragged(this.mouseX,this.mouseY):t.moved&&t.moved(this.mouseX,this.mouseY)}))}},i=s=>{if(s instanceof MouseEvent){let r=t.getBoundingClientRect();this.mouseX=s.clientX-r.left,this.mouseY=s.clientY-r.top,this.buttonDown=!1,this.listeners.map((t=>{t.up&&t.up(this.mouseX,this.mouseY)})),document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",i)}};t.addEventListener("mousedown",(s=>{if(s instanceof MouseEvent){let r=t.getBoundingClientRect();this.mouseX=s.clientX-r.left,this.mouseY=s.clientY-r.top,this.buttonDown=!0,this.listeners.map((t=>{t.down&&t.down(this.mouseX,this.mouseY)})),document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}}),!0),t.addEventListener("mousemove",e,!0),t.addEventListener("mouseup",i,!0),t.addEventListener("wheel",(t=>{t.preventDefault();let e=t.deltaY;t.deltaMode==WheelEvent.DOM_DELTA_LINE&&(e*=8),t.deltaMode==WheelEvent.DOM_DELTA_PAGE&&(e*=24),this.listeners.map((e=>{e.wheel&&e.wheel(t.deltaY)}))}),!0),t.addEventListener("touchstart",(e=>{if(!this.touch0||!this.touch1){let i=e.changedTouches.item(0);if(!i)return;let s=t.getBoundingClientRect(),r=i.clientX-s.left,n=i.clientY-s.top,a=new Gi(i.identifier,r,n);if(this.mouseX=r,this.mouseY=n,this.buttonDown=!0,this.touch0){if(!this.touch1){this.touch1=a;let t=this.touch1.x-this.touch0.x,e=this.touch1.x-this.touch0.x;this.initialPinchDistance=Math.sqrt(t*t+e*e),this.listeners.map((t=>{t.zoom&&t.zoom(this.initialPinchDistance,this.initialPinchDistance)}))}}else this.touch0=a,this.listeners.map((t=>{t.down&&t.down(a.x,a.y)}))}e.preventDefault()}),!1),t.addEventListener("touchmove",(e=>{if(this.touch0){var i=e.changedTouches;let n=t.getBoundingClientRect();for(var s=0;s{i.dragged&&i.dragged(t,e)}))),this.touch1&&this.touch1.identifier===r.identifier&&(this.touch1.x=this.mouseX=t,this.touch1.y=this.mouseY=e)}if(this.touch0&&this.touch1){let t=this.touch1.x-this.touch0.x,e=this.touch1.x-this.touch0.x,i=Math.sqrt(t*t+e*e);this.listeners.map((t=>{t.zoom&&t.zoom(this.initialPinchDistance,i)}))}}e.preventDefault()}),!1);let s=e=>{if(this.touch0){var i=e.changedTouches;let n=t.getBoundingClientRect();for(var s=0;s{i.up&&i.up(t,e)})),!this.touch1){this.buttonDown=!1;break}this.touch0=this.touch1,this.touch1=null,this.mouseX=this.touch0.x,this.mouseX=this.touch0.x,this.buttonDown=!0,this.listeners.map((t=>{t.down&&t.down(this.touch0.x,this.touch0.y)}))}this.touch1&&this.touch1.identifier&&(this.touch1=null)}}e.preventDefault()};t.addEventListener("touchend",s,!1),t.addEventListener("touchcancel",s)}addListener(t){this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>-1&&this.listeners.splice(e,1)}},Gi=class{constructor(t,e,i){this.identifier=t,this.x=e,this.y=i}},ji=class{constructor(t,e){this.canvas=t,this.camera=e;let i=0,s=0,r=0,n=0,a=0,o=0,h=0;new qi(t).addListener({down:(t,l)=>{i=e.position.x,s=e.position.y,r=a=t,n=o=l,h=e.zoom},dragged:(h,l)=>{let c=h-r,u=l-n,d=e.screenToWorld(new Ii(0,0),t.clientWidth,t.clientHeight),f=e.screenToWorld(new Ii(c,u),t.clientWidth,t.clientHeight).sub(d);e.position.set(i-f.x,s-f.y,0),e.update(),a=h,o=l},wheel:i=>{let s=i/200*e.zoom,r=e.zoom+s;if(r>0){let s=0,n=0;if(i<0)s=a,n=o;else{let e=new Ii(t.clientWidth/2+15,t.clientHeight/2),i=a-e.x,r=t.clientHeight-1-o-e.y;s=e.x-i,n=t.clientHeight-1-e.y+r}let h=e.screenToWorld(new Ii(s,n),t.clientWidth,t.clientHeight);e.zoom=r,e.update();let l=e.screenToWorld(new Ii(s,n),t.clientWidth,t.clientHeight);e.position.add(h.sub(l)),e.update()}},zoom:(t,i)=>{let s=t/i;e.zoom=h*s},up:(t,e)=>{a=t,o=e},moved:(t,e)=>{a=t,o=e}})}},Hi=class{constructor(t,e,i){this.vertexShader=e,this.fragmentShader=i,this.vs=null,this.fs=null,this.program=null,this.tmp2x2=new Float32Array(4),this.tmp3x3=new Float32Array(9),this.tmp4x4=new Float32Array(16),this.vsSource=e,this.fsSource=i,this.context=t instanceof vi?t:new vi(t),this.context.addRestorable(this),this.compile()}getProgram(){return this.program}getVertexShader(){return this.vertexShader}getFragmentShader(){return this.fragmentShader}getVertexShaderSource(){return this.vsSource}getFragmentSource(){return this.fsSource}compile(){let t=this.context.gl;try{if(this.vs=this.compileShader(t.VERTEX_SHADER,this.vertexShader),!this.vs)throw new Error("Couldn't compile vertex shader.");if(this.fs=this.compileShader(t.FRAGMENT_SHADER,this.fragmentShader),!this.fs)throw new Error("Couldn#t compile fragment shader.");this.program=this.compileProgram(this.vs,this.fs)}catch(t){throw this.dispose(),t}}compileShader(t,e){let i=this.context.gl,s=i.createShader(t);if(!s)throw new Error("Couldn't create shader.");if(i.shaderSource(s,e),i.compileShader(s),!i.getShaderParameter(s,i.COMPILE_STATUS)){let t="Couldn't compile shader: "+i.getShaderInfoLog(s);if(i.deleteShader(s),!i.isContextLost())throw new Error(t)}return s}compileProgram(t,e){let i=this.context.gl,s=i.createProgram();if(!s)throw new Error("Couldn't compile program.");if(i.attachShader(s,t),i.attachShader(s,e),i.linkProgram(s),!i.getProgramParameter(s,i.LINK_STATUS)){let t="Couldn't compile shader program: "+i.getProgramInfoLog(s);if(i.deleteProgram(s),!i.isContextLost())throw new Error(t)}return s}restore(){this.compile()}bind(){this.context.gl.useProgram(this.program)}unbind(){this.context.gl.useProgram(null)}setUniformi(t,e){this.context.gl.uniform1i(this.getUniformLocation(t),e)}setUniformf(t,e){this.context.gl.uniform1f(this.getUniformLocation(t),e)}setUniform2f(t,e,i){this.context.gl.uniform2f(this.getUniformLocation(t),e,i)}setUniform3f(t,e,i,s){this.context.gl.uniform3f(this.getUniformLocation(t),e,i,s)}setUniform4f(t,e,i,s,r){this.context.gl.uniform4f(this.getUniformLocation(t),e,i,s,r)}setUniform2x2f(t,e){let i=this.context.gl;this.tmp2x2.set(e),i.uniformMatrix2fv(this.getUniformLocation(t),!1,this.tmp2x2)}setUniform3x3f(t,e){let i=this.context.gl;this.tmp3x3.set(e),i.uniformMatrix3fv(this.getUniformLocation(t),!1,this.tmp3x3)}setUniform4x4f(t,e){let i=this.context.gl;this.tmp4x4.set(e),i.uniformMatrix4fv(this.getUniformLocation(t),!1,this.tmp4x4)}getUniformLocation(t){let e=this.context.gl;if(!this.program)throw new Error("Shader not compiled.");let i=e.getUniformLocation(this.program,t);if(!i&&!e.isContextLost())throw new Error(`Couldn't find location for uniform ${t}`);return i}getAttributeLocation(t){let e=this.context.gl;if(!this.program)throw new Error("Shader not compiled.");let i=e.getAttribLocation(this.program,t);if(-1==i&&!e.isContextLost())throw new Error(`Couldn't find location for attribute ${t}`);return i}dispose(){this.context.removeRestorable(this);let t=this.context.gl;this.vs&&(t.deleteShader(this.vs),this.vs=null),this.fs&&(t.deleteShader(this.fs),this.fs=null),this.program&&(t.deleteProgram(this.program),this.program=null)}static newColoredTextured(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tattribute vec2 ${Hi.TEXCOORDS};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = ${Hi.COLOR};\n\t\t\t\t\tv_texCoords = ${Hi.TEXCOORDS};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t")}static newTwoColoredTextured(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tattribute vec4 ${Hi.COLOR2};\n\t\t\t\tattribute vec2 ${Hi.TEXCOORDS};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_light;\n\t\t\t\tvarying vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_light = ${Hi.COLOR};\n\t\t\t\t\tv_dark = ${Hi.COLOR2};\n\t\t\t\t\tv_texCoords = ${Hi.TEXCOORDS};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_light;\n\t\t\t\tvarying LOWP vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tvec4 texColor = texture2D(u_texture, v_texCoords);\n\t\t\t\t\tgl_FragColor.a = texColor.a * v_light.a;\n\t\t\t\t\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n\t\t\t\t}\n\t\t\t")}static newColored(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = ${Hi.COLOR};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t")}},Zi=Hi;Zi.MVP_MATRIX="u_projTrans",Zi.POSITION="a_position",Zi.COLOR="a_color",Zi.COLOR2="a_color2",Zi.TEXCOORDS="a_texCoords",Zi.SAMPLER="u_texture";var Ki=class{constructor(t,e,i,s){this.attributes=e,this.verticesBuffer=null,this.verticesLength=0,this.dirtyVertices=!1,this.indicesBuffer=null,this.indicesLength=0,this.dirtyIndices=!1,this.elementsPerVertex=0,this.context=t instanceof vi?t:new vi(t),this.elementsPerVertex=0;for(let t=0;tthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length}setIndices(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length}draw(t,e){this.drawWithOffset(t,e,0,this.indicesLength>0?this.indicesLength:this.verticesLength/this.elementsPerVertex)}drawWithOffset(t,e,i,s){let r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,s,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,s),this.unbind(t)}bind(t){let e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);let i=0;for(let s=0;s0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)}unbind(t){let e=this.context.gl;for(let i=0;i0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}update(){let t=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=t.createBuffer()),t.bindBuffer(t.ARRAY_BUFFER,this.verticesBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),t.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=t.createBuffer()),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),t.DYNAMIC_DRAW),this.dirtyIndices=!1)}restore(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()}dispose(){this.context.removeRestorable(this);let t=this.context.gl;t.deleteBuffer(this.verticesBuffer),t.deleteBuffer(this.indicesBuffer)}},Ji=class{constructor(t,e,i){this.name=t,this.type=e,this.numElements=i}},Qi=class extends Ji{constructor(){super(Zi.POSITION,ss.Float,2)}},$i=class extends Ji{constructor(){super(Zi.POSITION,ss.Float,3)}},ts=class extends Ji{constructor(t=0){super(Zi.TEXCOORDS+(0==t?"":t),ss.Float,2)}},es=class extends Ji{constructor(){super(Zi.COLOR,ss.Float,4)}},is=class extends Ji{constructor(){super(Zi.COLOR2,ss.Float,4)}},ss=(t=>(t[t.Float=0]="Float",t))(ss||{}),rs=class{constructor(t,e=!0,i=10920){if(this.drawCalls=0,this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,this.cullWasEnabled=!1,i>10920)throw new Error("Can't have more than 10920 triangles per batch: "+i);this.context=t instanceof vi?t:new vi(t);let s=e?[new Qi,new es,new ts,new is]:[new Qi,new es,new ts];this.mesh=new Ki(t,s,i,3*i);let r=this.context.gl;this.srcColorBlend=r.SRC_ALPHA,this.srcAlphaBlend=r.ONE,this.dstBlend=r.ONE_MINUS_SRC_ALPHA}begin(t){if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=t,this.lastTexture=null,this.isDrawing=!0;let e=this.context.gl;e.enable(e.BLEND),e.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend),this.cullWasEnabled=e.isEnabled(e.CULL_FACE),this.cullWasEnabled&&e.disable(e.CULL_FACE)}setBlendMode(t,e,i){if((this.srcColorBlend!=t||this.srcAlphaBlend!=e||this.dstBlend!=i)&&(this.srcColorBlend=t,this.srcAlphaBlend=e,this.dstBlend=i,this.isDrawing)){this.flush(),this.context.gl.blendFuncSeparate(t,i,e,i)}}draw(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.mesh.getVertices().length||this.indicesLength+i.length>this.mesh.getIndices().length)&&this.flush();let s=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);let r=this.mesh.getIndices();for(let t=this.indicesLength,e=0;e0||this.indicesLength>0)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1;let t=this.context.gl;t.disable(t.BLEND),this.cullWasEnabled&&t.enable(t.CULL_FACE)}getDrawCalls(){return this.drawCalls}static getAndResetGlobalDrawCalls(){let t=rs.globalDrawCalls;return rs.globalDrawCalls=0,t}dispose(){this.mesh.dispose()}},ns=rs;ns.globalDrawCalls=0;var as=class{constructor(t,e=10920){if(this.isDrawing=!1,this.shapeType=os.Filled,this.color=new h(1,1,1,1),this.shader=null,this.vertexIndex=0,this.tmp=new w,e>10920)throw new Error("Can't have more than 10920 triangles per batch: "+e);this.context=t instanceof vi?t:new vi(t),this.mesh=new Ki(t,[new Qi,new es],e,0);let i=this.context.gl;this.srcColorBlend=i.SRC_ALPHA,this.srcAlphaBlend=i.ONE,this.dstBlend=i.ONE_MINUS_SRC_ALPHA}begin(t){if(this.isDrawing)throw new Error("ShapeRenderer.begin() has already been called");this.shader=t,this.vertexIndex=0,this.isDrawing=!0;let e=this.context.gl;e.enable(e.BLEND),e.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend)}setBlendMode(t,e,i){if(this.srcColorBlend=t,this.srcAlphaBlend=e,this.dstBlend=i,this.isDrawing){this.flush(),this.context.gl.blendFuncSeparate(t,i,e,i)}}setColor(t){this.color.setFromColor(t)}setColorWith(t,e,i,s){this.color.set(t,e,i,s)}point(t,e,i){this.check(os.Point,1),i||(i=this.color),this.vertex(t,e,i)}line(t,e,i,s,r){this.check(os.Line,2);this.mesh.getVertices(),this.vertexIndex;r||(r=this.color),this.vertex(t,e,r),this.vertex(i,s,r)}triangle(t,e,i,s,r,n,a,o,h,l){this.check(t?os.Filled:os.Line,3);this.mesh.getVertices(),this.vertexIndex;o||(o=this.color),h||(h=this.color),l||(l=this.color),t?(this.vertex(e,i,o),this.vertex(s,r,h),this.vertex(n,a,l)):(this.vertex(e,i,o),this.vertex(s,r,h),this.vertex(s,r,o),this.vertex(n,a,h),this.vertex(n,a,o),this.vertex(e,i,h))}quad(t,e,i,s,r,n,a,o,h,l,c,u,d){this.check(t?os.Filled:os.Line,3);this.mesh.getVertices(),this.vertexIndex;l||(l=this.color),c||(c=this.color),u||(u=this.color),d||(d=this.color),t?(this.vertex(e,i,l),this.vertex(s,r,c),this.vertex(n,a,u),this.vertex(n,a,u),this.vertex(o,h,d),this.vertex(e,i,l)):(this.vertex(e,i,l),this.vertex(s,r,c),this.vertex(s,r,c),this.vertex(n,a,u),this.vertex(n,a,u),this.vertex(o,h,d),this.vertex(o,h,d),this.vertex(e,i,l))}rect(t,e,i,s,r,n){this.quad(t,e,i,e+s,i,e+s,i+r,e,i+r,n,n,n,n)}rectLine(t,e,i,s,r,n,a){this.check(t?os.Filled:os.Line,8),a||(a=this.color);let o=this.tmp.set(r-i,e-s);o.normalize(),n*=.5;let h=o.x*n,l=o.y*n;t?(this.vertex(e+h,i+l,a),this.vertex(e-h,i-l,a),this.vertex(s+h,r+l,a),this.vertex(s-h,r-l,a),this.vertex(s+h,r+l,a),this.vertex(e-h,i-l,a)):(this.vertex(e+h,i+l,a),this.vertex(e-h,i-l,a),this.vertex(s+h,r+l,a),this.vertex(s-h,r-l,a),this.vertex(s+h,r+l,a),this.vertex(e+h,i+l,a),this.vertex(s-h,r-l,a),this.vertex(e-h,i-l,a))}x(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)}polygon(t,e,i,s){if(i<3)throw new Error("Polygon must contain at least 3 vertices");this.check(os.Line,2*i),s||(s=this.color);this.mesh.getVertices(),this.vertexIndex;i<<=1;let r=t[e<<=1],n=t[e+1],a=e+i;for(let o=e,h=e+i-2;o=a?(h=r,l=n):(h=t[o+2],l=t[o+3]),this.vertex(e,i,s),this.vertex(h,l,s)}}circle(t,e,i,s,r,n=0){if(0==n&&(n=Math.max(1,6*c.cbrt(s)|0)),n<=0)throw new Error("segments must be > 0.");r||(r=this.color);let a=2*c.PI/n,o=Math.cos(a),h=Math.sin(a),l=s,u=0;if(t){this.check(os.Filled,3*n+3),n--;for(let t=0;t0;)this.vertex(b,A,l),b+=S,A+=M,S+=I,M+=E,I+=T,E+=k,this.vertex(b,A,l);this.vertex(b,A,l),this.vertex(a,o,l)}vertex(t,e,i){let s=this.vertexIndex,r=this.mesh.getVertices();r[s++]=t,r[s++]=e,r[s++]=i.r,r[s++]=i.g,r[s++]=i.b,r[s++]=i.a,this.vertexIndex=s}end(){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.flush();let t=this.context.gl;t.disable(t.BLEND),this.isDrawing=!1}flush(){if(0!=this.vertexIndex){if(!this.shader)throw new Error("No shader set.");this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0}}check(t,e){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");if(this.shapeType==t){if(!(this.mesh.maxVertices()-this.mesh.numVertices()(t[t.Point=0]="Point",t[t.Line=1]="Line",t[t.Filled=4]="Filled",t))(os||{}),hs=class{constructor(t){this.boneLineColor=new h(1,0,0,1),this.boneOriginColor=new h(0,1,0,1),this.attachmentLineColor=new h(0,0,1,.5),this.triangleLineColor=new h(1,.64,0,.5),this.pathColor=(new h).setFromString("FF7F00"),this.clipColor=new h(.8,0,0,2),this.aabbColor=new h(0,1,0,.5),this.drawBones=!0,this.drawRegionAttachments=!0,this.drawBoundingBoxes=!0,this.drawMeshHull=!0,this.drawMeshTriangles=!0,this.drawPaths=!0,this.drawSkeletonXY=!1,this.drawClipping=!0,this.premultipliedAlpha=!1,this.scale=1,this.boneWidth=2,this.bounds=new ci,this.temp=new Array,this.vertices=m.newFloatArray(2048),this.context=t instanceof vi?t:new vi(t)}draw(t,e,i){let s=e.x,r=e.y,n=this.context.gl,a=this.premultipliedAlpha?n.ONE:n.SRC_ALPHA;t.setBlendMode(a,n.ONE,n.ONE_MINUS_SRC_ALPHA);let o=e.bones;if(this.drawBones){t.setColor(this.boneLineColor);for(let e=0,s=o.length;e-1)continue;if(!s.parent)continue;let r=s.data.length*s.a+s.worldX,n=s.data.length*s.c+s.worldY;t.rectLine(!0,s.worldX,s.worldY,r,n,this.boneWidth*this.scale)}this.drawSkeletonXY&&t.x(s,r,4*this.scale)}if(this.drawRegionAttachments){t.setColor(this.attachmentLineColor);let i=e.slots;for(let e=0,s=i.length;e0){t.setColor(this.attachmentLineColor),h=2*(h>>1);let e=a[h-2],i=a[h-1];for(let s=0,r=h;s-1||t.circle(!0,s.worldX,s.worldY,3*this.scale,this.boneOriginColor,8)}}if(this.drawClipping){let i=e.slots;t.setColor(this.clipColor);for(let e=0,s=i.length;e=0&&i==v.data.index&&(x=!0),!x){h.clipEndWithSlot(v);continue}s>=0&&s==v.data.index&&(x=!1);let y,b=v.getAttachment();if(b instanceof re){let t=b;d.vertices=this.vertices,d.numVertices=4,d.numFloats=w<<2,t.computeWorldVertices(v,d.vertices,0,w),a=us.QUAD_TRIANGLES,n=t.uvs,y=t.region.renderObject.page.texture,o=t.color}else{if(!(b instanceof te)){if(b instanceof Wt){let t=b;h.clipStart(v,t);continue}h.clipEndWithSlot(v);continue}{let t=b;d.vertices=this.vertices,d.numVertices=t.worldVerticesLength>>1,d.numFloats=d.numVertices*w,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=m.newFloatArray(d.numFloats)),t.computeWorldVertices(v,0,t.worldVerticesLength,d.vertices,0,w),a=t.triangles,y=t.region.renderObject.page.texture,n=t.uvs,o=t.color}}if(y){let e=v.color,i=this.tempColor;i.r=p.r*e.r*o.r,i.g=p.g*e.g*o.g,i.b=p.b*e.b*o.b,i.a=p.a*e.a*o.a,l&&(i.r*=i.a,i.g*=i.a,i.b*=i.a);let s=this.tempColor2;v.darkColor?(l?(s.r=v.darkColor.r*i.a,s.g=v.darkColor.g*i.a,s.b=v.darkColor.b*i.a):s.setFromColor(v.darkColor),s.a=l?1:0):s.set(0,0,0,1);let f=v.data.blendMode;if(f!=u&&(u=f,t.setBlendMode(bi.getSourceColorGLBlendMode(u,l),bi.getSourceAlphaGLBlendMode(u),bi.getDestGLBlendMode(u))),h.isClipping()){h.clipTriangles(d.vertices,d.numFloats,a,a.length,n,i,s,c);let e=new Float32Array(h.clippedVertices),o=h.clippedTriangles;r&&r(d.vertices,d.numFloats,g),t.draw(y,e,o)}else{let e=d.vertices;if(c)for(let t=2,r=0,a=d.numFloats;t(t[t.Stretch=0]="Stretch",t[t.Expand=1]="Expand",t[t.Fit=2]="Fit",t))(ys||{}),bs=0,As=163,Ss=class{constructor(t){if(this.logo=null,this.spinner=null,this.angle=0,this.fadeOut=0,this.fadeIn=0,this.timeKeeper=new v,this.backgroundColor=new h(.135,.135,.135,1),this.tempColor=new h,this.renderer=t,this.timeKeeper.maxDelta=9,!ps){let t=navigator.userAgent.indexOf("Safari")>-1,e=()=>bs++;(ps=new Image).src=Is,t||(ps.crossOrigin="anonymous"),ps.onload=e,(fs=new Image).src=Ms,t||(fs.crossOrigin="anonymous"),fs.onload=e}}dispose(){var t,e;null==(t=this.logo)||t.dispose(),null==(e=this.spinner)||e.dispose()}draw(t=!1){if(bs<2||t&&this.fadeOut>1)return;this.timeKeeper.update();let e=Math.abs(Math.sin(this.timeKeeper.totalTime+.25));this.angle-=200*this.timeKeeper.delta*(1+1.5*Math.pow(e,5));let i=this.tempColor,s=this.renderer,r=s.canvas,n=s.context.gl;if(s.resize(1),s.camera.position.set(r.width/2,r.height/2,0),s.batcher.setBlendMode(n.ONE,n.ONE,n.ONE_MINUS_SRC_ALPHA),t){if(this.fadeOut+=this.timeKeeper.delta*(this.timeKeeper.totalTime<1?2:1),this.fadeOut>1)return;i.setFromColor(this.backgroundColor),e=1-this.fadeOut/1,e=1-(e-1)*(e-1),i.a*=e,i.a>0&&(s.camera.zoom=1,s.begin(),s.quad(!0,0,0,r.width,0,r.width,r.height,0,r.height,i,i,i,i),s.end())}else this.fadeIn+=this.timeKeeper.delta,this.backgroundColor.a>0&&(n.clearColor(this.backgroundColor.r,this.backgroundColor.g,this.backgroundColor.b,this.backgroundColor.a),n.clear(n.COLOR_BUFFER_BIT)),e=1;e*=Math.min(this.fadeIn/1,1),i.set(e,e,e,e),this.logo||(this.logo=new Si(s.context,ps),this.spinner=new Si(s.context,fs)),s.camera.zoom=Math.max(1,As/r.height),s.begin(),s.drawTexture(this.logo,(r.width-165)/2,(r.height-108)/2,165,108,i),this.spinner&&s.drawTextureRotated(this.spinner,(r.width-As)/2,(r.height-As)/2,As,As,81.5,81.5,this.angle,i),s.end()}},Ms="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAALKElEQVR42u2de2iW5R/GPzuqcwfnnKfNmafl5tTNHWzqNi3DEMQykcAoJSsySkspjSIk0iD/07Kf4R+FnVBDUTshZGpWUEJaaiWFgZlUFmXmIe3HNXthyebeZ77P9H13ffBG8Y8H7ut7vff93N/7fu4vGGPiFZiez/Qtw9lytJajfzfw9z/j+efPOv7cV8W+lUNY2a8T/ayTCRsWFLJA5rtUO1LLkV5p9LJeJizQiHeqnlOtmVFtdTGrrZkJCxYXsTgaI6r9MY4/UpNItW4mFDaXsTlaM6qVZlBq3UwofFrJp0HMWJ9DvXUzobCznJ1BzFjWlTLrZkJh/TDWBzFjTgo51s2EgnKI0Rrx+FiOWzNzVaym91Syx5qZsGBWb2ZFa0ZN6dbMhAWTcpkUrRmXD2K5NTNhgVbH0Zpxbl/mWjMTFvRIo0e0ZpzcncnWzISKtvmiMWNRJ4qslwmVXRXsas2Ix8ZwzFqZsGFREYtaM+Oaa1ljrUzYkJ9G/ok6TlzKjJWZVFor0y7c1Zu7WjLiqiGsskamXdHopyT4vALmzS9k/t19uHtKHlOSIMn6xAtARjIZ1sFcUSZ0Y4La+G6M18hS2IlCn4a+WoC0JNL0d/dUupdnUj40g6EJ2VEdMnhrOG/p5f/jUXz8SgmvaGU6KpNRNsLVQV0OdXf24s63h/P2gWoOrBjMCr2GJFQnnxnIM3q5P1PPmaYv+4ev4/C6UtbpV2gzXCkgL5W8Bwt48OIc6ul6Tp+s4+SyASxLiI4+PYCn1bHzDZxvaQW6vZzto7MYnQIpNkf7kp5EuozYUroqEjcNKHHd0Tl9mBPN1pk+hFeieGBnBtog7UXjsj9pWg+m6duecw2cay1OC/uxMC47KmP9OIYfoz1YoC20J/rzRG4quTZK2EAyJGs20qwUbYw0aNRmUxtvfUW/uEtNzc1NB1/X8LVyd15hh82F43AvD+VlXcsSJEZa1CQ3ejleAO7oxR3RDP0XN91X4+NXYb8nkv7UNTwV7e0YTdu7I3g33t7tuaEbNwSZpps2fSyvs4M2Tjhot+jb0Xzbltj8r5j/xVt/6Z1Ob93U1ZYO691EhhzchcHeXosVjcNZysyezLw4xRZt05R+fTeuj8vOj+zKyG0j2aZcVVs6v+QalnjrMFZASQYl2nBoSyz06e3j/Xk8rgWYmMvEICu2pm1HOTuc7okV8FgRj0XukwzanhvCc/F+72TjoQjdObN1OFuDLmh0xP+WHtxiI10ukJlCprb4guiv1fP+avZrS1C7NAkliHZjDtZwMMgqbukAltpMlwuMy2FcEBPqvfLLar5Uqi0hBdEwryy+Mv5n6zkbjTBa+dlMlwvUZFETZKGiFM7tvbhdJ3gSVRO0wzIjnxmvl/J6a6JsGMYGrahtpssFeqbR841S3mhN80OjOaSDEdqd6SjaMKgzgzRK7q1ib3PT9sYyNo7JZoyNFNvRcVMZmy7WOvIuryv/Zvdmdt90+nY0bRp3AvROohFwdwW7dTG7RFlbwlqdrbOBYg005NAQmZU0HWt1rXMBH1Xw0dQ8pmqzoaPmdhun7bHZjNVe9qP9eFQfO1VkUmHjhAVUZ1GtnKFSbjrkrPfy4i4UW5t/6ZxM54J0CqxFe81KpGsQyE4h23oYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjLna+bdOy+IiFquIpGq16Pb79cNYv3IIK/X/ugx+Ui6TVKvYVU9Nc8gX8od8Ir/IN/KPfCQ/yVfyl/6/pfJvLChkQdD6wyqntquCXYuKWJSfRr6D0dEAxV3xlw/khyD+kd/ku/88cHo+09tS3LBpO1HHCVUqcIA6CqB4K+6X6x35L/JM2loXurlWmUmlA5XogOIcK8/If5HncrSWo7F6cKIWPjT/RXGOlWfkv8hzaWsN4uaaysE6WIkOKM6x8oz8F3kusXqo2vxC5jtYiQ4ozrH0TeS5qIZcrB7qkrwdA8U5Vp6R/yLPZV8V+2L14Cl5THGwEh1QnGPlGfkv8lyUlIzFQ1cNYVVHrcjZ0VCcFe9Y+Eb+izy3ceclUl43aFN52DXXssYpnY6a4qFS8ZcP2uIf+e7inRh6pdFrdTGrm8uiHx/L8T2V7NGWzvJBLJ/bl7mTuzO5qBNFDoiJID/IF/KHfCK/yDfyT3O7d/KbfNfS80hNIrU0g9L6HOq1x5iTQo6FNpeLfCQ/yVfyl3xmXYwxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHNk9z4JwJ0SqKTdQkbyEwhU393T6V7zzR6pieR3tE1ITeVXImhe6BXDGZFdRbVeank2TBhcaEMr0rwbixj49IBLL2/L/ffmMuNHfqO9tFZjJYBd1ewO3Lx+IcVfKhqna5nHZYR6XFPH+5R3eeI5t9fx/fvjeC9Jdew5OKZKqFR/RDVKL6vL/f9PJafmyvHsL+a/ff24V6NmjZQbGchVbY6UM2BluqHv1rCqzVZ1KQlkZboepCdQvacPsz5bjTfXao+yMEaDt7Wk9tSIMVGig3TejCtJSM2bSpkPjWPqd1S6Zao+lORSYWmgkOjORRNwZqd5ezMSiHLRooNr5XwWjS6/1XHX9vL2T67N7M1iyXa9JCrYjVrS1gbpJyw6hBfsmiNCYT0P9/A+Wj1/6qGr5YNYFlJBiWJogEzezLz/ZG8/9s4fgtSyuvNYbyp1IONFBtu7sHNv4/j9yAxUHWrdaWsG9+N8XHd+YxkMpSy+aySz841cC5oXbmHCnnI74yxAgZ3YbDeB4PEQCOpBpFNZWwa2ZWRcdnxLsl00crtRB0n2lLg8JNRfDKoM4NsolgBSmw/UMADba1+qpmqfyf6x1u/0a/og3I+aEunP6/i86osqmygcGarF4p54dex/Bo0LqfqOfVwIQ/HW5/RSkwV1oN2WLlHTc82TljAwM4M1O5LWwYKZTjibYXNS0N5KcjKTe10PadfLObFuJwK4ozp+UzXDBTUjL+M5ZcBnRkQV53dMIwNQTu6bSTbVEzbi5awuVByd2E/FgaN0Tc1fKOzBHHV2aAdVSdv6s5NNkp7cSH/++xAng2yyHx+CM/H21YhfdPp+0U1X0TbSZnXx8faG9Aop0MS0cToh1p+iLcpOkLj9t/JOk5eqoPHxnDsyf486an5yqCDK7XZ1O4oZ4dWyy3FSXHUAYq47uyYbMZoGmhpG3DlEFb6uNiVBhpyaHhnBO8oJmfqOROJjzIiP43hJ8UxITqqX56S2Hur2KsOnq3nrE6PPNKPRwrSKbAZrjTQNZmuE7oxYXMZmxWbw9dxWFu4W4ezVedOE6qzI7oyYkY+M7TPeWsPbk2UX1qioSN+E3OZqOR2cReKE+qQRFN0Pi7y73g/UawU1KzezJpXwLz5hczX1ueUPKYkNb6GJQZ+j7/aAfRZREsv+quGsMoamXZBW2Gt5eU0alorEzYsKmJRa/m4NdeyxlqZsCGa84DKnVorEzboC7podis69DfIJmwufHMc7famvvmxZiYsKOtKWbRm1OcW1syEBboSJFozLh/EcmtmwgIluaM14/phrLdmJixYXMTiaM24p5I91syEBTphFOR7Y2tmwgJNvUFOr+tov3UzoaAv44KYUatv62ZCoemdhtG0+hzqrZsJBR08DWLG0gxKrZu50qvpxos3U5NItW4mFPp1ot+lPlpq2lYXs9qamVBZUMiC1ox4pJYjvlfStAu6GmTLcLboMtPIV4/6im5fFfuUi9QIap2MiWP+D96R1vPmsD/fAAAAAElFTkSuQmCC",Is="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAABsCAYAAAALzHKmAAAQ7klEQVR42u3da4xdVRUA4D0zd2Y6nZY59DVtZ1puS9+lzC0YAi2UQ8AAQczFpPgA9VIeIQbirRqJ0cBUBVGjDr/QCKSNRSMmpuODxAdxqhgwxkhFjf6Sxh/+UUNVNGJCzR7uTvas7LXX2q9zzp3em6y0gTN3Zu75utZe5+yztxC9V+/Ve5X9En1Vjd7J6SFbLNF7naPw+l2jh7YHMBWssqMHtlsRdim4qsLtIawaPiHEQOLoNrA9iIkQDnRrVA1qD2LZ8ISoxYqKo13sQAtBWBayQWZUAXGRQM9JjCngDVY0UqJNDbQrMcaGmArdUKpIjbYiQLsCZCyIMQBy8QwnilR4Q5AuCpxFYvRFmBLbEiwKwpsSaWycVQGZBKMrwBjA9BhxDe57u2L2hOoKNCbOrgAZitEVYUxoKSMErQvSxYIzCkguRg5EF4AUhqUlhy/YUKSxcRaKsioYOQhD4I0yYxkR3PcJBcuFysmgsXAWBTMJyBCMIQh9kGGxXIXvexCQXbHGAMrBWTbM2CCpMSMLIxehC77lSJwXGth7M0FzoVJIXXDWQnGmhOkL0ic7YhhtWdGGkAuPAjUWGoF4faCmwBkbZmyUqUCyMqMLRA4+E6IsdTjidUHKBYrh9CnpRcH0ypKxsyOGEYNIIeTCOz91OIJ1QYoB5eAMyZo+MFNnyVTZ0YiRC9EGEMOyAgshxErHsL2XK1gOUgwohtM1a5YNM7Rsu4K0ZkcbRm4mpPBRwFZ5hg9eCqkrUB+csWGGogzNkqEgrdnRhpGLkINudaLgwvVB6oqzCjCTZElb2Y4B0gUjBtEG0ARnDRLjjoG9DwcshtQGlIPTljVjwUySLWNkyRCQVHa0ZUUTRAwgF91a33BEy0VKAcVwwqwZC2bqbOlUurllOxQkJzNyINoAYqjWhYYjWg5SCiiG05Q1U8FMjTIoS8YE6YORi1BHtJ4KIcQEEtTXUWAxpK44YVlPBdO1jCdFWTZIE8bVGEYMIRPcZGBw4HKQcoBiOE1ZMzbMgVQwU6JMAdKEEcuIJogUvg1YCCE2gsCO42DlIIVAKZwpYJaSLVNnSU6XjYHUmxhTmXaFaMO3EYkLqMC+FsLlIoVAKZzMrEnBhJeLfLNlKMrYWRIDCbOkFSSVHbHM6AKRC6/ODUewNqQ+OLlZkxpjUmV8MBbMUJSxyzY3Q1IgTRgxiBRCHdem0KDAUkBh9sRwwjEnAXMMgTnKhFlUtiwkS5rGka4g9SaGgxFmRC7AzTCEEBcyA36dDSsXqAtOLkysjGMwY5XxVChjZ0kuSCo7YlkRQsQQYtDEFsegsLoCxUp7Kpgps2UslFGzJGccSYHUmxhOZqwzEZqAbfUMCisHKIZzgsCpl3MTzMwTpi1bYp2477gyFKUxS7qWbdjY2EBS2dGE0QQRA7gNCyHEdhjE8RhUDlBT9tzgmjWZMFNlSy+Urk1OzCyJlW0XkK4YOQh1cDtcgwBrQmoDWkdgboBZE8mYsJSHlnFbJ+5bwmOPJ7lZkirbC8aRsMvmgtTHjBhGE0QbwJ2egUE1ITVlUC5OmDVdYNrKuN70xM6WoShjlW4464dbtiFIWK6x7GjESEHUUe0iYncnbMdQSE0Z1ITTNOb0hRmjjLtmS9dmJ2rp1jtuKktyyrb6YLEMCUHq2dGG0QQRQ7f72kzc+cJecerne8Wvv7JNPHPvenEkz8Sh3UtFc92QyGt9Yko/HgOLAIUZlItTz5ouMF3KuE+2jFLCQ1D6lm6fLMkBacuOJowYRBUXyfjuHjF3NhdnsfjvAfH6E9vFt9XxKgikEKgJZyyYalzOLeMu2bLbULI6bh+QGwmQ+rgRlumdGEQAao+K56bEL2woVUwOiev0r8OAUjiJrMmFCbvykGxZRAmPitK1dHM7bohyMsuyi/I8f0+e57fJYIKEZXpXo9E4mOf5XTKyLLvCBLETF8uY2SKepkC+dpX4T02Ivepr4HvZcOZ5fmee54fyPL+DmTUhzAs6n4n8bN5dr9f3YdkSg8nsxG0lPBVKVpNjG0/aGhzfLDmRZdnumZmZp8+c+cdZPV555fSr7Xb7s0jJ3i5Pcue4MxKkPPkvvXTqz/B92u32l0wYOzG1fkhcd/py8Rcbyq/vFM/KY1WA95h/3zzP71bfU6JsNpsfgj+P/FlbrdaDGExYyuXvLz8H+DudODH700ajcSM3W6Yu4alQ1spCOTd38jcKocTZbh9+9NixY99XJ8AEUkcpo9W64yH197m5k7+bnZ19QT+J09NHntQhwji/Jg58qi6++ofLxJ8gSFneVw2Ka4QQDfh1Ok4dZavVmtZ/nrm5k7/Vf55O1tRhboUw5+ZOvqyOl5+R/FyOHj32PYVU/tloNG5IXcKrhJIzngwp3fNjomazea/64BuNxts646f50lWv169utw9/DmtqdJQyZFaSJVuV6nq9fqMEof5/vV6/CYBqgJDlee+yAbF/+4i4ZWqZeNfaIfHWzn+Hx0KcEuU9+s8jv3ej0bhVlXOZydX/k0iRMeb8P0D5e6tj8zy/Xb9UJIc56h/yqVOnXul8lmuZ2bJslKmbHG7XrbpCmCXFRLvdfqQD6jTS3Jiy5I4OykM6ADV+1Eu1DmV6evopBORexzDi1L+X/HnGxsb2w3Hm9PSRJ9QxWPOTZdmlKht2hi+w6dkox5bqffI8fye3hDteGqKaHVsHXihKl0tB+h0cY+lute54AGRKDCW89LNTRynHb7ChUWVVjetOnJh9EYBUyPZeNCoOtsbFQwdXi4/esELcd+tq8cCHJ8UXp+viy9efLz7AgamjlKXc1AA1m83DoIRDlFubzeb96hhZLVTlgJ24gttutx+ONa50bHZKRenaeTs1OfpAfnr6yOOdE7EZdNwmlKocntXLNkA5JTGq47Ds+Lf94lWsyfnXleLfnIwJUN4DOnNYwuUxh2A3Ln9XULrfK8t3J27Tu3BVwiOjXJqoAy8UZej1yclGo3GTLN+gu3w+z/P3YaWbQqk3Ne12e4ZC+c8rxWsYytcPiP9RpZxCqWDKnxOiBNlyAUpOnGsoh4tA2Rm8X9xqtT6md5wyZmYe+0YRKL+1S/wYQ3n8zctBl5SBUv5djivfjMOPduIzcizeiYfr9foVvUwZG+XCuzibZKnSceZ5/v4QlKp8y7ElhnJlTeTP7BI/kllRYfzrfvHqFy4UX1vaL/aVlSmROzwbwdS29T2UcEwZF+V8ozM2lu1VY812u/15akypGh3TmFJesJbHHD167IdUxz3YJy5bNySuX1mbvy55CbMLtzU6tjGlsdFptVqfUMc0Go23F4wy1l2dSnbfvpMwVPe9WWVLDsrOJaF9MFu2Wq1PqmNkGce67xiXhTjdNwdlvV6/BgxfbPfBfVCetxi6b9/rlCup65QzM48dl2OjLMv26CibzeZ96sTIzEFdpwQXz9U1yrtVlpR/Zll2Fec65Y6l4pbbx8XHH9kknvzJlPjlHy8Tp29eKT5ou0aJoIT3w3dBlLDzVpfAJEZ1XOdaJZxnOSlvPMjPzxFljIvng914RwebsjYO7uhMyHu46sOfnf3Oz2TXDW6vvYxdFoIXz3Wc8J5zs9n8iOn2IrxTc2BM3Glqdp7dI553uaOjxrhwcob+MyuUpjs6WZZdon8OcigjPx8V+u+GTWFTSWEx3WYcdJ225jNDSE4q0GHCzlueHOyujn6bUWYgeb9ZZUaQPe+GzQ+Gc8+oOGhC+c1d4gfI16n3XDAhQ7+9qE9l01E2Go132GYKyXE1NiFDTcpoNpv3LOYJGWXNErJNW9sEp63p2RKiVPMn1bS1DgxsyhoGdGpmizj+xtXiDYnx7/vFmce3iWdW1cTVGEY4hQ2ZW0nNq8Qm/M6XbXm3S100lwGedFybuvNOibLI+ZS2ceU4eAxiEuvCkfmU8ycToDxETe6FgCBQHeqyAbFvfEhcO7BwDuXFCEbTZF840XeHK0jYcbs2OIGle0mVJ/mmnClEPQqxyTY5I8/zFhif7fSZee4bnrPOU4AssnRXHaVTCTd14dRDY3UbTIiSeFhsN/aMjgnqthFx880rxX3yATL5p3y4LPXzOaBkUyBjZMlYpbtQlIOBD475ZEusjMNSvkXe6VEoJVDkeZ2dzIfIFsRzU+JF2OyM9M9fTC/6SUYOyFQPjQ2nWiUjxnPfw5EeHqMWIqAeIFsAU847lJM2JM6xsewt1OIDLs99P7ZFHNdB/upS8XtPiD7PfLuCXJNolYyyFiNI/Zit65ItrOVafFbHcFohY7hPTN21Tjz4uc3iqfsnxKdX1MTl1OoYRFaMsToGB6Trw2JFP/OdZC2hJZ7ZkrMoAbbSGmelDJ91hFKuJeS7jlBMkJnrAqqJlgMUZS/dArPlGHNdSg5M3xXXtvquuEatvIYtDRhpxbUJuIgqsU5lGWtUploK0KuEU9mSW8YpmFQ556xNuYW7NiW13B+FkMiKHIy+C6eGgBxJvMR0oSv5hi6+z4HJyZoU0M2RVvDlrOQbcxVfX5AhZbuqy0v7ZstYMLHlAVlLTF9ALLbvu9Y5Zylpn/XOsd0ibIvxr2KCLHpp6SCUIdnSZSF+WzfOhem6GD+1KwR3Z4jNjrtDpNoZwmWd8yrupZN6Hx3fbMmFSe0Swdq2ZIPjxk1112Duo8OBGLrBkw/IoncdK2XHsdC9dHz204m50xh3tzFq1zFqtzHXrfCw7OgDsqyNnZLszVijsmXgrmNcmGtS78lIoMX2aJz03fKO2sDJddPQSCDPiQ1DfWBycY6XtXstc2PQKuxgG2McmXTPb9/9vmuJYXKyJrWjbeg+3xPM4O73nWqvbyw7xgZZSJbEUBa157cNJjdr2vb+5iA1YV3HxYscj30PDCEHIgcjtfm8K8hSsmRotkwFk5s1TTghUAopB6xrjHMBBkI0YYTZ0dZlxwLpkiWDULpmy5gwqayZgZNkA7oKQQCxctByYg0XIIEQQuRitGVHblMTA2ShKGPDpC6wu+DEgJqg2rDGDBtAF4Q6RAojp1xXGmSMbImVcR+YWNY04eQCtUG1ofUJ2/uvcETIgUhhdAE5GAlkKShjwHTNmhhODKgJqQ2sC14uOgyfD0IbRF+MlQaZAiZWyn2yJsTJATqGnHQO2Jhh+xlsACFCG0QbRtdyzQFZCZSxYPpmTS7Q5cjJHYNBYIkZpu99HoUQ/o4QIYSIZUZfjJ4ZMjZI32wZBDMU5yhy8pZTULl4XYP5fagMyEVoy4oupTpGduwnkloSlKEwY+AcQU4MhRTD6ovXBRwFzwWgCSEF0QVjJUGmgEllTS5OLlCIlIN1mS9mx/cZ5eLDALpCTI2RAhkTZQqYoTgpoCPECbaBHQ2ETL3PUl98ECAXYijG0OyYAmQoTG7W5ODkAF1CnVgm2JQx4okPA+gCMTbGskBGgRmaOblAh5GTORIrfKFx4VH4EIAxIXIxlg2SBbMvECY3e7oApbDaIgQu5/2HmeEKEINYiwSRi7EQkLFgumZOCuggctKGI4ULZN/vMeSLj0AYMytWEqMLzFg4fYDaoKaC6wvOFR4FkIPQFaILxrJAOsHsc/zlfYDWXE8qF22s8Pz5KHxcgEVALBtjJXBSSEOwFhk1Zgy4hitCT4hVw+gFs8/zwxqIBbUgyK7fcyA0PD9XX4iVxhiC0xdof6STWCsoBmKF7+cVCWFXQYyBMxRpf+STX1b0x45AhN0OMSrOGEirhrY/dfQAdjvS7oy+WCF6r1RIFxXWvlTRg1YVqFWBmxZbD99ig9pt0YPQw9rD1nstVri9V+/Ve3XrS/wfim4P5fIFxLoAAAAASUVORK5CYII=",Es=class{constructor(t,e){this.time=new v,e.pathPrefix||(e.pathPrefix=""),e.app||(e.app={loadAssets:()=>{},initialize:()=>{},update:()=>{},render:()=>{},error:()=>{}}),e.webglConfig&&(e.webglConfig={alpha:!0}),this.htmlCanvas=t,this.context=new vi(t,e.webglConfig),this.renderer=new vs(t,this.context),this.gl=this.context.gl,this.assetManager=new Mi(this.context,e.pathPrefix),this.input=new qi(t),e.app.loadAssets&&e.app.loadAssets(this);let i=()=>{requestAnimationFrame(i),this.time.update(),e.app.update&&e.app.update(this,this.time.delta),e.app.render&&e.app.render(this)},s=()=>{this.assetManager.isLoadingComplete()?this.assetManager.hasErrors()?e.app.error&&e.app.error(this,this.assetManager.getErrors()):(e.app.initialize&&e.app.initialize(this),i()):requestAnimationFrame(s)};requestAnimationFrame(s)}clear(t,e,i,s){this.gl.clearColor(t,e,i,s),this.gl.clear(this.gl.COLOR_BUFFER_BIT)}};return ms=r,((r,n,a,o)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let h of i(n))s.call(r,h)||h===a||t(r,h,{get:()=>n[h],enumerable:!(o=e(n,h))||o.enumerable});return r})(t({},"__esModule",{value:!0}),ms)})();t.exports=e}).call(window)},3524:(t,e,i)=>{var s=i(7473),r=i(4597),n=i(6732),a=i(2482),o=i(704),h=i(3137),l=i(1192),c=new s({Extends:h,initialize:function(t,e,i,s,n,c,u){var d,f,p,m=[],g=t.cacheManager.custom.spine;if(a(e)){var x=e;for(e=r(x,"key"),f=new o(t,{key:e,url:r(x,"jsonURL"),extension:r(x,"jsonExtension","json"),xhrSettings:r(x,"jsonXhrSettings")}),s=r(x,"atlasURL"),n=r(x,"preMultipliedAlpha"),Array.isArray(s)||(s=[s]),d=0;d{var s=i(2494),r=i(7473),n=i(5851),a=i(3527),o=i(5722),h={canvas:i(5159),webgl:i(7518)},l=i(3524),c=i(8332),u=i(5782),d=i(1984),f=new r({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:d,postRender:d,render:d,destroy:d});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,s,r,n){var a=this.scene.sys[i],o=new c(this.scene,a,t,e,s,r,n);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var r=n(t,"key",null),a=n(t,"animationName",null),o=n(t,"loop",!1),h=this.scene.sys[i],l=new c(this.scene,h,0,0,r,a,o);void 0!==e&&(t.add=e),s(this.scene,l,t);var u=n(t,"skinName",!1);u&&l.setSkinByName(u);var d=n(t,"slotName",!1),f=n(t,"attachmentName",null);return d&&l.setAttachment(d,f),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,s){var r=this.scene.sys[i],n=new u(this.scene,r,t,e,s);return this.displayList.add(n),n}),(function(t,e){void 0===t&&(t={});var r=n(t,"x",0),a=n(t,"y",0),o=n(t,"children",null),h=this.scene.sys[i],l=new u(this.scene,h,r,a,o);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(a,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=this.renderer.spineSceneRenderer;t||(t=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0),this.renderer.spineSceneRenderer=t),this.sceneRenderer=t,this.skeletonRenderer=t.skeletonRenderer,this.skeletonDebugRenderer=t.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures;i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures,n=this.sceneRenderer.context.gl;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(n,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,s,r,n,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h{var s=i(7473),r=i(7361),n=i(7738),a=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n){r.call(this,t,i,s,n),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},8064:t=>{t.exports=function(t,e,i,s){var r=e.list;if(0!==r.length){i.addToRenderList(e);var n=e.localTransform;s?(n.loadIdentity(),n.multiply(s),n.translate(e.x,e.y),n.rotate(e.rotation),n.scale(e.scaleX,e.scaleY)):n.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c{var s=i(1984),r=i(1984);s=i(434),r=i(8064),t.exports={renderWebGL:s,renderCanvas:r}},434:t=>{t.exports=function(t,e,i,s){var r=e.plugin.sceneRenderer,n=e.list;if(0!==n.length){i.addToRenderList(e);var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.newType&&(t.pipelines.clear(),r.begin());var o=t.nextTypeMatch;t.nextTypeMatch=!0,t.newType=!1;for(var h=0;h{t.exports="complete"},8621:t=>{t.exports="dispose"},8944:t=>{t.exports="end"},7494:t=>{t.exports="event"},1908:t=>{t.exports="interrupted"},5591:t=>{t.exports="start"},5146:(t,e,i)=>{t.exports={COMPLETE:i(6576),DISPOSE:i(8621),END:i(8944),EVENT:i(7494),INTERRUPTED:i(1908),START:i(5591)}},8332:(t,e,i)=>{var s=i(6412),r=i(2915),n=i(7473),a=i(1991),o=i(3131),h=i(9660),l=i(4627),c=i(3212),u=i(8414),d=i(3426),f=i(7149),p=i(2273),m=i(4208),g=i(5146),x=i(2762),w=new n({Extends:p,Mixins:[a,o,h,l,c,u,x],initialize:function(t,e,i,s,r,n,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,s),r&&this.setSkeleton(r,n,a)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var s=this.plugin,r=s.sceneRenderer;s.gl&&r.batcher.isDrawing&&(r.end(),s.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,s=(t>>8&255)/255,r=(255&t)/255,n=t>16777215?(t>>>24)/255:null,a=this.skeleton;if(e){var o=this.findSlot(e);o&&(a=o)}return a.color.r=i,a.color.g=s,a.color.b=r,null!==n&&(a.color.a=n),this},setSkeletonFromJSON:function(t,e,i,s){return this.setSkeleton(t,e,i,s)},setSkeleton:function(t,e,i,s){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,s);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var n=r.skeleton;return n.setSkin(),n.setToSetupPose(),this.skeleton=n,r=this.plugin.createAnimationState(n),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(d(this.rotation))+90),this.state.apply(n),n.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=m(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,s){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===s&&(s=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-s,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,s=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=i,t.scaleY=s,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i{var s=i(3426),r=i(4208),n=i(8445);t.exports=function(t,e,i,a){var o=t.currentContext,h=e.plugin,l=e.skeleton,c=h.skeletonRenderer,u=t._tempMatrix1,d=t._tempMatrix2,f=t._tempMatrix3;i.addToRenderList(e),d.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),u.copyFrom(i.matrix),a?(u.multiplyWithOffset(a,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),d.e=e.x,d.f=e.y,u.multiply(d,f)):(d.e-=i.scrollX*e.scrollFactorX,d.f-=i.scrollY*e.scrollFactorY,u.multiply(d,f)),l.x=f.tx,l.y=f.ty,l.scaleX=f.scaleX,l.scaleY=-1*f.scaleY,e.scaleX<0?(l.scaleX*=-1,e.root.rotation=r(f.rotationNormalized)):e.root.rotation=n(r(s(f.rotationNormalized))+90,0,360),e.scaleY<0&&(l.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*r(f.rotationNormalized):e.root.rotation+=2*r(f.rotationNormalized)),i.renderToTexture&&(l.y=f.ty,l.scaleY*=-1),l.updateWorldTransform(),c.ctx=o,c.debugRendering=h.drawDebug||e.drawDebug,o.save(),c.draw(l),o.restore()}},2762:(t,e,i)=>{var s=i(1984),r=i(1984),n=i(1984);s=i(4290),n=i(780),r=i(2753),t.exports={renderWebGL:s,renderCanvas:r,renderDirect:n}},780:(t,e,i)=>{var s=i(2915),r=i(3426),n=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var c=e.plugin,u=e.skeleton,d=c.sceneRenderer;t.pipelines.clear(),d.begin();var f=e.scrollFactorX,p=e.scrollFactorY,m=u.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,u.color.a=s(m*l.alpha,0,1)),i.addToRenderList(e);var g=n(e,i,h).calc,x=t.height;if(u.x=g.tx,u.y=x-g.ty,u.scaleX=g.scaleX,u.scaleY=g.scaleY,e.scaleX<0?(u.scaleX*=-1,e.root.rotation=o(a(g.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(u.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(g.rotationNormalized):e.root.rotation+=2*a(g.rotationNormalized)),u.updateWorldTransform(),d.drawSkeleton(u,e.preMultipliedAlpha),l&&(e.scrollFactorX=f,e.scrollFactorY=p,u.color.a=m),c.drawDebug||e.drawDebug){var w=u.x,v=u.y;u.x=0,u.y=0,d.drawSkeletonDebug(u,e.preMultipliedAlpha),u.x=w,u.y=v}d.end(),t.pipelines.rebind()}},4290:(t,e,i)=>{var s=i(2915),r=i(3426),n=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var c=e.plugin,u=e.skeleton,d=c.sceneRenderer;t.newType&&(t.pipelines.clear(),d.begin());var f=e.scrollFactorX,p=e.scrollFactorY,m=u.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,u.color.a=s(m*l.alpha,0,1)),i.addToRenderList(e);var g=n(e,i,h).calc,x=t.height;if(u.x=g.tx,u.y=x-g.ty,u.scaleX=g.scaleX,u.scaleY=g.scaleY,e.scaleX<0?(u.scaleX*=-1,e.root.rotation=o(a(g.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(g.rotationNormalized))+90,0,360),e.scaleY<0&&(u.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(g.rotationNormalized):e.root.rotation+=2*a(g.rotationNormalized)),u.updateWorldTransform(),d.drawSkeleton(u,e.preMultipliedAlpha),l&&(e.scrollFactorX=f,e.scrollFactorY=p,u.color.a=m),c.drawDebug||e.drawDebug){var w=u.x,v=u.y;u.x=0,u.y=0,d.drawSkeletonDebug(u,e.preMultipliedAlpha),u.x=w,u.y=v}t.nextTypeMatch||(d.end(),t.pipelines.rebind())}},9454:(t,e,i)=>{var s={VERSION:"3.70.0",BlendModes:i(8351),ScaleModes:i(8196),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},1081:(t,e,i)=>{var s=i(7473),r=i(6748),n=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{t.exports="changedata"},7801:t=>{t.exports="changedata-"},4873:t=>{t.exports="destroy"},9966:t=>{t.exports="removedata"},4586:t=>{t.exports="setdata"},6748:(t,e,i)=>{t.exports={CHANGE_DATA:i(9044),CHANGE_DATA_KEY:i(7801),DESTROY:i(4873),REMOVE_DATA:i(9966),SET_DATA:i(4586)}},3004:(t,e,i)=>{var s=i(2776),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(r.ogg=i('ogg; codecs="vorbis"'),r.opus=i('ogg; codecs="opus"',"opus"),r.mp3=i("mpeg"),r.wav=i("wav"),r.m4a=i("x-m4a"),r.aac=i("aac"),r.flac=i("flac","x-flac"),r.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)r.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var n=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===n&&a>=11||n>10)&&(r.dolby=!0)}}}catch(t){}return r}()},2776:(t,e,i)=>{var s,r=i(5203),n={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edg\/\d+/.test(s)?(n.edge=!0,n.es2019=!0):/OPR/.test(s)?(n.opera=!0,n.es2019=!0):/Chrome\/(\d+)/.test(s)&&!r.windowsPhone?(n.chrome=!0,n.chromeVersion=parseInt(RegExp.$1,10),n.es2019=n.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(n.firefox=!0,n.firefoxVersion=parseInt(RegExp.$1,10),n.es2019=n.firefoxVersion>10):/AppleWebKit/.test(s)&&r.iOS?(n.mobileSafari=!0,n.es2019=!0):/MSIE (\d+\.\d+);/.test(s)?(n.ie=!0,n.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(s)&&!r.windowsPhone?(n.safari=!0,n.safariVersion=parseInt(RegExp.$1,10),n.es2019=n.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(n.ie=!0,n.trident=!0,n.tridentVersion=parseInt(RegExp.$1,10),n.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(n.silk=!0),n)},6505:(t,e,i)=>{var s,r,n,a=i(8073),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(n=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(n,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+r},n.src=s+"AP804Oa6"+r,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return a.remove(this),s}()),o)},6543:(t,e,i)=>{var s=i(5203),r=i(2776),n=i(8073),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=n.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=n.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=s.data instanceof Uint8ClampedArray,n.remove(t),n.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(a.getUserMedia=!1),!s.iOS&&(r.ie||r.firefox||r.chrome)&&(a.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},3922:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",r=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(2776),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},5203:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},2131:(t,e,i)=>{var s=i(4597),r={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};t.exports=function(){if("function"==typeof importScripts)return r;var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(r.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(r.h264=!0,r.mp4=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(r.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(r.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(r.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,"")&&(r.hls=!0))}catch(t){}return t.parentNode&&t.parentNode.removeChild(t),r.getVideoURL=function(t){Array.isArray(t)||(t=[t]);for(var e=0;e{t.exports={os:i(5203),browser:i(2776),features:i(6543),input:i(1454),audio:i(3004),video:i(2131),fullscreen:i(3922),canvasFeatures:i(6505)}},5686:(t,e,i)=>{var s=i(7473),r=new Float32Array(20),n=new s({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(t){return this._matrix.set(t),this._dirty=!0,this},reset:function(){var t=this._matrix;return t.fill(0),t[0]=1,t[6]=1,t[12]=1,t[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var t=this._data;return this._dirty&&(t.set(this._matrix),t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._dirty=!1),t},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),r=.213,n=.715,a=.072;return this.multiply([r+.787*i+s*-r,n+i*-n+s*-n,a+i*-a+.928*s,0,0,r+i*-r+.143*s,n+i*(1-n)+.14*s,a+i*-a+-.283*s,0,0,r+i*-r+-.787*s,n+i*-n+s*n,a+.928*i+s*a,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply(n.BLACK_WHITE,t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply(n.NEGATIVE,t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply(n.DESATURATE_LUMINANCE,t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply(n.SEPIA,t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply(n.LSD,t)},brown:function(t){return void 0===t&&(t=!1),this.multiply(n.BROWN,t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply(n.VINTAGE,t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply(n.KODACHROME,t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply(n.TECHNICOLOR,t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply(n.POLAROID,t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply(n.SHIFT_BGR,t)},multiply:function(t,e){void 0===e&&(e=!1),e||this.reset();var i=this._matrix,s=r;return s.set(i),i.set([s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19]]),this._dirty=!0,this}});n.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],n.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],n.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],n.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],n.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],n.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],n.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],n.KODACHROME=[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],n.TECHNICOLOR=[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],n.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],n.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t.exports=n},8073:(t,e,i)=>{var s,r,n,a=i(9454),o=i(2150),h=[],l=!1;t.exports=(n=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,a.CANVAS)},create:s=function(t,e,i,s,n){var c;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=a.CANVAS),void 0===n&&(n=!1);var u=r(s);return null===u?(u={parent:t,canvas:document.createElement("canvas"),type:s},s===a.CANVAS&&h.push(u),c=u.canvas):(u.parent=t,c=u.canvas),n&&(u.parent=c),c.width=e,c.height=i,l&&s===a.CANVAS&&o.disable(c.getContext("2d",{willReadFrequently:!1})),c},createWebGL:function(t,e,i){return s(t,e,i,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{var s=i(7473),r=i(3649),n=new s({initialize:function(t,e,i,s,r,n){e||(e=t.sys.make.image({x:i,y:s,key:r,frame:n,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,i,s,r){return new n(this.scene,t,e,i,s,r)})),t.exports=n},6726:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,r=this.geometryMask,n=t.maskCount,a=255;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,n,a),s.stencilOp(s.KEEP,s.KEEP,s.INCR),n++):(s.stencilFunc(s.EQUAL,n+1,a),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),this.level=n,r.renderWebGL(t,r,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),this.invertAlpha?s.stencilFunc(s.NOTEQUAL,n,a):s.stencilFunc(s.EQUAL,n,a)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},7340:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.BARREL,t),this.amount=e}});t.exports=a},5170:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===i&&(i=1),void 0===s&&(s=1),void 0===a&&(a=1),void 0===o&&(o=1),void 0===h&&(h=4),r.call(this,n.BLOOM,t),this.steps=h,this.offsetX=i,this.offsetY=s,this.blurStrength=a,this.strength=o,this.glcolor=[1,1,1],null!=e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},4199:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===e&&(e=0),void 0===i&&(i=2),void 0===s&&(s=2),void 0===a&&(a=1),void 0===h&&(h=4),r.call(this,n.BLUR,t),this.quality=e,this.x=i,this.y=s,this.steps=h,this.strength=a,this.glcolor=[1,1,1],null!=o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},3132:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=.5),void 0===i&&(i=1),void 0===s&&(s=.2),void 0===a&&(a=!1),void 0===o&&(o=1),void 0===h&&(h=1),void 0===l&&(l=1),r.call(this,n.BOKEH,t),this.radius=e,this.amount=i,this.contrast=s,this.isTiltShift=a,this.strength=l,this.blurX=o,this.blurY=h}});t.exports=a},6610:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o){void 0===e&&(e=8),void 0===a&&(a=1),void 0===o&&(o=.005),r.call(this,n.CIRCLE,t),this.scale=a,this.feather=o,this.thickness=e,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=i&&(this.color=i),null!=s&&(this.backgroundColor=s)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundColor:{get:function(){var t=this.glcolor2;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor2;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(t){this.glcolor2[3]=t}}});t.exports=a},4931:(t,e,i)=>{var s=i(7473),r=i(5686),n=i(1571),a=new s({Extends:r,initialize:function(t){r.call(this),this.type=n.COLOR_MATRIX,this.gameObject=t,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});t.exports=a},6128:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.type=t,this.gameObject=e,this.active=!0},setActive:function(t){return this.active=t,this},destroy:function(){this.gameObject=null,this.active=!1}});t.exports=s},9195:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s){void 0===e&&(e="__WHITE"),void 0===i&&(i=.005),void 0===s&&(s=.005),r.call(this,n.DISPLACEMENT,t),this.x=i,this.y=s,this.glTexture,this.setTexture(e)},setTexture:function(t){var e=this.gameObject.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this}});t.exports=a},445:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===i&&(i=4),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.GLOW,t),this.outerStrength=i,this.innerStrength=s,this.knockout=a,this.glcolor=[1,1,1,1],void 0!==e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},7724:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l,c){void 0===s&&(s=.2),void 0===a&&(a=0),void 0===o&&(o=0),void 0===h&&(h=0),void 0===l&&(l=1),void 0===c&&(c=0),r.call(this,n.GRADIENT,t),this.alpha=s,this.size=c,this.fromX=a,this.fromY=o,this.toX=h,this.toY=l,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=e&&(this.color1=e),null!=i&&(this.color2=i)},color1:{get:function(){var t=this.glcolor1;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor1;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}},color2:{get:function(){var t=this.glcolor2;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor2;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}}});t.exports=a},4412:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.PIXELATE,t),this.amount=e}});t.exports=a},75:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.1),void 0===a&&(a=1),void 0===h&&(h=6),void 0===l&&(l=1),r.call(this,n.SHADOW,t),this.x=e,this.y=i,this.decay=s,this.power=a,this.glcolor=[0,0,0,1],this.samples=h,this.intensity=l,void 0!==o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},8734:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=3),void 0===a&&(a=!1),r.call(this,n.SHINE,t),this.speed=e,this.lineWidth=i,this.gradient=s,this.reveal=a}});t.exports=a},2437:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=.5),void 0===a&&(a=.5),r.call(this,n.VIGNETTE,t),this.x=e,this.y=i,this.radius=s,this.strength=a}});t.exports=a},5984:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.WIPE,t),this.progress=0,this.wipeWidth=e,this.direction=i,this.axis=s,this.reveal=a}});t.exports=a},1571:t=>{t.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},7347:(t,e,i)=>{var s=i(1030),r=i(1571),n={Barrel:i(7340),Controller:i(6128),Bloom:i(5170),Blur:i(4199),Bokeh:i(3132),Circle:i(6610),ColorMatrix:i(4931),Displacement:i(9195),Glow:i(445),Gradient:i(7724),Pixelate:i(4412),Shadow:i(75),Shine:i(8734),Vignette:i(2437),Wipe:i(5984)};n=s(!1,n,r),t.exports=n},2494:(t,e,i)=>{var s=i(8351),r=i(8361);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var n=r(i,"scale",null);"number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=r(n,"x",1),e.scaleY=r(n,"y",1));var a=r(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(i,"rotation",0);var o=r(i,"angle",null);null!==o&&(e.angle=o),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),c=r(h,"y",.5);e.setOrigin(l,c)}return e.blendMode=r(i,"blendMode",s.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},2273:(t,e,i)=>{var s=i(7473),r=i(6125),n=i(1081),a=i(4399),o=i(3389),h=i(204),l=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(t,e){return this.data||(this.data=new n(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new n(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new n(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new n(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},3649:(t,e,i)=>{var s=i(7473),r=i(8456),n=i(204),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(n.DESTROY,this.destroy,this)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},r.register("GameObjectFactory",a,"add"),t.exports=a},2208:(t,e,i)=>{var s=i(4227),r=new s,n=new s,a=new s,o={camera:r,sprite:n,calc:a};t.exports=function(t,e,i){var s=r,h=n,l=a;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),o}},4344:(t,e,i)=>{var s=i(2915),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},4518:(t,e,i)=>{var s=i(2915),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},5173:(t,e,i)=>{var s=i(8351),r={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},1991:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},8305:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},3131:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},1626:(t,e,i)=>{var s=i(7473),r=i(7347),n=i(8935),a=new s({initialize:function(t,e){this.gameObject=t,this.isPost=e,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(t){return void 0===t&&(t=0),this.padding=t,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(t){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,void 0!==t&&(this.padding=t),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var t=this.list,e=0;e{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},3671:(t,e,i)=>{var s=i(1392),r=i(9876),n=i(2529),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t,e){return void 0===t&&(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getTopLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,n,a,o,h,l;if(void 0===t&&(t=new s),this.parentContainer){var c=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),c.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),c.transformPoint(t.x,t.y,t),r=t.x,n=t.y,this.getBottomLeft(t),c.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),c.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,n=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(i,n,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(i,n,o,l)-t.y,t}};t.exports=a},2246:(t,e,i)=>{var s=i(7499),r=i(6726),n={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,r,n){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,r,n)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=n},5085:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},77:(t,e,i)=>{var s=i(7149),r=i(1864),n=i(5851),a=i(3747),o=i(2529),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=n(t,"from",0),t.to=n(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=n(t,"rotationOffset",0);var l=n(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var c=this.path.getPoint(.1);this.rotation=Math.atan2(c.y-this.y,c.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t&&t.data){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var n=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-n,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},986:(t,e,i)=>{var s=i(3911),r={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(t){this.pipelineData={};var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){var a=n.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?s(e):e)}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},resetPipeline:function(t){return void 0===t&&(t=!1),this.pipeline=this.defaultPipeline,t&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=r},4461:(t,e,i)=>{var s=i(3911),r=i(1626),n=i(8935),a={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(t){this.postPipelines=[],this.postPipelineData={},this.postFX=new r(this,!0),t&&(this.preFX=new r(this,!1))},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPostPipelineData:function(t,e){var i=this.postPipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],r=0;r=0;s--){var r=i[s];(e&&r.name===t||!e&&r===t)&&(r.destroy(),n(i,s))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};t.exports=a},4627:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},1868:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},4976:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e,i,s){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e,i,s)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},9243:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=r},5693:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},6125:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},3212:(t,e,i)=>{var s=i(7425),r=i(4227),n=i(7556),a=i(3692),o=i(2820),h=i(2529),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return o(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(e||(e=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var r=s.scrollX,a=s.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):n(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},4227:(t,e,i)=>{var s=i(7473),r=i(7425),n=i(2529),a=new s({initialize:function(t,e,i,s,r,n){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===r&&(r=0),void 0===n&&(n=0),this.matrix=new Float32Array([t,e,i,s,r,n,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||n?r.TAU-(n>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3];return s[0]=r*i+a*e,s[1]=n*i+o*e,s[2]=r*-e+a*i,s[3]=n*-e+o*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,r=i[0],n=i[1],a=i[2],o=i[3],h=i[4],l=i[5],c=s[0],u=s[1],d=s[2],f=s[3],p=s[4],m=s[5],g=void 0===e?i:e.matrix;return g[0]=c*r+u*a,g[1]=c*n+u*o,g[2]=d*r+f*a,g[3]=d*n+f*o,g[4]=p*r+m*a+h,g[5]=p*n+m*o+l,g},multiplyWithOffset:function(t,e,i){var s=this.matrix,r=t.matrix,n=s[0],a=s[1],o=s[2],h=s[3],l=e*n+i*o+s[4],c=e*a+i*h+s[5],u=r[0],d=r[1],f=r[2],p=r[3],m=r[4],g=r[5];return s[0]=u*n+d*o,s[1]=u*a+d*h,s[2]=f*n+p*o,s[3]=f*a+p*h,s[4]=m*n+g*o+l,s[5]=m*a+g*h+c,this},transform:function(t,e,i,s,r,n){var a=this.matrix,o=a[0],h=a[1],l=a[2],c=a[3],u=a[4],d=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*c,a[2]=i*o+s*l,a[3]=i*h+s*c,a[4]=r*o+n*l+u,a[5]=r*h+n*c+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3],h=s[4],l=s[5];return i.x=t*r+e*a+h,i.y=t*n+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=e*r-i*s;return t[0]=r/o,t[1]=-i/o,t[2]=-s/o,t[3]=e/o,t[4]=(s*a-r*n)/o,t[5]=-(e*a-i*n)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){return t.setTransform(this),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,r,n){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=s,a[4]=r,a[5]=n,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],r=e[2],n=e[3],a=i*n-s*r;if(t.translateX=e[4],t.translateY=e[5],i||s){var o=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/o):-Math.acos(i/o),t.scaleX=o,t.scaleY=a/o}else if(r||n){var h=Math.sqrt(r*r+n*n);t.rotation=.5*Math.PI-(n>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,r){var n=this.matrix,a=Math.sin(i),o=Math.cos(i);return n[4]=t,n[5]=e,n[0]=o*s,n[1]=a*s,n[2]=-a*r,n[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new n);var s=this.matrix,r=s[0],a=s[1],o=s[2],h=s[3],l=s[4],c=s[5],u=1/(r*h+o*-a);return i.x=h*u*t+-o*u*e+(c*o-l*h)*u,i.y=r*u*e+-a*u*t+(-c*r+l*a)*u,i},setQuad:function(t,e,i,s,r,n){void 0===r&&(r=!1),void 0===n&&(n=this.quad);var a=this.matrix,o=a[0],h=a[1],l=a[2],c=a[3],u=a[4],d=a[5];return r?(n[0]=Math.round(t*o+e*l+u),n[1]=Math.round(t*h+e*c+d),n[2]=Math.round(t*o+s*l+u),n[3]=Math.round(t*h+s*c+d),n[4]=Math.round(i*o+s*l+u),n[5]=Math.round(i*h+s*c+d),n[6]=Math.round(i*o+e*l+u),n[7]=Math.round(i*h+e*c+d)):(n[0]=t*o+e*l+u,n[1]=t*h+e*c+d,n[2]=t*o+s*l+u,n[3]=t*h+s*c+d,n[4]=i*o+s*l+u,n[5]=i*h+s*c+d,n[6]=i*o+e*l+u,n[7]=i*h+e*c+d),n},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},8414:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},4286:(t,e,i)=>{t.exports={Alpha:i(4344),AlphaSingle:i(4518),BlendMode:i(5173),ComputedSize:i(1991),Crop:i(8305),Depth:i(3131),Flip:i(9660),FX:i(1626),GetBounds:i(3671),Mask:i(2246),Origin:i(5085),PathFollower:i(77),Pipeline:i(986),PostPipeline:i(4461),ScrollFactor:i(4627),Size:i(1868),Texture:i(4976),TextureCrop:i(9243),Tint:i(5693),ToJSON:i(6125),Transform:i(3212),TransformMatrix:i(4227),Visible:i(8414)}},7361:(t,e,i)=>{var s=i(1953),r=i(8351),n=i(7473),a=i(4286),o=i(3389),h=i(2273),l=i(1392),c=i(3232),u=i(9422),d=i(2529),f=new n({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.PostPipeline,a.Transform,a.Visible,c],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(e,i),this.setBlendMode(r.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,r=!1;t.setEmpty();for(var n=0;n-1},setAll:function(t,e,i,r){return s.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,s=[null],r=this.list.slice(),n=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},2840:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var r=e.list;if(0!==r.length){var n=e.localTransform;s?(n.loadIdentity(),n.multiply(s),n.translate(e.x,e.y),n.rotate(e.rotation),n.scale(e.scaleX,e.scaleY)):n.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c{var s=i(1984),r=s,n=s;r=i(4343),n=i(2840),t.exports={renderWebGL:r,renderCanvas:n}},4343:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var r=e.list,n=r.length;if(0!==n){var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,c=e.scrollFactorY,u=0;u{t.exports="addedtoscene"},4265:t=>{t.exports="destroy"},8671:t=>{t.exports="removedfromscene"},3420:t=>{t.exports="complete"},601:t=>{t.exports="created"},7919:t=>{t.exports="error"},6231:t=>{t.exports="locked"},5241:t=>{t.exports="loop"},8325:t=>{t.exports="playing"},3356:t=>{t.exports="play"},7513:t=>{t.exports="seeked"},5788:t=>{t.exports="seeking"},7111:t=>{t.exports="stalled"},8118:t=>{t.exports="stop"},9184:t=>{t.exports="textureready"},4287:t=>{t.exports="unlocked"},857:t=>{t.exports="unsupported"},3389:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(6608),DESTROY:i(4265),REMOVED_FROM_SCENE:i(8671),VIDEO_COMPLETE:i(3420),VIDEO_CREATED:i(601),VIDEO_ERROR:i(7919),VIDEO_LOCKED:i(6231),VIDEO_LOOP:i(5241),VIDEO_PLAY:i(3356),VIDEO_PLAYING:i(8325),VIDEO_SEEKED:i(7513),VIDEO_SEEKING:i(5788),VIDEO_STALLED:i(7111),VIDEO_STOP:i(8118),VIDEO_TEXTURE:i(9184),VIDEO_UNLOCKED:i(4287),VIDEO_UNSUPPORTED:i(857)}},1643:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},8881:(t,e,i)=>{var s=i(7655);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},4479:(t,e,i)=>{var s=i(4771),r=i(7655);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=s(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,c=0;c{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},284:(t,e,i)=>{var s=i(7473),r=i(8881),n=i(4479),a=i(1643),o=i(3915),h=i(2529),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return n(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},setFromObjects:function(t,e){return this.x1=t.x,this.y1=t.y,this.x2=e.x,this.y2=e.y,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},3915:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},7655:(t,e,i)=>{var s=i(7473),r=i(1643),n=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=n},5956:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},716:(t,e,i)=>{var s=i(7120),r=i(7655);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var n=s(t)*e;return e>.5?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width)),i}},8151:(t,e,i)=>{var s=i(716),r=i(7120);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=r(t)/i);for(var a=0;a{t.exports=function(t){return 2*(t.width+t.height)}},2161:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},1392:(t,e,i)=>{var s=i(7473),r=i(5956),n=i(716),a=i(8151),o=i(1643),h=i(284),l=i(2161),c=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=c},9422:(t,e,i)=>{var s=i(1392);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=Math.min(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-n;return i.setTo(r,n,a,o)}},1593:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=i(4597),o=i(5593),h=i(7410),l=i(5874),c=i(707),u=new s({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=a(e,"url");void 0===s?s=t.path+i+"."+a(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=c(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(n.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(n.FILE_COMPLETE,e,i,t),this.loader.emit(n.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});u.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},u.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=u},9845:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},5593:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},7410:(t,e,i)=>{var s=i(1030),r=i(707);t.exports=function(t,e){var i=void 0===t?r():s({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},3137:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=new s({initialize:function(t,e,i,s){var n=[];s.forEach((function(t){t&&n.push(t)})),this.loader=t,this.type=e,this.key=i;var a=this.key;t.prefix&&""!==t.prefix&&(this.key=t.prefix+a),this.multiKeyIndex=t.multiKeyIndex++,this.files=n,this.state=r.FILE_PENDING,this.complete=!1,this.pending=n.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o{var s=i(7410);t.exports=function(t,e){var i=s(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var n in i.headers)r.setRequestHeader(n,i.headers[n]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},707:t=>{t.exports=function(t,e,i,s,r,n){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===r&&(r=0),void 0===n&&(n=!1),{responseType:t,async:e,user:i,password:s,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}}},4359:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},462:t=>{t.exports="addfile"},7297:t=>{t.exports="complete"},8660:t=>{t.exports="filecomplete"},6484:t=>{t.exports="filecomplete-"},7972:t=>{t.exports="loaderror"},1906:t=>{t.exports="load"},1441:t=>{t.exports="fileprogress"},1072:t=>{t.exports="postprocess"},1927:t=>{t.exports="progress"},6597:t=>{t.exports="start"},1179:(t,e,i)=>{t.exports={ADD:i(462),COMPLETE:i(7297),FILE_COMPLETE:i(8660),FILE_KEY_COMPLETE:i(6484),FILE_LOAD_ERROR:i(7972),FILE_LOAD:i(1906),FILE_PROGRESS:i(1441),POST_PROCESS:i(1072),PROGRESS:i(1927),START:i(6597)}},6732:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=i(5593),c=new s({Extends:n,initialize:function t(e,i,s,r,a){var l,c="png";if(h(i)){var u=i;i=o(u,"key"),s=o(u,"url"),l=o(u,"normalMap"),r=o(u,"xhrSettings"),c=o(u,"extension",c),a=o(u,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:c,responseType:"blob",key:i,url:s,xhrSettings:r,config:a};if(n.call(this,e,d),l){var f=new t(e,this.key,l,r,a);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){n.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){n.revokeObjectURL(t.data),t.onProcessError()},n.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("spritesheet"===t.type?t.addToCache():"normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(5851),l=i(2482),c=new s({Extends:n,initialize:function(t,e,i,s,a){var c="json";if(l(e)){var u=e;e=o(u,"key"),i=o(u,"url"),s=o(u,"xhrSettings"),c=o(u,"extension",c),a=o(u,"dataKey",a)}var d={type:"json",cache:t.cacheManager.json,extension:c,responseType:"text",key:e,url:i,xhrSettings:s,config:a};n.call(this,t,d),l(i)&&(this.data=a?h(i,a):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=new s({Extends:n,initialize:function(t,e,i,s){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var c=e;e=o(c,"key"),i=o(c,"url"),s=o(c,"xhrSettings"),a=o(c,"extension",a),r=o(c,"type",r),l=o(c,"cache",l)}var u={type:r,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports=function(t){for(var e=0,i=0;i{var s=i(3916);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},7025:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},48:t=>{t.exports=function(t,e,i,s,r){var n=.5*(s-e),a=.5*(r-i),o=t*t;return(2*i-2*s+n+a)*(t*o)+(-3*i+3*s-2*n-a)*o+n*t+i}},5035:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},2915:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},7149:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.DEG_TO_RAD}},2975:t=>{t.exports=function(t,e){return Math.abs(t-e)}},2107:(t,e,i)=>{var s=i(2915),r=i(7473),n=i(9652),a=i(1984),o=new n,h=new r({initialize:function t(e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,n=r[0],a=r[4],o=r[8],h=r[1],l=r[5],c=r[9],u=r[2],d=r[6],f=r[10],p=0,m=0,g=0,x=.99999;switch(e){case"XYZ":m=Math.asin(s(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},104:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},4941:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},1555:(t,e,i)=>{var s=i(2915);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},5005:t=>{t.exports=function(t,e){return t/e/1e3}},3702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},8820:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},1743:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},3416:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},2149:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=l*n-a*h,u=-l*r+a*o,d=h*r-n*o,f=e*c+i*u+s*d;return f?(f=1/f,t[0]=c*f,t[1]=(-l*i+s*h)*f,t[2]=(a*i-s*n)*f,t[3]=u*f,t[4]=(l*e-s*o)*f,t[5]=(-a*e+s*r)*f,t[6]=d*f,t[7]=(-h*e+i*o)*f,t[8]=(n*e-i*r)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=n*l-a*h,t[1]=s*h-i*l,t[2]=i*a-s*n,t[3]=a*o-r*l,t[4]=e*l-s*o,t[5]=s*r-e*a,t[6]=r*h-n*o,t[7]=i*o-e*h,t[8]=e*n-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*n-a*h)+i*(-l*r+a*o)+s*(h*r-n*o)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],c=e[8],u=t.val,d=u[0],f=u[1],p=u[2],m=u[3],g=u[4],x=u[5],w=u[6],v=u[7],y=u[8];return e[0]=d*i+f*n+p*h,e[1]=d*s+f*a+p*l,e[2]=d*r+f*o+p*c,e[3]=m*i+g*n+x*h,e[4]=m*s+g*a+x*l,e[5]=m*r+g*o+x*c,e[6]=w*i+v*n+y*h,e[7]=w*s+v*a+y*l,e[8]=w*r+v*o+y*c,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*n,e[1]=l*s+h*a,e[2]=l*r+h*o,e[3]=l*n-h*i,e[4]=l*a-h*s,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,r=t.w,n=e+e,a=i+i,o=s+s,h=e*n,l=e*a,c=e*o,u=i*a,d=i*o,f=s*o,p=r*n,m=r*a,g=r*o,x=this.val;return x[0]=1-(u+f),x[3]=l+g,x[6]=c-m,x[1]=l-g,x[4]=1-(h+f),x[7]=d+p,x[2]=c+m,x[5]=d-p,x[8]=1-(h+u),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],r=e[1],n=e[2],a=e[3],o=e[4],h=e[5],l=e[6],c=e[7],u=e[8],d=e[9],f=e[10],p=e[11],m=e[12],g=e[13],x=e[14],w=e[15],v=s*h-r*o,y=s*l-n*o,b=s*c-a*o,A=r*l-n*h,S=r*c-a*h,M=n*c-a*l,I=u*g-d*m,E=u*x-f*m,T=u*w-p*m,k=d*x-f*g,C=d*w-p*g,R=f*w-p*x,F=v*R-y*C+b*k+A*T-S*E+M*I;return F?(F=1/F,i[0]=(h*R-l*C+c*k)*F,i[1]=(l*T-o*R-c*E)*F,i[2]=(o*C-h*T+c*I)*F,i[3]=(n*C-r*R-a*k)*F,i[4]=(s*R-n*T+a*E)*F,i[5]=(r*T-s*C-a*I)*F,i[6]=(g*M-x*S+w*A)*F,i[7]=(x*b-m*M-w*y)*F,i[8]=(m*S-g*b+w*v)*F,this):null}});t.exports=s},9652:(t,e,i)=>{var s=i(7473),r=i(5689),n=1e-6,a=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,r,n,a,o,h,l,c,u,d,f,p,m){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=s,g[4]=r,g[5]=n,g[6]=a,g[7]=o,g[8]=h,g[9]=l,g[10]=c,g[11]=u,g[12]=d,g[13]=f,g[14]=p,g[15]=m,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=o.fromQuat(i).val,r=e.x,n=e.y,a=e.z;return this.setValues(s[0]*r,s[1]*r,s[2]*r,0,s[4]*n,s[5]*n,s[6]*n,0,s[8]*a,s[9]*a,s[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],r=t[6],n=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=r,t[11]=t[14],t[12]=s,t[13]=n,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15],x=e*a-i*n,w=e*o-s*n,v=e*h-r*n,y=i*o-s*a,b=i*h-r*a,A=s*h-r*o,S=l*p-c*f,M=l*m-u*f,I=l*g-d*f,E=c*m-u*p,T=c*g-d*p,k=u*g-d*m,C=x*k-w*T+v*E+y*I-b*M+A*S;return C?(C=1/C,this.setValues((a*k-o*T+h*E)*C,(s*T-i*k-r*E)*C,(p*A-m*b+g*y)*C,(u*b-c*A-d*y)*C,(o*I-n*k-h*M)*C,(e*k-s*I+r*M)*C,(m*v-f*A-g*w)*C,(l*A-u*v+d*w)*C,(n*T-a*I+h*S)*C,(i*I-e*T-r*S)*C,(f*b-p*v+g*x)*C,(c*v-l*b-d*x)*C,(a*M-n*E-o*S)*C,(e*E-i*M+s*S)*C,(p*w-f*y-m*x)*C,(l*y-c*w+u*x)*C)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return this.setValues(a*(u*g-d*m)-c*(o*g-h*m)+p*(o*d-h*u),-(i*(u*g-d*m)-c*(s*g-r*m)+p*(s*d-r*u)),i*(o*g-h*m)-a*(s*g-r*m)+p*(s*h-r*o),-(i*(o*d-h*u)-a*(s*d-r*u)+c*(s*h-r*o)),-(n*(u*g-d*m)-l*(o*g-h*m)+f*(o*d-h*u)),e*(u*g-d*m)-l*(s*g-r*m)+f*(s*d-r*u),-(e*(o*g-h*m)-n*(s*g-r*m)+f*(s*h-r*o)),e*(o*d-h*u)-n*(s*d-r*u)+l*(s*h-r*o),n*(c*g-d*p)-l*(a*g-h*p)+f*(a*d-h*c),-(e*(c*g-d*p)-l*(i*g-r*p)+f*(i*d-r*c)),e*(a*g-h*p)-n*(i*g-r*p)+f*(i*h-r*a),-(e*(a*d-h*c)-n*(i*d-r*c)+l*(i*h-r*a)),-(n*(c*m-u*p)-l*(a*m-o*p)+f*(a*u-o*c)),e*(c*m-u*p)-l*(i*m-s*p)+f*(i*u-s*c),-(e*(a*m-o*p)-n*(i*m-s*p)+f*(i*o-s*a)),e*(a*u-o*c)-n*(i*u-s*c)+l*(i*o-s*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*a-i*n)*(u*g-d*m)-(e*o-s*n)*(c*g-d*p)+(e*h-r*n)*(c*m-u*p)+(i*o-s*a)*(l*g-d*f)-(i*h-r*a)*(l*m-u*f)+(s*h-r*o)*(l*p-c*f)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],c=e[8],u=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],x=e[15],w=t.val,v=w[0],y=w[1],b=w[2],A=w[3];return e[0]=v*i+y*a+b*c+A*p,e[1]=v*s+y*o+b*u+A*m,e[2]=v*r+y*h+b*d+A*g,e[3]=v*n+y*l+b*f+A*x,v=w[4],y=w[5],b=w[6],A=w[7],e[4]=v*i+y*a+b*c+A*p,e[5]=v*s+y*o+b*u+A*m,e[6]=v*r+y*h+b*d+A*g,e[7]=v*n+y*l+b*f+A*x,v=w[8],y=w[9],b=w[10],A=w[11],e[8]=v*i+y*a+b*c+A*p,e[9]=v*s+y*o+b*u+A*m,e[10]=v*r+y*h+b*d+A*g,e[11]=v*n+y*l+b*f+A*x,v=w[12],y=w[13],b=w[14],A=w[15],e[12]=v*i+y*a+b*c+A*p,e[13]=v*s+y*o+b*u+A*m,e[14]=v*r+y*h+b*d+A*g,e[15]=v*n+y*l+b*f+A*x,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,r=i[0],n=i[4],a=i[8],o=i[12],h=i[1],l=i[5],c=i[9],u=i[13],d=i[2],f=i[6],p=i[10],m=i[14],g=i[3],x=i[7],w=i[11],v=i[15],y=s[0],b=s[4],A=s[8],S=s[12],M=s[1],I=s[5],E=s[9],T=s[13],k=s[2],C=s[6],R=s[10],F=s[14],Y=s[3],P=s[7],X=s[11],L=s[15];return this.setValues(r*y+n*M+a*k+o*Y,h*y+l*M+c*k+u*Y,d*y+f*M+p*k+m*Y,g*y+x*M+w*k+v*Y,r*b+n*I+a*C+o*P,h*b+l*I+c*C+u*P,d*b+f*I+p*C+m*P,g*b+x*I+w*C+v*P,r*A+n*E+a*R+o*X,h*A+l*E+c*R+u*X,d*A+f*E+p*R+m*X,g*A+x*E+w*R+v*X,r*S+n*T+a*F+o*L,h*S+l*T+c*F+u*L,d*S+f*T+p*F+m*L,g*S+x*T+w*F+v*L)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),r=1-i,n=t.x,a=t.y,o=t.z,h=r*n,l=r*a;return this.setValues(h*n+i,h*a-s*o,h*o+s*a,0,h*a+s*o,l*a+i,l*o-s*n,0,h*o-s*a,l*o+s*n,r*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,r=e.y,a=e.z,o=Math.sqrt(s*s+r*r+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},44:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},5385:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},8585:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==s?(r=(s-t)/(s-i))<0&&(r=0):r=1:r<0&&(r=0),r}},372:(t,e,i)=>{var s=i(7473),r=i(2149),n=i(1984),a=i(5689),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),c=new a(1,0,0),u=new a(0,1,0),d=new a,f=new r,p=new s({initialize:function(t,e,i,s){this.onChangeCallback=n,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=s*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),r+e*(t.z-r),n+e*(t.w-n))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(c).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=f.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*n+i*o-s*a,i*h+r*a+s*n-e*o,s*h+r*o+e*a-i*n,r*h-e*n-i*a-s*o)},slerp:function(t,e){var i=this.x,s=this.y,r=this.z,n=this.w,a=t.x,h=t.y,l=t.z,c=t.w,u=i*a+s*h+r*l+n*c;u<0&&(u=-u,a=-a,h=-h,l=-l,c=-c);var d=1-e,f=e;if(1-u>o){var p=Math.acos(u),m=Math.sin(p);d=Math.sin((1-e)*p)/m,f=Math.sin(e*p)/m}return this.set(d*i+f*a,d*s+f*h,d*r+f*l,d*n+f*c)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s,n=r?1/r:0;return this.set(-t*n,-e*n,-i*n,s*n)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*n,i*a+s*n,s*a-i*n,r*a-e*n)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a-s*n,i*a+r*n,s*a+e*n,r*a-i*n)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*n,i*a-e*n,s*a+r*n,r*a-s*n)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,r=t.z/2,n=Math.cos(i),a=Math.cos(s),o=Math.cos(r),h=Math.sin(i),l=Math.sin(s),c=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+n*l*c,n*l*o-h*a*c,n*a*c+h*l*o,n*a*o-h*l*c,e);break;case"YXZ":this.set(h*a*o+n*l*c,n*l*o-h*a*c,n*a*c-h*l*o,n*a*o+h*l*c,e);break;case"ZXY":this.set(h*a*o-n*l*c,n*l*o+h*a*c,n*a*c+h*l*o,n*a*o-h*l*c,e);break;case"ZYX":this.set(h*a*o-n*l*c,n*l*o+h*a*c,n*a*c-h*l*o,n*a*o+h*l*c,e);break;case"YZX":this.set(h*a*o+n*l*c,n*l*o+h*a*c,n*a*c-h*l*o,n*a*o-h*l*c,e);break;case"XZY":this.set(h*a*o-n*l*c,n*l*o-h*a*c,n*a*c+h*l*o,n*a*o+h*l*c,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],r=i[4],n=i[8],a=i[1],o=i[5],h=i[9],l=i[2],c=i[6],u=i[10],d=s+o+u;return d>0?(e=.5/Math.sqrt(d+1),this.set((c-h)*e,(n-l)*e,(a-r)*e,.25/e)):s>o&&s>u?(e=2*Math.sqrt(1+s-o-u),this.set(.25*e,(r+a)/e,(n+l)/e,(c-h)/e)):o>u?(e=2*Math.sqrt(1+o-s-u),this.set((r+a)/e,.25*e,(h+c)/e,(n-l)/e)):(e=2*Math.sqrt(1+u-s-o),this.set((n+l)/e,(h+c)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var n=h[r],a=h[n];e=Math.sqrt(i[3*r+r]-i[3*n+n]-i[3*a+a]+1),l[r]=.5*e,e=.5/e,l[n]=(i[3*n+r]+i[3*r+n])*e,l[a]=(i[3*a+r]+i[3*r+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+n]-i[3*n+a])*e}return this.onChangeCallback(this),this}});t.exports=p},4208:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.RAD_TO_DEG}},1705:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},6650:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,r=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=s*e,t}},2037:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},6283:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},9876:t=>{t.exports=function(t,e,i,s){var r=Math.cos(s),n=Math.sin(s),a=t.x-e,o=t.y-i;return t.x=a*r-o*n+e,t.y=a*n+o*r+i,t}},8348:t=>{t.exports=function(t,e,i,s,r){var n=s+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},4497:t=>{t.exports=function(t,e,i,s,r){return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},9640:(t,e,i)=>{var s=i(5689),r=i(9652),n=i(372),a=new r,o=new n,h=new s;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},4078:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},855:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},4936:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var r=[],n=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},278:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},163:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r){void 0===r&&(r=new s);var n=0,a=0;return t>0&&t<=e*i&&(n=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(n,a)}},7556:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r,n,a,o,h){void 0===h&&(h=new s);var l=Math.sin(n),c=Math.cos(n),u=c*a,d=l*a,f=-l*o,p=c*o,m=1/(u*p+f*-d);return h.x=p*m*t+-f*m*e+(r*f-i*p)*m,h.y=u*m*e+-d*m*t+(-r*u+i*d)*m,h}},2529:(t,e,i)=>{var s=i(7473),r=i(12),n=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new n(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},5689:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,r=t.z,n=e.x,a=e.y,o=e.z;return this.x=s*o-r*a,this.y=r*n-i*o,this.z=i*a-s*n,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z;return this.x=i*a-s*n,this.y=s*r-e*a,this.z=e*n-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*s,this.y=r[1]*e+r[4]*i+r[7]*s,this.z=r[2]*e+r[5]*i+r[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=1/(r[3]*e+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*s+r[12])*n,this.y=(r[1]*e+r[5]*i+r[9]*s+r[13])*n,this.z=(r[2]*e+r[6]*i+r[10]*s+r[14])*n,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+s*r[6],this.y=e*r[1]+i*r[4]+s*r[7],this.z=e*r[2]+i*r[5]+s*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12],this.y=r[1]*e+r[5]*i+r[9]*s+r[13],this.z=r[2]*e+r[6]*i+r[10]*s+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=e*r[0]+i*r[4]+s*r[8]+r[12],a=e*r[1]+i*r[5]+s*r[9]+r[13],o=e*r[2]+i*r[6]+s*r[10]+r[14],h=e*r[3]+i*r[7]+s*r[11]+r[15];return this.x=n/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,c=o*s+r*i-n*e,u=-r*e-n*i-a*s;return this.x=h*o+u*-r+l*-a-c*-n,this.y=l*o+u*-n+c*-r-h*-a,this.z=c*o+u*-a+h*-n-l*-r,this},project:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=r[0],a=r[1],o=r[2],h=r[3],l=r[4],c=r[5],u=r[6],d=r[7],f=r[8],p=r[9],m=r[10],g=r[11],x=r[12],w=r[13],v=r[14],y=1/(e*h+i*d+s*g+r[15]);return this.x=(e*n+i*l+s*f+x)*y,this.y=(e*a+i*c+s*p+w)*y,this.z=(e*o+i*u+s*m+v)*y,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,r=t.z,n=t.w,a=this.x-i,o=n-this.y-1-s,h=this.z;return this.x=2*a/r-1,this.y=2*o/n-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},9279:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=s*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this.w=n+e*(t.w-n),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+s*s+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12]*r,this.y=n[1]*e+n[5]*i+n[9]*s+n[13]*r,this.z=n[2]*e+n[6]*i+n[10]*s+n[14]*r,this.w=n[3]*e+n[7]*i+n[11]*s+n[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,c=o*s+r*i-n*e,u=-r*e-n*i-a*s;return this.x=h*o+u*-r+l*-a-c*-n,this.y=l*o+u*-n+c*-r-h*-a,this.z=c*o+u*-a+h*-n-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},4119:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},8445:t=>{t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},6412:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},760:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},6909:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},6947:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},3426:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},6906:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},3270:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-Math.PI,Math.PI)}},2748:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-180,180)}},936:(t,e,i)=>{var s=i(6906);t.exports=function(t){return s(t+Math.PI)}},1935:(t,e,i)=>{var s=i(7425);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},3692:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},2820:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-180,180)}},1833:(t,e,i)=>{t.exports={Between:i(6412),BetweenPoints:i(760),BetweenPointsY:i(6909),BetweenY:i(6947),CounterClockwise:i(3426),Normalize:i(6906),Random:i(3270),RandomDegrees:i(2748),Reverse:i(936),RotateTo:i(1935),ShortestBetween:i(5393),Wrap:i(3692),WrapDegrees:i(2820)}},7425:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},1518:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return Math.sqrt(r*r+n*n)}},5372:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},4430:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},4361:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},7798:t=>{t.exports=function(t,e,i,s,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(s-e,r))}},8290:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},3788:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return r*r+n*n}},6338:(t,e,i)=>{t.exports={Between:i(1518),BetweenPoints:i(5372),BetweenPointsSquared:i(4430),Chebyshev:i(4361),Power:i(7798),Snake:i(8290),Squared:i(3788)}},5751:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},6203:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},9103:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},4938:(t,e,i)=>{t.exports={In:i(5751),Out:i(9103),InOut:i(6203)}},8677:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},4649:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},504:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},8872:(t,e,i)=>{t.exports={In:i(8677),Out:i(504),InOut:i(4649)}},3170:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},2627:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},1349:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},5006:(t,e,i)=>{t.exports={In:i(3170),Out:i(1349),InOut:i(2627)}},6046:t=>{t.exports=function(t){return t*t*t}},9531:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},4836:t=>{t.exports=function(t){return--t*t*t+1}},875:(t,e,i)=>{t.exports={In:i(6046),Out:i(4836),InOut:i(9531)}},7619:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},7437:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},8119:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},2884:(t,e,i)=>{t.exports={In:i(7619),Out:i(8119),InOut:i(7437)}},5456:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},3461:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},2711:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},6287:(t,e,i)=>{t.exports={In:i(5456),Out:i(2711),InOut:i(3461)}},8613:(t,e,i)=>{t.exports={Back:i(4938),Bounce:i(8872),Circular:i(5006),Cubic:i(875),Elastic:i(2884),Expo:i(6287),Linear:i(4233),Quadratic:i(6341),Quartic:i(762),Quintic:i(345),Sine:i(8698),Stepped:i(7051)}},744:t=>{t.exports=function(t){return t}},4233:(t,e,i)=>{t.exports=i(744)},9810:t=>{t.exports=function(t){return t*t}},8163:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},6123:t=>{t.exports=function(t){return t*(2-t)}},6341:(t,e,i)=>{t.exports={In:i(9810),Out:i(6123),InOut:i(8163)}},7337:t=>{t.exports=function(t){return t*t*t*t}},4878:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},9012:t=>{t.exports=function(t){return 1- --t*t*t*t}},762:(t,e,i)=>{t.exports={In:i(7337),Out:i(9012),InOut:i(4878)}},303:t=>{t.exports=function(t){return t*t*t*t*t}},553:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},1632:t=>{t.exports=function(t){return--t*t*t*t*t+1}},345:(t,e,i)=>{t.exports={In:i(303),Out:i(1632),InOut:i(553)}},8455:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},1844:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},990:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},8698:(t,e,i)=>{t.exports={In:i(8455),Out:i(990),InOut:i(1844)}},6745:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},7051:(t,e,i)=>{t.exports=i(6745)},3158:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},12:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},7373:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},2622:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(3158),Equal:i(12),Floor:i(1326),GreaterThan:i(7373),LessThan:i(2622)}},4675:(t,e,i)=>{var s=i(7425),r=i(1030),n={Angle:i(1833),Distance:i(6338),Easing:i(8613),Fuzzy:i(7927),Interpolation:i(2140),Pow2:i(7897),Snap:i(3943),RandomDataGenerator:i(6957),Average:i(3136),Bernstein:i(785),Between:i(7025),CatmullRom:i(48),CeilTo:i(5035),Clamp:i(2915),DegToRad:i(7149),Difference:i(2975),Euler:i(2107),Factorial:i(3916),FloatBetween:i(104),FloorTo:i(4941),FromPercent:i(1555),GetSpeed:i(5005),IsEven:i(3702),IsEvenStrict:i(8820),Linear:i(1743),LinearXY:i(3416),MaxAdd:i(3733),Median:i(44),MinSub:i(5385),Percent:i(8585),RadToDeg:i(4208),RandomXY:i(1705),RandomXYZ:i(6650),RandomXYZW:i(2037),Rotate:i(6283),RotateAround:i(9876),RotateAroundDistance:i(8348),RotateTo:i(4497),RoundAwayFromZero:i(4078),RoundTo:i(855),SinCosTableGenerator:i(4936),SmootherStep:i(278),SmoothStep:i(2733),ToXY:i(163),TransformXY:i(7556),Within:i(4119),Wrap:i(8445),Vector2:i(2529),Vector3:i(5689),Vector4:i(9279),Matrix3:i(2149),Matrix4:i(9652),Quaternion:i(372),RotateVec3:i(9640)};n=r(!1,n,s),t.exports=n},1640:(t,e,i)=>{var s=i(785);t.exports=function(t,e){for(var i=0,r=t.length-1,n=0;n<=r;n++)i+=Math.pow(1-e,r-n)*Math.pow(e,n)*t[n]*s(r,n);return i}},6105:(t,e,i)=>{var s=i(48);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return t[0]===t[i]?(e<0&&(n=Math.floor(r=i*(1+e))),s(r-n,t[(n-1+i)%i],t[n],t[(n+1)%i],t[(n+2)%i])):e<0?t[0]-(s(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(r-n,t[n?n-1:0],t[n],t[i{t.exports=function(t,e,i,s,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,r)}},6765:(t,e,i)=>{var s=i(1743);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return e<0?s(t[0],t[1],r):e>1?s(t[i],t[i-1],i-r):s(t[n],t[n+1>i?i:n+1],r-n)}},6388:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},5735:(t,e,i)=>{var s=i(2733);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},8705:(t,e,i)=>{var s=i(278);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},2140:(t,e,i)=>{t.exports={Bezier:i(1640),CatmullRom:i(6105),CubicBezier:i(4002),Linear:i(6765),QuadraticBezier:i(6388),SmoothStep:i(5735),SmootherStep:i(8705)}},5443:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},167:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},7897:(t,e,i)=>{t.exports={GetNext:i(5443),IsSize:i(725),IsValue:i(167)}},6957:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},5659:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},5461:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},5131:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},3943:(t,e,i)=>{t.exports={Ceil:i(5659),Floor:i(5461),To:i(5131)}},8666:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},8456:t=>{var e={},i={},s={register:function(t,i,s,r){void 0===r&&(r=!1),e[t]={plugin:i,mapping:s,custom:r}},registerCustom:function(t,e,s,r){i[t]={plugin:e,mapping:s,data:r}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},5722:(t,e,i)=>{var s=i(8666),r=i(7473),n=i(204),a=new r({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(n.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},8351:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},8196:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},3527:t=>{t.exports="resize"},8618:t=>{t.exports="addedtoscene"},4328:t=>{t.exports="boot"},6099:t=>{t.exports="create"},7645:t=>{t.exports="destroy"},2710:t=>{t.exports="pause"},2547:t=>{t.exports="postupdate"},8577:t=>{t.exports="prerender"},8197:t=>{t.exports="preupdate"},8997:t=>{t.exports="ready"},7604:t=>{t.exports="removedfromscene"},8999:t=>{t.exports="render"},9742:t=>{t.exports="resume"},3667:t=>{t.exports="shutdown"},3468:t=>{t.exports="sleep"},7840:t=>{t.exports="start"},9896:t=>{t.exports="transitioncomplete"},5103:t=>{t.exports="transitioninit"},3162:t=>{t.exports="transitionout"},7841:t=>{t.exports="transitionstart"},6454:t=>{t.exports="transitionwake"},6536:t=>{t.exports="update"},3875:t=>{t.exports="wake"},204:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(8618),BOOT:i(4328),CREATE:i(6099),DESTROY:i(7645),PAUSE:i(2710),POST_UPDATE:i(2547),PRE_RENDER:i(8577),PRE_UPDATE:i(8197),READY:i(8997),REMOVED_FROM_SCENE:i(7604),RENDER:i(8999),RESUME:i(9742),SHUTDOWN:i(3667),SLEEP:i(3468),START:i(7840),TRANSITION_COMPLETE:i(9896),TRANSITION_INIT:i(5103),TRANSITION_OUT:i(3162),TRANSITION_START:i(7841),TRANSITION_WAKE:i(6454),UPDATE:i(6536),WAKE:i(3875)}},2362:(t,e,i)=>{var s=i(7473),r=i(2915),n=i(1030),a=new s({initialize:function(t,e,i,s,r,n,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(n,a,s,r)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,n=r.cut;n.x=i,n.y=s,n.w=t,n.h=e,n.r=i+t,n.b=s+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var a=r.drawImage;return a.x=i,a.y=s,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,i,s,r,n){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=s,o.w=r,o.h=n,o.r=i+r,o.b=s+n,this.x=i,this.y=s,this.width=r,this.height=n,this.halfWidth=.5*r,this.halfHeight=.5*n,this.centerX=Math.floor(r/2),this.centerY=Math.floor(n/2),this.updateUVs()},setScale9:function(t,e,i,s){var r=this.data;return r.scale9=!0,r.is3Slice=0===e&&s===this.height,r.scale9Borders.x=t,r.scale9Borders.y=e,r.scale9Borders.w=i,r.scale9Borders.h=s,this},setCropUVs:function(t,e,i,s,n,a,o){var h=this.cutX,l=this.cutY,c=this.cutWidth,u=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=r(e,0,d)),m=l+(i=r(i,0,f)),g=s=r(s,0,d-e),x=n=r(n,0,f-i),w=this.data;if(w.trim){var v=w.spriteSourceSize,y=e+(s=r(s,0,c-e)),b=i+(n=r(n,0,u-i));if(!(v.ry||v.y>b)){var A=Math.max(v.x,e),S=Math.max(v.y,i),M=Math.min(v.r,y)-A,I=Math.min(v.b,b)-S;g=M,x=I,p=a?h+(c-(A-v.x)-M):h+(A-v.x),m=o?l+(u-(S-v.y)-I):l+(S-v.y),e=A,i=S,s=M,n=I}else p=0,m=0,g=0,x=0}else a&&(p=h+(c-e-s)),o&&(m=l+(u-i-n));var E=this.source.width,T=this.source.height;return t.u0=Math.max(0,p/E),t.v0=Math.max(0,m/T),t.u1=Math.min(1,(p+g)/E),t.v1=Math.min(1,(m+x)/T),t.x=e,t.y=i,t.cx=p,t.cy=m,t.cw=g,t.ch=x,t.width=s,t.height=n,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,r,n){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=i,this.v0=s,this.u1=r,this.v1=n,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,r=this.data.drawImage;r.width=i,r.height=s;var n=this.source.width,a=this.source.height;return this.u0=t/n,this.v0=e/a,this.u1=(t+i)/n,this.v1=(e+s)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=n(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=a},1864:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},3747:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},7473:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,r,a){for(var o in s)if(s.hasOwnProperty(o)){var h=e(s,o,r);if(!1!==h){if(i((a||t).prototype,o)){if(n.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=s[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},1792:t=>{t.exports=function(t,e,i,s,r){if(void 0===r&&(r=t),i>0){var n=i-t.length;if(n<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>n&&(e.splice(n),a=n);for(var o=0;o{t.exports=function(t,e,i,s,r,n){if(void 0===i&&(i=0),void 0===n&&(n=t),s>0){var a=s-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;s>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(n,l)}return e}},2513:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=0;if(s(t,r,n))for(var o=r;o{t.exports=function(t,e,i){var s,r=[null];for(s=3;s{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,r,n=1;if(i){if(te.length&&(n=e.length),i?(s=e[n-1][i],(r=e[n][i])-t<=t-s?e[n]:e[n-1]):(s=e[n-1],(r=e[n])-t<=t-s?r:s)}},4493:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=[];if(s(t,r,n))for(var o=r;o{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},8683:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s>r||(t.splice(s,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},546:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],r=t.indexOf(s);t[i]=s,t[r]=e}return t}},1419:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},6512:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var r,n=[],a=!1;if((i||s)&&(a=!0,i||(i=""),s||(s="")),e=e;r--)a?n.push(i+r.toString()+s):n.push(r);else for(r=t;r<=e;r++)a?n.push(i+r.toString()+s):n.push(r);return n}},1316:(t,e,i)=>{var s=i(4078);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],n=Math.max(s((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,r,n,a,o){for(void 0===n&&(n=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>n;){if(a-n>600){var h=a-n+1,l=r-n+1,c=Math.log(h),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(h-u)/h)*(l-h/2<0?-1:1),f=Math.max(n,Math.floor(r-l*u/h+d)),p=Math.min(a,Math.floor(r+(h-l)*u/h+d));s(t,r,f,p,o)}var m=t[r],g=n,x=a;for(e(t,n,r),o(t[a],m)>0&&e(t,n,a);g0;)x--}0===o(t[n],m)?e(t,n,x):e(t,++x,a),x<=r&&(n=x+1),r<=x&&(a=x-1)}};t.exports=s},9703:(t,e,i)=>{var s=i(5851),r=i(4912),n=function(t,e,i){for(var s=[],r=0;r{var s=i(8935);t.exports=function(t,e,i,r){var n;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(n=t.indexOf(e))?(s(t,n),i&&i.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(n=t.indexOf(h))&&(s(t,n),o.push(h),i&&i.call(r,h)),a--}return o}},4725:(t,e,i)=>{var s=i(8935);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var n=s(t,e);return i&&i.call(r,n),n}},8780:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===n&&(n=t),s(t,e,i)){var a=i-e,o=t.splice(e,a);if(r)for(var h=0;h{var s=i(8935);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return s(t,r)}},6960:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),r=t.indexOf(i);return-1!==s&&-1===r&&(t[s]=i,!0)}},1021:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var r=t.length;if(e<0||e>r||e>=i||i>r){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},5361:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},3718:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},2071:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},8935:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],r=e;r{var s=i(9356);function r(t,e){return String(t).localeCompare(e)}function n(t,e,i,s){var r,n,a,o,h,l=t.length,c=0,u=2*i;for(r=0;rl&&(n=l),a>l&&(a=l),o=r,h=n;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[r]=e,t}},1953:(t,e,i)=>{t.exports={Matrix:i(1237),Add:i(1792),AddAt:i(2280),BringToTop:i(2513),CountAllMatching:i(1771),Each:i(7883),EachInRange:i(5856),FindClosestInSorted:i(3957),Flatten:i(4493),GetAll:i(6245),GetFirst:i(1647),GetRandom:i(5301),MoveDown:i(1842),MoveTo:i(1419),MoveUp:i(6512),MoveAbove:i(8683),MoveBelow:i(546),NumberArray:i(4130),NumberArrayStep:i(1316),QuickSelect:i(9465),Range:i(9703),Remove:i(7161),RemoveAt:i(4725),RemoveBetween:i(8780),RemoveRandomElement:i(5744),Replace:i(6960),RotateLeft:i(1021),RotateRight:i(4027),SafeRange:i(2497),SendToBack:i(5361),SetAll:i(3718),Shuffle:i(4912),SortByDigits:i(2071),SpliceOne:i(8935),StableSort:i(9992),Swap:i(2372)}},1816:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(7222),r=i(1816);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},6063:t=>{t.exports=function(t){for(var e=0;e{var s=i(7116);t.exports=function(t){return s(t,180)}},2597:(t,e,i)=>{var s=i(7116);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i{var s=i(1816),r=i(4780);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(7116);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i{var s=i(1021),r=i(4027);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):r(t,i)),0!==e)for(var n=0;n{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),r=0;r-1;n--)s[r][n]=t[n][r]}return s}},1237:(t,e,i)=>{t.exports={CheckMatrix:i(1816),MatrixToString:i(6655),ReverseColumns:i(582),ReverseRows:i(6063),Rotate180:i(8321),RotateLeft:i(2597),RotateMatrix:i(7116),RotateRight:i(6285),Translate:i(7711),TransposeMatrix:i(4780)}},3911:t=>{var e=function(t){var i,s,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)s=t[r],i[r]=e(s);return i};t.exports=e},1030:(t,e,i)=>{var s=i(2482),r=function(){var t,e,i,n,a,o,h=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof h&&(u=h,h=arguments[1]||{},l=2),c===l&&(h=this,--l);l{var s=i(4675),r=i(5851);t.exports=function(t,e,i){var n=r(t,e,null);if(null===n)return i;if(Array.isArray(n))return s.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return s.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return s.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(e);return n}},4597:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},5851:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),n=t,a=s,o=i,h=i,l=!0,c=!0,u=0;u{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},7222:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var r=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var n=Math.ceil((r=e-t.length)/2);t=new Array(r-n+1).join(i)+t+new Array(n+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}}},e={};var i=function i(s){var r=e[s];if(void 0!==r)return r.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}(4513);window.SpinePlugin=i})(); \ No newline at end of file diff --git a/plugins/spine4.1/dist/SpineWebGLPlugin.js b/plugins/spine4.1/dist/SpineWebGLPlugin.js index 08ce89ccf..709cded7b 100644 --- a/plugins/spine4.1/dist/SpineWebGLPlugin.js +++ b/plugins/spine4.1/dist/SpineWebGLPlugin.js @@ -13277,7 +13277,7 @@ var SpinePlugin = new Class({ * Note: The ability to load this type of file will only be available if the Spine Plugin has been built or loaded into Phaser. * * @method Phaser.Loader.LoaderPlugin#spine - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.19.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -16269,7 +16269,7 @@ var CONST = { * @type {string} * @since 3.0.0 */ - VERSION: '3.60.0', + VERSION: '3.70.0', BlendModes: __webpack_require__(8351), @@ -16687,24 +16687,21 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to increase the value for. - * @param {number} [data=1] - The amount to increase the given key by. Pass a negative value to decrease the key. + * @param {string} key - The key to change the value for. + * @param {number} [amount=1] - The amount to increase the given key by. Pass a negative value to decrease the key. * * @return {this} This Data Manager instance. */ - inc: function (key, data) + inc: function (key, amount) { if (this._frozen) { return this; } - if (data === undefined) + if (amount === undefined) { - data = 1; + amount = 1; } var value = this.get(key); @@ -16714,7 +16711,7 @@ var DataManager = new Class({ value = 0; } - this.set(key, (value + data)); + this.set(key, (value + amount)); return this; }, @@ -16730,10 +16727,7 @@ var DataManager = new Class({ * @fires Phaser.Data.Events#CHANGE_DATA_KEY * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to toggle the value for. + * @param {string} key - The key to toggle the value for. * * @return {this} This Data Manager instance. */ @@ -17493,6 +17487,7 @@ function init () else if ((/AppleWebKit/).test(ua) && OS.iOS) { Browser.mobileSafari = true; + Browser.es2019 = true; } else if ((/MSIE (\d+\.\d+);/).test(ua)) { @@ -20400,7 +20395,7 @@ var Blur = new Class({ * @type {number} * @since 3.60.0 */ - this.quality = 0; + this.quality = quality; /** * The horizontal offset of the blur effect. @@ -20826,8 +20821,28 @@ var Circle = new Class({ color[2] = (value & 0xFF) / 255; } - } + }, + /** + * The alpha of the background, behind the texture, given as a number value. + * + * @name Phaser.FX.Circle#backgroundAlpha + * @type {number} + * @since 3.70.0 + */ + backgroundAlpha: { + + get: function () + { + return this.glcolor2[3]; + }, + + set: function (value) + { + this.glcolor2[3] = value; + } + + } }); module.exports = Circle; @@ -21330,10 +21345,10 @@ var FX_CONST = __webpack_require__(1571); * @param {number} [color1=0xff0000] - The first gradient color, given as a number value. * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value. * @param {number} [alpha=0.2] - The alpha value of the gradient effect. - * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. + * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toY=1] - The vertical position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect. */ var Gradient = new Class({ @@ -21375,7 +21390,7 @@ var Gradient = new Class({ this.size = size; /** - * The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. + * The horizontal position the gradient will start from. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#fromX * @type {number} @@ -21384,7 +21399,7 @@ var Gradient = new Class({ this.fromX = fromX; /** - * The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. + * The vertical position the gradient will start from. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#fromY * @type {number} @@ -21393,7 +21408,7 @@ var Gradient = new Class({ this.fromY = fromY; /** - * The horizontal position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels. + * The horizontal position the gradient will end. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#toX * @type {number} @@ -21402,7 +21417,7 @@ var Gradient = new Class({ this.toX = toX; /** - * The vertical position the gradient will end. This value is noralized, between 0 and 1 and is not in pixels. + * The vertical position the gradient will end. This value is normalized, between 0 and 1 and is not in pixels. * * @name Phaser.FX.Gradient#toY * @type {number} @@ -22775,22 +22790,19 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#incData * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to increase the value for. - * @param {*} [data] - The value to increase for the given key. + * @param {string} key - The key to change the value for. + * @param {number} [amount=1] - The amount to increase the given key by. Pass a negative value to decrease the key. * * @return {this} This GameObject. */ - incData: function (key, value) + incData: function (key, amount) { if (!this.data) { this.data = new DataManager(this); } - this.data.inc(key, value); + this.data.inc(key, amount); return this; }, @@ -22808,10 +22820,7 @@ var GameObject = new Class({ * @method Phaser.GameObjects.GameObject#toggleData * @since 3.23.0 * - * @generic {any} T - * @genericUse {(string|T)} - [key] - * - * @param {(string|object)} key - The key to toggle the value for. + * @param {string} key - The key to toggle the value for. * * @return {this} This GameObject. */ @@ -25123,10 +25132,10 @@ var FX = new Class({ * @param {number} [color1=0xff0000] - The first gradient color, given as a number value. * @param {number} [color2=0x00ff00] - The second gradient color, given as a number value. * @param {number} [alpha=0.2] - The alpha value of the gradient effect. - * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. - * @param {number} [toY=1] - The vertical position the gradient will end at. This value is noralized, between 0 and 1 and is not in pixels. + * @param {number} [fromX=0] - The horizontal position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [fromY=0] - The vertical position the gradient will start from. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toX=0] - The horizontal position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. + * @param {number} [toY=1] - The vertical position the gradient will end at. This value is normalized, between 0 and 1, and is not in pixels. * @param {number} [size=0] - How many 'chunks' the gradient is divided in to, as spread over the entire height of the texture. Leave this at zero for a smooth gradient, or set higher for a more retro chunky effect. * * @return {Phaser.FX.Gradient} The Gradient FX Controller. @@ -26661,7 +26670,7 @@ var PathFollower = { { var tween = this.pathTween; - if (tween) + if (tween && tween.data) { var tweenData = tween.data[0]; var pathDelta = this.pathDelta; @@ -27685,19 +27694,25 @@ var Texture = { * * Textures are referenced by their string-based keys, as stored in the Texture Manager. * + * Calling this method will modify the `width` and `height` properties of your Game Object. + * + * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer. + * * @method Phaser.GameObjects.Components.Texture#setTexture * @since 3.0.0 * * @param {(string|Phaser.Textures.Texture)} key - The key of the texture to be used, as stored in the Texture Manager, or a Texture instance. * @param {(string|number)} [frame] - The name or index of the frame within the Texture. + * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object? + * @param {boolean} [updateOrigin=true] - Should this call change the origin of the Game Object? * * @return {this} This Game Object instance. */ - setTexture: function (key, frame) + setTexture: function (key, frame, updateSize, updateOrigin) { this.texture = this.scene.sys.textures.get(key); - return this.setFrame(frame); + return this.setFrame(frame, updateSize, updateOrigin); }, /** @@ -28182,7 +28197,7 @@ var Tint = { /** * The tint value being applied to the whole of the Game Object. - * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value. + * Return `tintTopLeft` when read this tint property. * * @name Phaser.GameObjects.Components.Tint#tint * @type {number} @@ -28191,6 +28206,11 @@ var Tint = { */ tint: { + get: function () + { + return this.tintTopLeft; + }, + set: function (value) { this.setTint(value, value, value, value); @@ -29634,9 +29654,7 @@ var TransformMatrix = new Class({ */ setToContext: function (ctx) { - var matrix = this.matrix; - - ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + ctx.setTransform(this); return ctx; }, @@ -29846,13 +29864,14 @@ var TransformMatrix = new Class({ * @param {number} y - The y value. * @param {number} xw - The xw value. * @param {number} yh - The yh value. - * @param {boolean} roundPixels - Pass the results via Math.round? + * @param {boolean} [roundPixels=false] - Pass the results via Math.round? * @param {Float32Array} [quad] - Optional Float32Array to store the results in. Otherwises uses the local quad array. * * @return {Float32Array} The quad Float32Array. */ setQuad: function (x, y, xw, yh, roundPixels, quad) { + if (roundPixels === undefined) { roundPixels = false; } if (quad === undefined) { quad = this.quad; } var matrix = this.matrix; @@ -29864,24 +29883,33 @@ var TransformMatrix = new Class({ var e = matrix[4]; var f = matrix[5]; - quad[0] = x * a + y * c + e; - quad[1] = x * b + y * d + f; - - quad[2] = x * a + yh * c + e; - quad[3] = x * b + yh * d + f; - - quad[4] = xw * a + yh * c + e; - quad[5] = xw * b + yh * d + f; - - quad[6] = xw * a + y * c + e; - quad[7] = xw * b + y * d + f; - if (roundPixels) { - quad.forEach(function (value, index) - { - quad[index] = Math.round(value); - }); + quad[0] = Math.round(x * a + y * c + e); + quad[1] = Math.round(x * b + y * d + f); + + quad[2] = Math.round(x * a + yh * c + e); + quad[3] = Math.round(x * b + yh * d + f); + + quad[4] = Math.round(xw * a + yh * c + e); + quad[5] = Math.round(xw * b + yh * d + f); + + quad[6] = Math.round(xw * a + y * c + e); + quad[7] = Math.round(xw * b + y * d + f); + } + else + { + quad[0] = x * a + y * c + e; + quad[1] = x * b + y * d + f; + + quad[2] = x * a + yh * c + e; + quad[3] = x * b + yh * d + f; + + quad[4] = xw * a + yh * c + e; + quad[5] = xw * b + yh * d + f; + + quad[6] = xw * a + y * c + e; + quad[7] = xw * b + y * d + f; } return quad; @@ -32740,6 +32768,28 @@ var Line = new Class({ return this; }, + /** + * Sets this Line to match the x/y coordinates of the two given Vector2Like objects. + * + * @method Phaser.Geom.Line#setFromObjects + * @since 3.70.0 + * + * @param {Phaser.Types.Math.Vector2Like} start - Any object with public `x` and `y` properties, whose values will be assigned to the x1/y1 components of this Line. + * @param {Phaser.Types.Math.Vector2Like} end - Any object with public `x` and `y` properties, whose values will be assigned to the x2/y2 components of this Line. + * + * @return {this} This Line object. + */ + setFromObjects: function (start, end) + { + this.x1 = start.x; + this.y1 = start.y; + + this.x2 = end.x; + this.y2 = end.y; + + return this; + }, + /** * Returns a Vector2 object that corresponds to the start of this Line. * @@ -34633,6 +34683,13 @@ var MultiFile = new Class({ */ this.key = key; + var loadKey = this.key; + + if (loader.prefix && loader.prefix !== '') + { + this.key = loader.prefix + loadKey; + } + /** * The current index being used by multi-file loaders to avoid key clashes. * @@ -35750,8 +35807,11 @@ var ImageFile = new Class({ // We do, but has it loaded? if (linkFile.state >= CONST.FILE_COMPLETE) { - // Both files have loaded - if (this.type === 'normalMap') + if (linkFile.type === 'spritesheet') + { + linkFile.addToCache(); + } + else if (this.type === 'normalMap') { // linkFile.data = Image // this.data = Normal Map @@ -35862,7 +35922,7 @@ var ImageFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#image - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -36101,7 +36161,7 @@ var JSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -36282,7 +36342,7 @@ var TextFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#text - * @fires Phaser.Loader.LoaderPlugin#ADD + * @fires Phaser.Loader.Events#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -43906,12 +43966,6 @@ module.exports = Within; */ var Wrap = function (value, min, max) { - if (value >= min && value <= max) - { - // Skip modulo if already in range - return value; - } - var range = max - min; return (min + ((((value - min) % range) + range) % range)); @@ -47478,7 +47532,7 @@ var RandomDataGenerator = new Class({ */ weightedPick: function (array) { - return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)]; + return array[~~(Math.pow(this.frac(), 2) * array.length + 0.5)]; }, /** @@ -49783,6 +49837,14 @@ var Frame = new Class({ y: 0, width: 0, height: 0 + }, + is3Slice: false, + scale9: false, + scale9Borders: { + x: 0, + y: 0, + w: 0, + h: 0 } }; @@ -49902,6 +49964,38 @@ var Frame = new Class({ return this.updateUVs(); }, + /** + * Sets the scale9 center rectangle values. + * + * Scale9 is a feature of Texture Packer, allowing you to define a nine-slice scaling grid. + * + * This is set automatically by the JSONArray and JSONHash parsers. + * + * @method Phaser.Textures.Frame#setScale9 + * @since 3.70.0 + * + * @param {number} x - The left coordinate of the center scale9 rectangle. + * @param {number} y - The top coordinate of the center scale9 rectangle. + * @param {number} width - The width of the center scale9 rectangle. + * @param {number} height - The height coordinate of the center scale9 rectangle. + * + * @return {this} This Frame object. + */ + setScale9: function (x, y, width, height) + { + var data = this.data; + + data.scale9 = true; + data.is3Slice = (y === 0 && height === this.height); + + data.scale9Borders.x = x; + data.scale9Borders.y = y; + data.scale9Borders.w = width; + data.scale9Borders.h = height; + + return this; + }, + /** * Takes a crop data object and, based on the rectangular region given, calculates the * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering. @@ -50203,8 +50297,8 @@ var Frame = new Class({ */ destroy: function () { - this.source = null; this.texture = null; + this.source = null; this.glTexture = null; this.customData = null; this.data = null; @@ -50280,6 +50374,40 @@ var Frame = new Class({ }, + /** + * Does the Frame have scale9 border data? + * + * @name Phaser.Textures.Frame#scale9 + * @type {boolean} + * @readonly + * @since 3.70.0 + */ + scale9: { + + get: function () + { + return this.data.scale9; + } + + }, + + /** + * If the Frame has scale9 border data, is it 3-slice or 9-slice data? + * + * @name Phaser.Textures.Frame#is3Slice + * @type {boolean} + * @readonly + * @since 3.70.0 + */ + is3Slice: { + + get: function () + { + return this.data.is3Slice; + } + + }, + /** * The Canvas drawImage data object. * @@ -51561,11 +51689,15 @@ module.exports = GetFirst; * @function Phaser.Utils.Array.GetRandom * @since 3.0.0 * - * @param {array} array - The array to select the random entry from. + * @generic T + * @genericUse {T[]} - [array] + * @genericUse {T} - [$return] + * + * @param {T[]} array - The array to select the random entry from. * @param {number} [startIndex=0] - An optional start index. * @param {number} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from. * - * @return {*} A random element from the array, or `null` if no element could be found in the range given. + * @return {T} A random element from the array, or `null` if no element could be found in the range given. */ var GetRandom = function (array, startIndex, length) { @@ -53560,12 +53692,20 @@ var RotateMatrix = __webpack_require__(7116); * @genericUse {T[][]} - [matrix,$return] * * @param {T[][]} [matrix] - The array to rotate. + * @param {number} [amount=1] - The number of times to rotate the matrix. * * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. */ -var RotateLeft = function (matrix) +var RotateLeft = function (matrix, amount) { - return RotateMatrix(matrix, 90); + if (amount === undefined) { amount = 1; } + + for (var i = 0; i < amount; i++) + { + matrix = RotateMatrix(matrix, 90); + } + + return matrix; }; module.exports = RotateLeft; @@ -53695,12 +53835,20 @@ var RotateMatrix = __webpack_require__(7116); * @genericUse {T[][]} - [matrix,$return] * * @param {T[][]} [matrix] - The array to rotate. + * @param {number} [amount=1] - The number of times to rotate the matrix. * * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix. */ -var RotateRight = function (matrix) +var RotateRight = function (matrix, amount) { - return RotateMatrix(matrix, -90); + if (amount === undefined) { amount = 1; } + + for (var i = 0; i < amount; i++) + { + matrix = RotateMatrix(matrix, -90); + } + + return matrix; }; module.exports = RotateRight; @@ -54061,7 +54209,7 @@ var GetValue = __webpack_require__(5851); * * Allowed types: * - * Implicit + * Explicit: * { * x: 4 * } diff --git a/plugins/spine4.1/dist/SpineWebGLPlugin.min.js b/plugins/spine4.1/dist/SpineWebGLPlugin.min.js index 7595ba124..bc9fc3ba8 100644 --- a/plugins/spine4.1/dist/SpineWebGLPlugin.min.js +++ b/plugins/spine4.1/dist/SpineWebGLPlugin.min.js @@ -1 +1 @@ -(()=>{var t={4399:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,s,n,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new r(s,n||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,r=[];if(0===this._eventsCount)return r;for(s in t=this._events)e.call(t,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,n=s.length,a=new Array(n);r{(function(){"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r={};((e,i)=>{for(var s in i)t(e,s,{get:i[s],enumerable:!0})})(r,{AlphaTimeline:()=>ft,Animation:()=>C,AnimationState:()=>kt,AnimationStateAdapter:()=>Ot,AnimationStateData:()=>Vt,AssetManager:()=>Ei,AssetManagerBase:()=>ce,AtlasAttachmentLoader:()=>ne,Attachment:()=>b,AttachmentTimeline:()=>mt,BinaryInput:()=>Pe,BlendMode:()=>ke,Bone:()=>he,BoneData:()=>ae,BoundingBoxAttachment:()=>Ut,CURRENT:()=>Nt,CameraController:()=>ji,ClippingAttachment:()=>Wt,Color:()=>h,Color2Attribute:()=>is,ColorAttribute:()=>es,ConstraintData:()=>le,CurveTimeline:()=>Q,CurveTimeline1:()=>$,CurveTimeline2:()=>tt,DebugUtils:()=>m,DeformTimeline:()=>xt,Downloader:()=>ue,DrawOrderTimeline:()=>bt,Event:()=>de,EventData:()=>fe,EventQueue:()=>Lt,EventTimeline:()=>yt,EventType:()=>Pt,FIRST:()=>Dt,FakeTexture:()=>Zt,GLTexture:()=>Mi,HOLD_FIRST:()=>Bt,HOLD_MIX:()=>zt,HOLD_SUBSEQUENT:()=>Xt,IkConstraint:()=>pe,IkConstraintData:()=>ge,IkConstraintTimeline:()=>At,Input:()=>qi,IntSet:()=>n,Interpolation:()=>u,LoadingScreen:()=>As,M00:()=>Ti,M01:()=>Ii,M02:()=>Ci,M03:()=>Ri,M10:()=>ki,M11:()=>Fi,M12:()=>Li,M13:()=>Pi,M20:()=>Oi,M21:()=>Yi,M22:()=>Di,M23:()=>Xi,M30:()=>Bi,M31:()=>zi,M32:()=>_i,M33:()=>Ni,ManagedWebGLRenderingContext:()=>yi,MathUtils:()=>c,Matrix4:()=>Ui,Mesh:()=>Ki,MeshAttachment:()=>te,MixBlend:()=>R,MixDirection:()=>k,OrthoCamera:()=>Wi,PathAttachment:()=>ee,PathConstraint:()=>be,PathConstraintData:()=>me,PathConstraintMixTimeline:()=>Tt,PathConstraintPositionTimeline:()=>Et,PathConstraintSpacingTimeline:()=>St,PointAttachment:()=>ie,PolygonBatcher:()=>ns,Pool:()=>x,Position2Attribute:()=>Qi,Position3Attribute:()=>$i,PositionMode:()=>xe,Pow:()=>d,PowOut:()=>f,RGB2Timeline:()=>gt,RGBA2Timeline:()=>pt,RGBATimeline:()=>ut,RGBTimeline:()=>dt,RegionAttachment:()=>re,ResizeMode:()=>ys,RotateMode:()=>ye,RotateTimeline:()=>et,SETUP:()=>_t,SUBSEQUENT:()=>Yt,ScaleTimeline:()=>nt,ScaleXTimeline:()=>at,ScaleYTimeline:()=>ot,SceneRenderer:()=>vs,SequenceTimeline:()=>Ct,Shader:()=>Zi,ShapeRenderer:()=>as,ShapeType:()=>os,ShearTimeline:()=>ht,ShearXTimeline:()=>lt,ShearYTimeline:()=>ct,Skeleton:()=>Se,SkeletonBinary:()=>Le,SkeletonBounds:()=>ci,SkeletonClipping:()=>di,SkeletonData:()=>Te,SkeletonDebugRenderer:()=>ls,SkeletonJson:()=>fi,SkeletonRenderer:()=>us,Skin:()=>Ce,SkinEntry:()=>Ie,Slot:()=>Ae,SlotData:()=>Re,SpacingMode:()=>ve,SpineCanvas:()=>Ss,StringSet:()=>a,TexCoordAttribute:()=>ts,Texture:()=>qt,TextureAtlas:()=>Kt,TextureAtlasPage:()=>Qt,TextureAtlasRegion:()=>$t,TextureFilter:()=>Gt,TextureRegion:()=>Ht,TextureWrap:()=>jt,TimeKeeper:()=>y,Timeline:()=>J,Touch:()=>Gi,TrackEntry:()=>Ft,TransformConstraint:()=>Me,TransformConstraintData:()=>Fe,TransformConstraintTimeline:()=>Mt,TransformMode:()=>oe,TranslateTimeline:()=>it,TranslateXTimeline:()=>st,TranslateYTimeline:()=>rt,Triangulator:()=>ui,Utils:()=>g,Vector2:()=>v,Vector3:()=>Si,VertexAttachment:()=>M,VertexAttribute:()=>Ji,VertexAttributeType:()=>ss,WebGLBlendModeConverter:()=>bi,WindowedMean:()=>w});var n=class{constructor(){this.array=new Array}add(t){let e=this.contains(t);return this.array[0|t]=0|t,!e}contains(t){return null!=this.array[0|t]}remove(t){this.array[0|t]=void 0}clear(){this.array.length=0}},a=class{constructor(){this.entries={},this.size=0}add(t){let e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){let e=this.size;for(var i=0,s=t.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}static rgb888ToColor(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}static fromString(t){return(new o).setFromString(t)}},h=o;h.WHITE=new o(1,1,1,1),h.RED=new o(1,0,0,1),h.GREEN=new o(0,1,0,1),h.BLUE=new o(0,0,1,1),h.MAGENTA=new o(1,0,1,1);var l=class{static clamp(t,e,i){return ti?i:t}static cosDeg(t){return Math.cos(t*l.degRad)}static sinDeg(t){return Math.sin(t*l.degRad)}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){let e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return l.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,i){let s=Math.random(),r=e-t;return s<=(i-t)/r?t+Math.sqrt(s*r*(i-t)):e-Math.sqrt((1-s)*r*(e-i))}static isPowerOfTwo(t){return t&&0==(t&t-1)}},c=l;c.PI=3.1415927,c.PI2=2*l.PI,c.radiansToDegrees=180/l.PI,c.radDeg=l.radiansToDegrees,c.degreesToRadians=l.PI/180,c.degRad=l.degreesToRadians;var u=class{apply(t,e,i){return t+(e-t)*this.applyInternal(i)}},d=class extends u{constructor(t){super(),this.power=2,this.power=t}applyInternal(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}},f=class extends d{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}},p=class{static arrayCopy(t,e,i,s,r){for(let n=e,a=s;n=e?t:p.setArraySize(t,e,i)}static newArray(t,e){let i=new Array(t);for(let s=0;s0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},w=class{constructor(t=32){this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e>1)*n;let a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(!l){o.length>0&&(h=o);let a=t.bone,l=a.worldX,c=a.worldY,u=a.a,d=a.b,f=a.c,p=a.d;for(let t=e,a=r;a=this.regions.length&&(i=this.regions.length-1);let s=this.regions[i];e.region!=s&&(e.region=s,e.updateRegion())}getPath(t,e){let i=t,s=(this.start+e).toString();for(let t=this.digits-s.length;t>0;t--)i+="0";return i+=s,i}static nextID(){return E._nextID++}},S=E;S._nextID=0;var T=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(T||{}),I=[0,1,2,3,4,5,6],C=class{constructor(t,e,i){if(this.timelines=[],this.timelineIds=new a,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=i}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));let h=this.timelines;for(let s=0,l=h.length;s(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(R||{}),k=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(k||{}),F=0,L=1,P=2,O=3,Y=4,D=5,X=6,B=7,z=8,_=9,N=10,V=11,U=12,W=13,q=14,G=15,j=16,H=17,Z=18,K=19,J=class{constructor(t,e){this.propertyIds=e,this.frames=g.newFloatArray(t*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(t,e){let i=t.length;for(let s=1;se)return s-1;return i-1}static search(t,e,i){let s=t.length;for(let r=i;re)return r-i;return s-i}},Q=class extends J{constructor(t,e,i){super(t,i),this.curves=g.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let e=this.getFrameCount()+18*t;if(this.curves.length>e){let t=g.newFloatArray(e);g.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,i,s,r,n,a,o,h,l,c){let u=this.curves,d=this.getFrameCount()+18*t;0==i&&(u[e]=2+d);let f=.03*(s-2*n+o),p=.03*(r-2*a+h),g=.006*(3*(n-o)-s+l),m=.006*(3*(a-h)-r+c),x=2*f+g,v=2*p+m,y=.3*(n-s)+f+.16666667*g,w=.3*(a-r)+p+.16666667*m,b=s+y,A=r+w;for(let t=d+18;dt){let n=this.frames[e],a=this.frames[e+i];return a+(t-n)/(r[s]-n)*(r[s+1]-a)}let n=s+18;for(s+=2;s=t){let e=r[s-2],i=r[s-1];return i+(t-e)/(r[s]-e)*(r[s+1]-i)}e+=this.getFrameEntries();let a=r[n-2],o=r[n-1];return o+(t-a)/(this.frames[e]-a)*(this.frames[e+i]-o)}},$=class extends Q{constructor(t,e,i){super(t,e,[i])}getFrameEntries(){return 2}setFrame(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+1]=i}getCurveValue(t){let e=this.frames,i=e.length-2;for(let s=2;s<=i;s+=2)if(e[s]>t){i=s-2;break}let s=this.curves[i>>1];switch(s){case 0:let s=e[i],r=e[i+1];return r+(t-s)/(e[i+2]-s)*(e[i+2+1]-r);case 1:return e[i+1]}return this.getBezierValue(t,i,1,s-2)}},tt=class extends Q{constructor(t,e,i,s){super(t,e,[i,s])}getFrameEntries(){return 3}setFrame(t,e,i,s){t*=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s}},et=class extends ${constructor(t,e,i){super(t,e,F+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i>2];switch(p){case 0:let t=h[f];c=h[f+1],u=h[f+2],d=h[f+3];let e=(i-t)/(h[f+4]-t);c+=(h[f+4+1]-c)*e,u+=(h[f+4+2]-u)*e,d+=(h[f+4+3]-d)*e;break;case 1:c=h[f+1],u=h[f+2],d=h[f+3];break;default:c=this.getBezierValue(i,f,1,p-2),u=this.getBezierValue(i,f,2,p+18-2),d=this.getBezierValue(i,f,3,p+36-2)}if(1==r)l.r=c,l.g=u,l.b=d;else{if(0==n){let t=o.data.color;l.r=t.r,l.g=t.g,l.b=t.b}l.r+=(c-l.r)*r,l.g+=(u-l.g)*r,l.b+=(d-l.b)*r}}},ft=class extends ${constructor(t,e,i){super(t,e,z+"|"+i),this.slotIndex=0,this.slotIndex=i}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.color;if(i>3];switch(y){case 0:let t=h[v];u=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],g=h[v+5],m=h[v+6],x=h[v+7];let e=(i-t)/(h[v+8]-t);u+=(h[v+8+1]-u)*e,d+=(h[v+8+2]-d)*e,f+=(h[v+8+3]-f)*e,p+=(h[v+8+4]-p)*e,g+=(h[v+8+5]-g)*e,m+=(h[v+8+6]-m)*e,x+=(h[v+8+7]-x)*e;break;case 1:u=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],g=h[v+5],m=h[v+6],x=h[v+7];break;default:u=this.getBezierValue(i,v,1,y-2),d=this.getBezierValue(i,v,2,y+18-2),f=this.getBezierValue(i,v,3,y+36-2),p=this.getBezierValue(i,v,4,y+54-2),g=this.getBezierValue(i,v,5,y+72-2),m=this.getBezierValue(i,v,6,y+90-2),x=this.getBezierValue(i,v,7,y+108-2)}if(1==r)l.set(u,d,f,p),c.r=g,c.g=m,c.b=x;else{if(0==n){l.setFromColor(o.data.color);let t=o.data.darkColor;c.r=t.r,c.g=t.g,c.b=t.b}l.add((u-l.r)*r,(d-l.g)*r,(f-l.b)*r,(p-l.a)*r),c.r+=(g-c.r)*r,c.g+=(m-c.g)*r,c.b+=(x-c.b)*r}}},gt=class extends Q{constructor(t,e,i){super(t,e,[B+"|"+i,_+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,s,r,n,a,o){t*=7,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n,this.frames[t+5]=a,this.frames[t+6]=o}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,c=o.darkColor;if(it){let r=this.frames[e];return i[s+1]*(t-r)/(i[s]-r)}let r=s+18;for(s+=2;s=t){let e=i[s-2],r=i[s-1];return r+(t-e)/(i[s]-e)*(i[s+1]-r)}let n=i[r-2],a=i[r-1];return a+(1-a)*(t-n)/(this.frames[e+this.getFrameEntries()]-n)}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.getAttachment();if(!h)return;if(!(h instanceof M)||h.timelineAttachment!=this.attachment)return;let l=o.deform;0==l.length&&(n=0);let c=this.vertices,u=c[0].length,d=this.frames;if(i=d[d.length-1]){let t=c[d.length-1];if(1==r)if(3==n){let e=h;if(e.bones)for(let e=0;ei)this.apply(t,e,Number.MAX_VALUE,s,r,n,a),e=-1;else if(e>=o[h-1])return;if(i0&&o[l-1]==t;)l--}for(;l=o[l];l++)s.push(this.events[l])}},yt=vt;yt.propertyIds=[""+U];var wt=class extends J{constructor(t){super(t,wt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.drawOrders[t]=i}apply(t,e,i,s,r,n,a){if(1==a)return void(0==n&&g.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(i>2];switch(f){case 0:let t=u[d];h=u[d+1],l=u[d+2],c=u[d+3];let e=(i-t)/(u[d+4]-t);h+=(u[d+4+1]-h)*e,l+=(u[d+4+2]-l)*e,c+=(u[d+4+3]-c)*e;break;case 1:h=u[d+1],l=u[d+2],c=u[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),c=this.getBezierValue(i,d,3,f+36-2)}if(0==n){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*r,o.mixX=t.mixX+(l-t.mixX)*r,o.mixY=t.mixY+(c-t.mixY)*r}else o.mixRotate+=(h-o.mixRotate)*r,o.mixX+=(l-o.mixX)*r,o.mixY+=(c-o.mixY)*r}},It=class extends J{constructor(t,e,i){super(t,[K+"|"+e+"|"+i.sequence.id]),this.slotIndex=e,this.attachment=i}getFrameEntries(){return It.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,i,s,r){let n=this.frames;n[t*=It.ENTRIES]=e,n[t+It.MODE]=i|s<<4,n[t+It.DELAY]=r}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.attachment,l=this.attachment;if(!(h==l||h instanceof M&&h.timelineAttachment==l))return;let c=this.frames;if(i>4,m=this.attachment.sequence.regions.length,x=I[15&f];if(0!=x)switch(g+=(i-d)/p+1e-5|0,x){case 1:g=Math.min(m-1,g);break;case 2:g%=m;break;case 3:{let t=(m<<1)-2;g=0==t?0:g%t,g>=m&&(g=t-g);break}case 4:g=Math.max(m-1-g,0);break;case 5:g=m-1-g%m;break;case 6:{let t=(m<<1)-2;g=0==t?0:(g+m-1)%t,g>=m&&(g=t-g)}}o.sequenceIndex=g}},Ct=It;Ct.ENTRIES=3,Ct.MODE=1,Ct.DELAY=2;var Rt=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Lt(this),this.propertyIDs=new a,this.animationsChanged=!1,this.trackEntryPool=new x((()=>new Ft)),this.data=t}static emptyAnimation(){return Rt._emptyAnimation}update(t){t*=this.timeScale;let e=this.tracks;for(let i=0,s=e.length;i0){if(s.delay-=r,s.delay>0)continue;r=-s.delay,s.delay=0}let n=s.next;if(n){let e=s.trackLast-n.delay;if(e>=0){for(n.delay=0,n.trackTime+=0==s.timeScale?0:(e/s.timeScale+t)*n.timeScale,s.trackTime+=r,this.setCurrent(i,n,!0);n.mixingFrom;)n.mixTime+=t,n=n.mixingFrom;continue}}else if(s.trackLast>=s.trackEnd&&!s.mixingFrom){e[i]=null,this.queue.end(s),this.clearNext(s);continue}if(s.mixingFrom&&this.updateMixingFrom(s,t)){let t=s.mixingFrom;for(s.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}s.trackTime+=r}this.queue.drain()}updateMixingFrom(t,e){let i=t.mixingFrom;if(!i)return!0;let s=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),s):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let e=this.events,i=this.tracks,s=!1;for(let n=0,a=i.length;n0)continue;s=!0;let o=0==n?1:a.mixBlend,h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let l=a.animationLast,c=a.getAnimationTime(),u=c,d=e;a.reverse&&(u=a.animation.duration-u,d=null);let f=a.animation.timelines,p=f.length;if(0==n&&1==h||3==o)for(let e=0;e1&&(r=1),1!=i&&(i=s.mixBlend));let n=r0&&this.queueEvents(s,d),this.events.length=0,s.nextAnimationLast=d,s.nextTrackLast=s.trackTime,r}applyAttachmentTimeline(t,e,i,s,r){var n=e.slots[t.slotIndex];n.bone.active&&(i0,s=t>=0;c.signum(e)!=c.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*c.signum(t)),s=i),d=f+t-t%360,s!=i&&(d+=360*c.signum(t)),n[a]=d}n[a+1]=f,h.rotation=l+d*s}queueEvents(t,e){let i=t.animationStart,s=t.animationEnd,r=s-i,n=t.trackLast%r,a=this.events,o=0,h=a.length;for(;os||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==r||n>t.trackTime%r:e>=s&&t.animationLast=this.tracks.length)return;let e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let i=e;for(;;){let t=i.mixingFrom;if(!t)break;this.queue.end(t),i.mixingFrom=null,i.mixingTo=null,i=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,i){let s=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,s&&(i&&this.queue.interrupt(s),e.mixingFrom=s,s.mixingTo=e,e.mixTime=0,s.mixingFrom&&s.mixDuration>0&&(e.interruptAlpha*=Math.min(1,s.mixTime/s.mixDuration)),s.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,i=!1){let s=this.data.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,s,i)}setAnimationWith(t,e,i=!1){if(!e)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));let n=this.trackEntry(t,e,i,r);return this.setCurrent(t,n,s),this.queue.drain(),n}addAnimation(t,e,i=!1,s=0){let r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,s)}addAnimationWith(t,e,i=!1,s=0){if(!e)throw new Error("animation cannot be null.");let r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;let n=this.trackEntry(t,e,i,r);return r?(r.next=n,n.previous=r,s<=0&&(s+=r.getTrackComplete()-n.mixDuration)):(this.setCurrent(t,n,!0),this.queue.drain()),n.delay=s,n}setEmptyAnimation(t,e=0){let i=this.setAnimationWith(t,Rt.emptyAnimation(),!1);return i.mixDuration=e,i.trackEnd=e,i}addEmptyAnimation(t,e=0,i=0){let s=this.addAnimationWith(t,Rt.emptyAnimation(),!1,i);return i<=0&&(s.delay+=s.mixDuration-e),s.mixDuration=e,s.trackEnd=e,s}setEmptyAnimations(t=0){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,i=this.tracks.length;e0){r[o]=zt,n[o]=i;continue t}break}r[o]=Bt}else r[o]=Yt}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},kt=Rt;kt._emptyAnimation=new C("",[],0);var Ft=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=2,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(t){this.animationLast=t,this.nextAnimationLast=t}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime(t[t.start=0]="start",t[t.interrupt=1]="interrupt",t[t.end=2]="end",t[t.dispose=3]="dispose",t[t.complete=4]="complete",t[t.event=5]="event",t))(Pt||{}),Ot=class{start(t){}interrupt(t){}end(t){}dispose(t){}complete(t){}event(t,e){}},Yt=0,Dt=1,Xt=2,Bt=3,zt=4,_t=1,Nt=2,Vt=class{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,i){let s=this.skeletonData.findAnimation(t);if(!s)throw new Error("Animation not found: "+t);let r=this.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);this.setMixWith(s,r,i)}setMixWith(t,e,i){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");let s=t.name+"."+e.name;this.animationToMixTime[s]=i}getMix(t,e){let i=t.name+"."+e.name,s=this.animationToMixTime[i];return void 0===s?this.defaultMix:s}},Ut=class extends M{constructor(t){super(t),this.color=new h(1,1,1,1)}copy(){let t=new Ut(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}},Wt=class extends M{constructor(t){super(t),this.endSlot=null,this.color=new h(.2275,.2275,.8078,1)}copy(){let t=new Wt(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}},qt=class{constructor(t){this._image=t}getImage(){return this._image}},Gt=(t=>(t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear",t))(Gt||{}),jt=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(jt||{}),Ht=class{constructor(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}},Zt=class extends qt{setFilters(t,e){}setWraps(t,e){}dispose(){}},Kt=class{constructor(t){this.pages=new Array,this.regions=new Array;let e=new Jt(t),i=new Array(4),s={size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},format:()=>{},filter:t=>{t.minFilter=g.enumValue(Gt,i[1]),t.magFilter=g.enumValue(Gt,i[2])},repeat:t=>{-1!=i[1].indexOf("x")&&(t.uWrap=10497),-1!=i[1].indexOf("y")&&(t.vWrap=10497)},pma:t=>{t.pma="true"==i[1]}};var r={xy:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2])},size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},bounds:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2]),t.width=parseInt(i[3]),t.height=parseInt(i[4])},offset:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2])},orig:t=>{t.originalWidth=parseInt(i[1]),t.originalHeight=parseInt(i[2])},offsets:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2]),t.originalWidth=parseInt(i[3]),t.originalHeight=parseInt(i[4])},rotate:t=>{let e=i[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:t=>{t.index=parseInt(i[1])}};let n=e.readLine();for(;n&&0==n.trim().length;)n=e.readLine();for(;n&&0!=n.trim().length&&0!=e.readEntry(i,n);)n=e.readLine();let a=null,o=null,h=null;for(;null!==n;)if(0==n.trim().length)a=null,n=e.readLine();else if(a){let t=new $t(a,n);for(;;){let s=e.readEntry(i,n=e.readLine());if(0==s)break;let a=r[i[0]];if(a)a(t);else{o||(o=[]),h||(h=[]),o.push(i[0]);let t=[];for(let e=0;e0&&h&&h.length>0&&(t.names=o,t.values=h,o=null,h=null),t.u=t.x/a.width,t.v=t.y/a.height,90==t.degrees?(t.u2=(t.x+t.height)/a.width,t.v2=(t.y+t.width)/a.height):(t.u2=(t.x+t.width)/a.width,t.v2=(t.y+t.height)/a.height),this.regions.push(t)}else{for(a=new Qt(n.trim());0!=e.readEntry(i,n=e.readLine());){let t=s[i[0]];t&&t(a)}this.pages.push(a)}}findRegion(t){for(let e=0;e=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;let i=e.indexOf(":");if(-1==i)return 0;t[0]=e.substr(0,i).trim();for(let s=1,r=i+1;;s++){let i=e.indexOf(",",r);if(-1==i)return t[s]=e.substr(r).trim(),s;if(t[s]=e.substr(r,i-r).trim(),r=i+1,4==s)return 4}}},Qt=class{constructor(t){this.minFilter=9728,this.magFilter=9728,this.uWrap=33071,this.vWrap=33071,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.name=t}setTexture(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}},$t=class extends Ht{constructor(t,e){super(),this.x=0,this.y=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.index=0,this.degrees=0,this.names=null,this.values=null,this.page=t,this.name=e}},te=class extends M{constructor(t,e){super(t),this.region=null,this.regionUVs=[],this.uvs=[],this.triangles=[],this.color=new h(1,1,1,1),this.width=0,this.height=0,this.hullLength=0,this.edges=[],this.parentMesh=null,this.sequence=null,this.tempColor=new h(0,0,0,0),this.path=e}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=g.newFloatArray(t.length));let e=this.uvs,i=this.uvs.length,s=this.region.u,r=this.region.v,n=0,a=0;if(this.region instanceof $t){let o=this.region,h=o.page.texture.getImage(),l=h.width,c=h.height;switch(o.degrees){case 90:s-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/c,n=o.originalHeight/l,a=o.originalWidth/c;for(let o=0;o= 0.");if(!e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}},oe=(t=>(t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection",t))(oe||{}),he=class{constructor(t,e,i){if(this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}isActive(){return this.active}update(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(t,e,i,s,r,n,a){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=s,this.ascaleY=r,this.ashearX=n,this.ashearY=a;let o=this.parent;if(!o){let o=this.skeleton,h=i+90+a,l=o.scaleX,u=o.scaleY;return this.a=c.cosDeg(i+n)*s*l,this.b=c.cosDeg(h)*r*l,this.c=c.sinDeg(i+n)*s*u,this.d=c.sinDeg(h)*r*u,this.worldX=t*l+o.x,void(this.worldY=e*u+o.y)}let h=o.a,l=o.b,u=o.c,d=o.d;switch(this.worldX=h*t+l*e+o.worldX,this.worldY=u*t+d*e+o.worldY,this.data.transformMode){case 0:{let t=i+90+a,e=c.cosDeg(i+n)*s,o=c.cosDeg(t)*r,f=c.sinDeg(i+n)*s,p=c.sinDeg(t)*r;return this.a=h*e+l*f,this.b=h*o+l*p,this.c=u*e+d*f,void(this.d=u*o+d*p)}case 1:{let t=i+90+a;this.a=c.cosDeg(i+n)*s,this.b=c.cosDeg(t)*r,this.c=c.sinDeg(i+n)*s,this.d=c.sinDeg(t)*r;break}case 2:{let t=h*h+u*u,e=0;t>1e-4?(t=Math.abs(h*d-l*u)/t,h/=this.skeleton.scaleX,u/=this.skeleton.scaleY,l=u*t,d=h*t,e=Math.atan2(u,h)*c.radDeg):(h=0,u=0,e=90-Math.atan2(d,l)*c.radDeg);let o=i+n-e,f=i+a-e+90,p=c.cosDeg(o)*s,g=c.cosDeg(f)*r,m=c.sinDeg(o)*s,x=c.sinDeg(f)*r;this.a=h*p-l*m,this.b=h*g-l*x,this.c=u*p+d*m,this.d=u*g+d*x;break}case 3:case 4:{let t=c.cosDeg(i),e=c.sinDeg(i),o=(h*t+l*e)/this.skeleton.scaleX,f=(u*t+d*e)/this.skeleton.scaleY,p=Math.sqrt(o*o+f*f);p>1e-5&&(p=1/p),o*=p,f*=p,p=Math.sqrt(o*o+f*f),3==this.data.transformMode&&h*d-l*u<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(p=-p);let g=Math.PI/2+Math.atan2(f,o),m=Math.cos(g)*p,x=Math.sin(g)*p,v=c.cosDeg(n)*s,y=c.cosDeg(90+a)*r,w=c.sinDeg(n)*s,b=c.sinDeg(90+a)*r;this.a=o*v+m*w,this.b=o*y+m*b,this.c=f*v+x*w,this.d=f*y+x*b;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}getWorldRotationX(){return Math.atan2(this.c,this.a)*c.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*c.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}updateAppliedTransform(){let t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*c.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*c.radDeg);let e=t.a,i=t.b,s=t.c,r=t.d,n=1/(e*r-i*s),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*n-o*i*n,this.ay=o*e*n-a*s*n;let h=n*r,l=n*e,u=n*i,d=n*s,f=h*this.a-u*this.c,p=h*this.b-u*this.d,g=l*this.c-d*this.a,m=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+g*g),this.ascaleX>1e-4){let t=f*m-p*g;this.ascaleY=t/this.ascaleX,this.ashearY=Math.atan2(f*p+g*m,t)*c.radDeg,this.arotation=Math.atan2(g,f)*c.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,p)*c.radDeg}worldToLocal(t){let e=1/(this.a*this.d-this.b*this.c),i=t.x-this.worldX,s=t.y-this.worldY;return t.x=i*this.d*e-s*this.b*e,t.y=s*this.a*e-i*this.c*e,t}localToWorld(t){let e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t}worldToLocalRotation(t){let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*c.radDeg+this.rotation-this.shearX}localToWorldRotation(t){t-=this.rotation-this.shearX;let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*c.radDeg}rotateWorld(t){let e=this.a,i=this.b,s=this.c,r=this.d,n=c.cosDeg(t),a=c.sinDeg(t);this.a=n*e-a*s,this.b=n*i-a*r,this.c=a*e+n*s,this.d=a*i+n*r}},le=class{constructor(t,e,i){this.name=t,this.order=e,this.skinRequired=i}},ce=class{constructor(t,e="",i=new ue){this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=t,this.pathPrefix=e,this.downloader=i}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,i){this.toLoad--,this.loaded++,this.assets[e]=i,t&&t(e,i)}error(t,e,i){this.toLoad--,this.loaded++,this.errors[e]=i,t&&t(e,i)}loadAll(){return new Promise(((t,e)=>{let i=()=>{this.isLoadingComplete()?this.hasErrors()?e(this.errors):t(this):requestAnimationFrame(i)};requestAnimationFrame(i)}))}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadBinary(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load binary ${t}: status ${e}, ${s}`)}))}loadText(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadText(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load text ${t}: status ${e}, ${s}`)}))}loadJson(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadJson(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load JSON ${t}: status ${e}, ${s}`)}))}loadTexture(t,e=(()=>{}),i=(()=>{})){if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then((e=>e.ok?e.blob():(this.error(i,t,`Couldn't load image: ${t}`),null))).then((t=>t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null)).then((i=>{i&&this.success(e,t,this.textureLoader(i))}));else{let s=new Image;s.crossOrigin="anonymous",s.onload=()=>{this.success(e,t,this.textureLoader(s))},s.onerror=()=>{this.error(i,t,`Couldn't load image: ${t}`)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),s.src=t}}loadTextureAtlas(t,e=(()=>{}),i=(()=>{}),s){let r=t.lastIndexOf("/"),n=r>=0?t.substring(0,r+1):"";t=this.start(t),this.downloader.downloadText(t,(r=>{try{let a=new Kt(r),o=a.pages.length,h=!1;for(let r of a.pages)this.loadTexture(s?s[r.name]:n+r.name,((i,s)=>{h||(r.setTexture(s),0==--o&&this.success(e,t,a))}),((e,s)=>{h||this.error(i,t,`Couldn't load texture atlas ${t} page image: ${e}`),h=!0}))}catch(e){this.error(i,t,`Couldn't parse texture atlas ${t}: ${e.message}`)}}),((e,s)=>{this.error(i,t,`Couldn't load texture atlas ${t}: status ${e}, ${s}`)}))}get(t){return this.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;let e=this.assets[t];if(e)return e;let i=this.errors[t];throw Error("Asset not found: "+t+(i?"\n"+i:""))}remove(t){t=this.pathPrefix+t;let e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}removeAll(){for(let t in this.assets){let e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}isLoadingComplete(){return 0==this.toLoad}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}},ue=class{constructor(){this.callbacks={},this.rawDataUris={}}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return-1!=e?(e+="base64,".length,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){for(var e=window.atob(t),i=e.length,s=new Uint8Array(i),r=0;r{this.finish(t,s.status,s.responseText)};s.onload=r,s.onerror=r,s.send()}downloadJson(t,e,i){this.downloadText(t,(t=>{e(JSON.parse(t))}),i)}downloadBinary(t,e,i){if(this.start(t,e,i))return;if(this.rawDataUris[t]){try{let e=this.rawDataUris[t];this.finish(t,200,this.dataUriToUint8Array(e))}catch(e){this.finish(t,400,JSON.stringify(e))}return}let s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer";let r=()=>{this.finish(t,s.status,s.response)};s.onload=()=>{200==s.status||0==s.status?this.finish(t,200,new Uint8Array(s.response)):r()},s.onerror=r,s.send()}start(t,e,i){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,i)}}finish(t,e,i){let s=this.callbacks[t];delete this.callbacks[t];let r=200==e||0==e?[i]:[e,i];for(let t=r.length-1,e=s.length;t180?f-=360:f<-180&&(f+=360);let m=t.ascaleX,x=t.ascaleY;if(s||r){switch(t.data.transformMode){case 3:case 4:p=e-t.worldX,g=i-t.worldY}let o=t.data.length*m,h=Math.sqrt(p*p+g*g);if(s&&ho&&o>1e-4){let t=(h/o-1)*a+1;m*=t,n&&(x*=t)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,m,x,t.ashearX,t.ashearY)}apply2(t,e,i,s,r,n,a,o,h){let l=t.ax,u=t.ay,d=t.ascaleX,f=t.ascaleY,p=d,g=f,m=e.ascaleX,x=0,v=0,y=0;d<0?(d=-d,x=180,y=-1):(x=0,y=1),f<0&&(f=-f,y=-y),m<0?(m=-m,v=180):v=0;let w=e.ax,b=0,A=0,M=0,E=t.a,S=t.b,T=t.c,I=t.d,C=Math.abs(d-f)<=1e-4;!C||n?(b=0,A=E*w+t.worldX,M=T*w+t.worldY):(b=e.ay,A=E*w+S*b+t.worldX,M=T*w+I*b+t.worldY);let R=t.parent;if(!R)throw new Error("IK parent must itself have a parent.");E=R.a,S=R.b,T=R.c,I=R.d;let k,F,L=1/(E*I-S*T),P=A-R.worldX,O=M-R.worldY,Y=(P*I-O*S)*L-l,D=(O*E-P*T)*L-u,X=Math.sqrt(Y*Y+D*D),B=e.data.length*m;if(X<1e-4)return this.apply1(t,i,s,!1,n,!1,h),void e.updateWorldTransformWith(w,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);P=i-R.worldX,O=s-R.worldY;let z=(P*I-O*S)*L-l,_=(O*E-P*T)*L-u,N=z*z+_*_;if(0!=o){o*=d*(m+1)*.5;let t=Math.sqrt(N),e=t-X-B*d+o;if(e>0){let i=Math.min(1,e/(2*o))-1;i=(e-o*(1-i*i))/t,z-=i*z,_-=i*_,N=z*z+_*_}}t:if(C){B*=d;let t=(N-X*X-B*B)/(2*X*B);t<-1?(t=-1,F=Math.PI*r):t>1?(t=1,F=0,n&&(E=(Math.sqrt(N)/(X+B)-1)*h+1,p*=E,a&&(g*=E))):F=Math.acos(t)*r,E=X+B*t,S=B*Math.sin(F),k=Math.atan2(_*E-z*S,z*E+_*S)}else{E=d*B,S=f*B;let t=E*E,e=S*S,i=Math.atan2(_,z);T=e*X*X+t*N-t*e;let s=-2*e*X,n=e-t;if(I=s*s-4*n*T,I>=0){let t=Math.sqrt(I);s<0&&(t=-t),t=.5*-(s+t);let e=t/n,a=T/t,o=Math.abs(e)=-1&&T<=1&&(T=Math.acos(T),P=E*Math.cos(T)+X,O=S*Math.sin(T),I=P*P+O*O,Ig&&(u=T,g=I,p=P,m=O)),N<=.5*(h+g)?(k=i-Math.atan2(l*r,o),F=a*r):(k=i-Math.atan2(m*r,p),F=u*r)}let V=Math.atan2(b,w)*y,U=t.arotation;k=(k-V)*c.radDeg+x-U,k>180?k-=360:k<-180&&(k+=360),t.updateWorldTransformWith(l,u,U+k*h,p,g,0,0),U=e.arotation,F=((F+V)*c.radDeg-e.ashearX)*y+v-U,F>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(w,b,U+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}},ge=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.softness=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},me=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.positionMode=xe.Fixed,this.spacingMode=ve.Fixed,this.rotateMode=ye.Chain,this.offsetRotation=0,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}},xe=(t=>(t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent",t))(xe||{}),ve=(t=>(t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional",t))(ve||{}),ye=(t=>(t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale",t))(ye||{}),we=class{constructor(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(let i=0,s=t.bones.length;i0){t=l/t*f;for(let e=1;e0?c.degRad:-c.degRad}for(let t=0,r=3;t0){let i=h.a,s=h.b,a=h.c,o=h.d,l=0,d=0,f=0;if(l=n?p[r-1]:0==u[t+1]?p[r+2]:Math.atan2(w,g),l-=Math.atan2(a,i),y){d=Math.cos(l),f=Math.sin(l);let t=h.data.length;m+=(t*(d*i-f*a)-g)*e,x+=(t*(f*i+d*a)-w)*e}else l+=v;l>c.PI?l-=c.PI2:l<-c.PI&&(l+=c.PI2),l*=e,d=Math.cos(l),f=Math.sin(l),h.a=d*i-f*a,h.b=d*s-f*o,h.c=f*i+d*a,h.d=f*s+d*o}h.updateAppliedTransform()}}computeWorldPositions(t,e,i){let s=this.target,r=this.position,n=this.spaces,a=g.setArraySize(this.positions,3*e+2),o=this.world,h=t.closed,l=t.worldVerticesLength,c=l/6,u=we.NONE;if(!t.constantSpeed){let d=t.lengths;c-=h?1:2;let f,p=d[c];switch(1==this.data.positionMode&&(r*=p),this.data.spacingMode){case 2:f=p;break;case 3:f=p/e;break;default:f=1}o=g.setArraySize(this.world,8);for(let g=0,m=0,x=0;gp){u!=we.AFTER&&(u=we.AFTER,t.computeWorldVertices(s,l-6,4,o,0,2)),this.addAfterPosition(v-p,o,0,a,m);continue}}for(;;x++){let t=d[x];if(!(v>t)){if(0==x)v/=t;else{let e=d[x-1];v=(v-e)/(t-e)}break}}x!=u&&(u=x,h&&x==c?(t.computeWorldVertices(s,l-4,4,o,0,2),t.computeWorldVertices(s,0,4,o,4,2)):t.computeWorldVertices(s,6*x+2,8,o,0,2)),this.addCurvePosition(v,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],a,m,i||g>0&&0==e)}return a}h?(l+=2,o=g.setArraySize(this.world,l),t.computeWorldVertices(s,2,l-4,o,0,2),t.computeWorldVertices(s,0,2,o,l-4,2),o[l-2]=o[0],o[l-1]=o[1]):(c--,l-=4,o=g.setArraySize(this.world,l),t.computeWorldVertices(s,2,l,o,0,2));let d,f=g.setArraySize(this.curves,c),p=0,m=o[0],x=o[1],v=0,y=0,w=0,b=0,A=0,M=0,E=0,S=0,T=0,I=0,C=0,R=0,k=0,F=0;for(let t=0,e=2;tp){this.addAfterPosition(O-p,o,l-4,a,s);continue}}for(;;c++){let t=f[c];if(!(O>t)){if(0==c)O/=t;else{let e=f[c-1];O=(O-e)/(t-e)}break}}if(c!=u){u=c;let t=6*c;for(m=o[t],x=o[t+1],v=o[t+2],y=o[t+3],w=o[t+4],b=o[t+5],A=o[t+6],M=o[t+7],E=.03*(m-2*v+w),S=.03*(x-2*y+b),T=.006*(3*(v-w)-m+A),I=.006*(3*(y-b)-x+M),C=2*E+T,R=2*S+I,k=.3*(v-m)+E+.16666667*T,F=.3*(y-x)+S+.16666667*I,P=Math.sqrt(k*k+F*F),L[0]=P,t=1;t<8;t++)k+=C,F+=R,C+=T,R+=I,P+=Math.sqrt(k*k+F*F),L[t]=P;k+=C,F+=R,P+=Math.sqrt(k*k+F*F),L[8]=P,k+=C+T,F+=R+I,P+=Math.sqrt(k*k+F*F),L[9]=P,g=0}for(O*=P;;g++){let t=L[g];if(!(O>t)){if(0==g)O/=t;else{let e=L[g-1];O=g+(O-e)/(t-e)}break}}this.addCurvePosition(.1*O,m,x,v,y,w,b,A,M,a,s,i||t>0&&0==e)}return a}addBeforePosition(t,e,i,s,r){let n=e[i],a=e[i+1],o=e[i+2]-n,h=e[i+3]-a,l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addAfterPosition(t,e,i,s,r){let n=e[i+2],a=e[i+3],o=n-e[i],h=a-e[i+1],l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addCurvePosition(t,e,i,s,r,n,a,o,h,l,c,u){if(0==t||isNaN(t))return l[c]=e,l[c+1]=i,void(l[c+2]=Math.atan2(r-i,s-e));let d=t*t,f=d*t,p=1-t,g=p*p,m=g*p,x=p*t,v=3*x,y=p*v,w=v*t,b=e*m+s*y+n*w+o*f,A=i*m+r*y+a*w+h*f;l[c]=b,l[c+1]=A,u&&(l[c+2]=t<.001?Math.atan2(r-i,s-e):Math.atan2(A-(i*g+r*x*2+a*d),b-(e*g+s*x*2+n*d)))}},be=we;be.NONE=-1,be.BEFORE=-2,be.AFTER=-3,be.epsilon=1e-5;var Ae=class{constructor(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(t instanceof M&&this.attachment instanceof M&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},Me=class{constructor(t,e){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new v,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(let i=0;i0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,g=this.data.offsetShearY*f,m=this.bones;for(let f=0,x=m.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=(t.x-x.worldX)*e,x.worldY+=(t.y-x.worldY)*i}if(0!=s){let t=Math.sqrt(x.a*x.a+x.c*x.c);0!=t&&(t=(t+(Math.sqrt(h*h+u*u)-t+this.data.offsetScaleX)*s)/t),x.a*=t,x.c*=t}if(0!=r){let t=Math.sqrt(x.b*x.b+x.d*x.d);0!=t&&(t=(t+(Math.sqrt(l*l+d*d)-t+this.data.offsetScaleY)*r)/t),x.b*=t,x.d*=t}if(n>0){let t=x.b,e=x.d,i=Math.atan2(e,t),s=Math.atan2(d,l)-Math.atan2(u,h)-(i-Math.atan2(x.c,x.a));s>c.PI?s-=c.PI2:s<-c.PI&&(s+=c.PI2),s=i+(s+g)*n;let r=Math.sqrt(t*t+e*e);x.b=Math.cos(s)*r,x.d=Math.sin(s)*r}x.updateAppliedTransform()}}applyRelativeWorld(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=0!=e||0!=i,o=this.target,h=o.a,l=o.b,u=o.c,d=o.d,f=h*d-l*u>0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,g=this.data.offsetShearY*f,m=this.bones;for(let f=0,x=m.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=t.x*e,x.worldY+=t.y*i}if(0!=s){let t=(Math.sqrt(h*h+u*u)-1+this.data.offsetScaleX)*s+1;x.a*=t,x.c*=t}if(0!=r){let t=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*r+1;x.b*=t,x.d*=t}if(n>0){let t=Math.atan2(d,l)-Math.atan2(u,h);t>c.PI?t-=c.PI2:t<-c.PI&&(t+=c.PI2);let e=x.b,i=x.d;t=Math.atan2(i,e)+(t-c.PI/2+g)*n;let s=Math.sqrt(e*e+i*i);x.b=Math.cos(t)*s,x.d=Math.sin(t)*s}x.updateAppliedTransform()}}applyAbsoluteLocal(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=this.target,o=this.bones;for(let h=0,l=o.length;h=s.length&&(s.length=t+1),s[t]||(s[t]={}),s[t][e]=i}addSkin(t){for(let e=0;e= 0.");if(!e)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}},ke=(t=>(t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen",t))(ke||{}),Fe=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Le=class{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){let e=this.scale,i=new Te;i.name="";let s=new Pe(t),r=s.readInt32(),n=s.readInt32();i.hash=0==n&&0==r?null:n.toString(16)+r.toString(16),i.version=s.readString(),i.x=s.readFloat(),i.y=s.readFloat(),i.width=s.readFloat(),i.height=s.readFloat();let a=s.readBoolean();a&&(i.fps=s.readFloat(),i.imagesPath=s.readString(),i.audioPath=s.readString());let o=0;o=s.readInt(!0);for(let t=0;t>4,t.readFloat())}s.push(e);break}}}}}let n=t.readInt(!0);if(n>0){let e=new bt(n),r=i.slots.length;for(let i=0;i=0;t--)a[t]=-1;let o=g.newArray(r-n,0),h=0,l=0;for(let e=0;e=0;t--)-1==a[t]&&(a[t]=o[--l]);e.setFrame(i,s,a)}s.push(e)}let a=t.readInt(!0);if(a>0){let e=new yt(a);for(let s=0;s>>1^-(1&i)}readStringRef(){let t=this.readInt(!0);return 0==t?null:this.strings[t-1]}readString(){let t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;let e="";for(let i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(t),i++}}return e}readFloat(){let t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}},Oe=class{constructor(t,e,i,s,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=s,this.inheritTimeline=r}},Ye=class{constructor(t=null,e=null){this.bones=t,this.vertices=e}},De=(t=>(t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping",t))(De||{});function Xe(t,e,i){let s=t.readFloat(),r=t.readFloat()*i;for(let n=0,a=0,o=e.getFrameCount()-1;e.setFrame(n,s,r),n!=o;n++){let o=t.readFloat(),h=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(n);break;case li:ze(t,e,a++,n,0,s,o,r,h,i)}s=o,r=h}return e}function Be(t,e,i){let s=t.readFloat(),r=t.readFloat()*i,n=t.readFloat()*i;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,s,r,n),a!=h;a++){let h=t.readFloat(),l=t.readFloat()*i,c=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(a);break;case li:ze(t,e,o++,a,0,s,h,r,l,i),ze(t,e,o++,a,1,s,h,n,c,i)}s=h,r=l,n=c}return e}function ze(t,e,i,s,r,n,a,o,h,l){e.setBezier(i,s,r,n,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,a,h)}var _e,Ne=0,Ve=1,Ue=2,We=3,qe=4,Ge=5,je=6,He=7,Ze=8,Ke=9,Je=0,Qe=1,$e=2,ti=3,ei=4,ii=5,si=0,ri=1,ni=0,ai=1,oi=2,hi=1,li=2,ci=class{constructor(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new x((()=>g.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");let i=this.boundingBoxes,s=this.polygons,r=this.polygonPool,n=t.slots,a=n.length;i.length=0,r.freeAll(s),s.length=0;for(let t=0;t=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,i,s){let r=this.minX,n=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=n&&s<=n||t>=a&&i>=a||e>=o&&s>=o)return!1;let h=(s-e)/(i-t),l=h*(r-t)+e;if(l>n&&ln&&lr&&cr&&ct.minX&&this.minYt.minY}containsPoint(t,e){let i=this.polygons;for(let s=0,r=i.length;s=i||o=i){let h=s[t];h+(i-r)/(o-r)*(s[n]-h)=c&&x<=a||x>=a&&x<=c)&&(x>=e&&x<=s||x>=s&&x<=e)){let t=(l*g-h*f)/m;if((t>=u&&t<=d||t>=d&&t<=u)&&(t>=i&&t<=r||t>=r&&t<=i))return!0}c=a,u=d}return!1}getPolygon(t){if(!t)throw new Error("boundingBox cannot be null.");let e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}},ui=class{constructor(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new x((()=>new Array)),this.polygonIndicesPool=new x((()=>new Array))}triangulate(t){let e=t,i=t.length>>1,s=this.indicesArray;s.length=0;for(let t=0;t3;){let t=i-1,a=0,o=1;for(;;){t:if(!r[a]){let n=s[t]<<1,h=s[a]<<1,l=s[o]<<1,c=e[n],u=e[n+1],d=e[h],f=e[h+1],p=e[l],g=e[l+1];for(let n=(o+1)%i;n!=t;n=(n+1)%i){if(!r[n])continue;let t=s[n]<<1,i=e[t],a=e[t+1];if(ui.positiveArea(p,g,c,u,i,a)&&ui.positiveArea(c,u,d,f,i,a)&&ui.positiveArea(d,f,p,g,i,a))break t}break}if(0==o){do{if(!r[a])break;a--}while(a>0);break}t=a,a=o,o=(o+1)%i}n.push(s[(i+a-1)%i]),n.push(s[a]),n.push(s[(a+1)%i]),s.splice(a,1),r.splice(a,1),i--;let h=(i+a-1)%i,l=a==i?0:a;r[h]=ui.isConcave(h,i,e,s),r[l]=ui.isConcave(l,i,e,s)}return 3==i&&(n.push(s[2]),n.push(s[0]),n.push(s[1])),n}decompose(t,e){let i=t,s=this.convexPolygons;this.polygonPool.freeAll(s),s.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let n=this.polygonIndicesPool.obtain();n.length=0;let a=this.polygonPool.obtain();a.length=0;let o=-1,h=0;for(let t=0,l=e.length;t0?(s.push(a),r.push(n)):(this.polygonPool.free(a),this.polygonIndicesPool.free(n)),a=this.polygonPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),a.push(g),a.push(m),a.push(x),n=this.polygonIndicesPool.obtain(),n.length=0,n.push(l),n.push(c),n.push(u),h=ui.winding(d,f,p,g,m,x),o=l)}a.length>0&&(s.push(a),r.push(n));for(let t=0,e=s.length;t=0;t--)a=s[t],0==a.length&&(s.splice(t,1),this.polygonPool.free(a),n=r[t],r.splice(t,1),this.polygonIndicesPool.free(n));return s}static isConcave(t,e,i,s){let r=s[(e+t-1)%e]<<1,n=s[t]<<1,a=s[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[n],i[n+1],i[a],i[a+1])}static positiveArea(t,e,i,s,r,n){return t*(n-s)+i*(e-n)+r*(s-e)>=0}static winding(t,e,i,s,r,n){let a=i-t,o=s-e;return r*o-n*a+a*e-t*o>=0?1:-1}},di=class{constructor(){this.triangulator=new ui,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}clipStart(t,e){if(this.clipAttachment)return 0;this.clipAttachment=e;let i=e.worldVerticesLength,s=g.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,s,0,2);let r=this.clippingPolygon;di.makeClockwise(r);let n=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let t=0,e=n.length;t>1,R=this.clipOutput,k=g.setArraySize(l,e+C*f);for(let h=0;h=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(s),h.push(r),h.push(n),h.push(t),h.push(e),o.length=0;let u=a,d=a.length-4;for(let t=0;;t+=2){let e=u[t],i=u[t+1],s=u[t+2],r=u[t+3],n=e-s,a=i-r,f=h,p=h.length-2,g=o.length;for(let t=0;t0;if(n*(l-r)-a*(h-s)>0){if(p){o.push(u),o.push(d);continue}let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i)}else if(p){let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i);o.push(u),o.push(d)}c=!0}if(g==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),t==d)break;let m=o;(o=h).length=0,h=m}if(l!=o){l.length=0;for(let t=0,e=o.length-2;t>1;t=0;e--)-1==o[e]&&(o[e]=t[--r])}e.setFrame(n,vi(a,"time",0),o)}r.push(e)}if(t.events){let e=new yt(t.events.length),s=0;for(let r=0;r{t&&t.preventDefault()})),i.addEventListener("webglcontextrestored",(t=>{for(let t=0,e=this.restorables.length;t-1&&this.restorables.splice(e,1)}},wi=771,bi=class{static getDestGLBlendMode(t){switch(t){case 0:case 2:case 3:return wi;case 1:return 1;default:throw new Error("Unknown blend mode: "+t)}}static getSourceColorGLBlendMode(t,e=!1){switch(t){case 0:case 1:return e?1:770;case 2:return 774;case 3:return 1;default:throw new Error("Unknown blend mode: "+t)}}static getSourceAlphaGLBlendMode(t){switch(t){case 0:case 1:return 1;case 2:return wi;case 3:return 769;default:throw new Error("Unknown blend mode: "+t)}}},Ai=class extends qt{constructor(t,e,i=!1){super(e),this.texture=null,this.boundUnit=0,this.useMipMaps=!1,this.context=t instanceof yi?t:new yi(t),this.useMipMaps=i,this.restore(),this.context.addRestorable(this)}setFilters(t,e){let i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,Ai.validateMagFilter(e)),this.useMipMaps=Ai.usesMipMaps(t),this.useMipMaps&&i.generateMipmap(i.TEXTURE_2D)}static validateMagFilter(t){switch(t){case 9987:case 9987:case 9985:case 9986:case 9984:return 9729;default:return t}}static usesMipMaps(t){switch(t){case 9987:case 9987:case 9985:case 9986:case 9984:return!0;default:return!1}}setWraps(t,e){let i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e)}update(t){let e=this.context.gl;this.texture||(this.texture=this.context.gl.createTexture()),this.bind(),Ai.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL&&e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this._image),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t&&e.generateMipmap(e.TEXTURE_2D)}restore(){this.texture=null,this.update(this.useMipMaps)}bind(t=0){let e=this.context.gl;this.boundUnit=t,e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)}unbind(){let t=this.context.gl;t.activeTexture(t.TEXTURE0+this.boundUnit),t.bindTexture(t.TEXTURE_2D,null)}dispose(){this.context.removeRestorable(this),this.context.gl.deleteTexture(this.texture)}},Mi=Ai;Mi.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL=!1;var Ei=class extends ce{constructor(t,e="",i=new ue){super((e=>new Mi(t,e)),e,i)}},Si=class{constructor(t=0,e=0,i=0){this.x=0,this.y=0,this.z=0,this.x=t,this.y=e,this.z=i}setFrom(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}set(t,e,i){return this.x=t,this.y=e,this.z=i,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}scale(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(){let t=this.length();return 0==t||(t=1/t,this.x*=t,this.y*=t,this.z*=t),this}cross(t){return this.set(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)}multiply(t){let e=t.values;return this.set(this.x*e[Ti]+this.y*e[Ii]+this.z*e[Ci]+e[Ri],this.x*e[ki]+this.y*e[Fi]+this.z*e[Li]+e[Pi],this.x*e[Oi]+this.y*e[Yi]+this.z*e[Di]+e[Xi])}project(t){let e=t.values,i=1/(this.x*e[Bi]+this.y*e[zi]+this.z*e[_i]+e[Ni]);return this.set((this.x*e[Ti]+this.y*e[Ii]+this.z*e[Ci]+e[Ri])*i,(this.x*e[ki]+this.y*e[Fi]+this.z*e[Li]+e[Pi])*i,(this.x*e[Oi]+this.y*e[Yi]+this.z*e[Di]+e[Xi])*i)}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}distance(t){let e=t.x-this.x,i=t.y-this.y,s=t.z-this.z;return Math.sqrt(e*e+i*i+s*s)}},Ti=0,Ii=4,Ci=8,Ri=12,ki=1,Fi=5,Li=9,Pi=13,Oi=2,Yi=6,Di=10,Xi=14,Bi=3,zi=7,_i=11,Ni=15,Vi=class{constructor(){this.temp=new Float32Array(16),this.values=new Float32Array(16);let t=this.values;t[Ti]=1,t[Fi]=1,t[Di]=1,t[Ni]=1}set(t){return this.values.set(t),this}transpose(){let t=this.temp,e=this.values;return t[Ti]=e[Ti],t[Ii]=e[ki],t[Ci]=e[Oi],t[Ri]=e[Bi],t[ki]=e[Ii],t[Fi]=e[Fi],t[Li]=e[Yi],t[Pi]=e[zi],t[Oi]=e[Ci],t[Yi]=e[Li],t[Di]=e[Di],t[Xi]=e[_i],t[Bi]=e[Ri],t[zi]=e[Pi],t[_i]=e[Xi],t[Ni]=e[Ni],this.set(t)}identity(){let t=this.values;return t[Ti]=1,t[Ii]=0,t[Ci]=0,t[Ri]=0,t[ki]=0,t[Fi]=1,t[Li]=0,t[Pi]=0,t[Oi]=0,t[Yi]=0,t[Di]=1,t[Xi]=0,t[Bi]=0,t[zi]=0,t[_i]=0,t[Ni]=1,this}invert(){let t=this.values,e=this.temp,i=t[Bi]*t[Yi]*t[Li]*t[Ri]-t[Oi]*t[zi]*t[Li]*t[Ri]-t[Bi]*t[Fi]*t[Di]*t[Ri]+t[ki]*t[zi]*t[Di]*t[Ri]+t[Oi]*t[Fi]*t[_i]*t[Ri]-t[ki]*t[Yi]*t[_i]*t[Ri]-t[Bi]*t[Yi]*t[Ci]*t[Pi]+t[Oi]*t[zi]*t[Ci]*t[Pi]+t[Bi]*t[Ii]*t[Di]*t[Pi]-t[Ti]*t[zi]*t[Di]*t[Pi]-t[Oi]*t[Ii]*t[_i]*t[Pi]+t[Ti]*t[Yi]*t[_i]*t[Pi]+t[Bi]*t[Fi]*t[Ci]*t[Xi]-t[ki]*t[zi]*t[Ci]*t[Xi]-t[Bi]*t[Ii]*t[Li]*t[Xi]+t[Ti]*t[zi]*t[Li]*t[Xi]+t[ki]*t[Ii]*t[_i]*t[Xi]-t[Ti]*t[Fi]*t[_i]*t[Xi]-t[Oi]*t[Fi]*t[Ci]*t[Ni]+t[ki]*t[Yi]*t[Ci]*t[Ni]+t[Oi]*t[Ii]*t[Li]*t[Ni]-t[Ti]*t[Yi]*t[Li]*t[Ni]-t[ki]*t[Ii]*t[Di]*t[Ni]+t[Ti]*t[Fi]*t[Di]*t[Ni];if(0==i)throw new Error("non-invertible matrix");let s=1/i;return e[Ti]=t[Li]*t[Xi]*t[zi]-t[Pi]*t[Di]*t[zi]+t[Pi]*t[Yi]*t[_i]-t[Fi]*t[Xi]*t[_i]-t[Li]*t[Yi]*t[Ni]+t[Fi]*t[Di]*t[Ni],e[Ii]=t[Ri]*t[Di]*t[zi]-t[Ci]*t[Xi]*t[zi]-t[Ri]*t[Yi]*t[_i]+t[Ii]*t[Xi]*t[_i]+t[Ci]*t[Yi]*t[Ni]-t[Ii]*t[Di]*t[Ni],e[Ci]=t[Ci]*t[Pi]*t[zi]-t[Ri]*t[Li]*t[zi]+t[Ri]*t[Fi]*t[_i]-t[Ii]*t[Pi]*t[_i]-t[Ci]*t[Fi]*t[Ni]+t[Ii]*t[Li]*t[Ni],e[Ri]=t[Ri]*t[Li]*t[Yi]-t[Ci]*t[Pi]*t[Yi]-t[Ri]*t[Fi]*t[Di]+t[Ii]*t[Pi]*t[Di]+t[Ci]*t[Fi]*t[Xi]-t[Ii]*t[Li]*t[Xi],e[ki]=t[Pi]*t[Di]*t[Bi]-t[Li]*t[Xi]*t[Bi]-t[Pi]*t[Oi]*t[_i]+t[ki]*t[Xi]*t[_i]+t[Li]*t[Oi]*t[Ni]-t[ki]*t[Di]*t[Ni],e[Fi]=t[Ci]*t[Xi]*t[Bi]-t[Ri]*t[Di]*t[Bi]+t[Ri]*t[Oi]*t[_i]-t[Ti]*t[Xi]*t[_i]-t[Ci]*t[Oi]*t[Ni]+t[Ti]*t[Di]*t[Ni],e[Li]=t[Ri]*t[Li]*t[Bi]-t[Ci]*t[Pi]*t[Bi]-t[Ri]*t[ki]*t[_i]+t[Ti]*t[Pi]*t[_i]+t[Ci]*t[ki]*t[Ni]-t[Ti]*t[Li]*t[Ni],e[Pi]=t[Ci]*t[Pi]*t[Oi]-t[Ri]*t[Li]*t[Oi]+t[Ri]*t[ki]*t[Di]-t[Ti]*t[Pi]*t[Di]-t[Ci]*t[ki]*t[Xi]+t[Ti]*t[Li]*t[Xi],e[Oi]=t[Fi]*t[Xi]*t[Bi]-t[Pi]*t[Yi]*t[Bi]+t[Pi]*t[Oi]*t[zi]-t[ki]*t[Xi]*t[zi]-t[Fi]*t[Oi]*t[Ni]+t[ki]*t[Yi]*t[Ni],e[Yi]=t[Ri]*t[Yi]*t[Bi]-t[Ii]*t[Xi]*t[Bi]-t[Ri]*t[Oi]*t[zi]+t[Ti]*t[Xi]*t[zi]+t[Ii]*t[Oi]*t[Ni]-t[Ti]*t[Yi]*t[Ni],e[Di]=t[Ii]*t[Pi]*t[Bi]-t[Ri]*t[Fi]*t[Bi]+t[Ri]*t[ki]*t[zi]-t[Ti]*t[Pi]*t[zi]-t[Ii]*t[ki]*t[Ni]+t[Ti]*t[Fi]*t[Ni],e[Xi]=t[Ri]*t[Fi]*t[Oi]-t[Ii]*t[Pi]*t[Oi]-t[Ri]*t[ki]*t[Yi]+t[Ti]*t[Pi]*t[Yi]+t[Ii]*t[ki]*t[Xi]-t[Ti]*t[Fi]*t[Xi],e[Bi]=t[Li]*t[Yi]*t[Bi]-t[Fi]*t[Di]*t[Bi]-t[Li]*t[Oi]*t[zi]+t[ki]*t[Di]*t[zi]+t[Fi]*t[Oi]*t[_i]-t[ki]*t[Yi]*t[_i],e[zi]=t[Ii]*t[Di]*t[Bi]-t[Ci]*t[Yi]*t[Bi]+t[Ci]*t[Oi]*t[zi]-t[Ti]*t[Di]*t[zi]-t[Ii]*t[Oi]*t[_i]+t[Ti]*t[Yi]*t[_i],e[_i]=t[Ci]*t[Fi]*t[Bi]-t[Ii]*t[Li]*t[Bi]-t[Ci]*t[ki]*t[zi]+t[Ti]*t[Li]*t[zi]+t[Ii]*t[ki]*t[_i]-t[Ti]*t[Fi]*t[_i],e[Ni]=t[Ii]*t[Li]*t[Oi]-t[Ci]*t[Fi]*t[Oi]+t[Ci]*t[ki]*t[Yi]-t[Ti]*t[Li]*t[Yi]-t[Ii]*t[ki]*t[Di]+t[Ti]*t[Fi]*t[Di],t[Ti]=e[Ti]*s,t[Ii]=e[Ii]*s,t[Ci]=e[Ci]*s,t[Ri]=e[Ri]*s,t[ki]=e[ki]*s,t[Fi]=e[Fi]*s,t[Li]=e[Li]*s,t[Pi]=e[Pi]*s,t[Oi]=e[Oi]*s,t[Yi]=e[Yi]*s,t[Di]=e[Di]*s,t[Xi]=e[Xi]*s,t[Bi]=e[Bi]*s,t[zi]=e[zi]*s,t[_i]=e[_i]*s,t[Ni]=e[Ni]*s,this}determinant(){let t=this.values;return t[Bi]*t[Yi]*t[Li]*t[Ri]-t[Oi]*t[zi]*t[Li]*t[Ri]-t[Bi]*t[Fi]*t[Di]*t[Ri]+t[ki]*t[zi]*t[Di]*t[Ri]+t[Oi]*t[Fi]*t[_i]*t[Ri]-t[ki]*t[Yi]*t[_i]*t[Ri]-t[Bi]*t[Yi]*t[Ci]*t[Pi]+t[Oi]*t[zi]*t[Ci]*t[Pi]+t[Bi]*t[Ii]*t[Di]*t[Pi]-t[Ti]*t[zi]*t[Di]*t[Pi]-t[Oi]*t[Ii]*t[_i]*t[Pi]+t[Ti]*t[Yi]*t[_i]*t[Pi]+t[Bi]*t[Fi]*t[Ci]*t[Xi]-t[ki]*t[zi]*t[Ci]*t[Xi]-t[Bi]*t[Ii]*t[Li]*t[Xi]+t[Ti]*t[zi]*t[Li]*t[Xi]+t[ki]*t[Ii]*t[_i]*t[Xi]-t[Ti]*t[Fi]*t[_i]*t[Xi]-t[Oi]*t[Fi]*t[Ci]*t[Ni]+t[ki]*t[Yi]*t[Ci]*t[Ni]+t[Oi]*t[Ii]*t[Li]*t[Ni]-t[Ti]*t[Yi]*t[Li]*t[Ni]-t[ki]*t[Ii]*t[Di]*t[Ni]+t[Ti]*t[Fi]*t[Di]*t[Ni]}translate(t,e,i){let s=this.values;return s[Ri]+=t,s[Pi]+=e,s[Xi]+=i,this}copy(){return(new Vi).set(this.values)}projection(t,e,i,s){this.identity();let r=1/Math.tan(i*(Math.PI/180)/2),n=(e+t)/(t-e),a=2*e*t/(t-e),o=this.values;return o[Ti]=r/s,o[ki]=0,o[Oi]=0,o[Bi]=0,o[Ii]=0,o[Fi]=r,o[Yi]=0,o[zi]=0,o[Ci]=0,o[Li]=0,o[Di]=n,o[_i]=-1,o[Ri]=0,o[Pi]=0,o[Xi]=a,o[Ni]=0,this}ortho2d(t,e,i,s){return this.ortho(t,t+i,e,e+s,0,1)}ortho(t,e,i,s,r,n){this.identity();let a=2/(e-t),o=2/(s-i),h=-2/(n-r),l=-(e+t)/(e-t),c=-(s+i)/(s-i),u=-(n+r)/(n-r),d=this.values;return d[Ti]=a,d[ki]=0,d[Oi]=0,d[Bi]=0,d[Ii]=0,d[Fi]=o,d[Yi]=0,d[zi]=0,d[Ci]=0,d[Li]=0,d[Di]=h,d[_i]=0,d[Ri]=l,d[Pi]=c,d[Xi]=u,d[Ni]=1,this}multiply(t){let e=this.temp,i=this.values,s=t.values;return e[Ti]=i[Ti]*s[Ti]+i[Ii]*s[ki]+i[Ci]*s[Oi]+i[Ri]*s[Bi],e[Ii]=i[Ti]*s[Ii]+i[Ii]*s[Fi]+i[Ci]*s[Yi]+i[Ri]*s[zi],e[Ci]=i[Ti]*s[Ci]+i[Ii]*s[Li]+i[Ci]*s[Di]+i[Ri]*s[_i],e[Ri]=i[Ti]*s[Ri]+i[Ii]*s[Pi]+i[Ci]*s[Xi]+i[Ri]*s[Ni],e[ki]=i[ki]*s[Ti]+i[Fi]*s[ki]+i[Li]*s[Oi]+i[Pi]*s[Bi],e[Fi]=i[ki]*s[Ii]+i[Fi]*s[Fi]+i[Li]*s[Yi]+i[Pi]*s[zi],e[Li]=i[ki]*s[Ci]+i[Fi]*s[Li]+i[Li]*s[Di]+i[Pi]*s[_i],e[Pi]=i[ki]*s[Ri]+i[Fi]*s[Pi]+i[Li]*s[Xi]+i[Pi]*s[Ni],e[Oi]=i[Oi]*s[Ti]+i[Yi]*s[ki]+i[Di]*s[Oi]+i[Xi]*s[Bi],e[Yi]=i[Oi]*s[Ii]+i[Yi]*s[Fi]+i[Di]*s[Yi]+i[Xi]*s[zi],e[Di]=i[Oi]*s[Ci]+i[Yi]*s[Li]+i[Di]*s[Di]+i[Xi]*s[_i],e[Xi]=i[Oi]*s[Ri]+i[Yi]*s[Pi]+i[Di]*s[Xi]+i[Xi]*s[Ni],e[Bi]=i[Bi]*s[Ti]+i[zi]*s[ki]+i[_i]*s[Oi]+i[Ni]*s[Bi],e[zi]=i[Bi]*s[Ii]+i[zi]*s[Fi]+i[_i]*s[Yi]+i[Ni]*s[zi],e[_i]=i[Bi]*s[Ci]+i[zi]*s[Li]+i[_i]*s[Di]+i[Ni]*s[_i],e[Ni]=i[Bi]*s[Ri]+i[zi]*s[Pi]+i[_i]*s[Xi]+i[Ni]*s[Ni],this.set(this.temp)}multiplyLeft(t){let e=this.temp,i=this.values,s=t.values;return e[Ti]=s[Ti]*i[Ti]+s[Ii]*i[ki]+s[Ci]*i[Oi]+s[Ri]*i[Bi],e[Ii]=s[Ti]*i[Ii]+s[Ii]*i[Fi]+s[Ci]*i[Yi]+s[Ri]*i[zi],e[Ci]=s[Ti]*i[Ci]+s[Ii]*i[Li]+s[Ci]*i[Di]+s[Ri]*i[_i],e[Ri]=s[Ti]*i[Ri]+s[Ii]*i[Pi]+s[Ci]*i[Xi]+s[Ri]*i[Ni],e[ki]=s[ki]*i[Ti]+s[Fi]*i[ki]+s[Li]*i[Oi]+s[Pi]*i[Bi],e[Fi]=s[ki]*i[Ii]+s[Fi]*i[Fi]+s[Li]*i[Yi]+s[Pi]*i[zi],e[Li]=s[ki]*i[Ci]+s[Fi]*i[Li]+s[Li]*i[Di]+s[Pi]*i[_i],e[Pi]=s[ki]*i[Ri]+s[Fi]*i[Pi]+s[Li]*i[Xi]+s[Pi]*i[Ni],e[Oi]=s[Oi]*i[Ti]+s[Yi]*i[ki]+s[Di]*i[Oi]+s[Xi]*i[Bi],e[Yi]=s[Oi]*i[Ii]+s[Yi]*i[Fi]+s[Di]*i[Yi]+s[Xi]*i[zi],e[Di]=s[Oi]*i[Ci]+s[Yi]*i[Li]+s[Di]*i[Di]+s[Xi]*i[_i],e[Xi]=s[Oi]*i[Ri]+s[Yi]*i[Pi]+s[Di]*i[Xi]+s[Xi]*i[Ni],e[Bi]=s[Bi]*i[Ti]+s[zi]*i[ki]+s[_i]*i[Oi]+s[Ni]*i[Bi],e[zi]=s[Bi]*i[Ii]+s[zi]*i[Fi]+s[_i]*i[Yi]+s[Ni]*i[zi],e[_i]=s[Bi]*i[Ci]+s[zi]*i[Li]+s[_i]*i[Di]+s[Ni]*i[_i],e[Ni]=s[Bi]*i[Ri]+s[zi]*i[Pi]+s[_i]*i[Xi]+s[Ni]*i[Ni],this.set(this.temp)}lookAt(t,e,i){let s=Vi.xAxis,r=Vi.yAxis,n=Vi.zAxis;n.setFrom(e).normalize(),s.setFrom(e).normalize(),s.cross(i).normalize(),r.setFrom(s).cross(n).normalize(),this.identity();let a=this.values;return a[Ti]=s.x,a[Ii]=s.y,a[Ci]=s.z,a[ki]=r.x,a[Fi]=r.y,a[Li]=r.z,a[Oi]=-n.x,a[Yi]=-n.y,a[Di]=-n.z,Vi.tmpMatrix.identity(),Vi.tmpMatrix.values[Ri]=-t.x,Vi.tmpMatrix.values[Pi]=-t.y,Vi.tmpMatrix.values[Xi]=-t.z,this.multiply(Vi.tmpMatrix),this}},Ui=Vi;Ui.xAxis=new Si,Ui.yAxis=new Si,Ui.zAxis=new Si,Ui.tmpMatrix=new Vi;var Wi=class{constructor(t,e){this.position=new Si(0,0,0),this.direction=new Si(0,0,-1),this.up=new Si(0,1,0),this.near=0,this.far=100,this.zoom=1,this.viewportWidth=0,this.viewportHeight=0,this.projectionView=new Ui,this.inverseProjectionView=new Ui,this.projection=new Ui,this.view=new Ui,this.viewportWidth=t,this.viewportHeight=e,this.update()}update(){let t=this.projection,e=this.view,i=this.projectionView,s=this.inverseProjectionView,r=this.zoom,n=this.viewportWidth,a=this.viewportHeight;t.ortho(r*(-n/2),r*(n/2),r*(-a/2),r*(a/2),this.near,this.far),e.lookAt(this.position,this.direction,this.up),i.set(t.values),i.multiply(e),s.set(i.values).invert()}screenToWorld(t,e,i){let s=t.x,r=i-t.y-1;return t.x=2*s/e-1,t.y=2*r/i-1,t.z=2*t.z-1,t.project(this.inverseProjectionView),t}worldToScreen(t,e,i){return t.project(this.projectionView),t.x=e*(t.x+1)/2,t.y=i*(t.y+1)/2,t.z=(t.z+1)/2,t}setViewport(t,e){this.viewportWidth=t,this.viewportHeight=e}},qi=class{constructor(t){this.mouseX=0,this.mouseY=0,this.buttonDown=!1,this.touch0=null,this.touch1=null,this.initialPinchDistance=0,this.listeners=new Array,this.eventListeners=[],this.element=t,this.setupCallbacks(t)}setupCallbacks(t){let e=e=>{if(e instanceof MouseEvent){let i=t.getBoundingClientRect();this.mouseX=e.clientX-i.left,this.mouseY=e.clientY-i.top,this.listeners.map((t=>{this.buttonDown?t.dragged&&t.dragged(this.mouseX,this.mouseY):t.moved&&t.moved(this.mouseX,this.mouseY)}))}},i=s=>{if(s instanceof MouseEvent){let r=t.getBoundingClientRect();this.mouseX=s.clientX-r.left,this.mouseY=s.clientY-r.top,this.buttonDown=!1,this.listeners.map((t=>{t.up&&t.up(this.mouseX,this.mouseY)})),document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",i)}};t.addEventListener("mousedown",(s=>{if(s instanceof MouseEvent){let r=t.getBoundingClientRect();this.mouseX=s.clientX-r.left,this.mouseY=s.clientY-r.top,this.buttonDown=!0,this.listeners.map((t=>{t.down&&t.down(this.mouseX,this.mouseY)})),document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}}),!0),t.addEventListener("mousemove",e,!0),t.addEventListener("mouseup",i,!0),t.addEventListener("wheel",(t=>{t.preventDefault();let e=t.deltaY;t.deltaMode==WheelEvent.DOM_DELTA_LINE&&(e*=8),t.deltaMode==WheelEvent.DOM_DELTA_PAGE&&(e*=24),this.listeners.map((e=>{e.wheel&&e.wheel(t.deltaY)}))}),!0),t.addEventListener("touchstart",(e=>{if(!this.touch0||!this.touch1){let i=e.changedTouches.item(0);if(!i)return;let s=t.getBoundingClientRect(),r=i.clientX-s.left,n=i.clientY-s.top,a=new Gi(i.identifier,r,n);if(this.mouseX=r,this.mouseY=n,this.buttonDown=!0,this.touch0){if(!this.touch1){this.touch1=a;let t=this.touch1.x-this.touch0.x,e=this.touch1.x-this.touch0.x;this.initialPinchDistance=Math.sqrt(t*t+e*e),this.listeners.map((t=>{t.zoom&&t.zoom(this.initialPinchDistance,this.initialPinchDistance)}))}}else this.touch0=a,this.listeners.map((t=>{t.down&&t.down(a.x,a.y)}))}e.preventDefault()}),!1),t.addEventListener("touchmove",(e=>{if(this.touch0){var i=e.changedTouches;let n=t.getBoundingClientRect();for(var s=0;s{i.dragged&&i.dragged(t,e)}))),this.touch1&&this.touch1.identifier===r.identifier&&(this.touch1.x=this.mouseX=t,this.touch1.y=this.mouseY=e)}if(this.touch0&&this.touch1){let t=this.touch1.x-this.touch0.x,e=this.touch1.x-this.touch0.x,i=Math.sqrt(t*t+e*e);this.listeners.map((t=>{t.zoom&&t.zoom(this.initialPinchDistance,i)}))}}e.preventDefault()}),!1);let s=e=>{if(this.touch0){var i=e.changedTouches;let n=t.getBoundingClientRect();for(var s=0;s{i.up&&i.up(t,e)})),!this.touch1){this.buttonDown=!1;break}this.touch0=this.touch1,this.touch1=null,this.mouseX=this.touch0.x,this.mouseX=this.touch0.x,this.buttonDown=!0,this.listeners.map((t=>{t.down&&t.down(this.touch0.x,this.touch0.y)}))}this.touch1&&this.touch1.identifier&&(this.touch1=null)}}e.preventDefault()};t.addEventListener("touchend",s,!1),t.addEventListener("touchcancel",s)}addListener(t){this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>-1&&this.listeners.splice(e,1)}},Gi=class{constructor(t,e,i){this.identifier=t,this.x=e,this.y=i}},ji=class{constructor(t,e){this.canvas=t,this.camera=e;let i=0,s=0,r=0,n=0,a=0,o=0,h=0;new qi(t).addListener({down:(t,l)=>{i=e.position.x,s=e.position.y,r=a=t,n=o=l,h=e.zoom},dragged:(h,l)=>{let c=h-r,u=l-n,d=e.screenToWorld(new Si(0,0),t.clientWidth,t.clientHeight),f=e.screenToWorld(new Si(c,u),t.clientWidth,t.clientHeight).sub(d);e.position.set(i-f.x,s-f.y,0),e.update(),a=h,o=l},wheel:i=>{let s=i/200*e.zoom,r=e.zoom+s;if(r>0){let s=0,n=0;if(i<0)s=a,n=o;else{let e=new Si(t.clientWidth/2+15,t.clientHeight/2),i=a-e.x,r=t.clientHeight-1-o-e.y;s=e.x-i,n=t.clientHeight-1-e.y+r}let h=e.screenToWorld(new Si(s,n),t.clientWidth,t.clientHeight);e.zoom=r,e.update();let l=e.screenToWorld(new Si(s,n),t.clientWidth,t.clientHeight);e.position.add(h.sub(l)),e.update()}},zoom:(t,i)=>{let s=t/i;e.zoom=h*s},up:(t,e)=>{a=t,o=e},moved:(t,e)=>{a=t,o=e}})}},Hi=class{constructor(t,e,i){this.vertexShader=e,this.fragmentShader=i,this.vs=null,this.fs=null,this.program=null,this.tmp2x2=new Float32Array(4),this.tmp3x3=new Float32Array(9),this.tmp4x4=new Float32Array(16),this.vsSource=e,this.fsSource=i,this.context=t instanceof yi?t:new yi(t),this.context.addRestorable(this),this.compile()}getProgram(){return this.program}getVertexShader(){return this.vertexShader}getFragmentShader(){return this.fragmentShader}getVertexShaderSource(){return this.vsSource}getFragmentSource(){return this.fsSource}compile(){let t=this.context.gl;try{if(this.vs=this.compileShader(t.VERTEX_SHADER,this.vertexShader),!this.vs)throw new Error("Couldn't compile vertex shader.");if(this.fs=this.compileShader(t.FRAGMENT_SHADER,this.fragmentShader),!this.fs)throw new Error("Couldn#t compile fragment shader.");this.program=this.compileProgram(this.vs,this.fs)}catch(t){throw this.dispose(),t}}compileShader(t,e){let i=this.context.gl,s=i.createShader(t);if(!s)throw new Error("Couldn't create shader.");if(i.shaderSource(s,e),i.compileShader(s),!i.getShaderParameter(s,i.COMPILE_STATUS)){let t="Couldn't compile shader: "+i.getShaderInfoLog(s);if(i.deleteShader(s),!i.isContextLost())throw new Error(t)}return s}compileProgram(t,e){let i=this.context.gl,s=i.createProgram();if(!s)throw new Error("Couldn't compile program.");if(i.attachShader(s,t),i.attachShader(s,e),i.linkProgram(s),!i.getProgramParameter(s,i.LINK_STATUS)){let t="Couldn't compile shader program: "+i.getProgramInfoLog(s);if(i.deleteProgram(s),!i.isContextLost())throw new Error(t)}return s}restore(){this.compile()}bind(){this.context.gl.useProgram(this.program)}unbind(){this.context.gl.useProgram(null)}setUniformi(t,e){this.context.gl.uniform1i(this.getUniformLocation(t),e)}setUniformf(t,e){this.context.gl.uniform1f(this.getUniformLocation(t),e)}setUniform2f(t,e,i){this.context.gl.uniform2f(this.getUniformLocation(t),e,i)}setUniform3f(t,e,i,s){this.context.gl.uniform3f(this.getUniformLocation(t),e,i,s)}setUniform4f(t,e,i,s,r){this.context.gl.uniform4f(this.getUniformLocation(t),e,i,s,r)}setUniform2x2f(t,e){let i=this.context.gl;this.tmp2x2.set(e),i.uniformMatrix2fv(this.getUniformLocation(t),!1,this.tmp2x2)}setUniform3x3f(t,e){let i=this.context.gl;this.tmp3x3.set(e),i.uniformMatrix3fv(this.getUniformLocation(t),!1,this.tmp3x3)}setUniform4x4f(t,e){let i=this.context.gl;this.tmp4x4.set(e),i.uniformMatrix4fv(this.getUniformLocation(t),!1,this.tmp4x4)}getUniformLocation(t){let e=this.context.gl;if(!this.program)throw new Error("Shader not compiled.");let i=e.getUniformLocation(this.program,t);if(!i&&!e.isContextLost())throw new Error(`Couldn't find location for uniform ${t}`);return i}getAttributeLocation(t){let e=this.context.gl;if(!this.program)throw new Error("Shader not compiled.");let i=e.getAttribLocation(this.program,t);if(-1==i&&!e.isContextLost())throw new Error(`Couldn't find location for attribute ${t}`);return i}dispose(){this.context.removeRestorable(this);let t=this.context.gl;this.vs&&(t.deleteShader(this.vs),this.vs=null),this.fs&&(t.deleteShader(this.fs),this.fs=null),this.program&&(t.deleteProgram(this.program),this.program=null)}static newColoredTextured(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tattribute vec2 ${Hi.TEXCOORDS};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = ${Hi.COLOR};\n\t\t\t\t\tv_texCoords = ${Hi.TEXCOORDS};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t")}static newTwoColoredTextured(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tattribute vec4 ${Hi.COLOR2};\n\t\t\t\tattribute vec2 ${Hi.TEXCOORDS};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_light;\n\t\t\t\tvarying vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_light = ${Hi.COLOR};\n\t\t\t\t\tv_dark = ${Hi.COLOR2};\n\t\t\t\t\tv_texCoords = ${Hi.TEXCOORDS};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_light;\n\t\t\t\tvarying LOWP vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tvec4 texColor = texture2D(u_texture, v_texCoords);\n\t\t\t\t\tgl_FragColor.a = texColor.a * v_light.a;\n\t\t\t\t\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n\t\t\t\t}\n\t\t\t")}static newColored(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = ${Hi.COLOR};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t")}},Zi=Hi;Zi.MVP_MATRIX="u_projTrans",Zi.POSITION="a_position",Zi.COLOR="a_color",Zi.COLOR2="a_color2",Zi.TEXCOORDS="a_texCoords",Zi.SAMPLER="u_texture";var Ki=class{constructor(t,e,i,s){this.attributes=e,this.verticesBuffer=null,this.verticesLength=0,this.dirtyVertices=!1,this.indicesBuffer=null,this.indicesLength=0,this.dirtyIndices=!1,this.elementsPerVertex=0,this.context=t instanceof yi?t:new yi(t),this.elementsPerVertex=0;for(let t=0;tthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length}setIndices(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length}draw(t,e){this.drawWithOffset(t,e,0,this.indicesLength>0?this.indicesLength:this.verticesLength/this.elementsPerVertex)}drawWithOffset(t,e,i,s){let r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,s,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,s),this.unbind(t)}bind(t){let e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);let i=0;for(let s=0;s0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)}unbind(t){let e=this.context.gl;for(let i=0;i0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}update(){let t=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=t.createBuffer()),t.bindBuffer(t.ARRAY_BUFFER,this.verticesBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),t.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=t.createBuffer()),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),t.DYNAMIC_DRAW),this.dirtyIndices=!1)}restore(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()}dispose(){this.context.removeRestorable(this);let t=this.context.gl;t.deleteBuffer(this.verticesBuffer),t.deleteBuffer(this.indicesBuffer)}},Ji=class{constructor(t,e,i){this.name=t,this.type=e,this.numElements=i}},Qi=class extends Ji{constructor(){super(Zi.POSITION,ss.Float,2)}},$i=class extends Ji{constructor(){super(Zi.POSITION,ss.Float,3)}},ts=class extends Ji{constructor(t=0){super(Zi.TEXCOORDS+(0==t?"":t),ss.Float,2)}},es=class extends Ji{constructor(){super(Zi.COLOR,ss.Float,4)}},is=class extends Ji{constructor(){super(Zi.COLOR2,ss.Float,4)}},ss=(t=>(t[t.Float=0]="Float",t))(ss||{}),rs=class{constructor(t,e=!0,i=10920){if(this.drawCalls=0,this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,this.cullWasEnabled=!1,i>10920)throw new Error("Can't have more than 10920 triangles per batch: "+i);this.context=t instanceof yi?t:new yi(t);let s=e?[new Qi,new es,new ts,new is]:[new Qi,new es,new ts];this.mesh=new Ki(t,s,i,3*i);let r=this.context.gl;this.srcColorBlend=r.SRC_ALPHA,this.srcAlphaBlend=r.ONE,this.dstBlend=r.ONE_MINUS_SRC_ALPHA}begin(t){if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=t,this.lastTexture=null,this.isDrawing=!0;let e=this.context.gl;e.enable(e.BLEND),e.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend),this.cullWasEnabled=e.isEnabled(e.CULL_FACE),this.cullWasEnabled&&e.disable(e.CULL_FACE)}setBlendMode(t,e,i){if((this.srcColorBlend!=t||this.srcAlphaBlend!=e||this.dstBlend!=i)&&(this.srcColorBlend=t,this.srcAlphaBlend=e,this.dstBlend=i,this.isDrawing)){this.flush(),this.context.gl.blendFuncSeparate(t,i,e,i)}}draw(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.mesh.getVertices().length||this.indicesLength+i.length>this.mesh.getIndices().length)&&this.flush();let s=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);let r=this.mesh.getIndices();for(let t=this.indicesLength,e=0;e0||this.indicesLength>0)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1;let t=this.context.gl;t.disable(t.BLEND),this.cullWasEnabled&&t.enable(t.CULL_FACE)}getDrawCalls(){return this.drawCalls}static getAndResetGlobalDrawCalls(){let t=rs.globalDrawCalls;return rs.globalDrawCalls=0,t}dispose(){this.mesh.dispose()}},ns=rs;ns.globalDrawCalls=0;var as=class{constructor(t,e=10920){if(this.isDrawing=!1,this.shapeType=os.Filled,this.color=new h(1,1,1,1),this.shader=null,this.vertexIndex=0,this.tmp=new v,e>10920)throw new Error("Can't have more than 10920 triangles per batch: "+e);this.context=t instanceof yi?t:new yi(t),this.mesh=new Ki(t,[new Qi,new es],e,0);let i=this.context.gl;this.srcColorBlend=i.SRC_ALPHA,this.srcAlphaBlend=i.ONE,this.dstBlend=i.ONE_MINUS_SRC_ALPHA}begin(t){if(this.isDrawing)throw new Error("ShapeRenderer.begin() has already been called");this.shader=t,this.vertexIndex=0,this.isDrawing=!0;let e=this.context.gl;e.enable(e.BLEND),e.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend)}setBlendMode(t,e,i){if(this.srcColorBlend=t,this.srcAlphaBlend=e,this.dstBlend=i,this.isDrawing){this.flush(),this.context.gl.blendFuncSeparate(t,i,e,i)}}setColor(t){this.color.setFromColor(t)}setColorWith(t,e,i,s){this.color.set(t,e,i,s)}point(t,e,i){this.check(os.Point,1),i||(i=this.color),this.vertex(t,e,i)}line(t,e,i,s,r){this.check(os.Line,2);this.mesh.getVertices(),this.vertexIndex;r||(r=this.color),this.vertex(t,e,r),this.vertex(i,s,r)}triangle(t,e,i,s,r,n,a,o,h,l){this.check(t?os.Filled:os.Line,3);this.mesh.getVertices(),this.vertexIndex;o||(o=this.color),h||(h=this.color),l||(l=this.color),t?(this.vertex(e,i,o),this.vertex(s,r,h),this.vertex(n,a,l)):(this.vertex(e,i,o),this.vertex(s,r,h),this.vertex(s,r,o),this.vertex(n,a,h),this.vertex(n,a,o),this.vertex(e,i,h))}quad(t,e,i,s,r,n,a,o,h,l,c,u,d){this.check(t?os.Filled:os.Line,3);this.mesh.getVertices(),this.vertexIndex;l||(l=this.color),c||(c=this.color),u||(u=this.color),d||(d=this.color),t?(this.vertex(e,i,l),this.vertex(s,r,c),this.vertex(n,a,u),this.vertex(n,a,u),this.vertex(o,h,d),this.vertex(e,i,l)):(this.vertex(e,i,l),this.vertex(s,r,c),this.vertex(s,r,c),this.vertex(n,a,u),this.vertex(n,a,u),this.vertex(o,h,d),this.vertex(o,h,d),this.vertex(e,i,l))}rect(t,e,i,s,r,n){this.quad(t,e,i,e+s,i,e+s,i+r,e,i+r,n,n,n,n)}rectLine(t,e,i,s,r,n,a){this.check(t?os.Filled:os.Line,8),a||(a=this.color);let o=this.tmp.set(r-i,e-s);o.normalize(),n*=.5;let h=o.x*n,l=o.y*n;t?(this.vertex(e+h,i+l,a),this.vertex(e-h,i-l,a),this.vertex(s+h,r+l,a),this.vertex(s-h,r-l,a),this.vertex(s+h,r+l,a),this.vertex(e-h,i-l,a)):(this.vertex(e+h,i+l,a),this.vertex(e-h,i-l,a),this.vertex(s+h,r+l,a),this.vertex(s-h,r-l,a),this.vertex(s+h,r+l,a),this.vertex(e+h,i+l,a),this.vertex(s-h,r-l,a),this.vertex(e-h,i-l,a))}x(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)}polygon(t,e,i,s){if(i<3)throw new Error("Polygon must contain at least 3 vertices");this.check(os.Line,2*i),s||(s=this.color);this.mesh.getVertices(),this.vertexIndex;i<<=1;let r=t[e<<=1],n=t[e+1],a=e+i;for(let o=e,h=e+i-2;o=a?(h=r,l=n):(h=t[o+2],l=t[o+3]),this.vertex(e,i,s),this.vertex(h,l,s)}}circle(t,e,i,s,r,n=0){if(0==n&&(n=Math.max(1,6*c.cbrt(s)|0)),n<=0)throw new Error("segments must be > 0.");r||(r=this.color);let a=2*c.PI/n,o=Math.cos(a),h=Math.sin(a),l=s,u=0;if(t){this.check(os.Filled,3*n+3),n--;for(let t=0;t0;)this.vertex(b,A,l),b+=M,A+=E,M+=S,E+=T,S+=I,T+=C,this.vertex(b,A,l);this.vertex(b,A,l),this.vertex(a,o,l)}vertex(t,e,i){let s=this.vertexIndex,r=this.mesh.getVertices();r[s++]=t,r[s++]=e,r[s++]=i.r,r[s++]=i.g,r[s++]=i.b,r[s++]=i.a,this.vertexIndex=s}end(){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.flush();let t=this.context.gl;t.disable(t.BLEND),this.isDrawing=!1}flush(){if(0!=this.vertexIndex){if(!this.shader)throw new Error("No shader set.");this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0}}check(t,e){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");if(this.shapeType==t){if(!(this.mesh.maxVertices()-this.mesh.numVertices()(t[t.Point=0]="Point",t[t.Line=1]="Line",t[t.Filled=4]="Filled",t))(os||{}),hs=class{constructor(t){this.boneLineColor=new h(1,0,0,1),this.boneOriginColor=new h(0,1,0,1),this.attachmentLineColor=new h(0,0,1,.5),this.triangleLineColor=new h(1,.64,0,.5),this.pathColor=(new h).setFromString("FF7F00"),this.clipColor=new h(.8,0,0,2),this.aabbColor=new h(0,1,0,.5),this.drawBones=!0,this.drawRegionAttachments=!0,this.drawBoundingBoxes=!0,this.drawMeshHull=!0,this.drawMeshTriangles=!0,this.drawPaths=!0,this.drawSkeletonXY=!1,this.drawClipping=!0,this.premultipliedAlpha=!1,this.scale=1,this.boneWidth=2,this.bounds=new ci,this.temp=new Array,this.vertices=g.newFloatArray(2048),this.context=t instanceof yi?t:new yi(t)}draw(t,e,i){let s=e.x,r=e.y,n=this.context.gl,a=this.premultipliedAlpha?n.ONE:n.SRC_ALPHA;t.setBlendMode(a,n.ONE,n.ONE_MINUS_SRC_ALPHA);let o=e.bones;if(this.drawBones){t.setColor(this.boneLineColor);for(let e=0,s=o.length;e-1)continue;if(!s.parent)continue;let r=s.data.length*s.a+s.worldX,n=s.data.length*s.c+s.worldY;t.rectLine(!0,s.worldX,s.worldY,r,n,this.boneWidth*this.scale)}this.drawSkeletonXY&&t.x(s,r,4*this.scale)}if(this.drawRegionAttachments){t.setColor(this.attachmentLineColor);let i=e.slots;for(let e=0,s=i.length;e0){t.setColor(this.attachmentLineColor),h=2*(h>>1);let e=a[h-2],i=a[h-1];for(let s=0,r=h;s-1||t.circle(!0,s.worldX,s.worldY,3*this.scale,this.boneOriginColor,8)}}if(this.drawClipping){let i=e.slots;t.setColor(this.clipColor);for(let e=0,s=i.length;e=0&&i==y.data.index&&(x=!0),!x){h.clipEndWithSlot(y);continue}s>=0&&s==y.data.index&&(x=!1);let w,b=y.getAttachment();if(b instanceof re){let t=b;d.vertices=this.vertices,d.numVertices=4,d.numFloats=v<<2,t.computeWorldVertices(y,d.vertices,0,v),a=cs.QUAD_TRIANGLES,n=t.uvs,w=t.region.renderObject.page.texture,o=t.color}else{if(!(b instanceof te)){if(b instanceof Wt){let t=b;h.clipStart(y,t);continue}h.clipEndWithSlot(y);continue}{let t=b;d.vertices=this.vertices,d.numVertices=t.worldVerticesLength>>1,d.numFloats=d.numVertices*v,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=g.newFloatArray(d.numFloats)),t.computeWorldVertices(y,0,t.worldVerticesLength,d.vertices,0,v),a=t.triangles,w=t.region.renderObject.page.texture,n=t.uvs,o=t.color}}if(w){let e=y.color,i=this.tempColor;i.r=p.r*e.r*o.r,i.g=p.g*e.g*o.g,i.b=p.b*e.b*o.b,i.a=p.a*e.a*o.a,l&&(i.r*=i.a,i.g*=i.a,i.b*=i.a);let s=this.tempColor2;y.darkColor?(l?(s.r=y.darkColor.r*i.a,s.g=y.darkColor.g*i.a,s.b=y.darkColor.b*i.a):s.setFromColor(y.darkColor),s.a=l?1:0):s.set(0,0,0,1);let f=y.data.blendMode;if(f!=u&&(u=f,t.setBlendMode(bi.getSourceColorGLBlendMode(u,l),bi.getSourceAlphaGLBlendMode(u),bi.getDestGLBlendMode(u))),h.isClipping()){h.clipTriangles(d.vertices,d.numFloats,a,a.length,n,i,s,c);let e=new Float32Array(h.clippedVertices),o=h.clippedTriangles;r&&r(d.vertices,d.numFloats,m),t.draw(w,e,o)}else{let e=d.vertices;if(c)for(let t=2,r=0,a=d.numFloats;t(t[t.Stretch=0]="Stretch",t[t.Expand=1]="Expand",t[t.Fit=2]="Fit",t))(ys||{}),ws=0,bs=163,As=class{constructor(t){if(this.logo=null,this.spinner=null,this.angle=0,this.fadeOut=0,this.fadeIn=0,this.timeKeeper=new y,this.backgroundColor=new h(.135,.135,.135,1),this.tempColor=new h,this.renderer=t,this.timeKeeper.maxDelta=9,!fs){let t=navigator.userAgent.indexOf("Safari")>-1,e=()=>ws++;(fs=new Image).src=Es,t||(fs.crossOrigin="anonymous"),fs.onload=e,(ds=new Image).src=Ms,t||(ds.crossOrigin="anonymous"),ds.onload=e}}dispose(){var t,e;null==(t=this.logo)||t.dispose(),null==(e=this.spinner)||e.dispose()}draw(t=!1){if(ws<2||t&&this.fadeOut>1)return;this.timeKeeper.update();let e=Math.abs(Math.sin(this.timeKeeper.totalTime+.25));this.angle-=200*this.timeKeeper.delta*(1+1.5*Math.pow(e,5));let i=this.tempColor,s=this.renderer,r=s.canvas,n=s.context.gl;if(s.resize(1),s.camera.position.set(r.width/2,r.height/2,0),s.batcher.setBlendMode(n.ONE,n.ONE,n.ONE_MINUS_SRC_ALPHA),t){if(this.fadeOut+=this.timeKeeper.delta*(this.timeKeeper.totalTime<1?2:1),this.fadeOut>1)return;i.setFromColor(this.backgroundColor),e=1-this.fadeOut/1,e=1-(e-1)*(e-1),i.a*=e,i.a>0&&(s.camera.zoom=1,s.begin(),s.quad(!0,0,0,r.width,0,r.width,r.height,0,r.height,i,i,i,i),s.end())}else this.fadeIn+=this.timeKeeper.delta,this.backgroundColor.a>0&&(n.clearColor(this.backgroundColor.r,this.backgroundColor.g,this.backgroundColor.b,this.backgroundColor.a),n.clear(n.COLOR_BUFFER_BIT)),e=1;e*=Math.min(this.fadeIn/1,1),i.set(e,e,e,e),this.logo||(this.logo=new Mi(s.context,fs),this.spinner=new Mi(s.context,ds)),s.camera.zoom=Math.max(1,bs/r.height),s.begin(),s.drawTexture(this.logo,(r.width-165)/2,(r.height-108)/2,165,108,i),this.spinner&&s.drawTextureRotated(this.spinner,(r.width-bs)/2,(r.height-bs)/2,bs,bs,81.5,81.5,this.angle,i),s.end()}},Ms="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAALKElEQVR42u2de2iW5R/GPzuqcwfnnKfNmafl5tTNHWzqNi3DEMQykcAoJSsySkspjSIk0iD/07Kf4R+FnVBDUTshZGpWUEJaaiWFgZlUFmXmIe3HNXthyebeZ77P9H13ffBG8Y8H7ut7vff93N/7fu4vGGPiFZiez/Qtw9lytJajfzfw9z/j+efPOv7cV8W+lUNY2a8T/ayTCRsWFLJA5rtUO1LLkV5p9LJeJizQiHeqnlOtmVFtdTGrrZkJCxYXsTgaI6r9MY4/UpNItW4mFDaXsTlaM6qVZlBq3UwofFrJp0HMWJ9DvXUzobCznJ1BzFjWlTLrZkJh/TDWBzFjTgo51s2EgnKI0Rrx+FiOWzNzVaym91Syx5qZsGBWb2ZFa0ZN6dbMhAWTcpkUrRmXD2K5NTNhgVbH0Zpxbl/mWjMTFvRIo0e0ZpzcncnWzISKtvmiMWNRJ4qslwmVXRXsas2Ix8ZwzFqZsGFREYtaM+Oaa1ljrUzYkJ9G/ok6TlzKjJWZVFor0y7c1Zu7WjLiqiGsskamXdHopyT4vALmzS9k/t19uHtKHlOSIMn6xAtARjIZ1sFcUSZ0Y4La+G6M18hS2IlCn4a+WoC0JNL0d/dUupdnUj40g6EJ2VEdMnhrOG/p5f/jUXz8SgmvaGU6KpNRNsLVQV0OdXf24s63h/P2gWoOrBjMCr2GJFQnnxnIM3q5P1PPmaYv+4ev4/C6UtbpV2gzXCkgL5W8Bwt48OIc6ul6Tp+s4+SyASxLiI4+PYCn1bHzDZxvaQW6vZzto7MYnQIpNkf7kp5EuozYUroqEjcNKHHd0Tl9mBPN1pk+hFeieGBnBtog7UXjsj9pWg+m6duecw2cay1OC/uxMC47KmP9OIYfoz1YoC20J/rzRG4quTZK2EAyJGs20qwUbYw0aNRmUxtvfUW/uEtNzc1NB1/X8LVyd15hh82F43AvD+VlXcsSJEZa1CQ3ejleAO7oxR3RDP0XN91X4+NXYb8nkv7UNTwV7e0YTdu7I3g33t7tuaEbNwSZpps2fSyvs4M2Tjhot+jb0Xzbltj8r5j/xVt/6Z1Ob93U1ZYO691EhhzchcHeXosVjcNZysyezLw4xRZt05R+fTeuj8vOj+zKyG0j2aZcVVs6v+QalnjrMFZASQYl2nBoSyz06e3j/Xk8rgWYmMvEICu2pm1HOTuc7okV8FgRj0XukwzanhvCc/F+72TjoQjdObN1OFuDLmh0xP+WHtxiI10ukJlCprb4guiv1fP+avZrS1C7NAkliHZjDtZwMMgqbukAltpMlwuMy2FcEBPqvfLLar5Uqi0hBdEwryy+Mv5n6zkbjTBa+dlMlwvUZFETZKGiFM7tvbhdJ3gSVRO0wzIjnxmvl/J6a6JsGMYGrahtpssFeqbR841S3mhN80OjOaSDEdqd6SjaMKgzgzRK7q1ib3PT9sYyNo7JZoyNFNvRcVMZmy7WOvIuryv/Zvdmdt90+nY0bRp3AvROohFwdwW7dTG7RFlbwlqdrbOBYg005NAQmZU0HWt1rXMBH1Xw0dQ8pmqzoaPmdhun7bHZjNVe9qP9eFQfO1VkUmHjhAVUZ1GtnKFSbjrkrPfy4i4UW5t/6ZxM54J0CqxFe81KpGsQyE4h23oYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjLna+bdOy+IiFquIpGq16Pb79cNYv3IIK/X/ugx+Ui6TVKvYVU9Nc8gX8od8Ir/IN/KPfCQ/yVfyl/6/pfJvLChkQdD6wyqntquCXYuKWJSfRr6D0dEAxV3xlw/khyD+kd/ku/88cHo+09tS3LBpO1HHCVUqcIA6CqB4K+6X6x35L/JM2loXurlWmUmlA5XogOIcK8/If5HncrSWo7F6cKIWPjT/RXGOlWfkv8hzaWsN4uaaysE6WIkOKM6x8oz8F3kusXqo2vxC5jtYiQ4ozrH0TeS5qIZcrB7qkrwdA8U5Vp6R/yLPZV8V+2L14Cl5THGwEh1QnGPlGfkv8lyUlIzFQ1cNYVVHrcjZ0VCcFe9Y+Eb+izy3ceclUl43aFN52DXXssYpnY6a4qFS8ZcP2uIf+e7inRh6pdFrdTGrm8uiHx/L8T2V7NGWzvJBLJ/bl7mTuzO5qBNFDoiJID/IF/KHfCK/yDfyT3O7d/KbfNfS80hNIrU0g9L6HOq1x5iTQo6FNpeLfCQ/yVfyl3xmXYwxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHNk9z4JwJ0SqKTdQkbyEwhU393T6V7zzR6pieR3tE1ITeVXImhe6BXDGZFdRbVeank2TBhcaEMr0rwbixj49IBLL2/L/ffmMuNHfqO9tFZjJYBd1ewO3Lx+IcVfKhqna5nHZYR6XFPH+5R3eeI5t9fx/fvjeC9Jdew5OKZKqFR/RDVKL6vL/f9PJafmyvHsL+a/ff24V6NmjZQbGchVbY6UM2BluqHv1rCqzVZ1KQlkZboepCdQvacPsz5bjTfXao+yMEaDt7Wk9tSIMVGig3TejCtJSM2bSpkPjWPqd1S6Zao+lORSYWmgkOjORRNwZqd5ezMSiHLRooNr5XwWjS6/1XHX9vL2T67N7M1iyXa9JCrYjVrS1gbpJyw6hBfsmiNCYT0P9/A+Wj1/6qGr5YNYFlJBiWJogEzezLz/ZG8/9s4fgtSyuvNYbyp1IONFBtu7sHNv4/j9yAxUHWrdaWsG9+N8XHd+YxkMpSy+aySz841cC5oXbmHCnnI74yxAgZ3YbDeB4PEQCOpBpFNZWwa2ZWRcdnxLsl00crtRB0n2lLg8JNRfDKoM4NsolgBSmw/UMADba1+qpmqfyf6x1u/0a/og3I+aEunP6/i86osqmygcGarF4p54dex/Bo0LqfqOfVwIQ/HW5/RSkwV1oN2WLlHTc82TljAwM4M1O5LWwYKZTjibYXNS0N5KcjKTe10PadfLObFuJwK4ozp+UzXDBTUjL+M5ZcBnRkQV53dMIwNQTu6bSTbVEzbi5awuVByd2E/FgaN0Tc1fKOzBHHV2aAdVSdv6s5NNkp7cSH/++xAng2yyHx+CM/H21YhfdPp+0U1X0TbSZnXx8faG9Aop0MS0cToh1p+iLcpOkLj9t/JOk5eqoPHxnDsyf486an5yqCDK7XZ1O4oZ4dWyy3FSXHUAYq47uyYbMZoGmhpG3DlEFb6uNiVBhpyaHhnBO8oJmfqOROJjzIiP43hJ8UxITqqX56S2Hur2KsOnq3nrE6PPNKPRwrSKbAZrjTQNZmuE7oxYXMZmxWbw9dxWFu4W4ezVedOE6qzI7oyYkY+M7TPeWsPbk2UX1qioSN+E3OZqOR2cReKE+qQRFN0Pi7y73g/UawU1KzezJpXwLz5hczX1ueUPKYkNb6GJQZ+j7/aAfRZREsv+quGsMoamXZBW2Gt5eU0alorEzYsKmJRa/m4NdeyxlqZsCGa84DKnVorEzboC7podis69DfIJmwufHMc7famvvmxZiYsKOtKWbRm1OcW1syEBboSJFozLh/EcmtmwgIluaM14/phrLdmJixYXMTiaM24p5I91syEBTphFOR7Y2tmwgJNvUFOr+tov3UzoaAv44KYUatv62ZCoemdhtG0+hzqrZsJBR08DWLG0gxKrZu50qvpxos3U5NItW4mFPp1ot+lPlpq2lYXs9qamVBZUMiC1ox4pJYjvlfStAu6GmTLcLboMtPIV4/6im5fFfuUi9QIap2MiWP+D96R1vPmsD/fAAAAAElFTkSuQmCC",Es="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAABsCAYAAAALzHKmAAAQ7klEQVR42u3da4xdVRUA4D0zd2Y6nZY59DVtZ1puS9+lzC0YAi2UQ8AAQczFpPgA9VIeIQbirRqJ0cBUBVGjDr/QCKSNRSMmpuODxAdxqhgwxkhFjf6Sxh/+UUNVNGJCzR7uTvas7LXX2q9zzp3em6y0gTN3Zu75utZe5+yztxC9V+/Ve5X9En1Vjd7J6SFbLNF7naPw+l2jh7YHMBWssqMHtlsRdim4qsLtIawaPiHEQOLoNrA9iIkQDnRrVA1qD2LZ8ISoxYqKo13sQAtBWBayQWZUAXGRQM9JjCngDVY0UqJNDbQrMcaGmArdUKpIjbYiQLsCZCyIMQBy8QwnilR4Q5AuCpxFYvRFmBLbEiwKwpsSaWycVQGZBKMrwBjA9BhxDe57u2L2hOoKNCbOrgAZitEVYUxoKSMErQvSxYIzCkguRg5EF4AUhqUlhy/YUKSxcRaKsioYOQhD4I0yYxkR3PcJBcuFysmgsXAWBTMJyBCMIQh9kGGxXIXvexCQXbHGAMrBWTbM2CCpMSMLIxehC77lSJwXGth7M0FzoVJIXXDWQnGmhOkL0ic7YhhtWdGGkAuPAjUWGoF4faCmwBkbZmyUqUCyMqMLRA4+E6IsdTjidUHKBYrh9CnpRcH0ypKxsyOGEYNIIeTCOz91OIJ1QYoB5eAMyZo+MFNnyVTZ0YiRC9EGEMOyAgshxErHsL2XK1gOUgwohtM1a5YNM7Rsu4K0ZkcbRm4mpPBRwFZ5hg9eCqkrUB+csWGGogzNkqEgrdnRhpGLkINudaLgwvVB6oqzCjCTZElb2Y4B0gUjBtEG0ARnDRLjjoG9DwcshtQGlIPTljVjwUySLWNkyRCQVHa0ZUUTRAwgF91a33BEy0VKAcVwwqwZC2bqbOlUurllOxQkJzNyINoAYqjWhYYjWg5SCiiG05Q1U8FMjTIoS8YE6YORi1BHtJ4KIcQEEtTXUWAxpK44YVlPBdO1jCdFWTZIE8bVGEYMIRPcZGBw4HKQcoBiOE1ZMzbMgVQwU6JMAdKEEcuIJogUvg1YCCE2gsCO42DlIIVAKZwpYJaSLVNnSU6XjYHUmxhTmXaFaMO3EYkLqMC+FsLlIoVAKZzMrEnBhJeLfLNlKMrYWRIDCbOkFSSVHbHM6AKRC6/ODUewNqQ+OLlZkxpjUmV8MBbMUJSxyzY3Q1IgTRgxiBRCHdem0KDAUkBh9sRwwjEnAXMMgTnKhFlUtiwkS5rGka4g9SaGgxFmRC7AzTCEEBcyA36dDSsXqAtOLkysjGMwY5XxVChjZ0kuSCo7YlkRQsQQYtDEFsegsLoCxUp7Kpgps2UslFGzJGccSYHUmxhOZqwzEZqAbfUMCisHKIZzgsCpl3MTzMwTpi1bYp2477gyFKUxS7qWbdjY2EBS2dGE0QQRA7gNCyHEdhjE8RhUDlBT9tzgmjWZMFNlSy+Urk1OzCyJlW0XkK4YOQh1cDtcgwBrQmoDWkdgboBZE8mYsJSHlnFbJ+5bwmOPJ7lZkirbC8aRsMvmgtTHjBhGE0QbwJ2egUE1ITVlUC5OmDVdYNrKuN70xM6WoShjlW4464dbtiFIWK6x7GjESEHUUe0iYncnbMdQSE0Z1ITTNOb0hRmjjLtmS9dmJ2rp1jtuKktyyrb6YLEMCUHq2dGG0QQRQ7f72kzc+cJecerne8Wvv7JNPHPvenEkz8Sh3UtFc92QyGt9Yko/HgOLAIUZlItTz5ouMF3KuE+2jFLCQ1D6lm6fLMkBacuOJowYRBUXyfjuHjF3NhdnsfjvAfH6E9vFt9XxKgikEKgJZyyYalzOLeMu2bLbULI6bh+QGwmQ+rgRlumdGEQAao+K56bEL2woVUwOiev0r8OAUjiJrMmFCbvykGxZRAmPitK1dHM7bohyMsuyi/I8f0+e57fJYIKEZXpXo9E4mOf5XTKyLLvCBLETF8uY2SKepkC+dpX4T02Ivepr4HvZcOZ5fmee54fyPL+DmTUhzAs6n4n8bN5dr9f3YdkSg8nsxG0lPBVKVpNjG0/aGhzfLDmRZdnumZmZp8+c+cdZPV555fSr7Xb7s0jJ3i5Pcue4MxKkPPkvvXTqz/B92u32l0wYOzG1fkhcd/py8Rcbyq/vFM/KY1WA95h/3zzP71bfU6JsNpsfgj+P/FlbrdaDGExYyuXvLz8H+DudODH700ajcSM3W6Yu4alQ1spCOTd38jcKocTZbh9+9NixY99XJ8AEUkcpo9W64yH197m5k7+bnZ19QT+J09NHntQhwji/Jg58qi6++ofLxJ8gSFneVw2Ka4QQDfh1Ok4dZavVmtZ/nrm5k7/Vf55O1tRhboUw5+ZOvqyOl5+R/FyOHj32PYVU/tloNG5IXcKrhJIzngwp3fNjomazea/64BuNxts646f50lWv169utw9/DmtqdJQyZFaSJVuV6nq9fqMEof5/vV6/CYBqgJDlee+yAbF/+4i4ZWqZeNfaIfHWzn+Hx0KcEuU9+s8jv3ej0bhVlXOZydX/k0iRMeb8P0D5e6tj8zy/Xb9UJIc56h/yqVOnXul8lmuZ2bJslKmbHG7XrbpCmCXFRLvdfqQD6jTS3Jiy5I4OykM6ADV+1Eu1DmV6evopBORexzDi1L+X/HnGxsb2w3Hm9PSRJ9QxWPOTZdmlKht2hi+w6dkox5bqffI8fye3hDteGqKaHVsHXihKl0tB+h0cY+lute54AGRKDCW89LNTRynHb7ChUWVVjetOnJh9EYBUyPZeNCoOtsbFQwdXi4/esELcd+tq8cCHJ8UXp+viy9efLz7AgamjlKXc1AA1m83DoIRDlFubzeb96hhZLVTlgJ24gttutx+ONa50bHZKRenaeTs1OfpAfnr6yOOdE7EZdNwmlKocntXLNkA5JTGq47Ds+Lf94lWsyfnXleLfnIwJUN4DOnNYwuUxh2A3Ln9XULrfK8t3J27Tu3BVwiOjXJqoAy8UZej1yclGo3GTLN+gu3w+z/P3YaWbQqk3Ne12e4ZC+c8rxWsYytcPiP9RpZxCqWDKnxOiBNlyAUpOnGsoh4tA2Rm8X9xqtT6md5wyZmYe+0YRKL+1S/wYQ3n8zctBl5SBUv5djivfjMOPduIzcizeiYfr9foVvUwZG+XCuzibZKnSceZ5/v4QlKp8y7ElhnJlTeTP7BI/kllRYfzrfvHqFy4UX1vaL/aVlSmROzwbwdS29T2UcEwZF+V8ozM2lu1VY812u/15akypGh3TmFJesJbHHD167IdUxz3YJy5bNySuX1mbvy55CbMLtzU6tjGlsdFptVqfUMc0Go23F4wy1l2dSnbfvpMwVPe9WWVLDsrOJaF9MFu2Wq1PqmNkGce67xiXhTjdNwdlvV6/BgxfbPfBfVCetxi6b9/rlCup65QzM48dl2OjLMv26CibzeZ96sTIzEFdpwQXz9U1yrtVlpR/Zll2Fec65Y6l4pbbx8XHH9kknvzJlPjlHy8Tp29eKT5ou0aJoIT3w3dBlLDzVpfAJEZ1XOdaJZxnOSlvPMjPzxFljIvng914RwebsjYO7uhMyHu46sOfnf3Oz2TXDW6vvYxdFoIXz3Wc8J5zs9n8iOn2IrxTc2BM3Glqdp7dI553uaOjxrhwcob+MyuUpjs6WZZdon8OcigjPx8V+u+GTWFTSWEx3WYcdJ225jNDSE4q0GHCzlueHOyujn6bUWYgeb9ZZUaQPe+GzQ+Gc8+oOGhC+c1d4gfI16n3XDAhQ7+9qE9l01E2Go132GYKyXE1NiFDTcpoNpv3LOYJGWXNErJNW9sEp63p2RKiVPMn1bS1DgxsyhoGdGpmizj+xtXiDYnx7/vFmce3iWdW1cTVGEY4hQ2ZW0nNq8Qm/M6XbXm3S100lwGedFybuvNOibLI+ZS2ceU4eAxiEuvCkfmU8ycToDxETe6FgCBQHeqyAbFvfEhcO7BwDuXFCEbTZF840XeHK0jYcbs2OIGle0mVJ/mmnClEPQqxyTY5I8/zFhif7fSZee4bnrPOU4AssnRXHaVTCTd14dRDY3UbTIiSeFhsN/aMjgnqthFx880rxX3yATL5p3y4LPXzOaBkUyBjZMlYpbtQlIOBD475ZEusjMNSvkXe6VEoJVDkeZ2dzIfIFsRzU+JF2OyM9M9fTC/6SUYOyFQPjQ2nWiUjxnPfw5EeHqMWIqAeIFsAU847lJM2JM6xsewt1OIDLs99P7ZFHNdB/upS8XtPiD7PfLuCXJNolYyyFiNI/Zit65ItrOVafFbHcFohY7hPTN21Tjz4uc3iqfsnxKdX1MTl1OoYRFaMsToGB6Trw2JFP/OdZC2hJZ7ZkrMoAbbSGmelDJ91hFKuJeS7jlBMkJnrAqqJlgMUZS/dArPlGHNdSg5M3xXXtvquuEatvIYtDRhpxbUJuIgqsU5lGWtUploK0KuEU9mSW8YpmFQ556xNuYW7NiW13B+FkMiKHIy+C6eGgBxJvMR0oSv5hi6+z4HJyZoU0M2RVvDlrOQbcxVfX5AhZbuqy0v7ZstYMLHlAVlLTF9ALLbvu9Y5Zylpn/XOsd0ibIvxr2KCLHpp6SCUIdnSZSF+WzfOhem6GD+1KwR3Z4jNjrtDpNoZwmWd8yrupZN6Hx3fbMmFSe0Swdq2ZIPjxk1112Duo8OBGLrBkw/IoncdK2XHsdC9dHz204m50xh3tzFq1zFqtzHXrfCw7OgDsqyNnZLszVijsmXgrmNcmGtS78lIoMX2aJz03fKO2sDJddPQSCDPiQ1DfWBycY6XtXstc2PQKuxgG2McmXTPb9/9vmuJYXKyJrWjbeg+3xPM4O73nWqvbyw7xgZZSJbEUBa157cNJjdr2vb+5iA1YV3HxYscj30PDCEHIgcjtfm8K8hSsmRotkwFk5s1TTghUAopB6xrjHMBBkI0YYTZ0dZlxwLpkiWDULpmy5gwqayZgZNkA7oKQQCxctByYg0XIIEQQuRitGVHblMTA2ShKGPDpC6wu+DEgJqg2rDGDBtAF4Q6RAojp1xXGmSMbImVcR+YWNY04eQCtUG1ofUJ2/uvcETIgUhhdAE5GAlkKShjwHTNmhhODKgJqQ2sC14uOgyfD0IbRF+MlQaZAiZWyn2yJsTJATqGnHQO2Jhh+xlsACFCG0QbRtdyzQFZCZSxYPpmTS7Q5cjJHYNBYIkZpu99HoUQ/o4QIYSIZUZfjJ4ZMjZI32wZBDMU5yhy8pZTULl4XYP5fagMyEVoy4oupTpGduwnkloSlKEwY+AcQU4MhRTD6ovXBRwFzwWgCSEF0QVjJUGmgEllTS5OLlCIlIN1mS9mx/cZ5eLDALpCTI2RAhkTZQqYoTgpoCPECbaBHQ2ETL3PUl98ECAXYijG0OyYAmQoTG7W5ODkAF1CnVgm2JQx4okPA+gCMTbGskBGgRmaOblAh5GTORIrfKFx4VH4EIAxIXIxlg2SBbMvECY3e7oApbDaIgQu5/2HmeEKEINYiwSRi7EQkLFgumZOCuggctKGI4ULZN/vMeSLj0AYMytWEqMLzFg4fYDaoKaC6wvOFR4FkIPQFaILxrJAOsHsc/zlfYDWXE8qF22s8Pz5KHxcgEVALBtjJXBSSEOwFhk1Zgy4hitCT4hVw+gFs8/zwxqIBbUgyK7fcyA0PD9XX4iVxhiC0xdof6STWCsoBmKF7+cVCWFXQYyBMxRpf+STX1b0x45AhN0OMSrOGEirhrY/dfQAdjvS7oy+WCF6r1RIFxXWvlTRg1YVqFWBmxZbD99ig9pt0YPQw9rD1nstVri9V+/Ve3XrS/wfim4P5fIFxLoAAAAASUVORK5CYII=",Ss=class{constructor(t,e){this.time=new y,e.pathPrefix||(e.pathPrefix=""),e.app||(e.app={loadAssets:()=>{},initialize:()=>{},update:()=>{},render:()=>{},error:()=>{}}),e.webglConfig&&(e.webglConfig={alpha:!0}),this.htmlCanvas=t,this.context=new yi(t,e.webglConfig),this.renderer=new vs(t,this.context),this.gl=this.context.gl,this.assetManager=new Ei(this.context,e.pathPrefix),this.input=new qi(t),e.app.loadAssets&&e.app.loadAssets(this);let i=()=>{requestAnimationFrame(i),this.time.update(),e.app.update&&e.app.update(this,this.time.delta),e.app.render&&e.app.render(this)},s=()=>{this.assetManager.isLoadingComplete()?this.assetManager.hasErrors()?e.app.error&&e.app.error(this,this.assetManager.getErrors()):(e.app.initialize&&e.app.initialize(this),i()):requestAnimationFrame(s)};requestAnimationFrame(s)}clear(t,e,i,s){this.gl.clearColor(t,e,i,s),this.gl.clear(this.gl.COLOR_BUFFER_BIT)}};return ps=r,((r,n,a,o)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let h of i(n))s.call(r,h)||h===a||t(r,h,{get:()=>n[h],enumerable:!(o=e(n,h))||o.enumerable});return r})(t({},"__esModule",{value:!0}),ps)})();t.exports=e}).call(window)},3524:(t,e,i)=>{var s=i(7473),r=i(4597),n=i(6732),a=i(2482),o=i(704),h=i(3137),l=i(1192),c=new s({Extends:h,initialize:function(t,e,i,s,n,c,u){var d,f,p,g=[],m=t.cacheManager.custom.spine;if(a(e)){var x=e;for(e=r(x,"key"),f=new o(t,{key:e,url:r(x,"jsonURL"),extension:r(x,"jsonExtension","json"),xhrSettings:r(x,"jsonXhrSettings")}),s=r(x,"atlasURL"),n=r(x,"preMultipliedAlpha"),Array.isArray(s)||(s=[s]),d=0;d{var s=i(2494),r=i(7473),n=i(5851),a=i(3527),o=i(5722),h={canvas:i(6937),webgl:i(6937)},l=i(3524),c=i(8332),u=i(5782),d=i(1984),f=new r({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:d,postRender:d,render:d,destroy:d});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,s,r,n){var a=this.scene.sys[i],o=new c(this.scene,a,t,e,s,r,n);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var r=n(t,"key",null),a=n(t,"animationName",null),o=n(t,"loop",!1),h=this.scene.sys[i],l=new c(this.scene,h,0,0,r,a,o);void 0!==e&&(t.add=e),s(this.scene,l,t);var u=n(t,"skinName",!1);u&&l.setSkinByName(u);var d=n(t,"slotName",!1),f=n(t,"attachmentName",null);return d&&l.setAttachment(d,f),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,s){var r=this.scene.sys[i],n=new u(this.scene,r,t,e,s);return this.displayList.add(n),n}),(function(t,e){void 0===t&&(t={});var r=n(t,"x",0),a=n(t,"y",0),o=n(t,"children",null),h=this.scene.sys[i],l=new u(this.scene,h,r,a,o);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(a,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=this.renderer.spineSceneRenderer;t||(t=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0),this.renderer.spineSceneRenderer=t),this.sceneRenderer=t,this.skeletonRenderer=t.skeletonRenderer,this.skeletonDebugRenderer=t.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures;i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures,n=this.sceneRenderer.context.gl;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(n,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,s,r,n,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h{var s=i(7473),r=i(7361),n=i(7738),a=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n){r.call(this,t,i,s,n),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},7738:(t,e,i)=>{var s=i(1984),r=i(1984);s=i(434),t.exports={renderWebGL:s,renderCanvas:r}},434:t=>{t.exports=function(t,e,i,s){var r=e.plugin.sceneRenderer,n=e.list;if(0!==n.length){i.addToRenderList(e);var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.newType&&(t.pipelines.clear(),r.begin());var o=t.nextTypeMatch;t.nextTypeMatch=!0,t.newType=!1;for(var h=0;h{t.exports="complete"},8621:t=>{t.exports="dispose"},8944:t=>{t.exports="end"},7494:t=>{t.exports="event"},1908:t=>{t.exports="interrupted"},5591:t=>{t.exports="start"},5146:(t,e,i)=>{t.exports={COMPLETE:i(6576),DISPOSE:i(8621),END:i(8944),EVENT:i(7494),INTERRUPTED:i(1908),START:i(5591)}},8332:(t,e,i)=>{var s=i(6412),r=i(2915),n=i(7473),a=i(1991),o=i(3131),h=i(9660),l=i(4627),c=i(3212),u=i(8414),d=i(3426),f=i(7149),p=i(2273),g=i(4208),m=i(5146),x=i(2762),v=new n({Extends:p,Mixins:[a,o,h,l,c,u,x],initialize:function(t,e,i,s,r,n,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,s),r&&this.setSkeleton(r,n,a)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var s=this.plugin,r=s.sceneRenderer;s.gl&&r.batcher.isDrawing&&(r.end(),s.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,s=(t>>8&255)/255,r=(255&t)/255,n=t>16777215?(t>>>24)/255:null,a=this.skeleton;if(e){var o=this.findSlot(e);o&&(a=o)}return a.color.r=i,a.color.g=s,a.color.b=r,null!==n&&(a.color.a=n),this},setSkeletonFromJSON:function(t,e,i,s){return this.setSkeleton(t,e,i,s)},setSkeleton:function(t,e,i,s){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,s);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var n=r.skeleton;return n.setSkin(),n.setToSetupPose(),this.skeleton=n,r=this.plugin.createAnimationState(n),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=g(d(this.rotation))+90),this.state.apply(n),n.updateCache(),this.updateSize()},onComplete:function(t){this.emit(m.COMPLETE,t)},onDispose:function(t){this.emit(m.DISPOSE,t)},onEnd:function(t){this.emit(m.END,t)},onEvent:function(t,e){this.emit(m.EVENT,t,e)},onInterrupted:function(t){this.emit(m.INTERRUPTED,t)},onStart:function(t){this.emit(m.START,t)},refresh:function(){return this.root&&(this.root.rotation=g(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,s){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===s&&(s=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-s,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,s=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=i,t.scaleY=s,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i{var s=i(1984),r=i(1984),n=i(1984);s=i(4290),n=i(780),t.exports={renderWebGL:s,renderCanvas:r,renderDirect:n}},780:(t,e,i)=>{var s=i(2915),r=i(3426),n=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var c=e.plugin,u=e.skeleton,d=c.sceneRenderer;t.pipelines.clear(),d.begin();var f=e.scrollFactorX,p=e.scrollFactorY,g=u.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,u.color.a=s(g*l.alpha,0,1)),i.addToRenderList(e);var m=n(e,i,h).calc,x=t.height;if(u.x=m.tx,u.y=x-m.ty,u.scaleX=m.scaleX,u.scaleY=m.scaleY,e.scaleX<0?(u.scaleX*=-1,e.root.rotation=o(a(m.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(m.rotationNormalized))+90,0,360),e.scaleY<0&&(u.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(m.rotationNormalized):e.root.rotation+=2*a(m.rotationNormalized)),u.updateWorldTransform(),d.drawSkeleton(u,e.preMultipliedAlpha),l&&(e.scrollFactorX=f,e.scrollFactorY=p,u.color.a=g),c.drawDebug||e.drawDebug){var v=u.x,y=u.y;u.x=0,u.y=0,d.drawSkeletonDebug(u,e.preMultipliedAlpha),u.x=v,u.y=y}d.end(),t.pipelines.rebind()}},4290:(t,e,i)=>{var s=i(2915),r=i(3426),n=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var c=e.plugin,u=e.skeleton,d=c.sceneRenderer;t.newType&&(t.pipelines.clear(),d.begin());var f=e.scrollFactorX,p=e.scrollFactorY,g=u.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,u.color.a=s(g*l.alpha,0,1)),i.addToRenderList(e);var m=n(e,i,h).calc,x=t.height;if(u.x=m.tx,u.y=x-m.ty,u.scaleX=m.scaleX,u.scaleY=m.scaleY,e.scaleX<0?(u.scaleX*=-1,e.root.rotation=o(a(m.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(m.rotationNormalized))+90,0,360),e.scaleY<0&&(u.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(m.rotationNormalized):e.root.rotation+=2*a(m.rotationNormalized)),u.updateWorldTransform(),d.drawSkeleton(u,e.preMultipliedAlpha),l&&(e.scrollFactorX=f,e.scrollFactorY=p,u.color.a=g),c.drawDebug||e.drawDebug){var v=u.x,y=u.y;u.x=0,u.y=0,d.drawSkeletonDebug(u,e.preMultipliedAlpha),u.x=v,u.y=y}t.nextTypeMatch||(d.end(),t.pipelines.rebind())}},9454:(t,e,i)=>{var s={VERSION:"3.60.0",BlendModes:i(8351),ScaleModes:i(8196),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},1081:(t,e,i)=>{var s=i(7473),r=i(6748),n=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{t.exports="changedata"},7801:t=>{t.exports="changedata-"},4873:t=>{t.exports="destroy"},9966:t=>{t.exports="removedata"},4586:t=>{t.exports="setdata"},6748:(t,e,i)=>{t.exports={CHANGE_DATA:i(9044),CHANGE_DATA_KEY:i(7801),DESTROY:i(4873),REMOVE_DATA:i(9966),SET_DATA:i(4586)}},3004:(t,e,i)=>{var s=i(2776),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(r.ogg=i('ogg; codecs="vorbis"'),r.opus=i('ogg; codecs="opus"',"opus"),r.mp3=i("mpeg"),r.wav=i("wav"),r.m4a=i("x-m4a"),r.aac=i("aac"),r.flac=i("flac","x-flac"),r.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)r.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var n=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===n&&a>=11||n>10)&&(r.dolby=!0)}}}catch(t){}return r}()},2776:(t,e,i)=>{var s,r=i(5203),n={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edg\/\d+/.test(s)?(n.edge=!0,n.es2019=!0):/OPR/.test(s)?(n.opera=!0,n.es2019=!0):/Chrome\/(\d+)/.test(s)&&!r.windowsPhone?(n.chrome=!0,n.chromeVersion=parseInt(RegExp.$1,10),n.es2019=n.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(n.firefox=!0,n.firefoxVersion=parseInt(RegExp.$1,10),n.es2019=n.firefoxVersion>10):/AppleWebKit/.test(s)&&r.iOS?n.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(s)?(n.ie=!0,n.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(s)&&!r.windowsPhone?(n.safari=!0,n.safariVersion=parseInt(RegExp.$1,10),n.es2019=n.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(n.ie=!0,n.trident=!0,n.tridentVersion=parseInt(RegExp.$1,10),n.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(n.silk=!0),n)},6505:(t,e,i)=>{var s,r,n,a=i(8073),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(n=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(n,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+r},n.src=s+"AP804Oa6"+r,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return a.remove(this),s}()),o)},6543:(t,e,i)=>{var s=i(5203),r=i(2776),n=i(8073),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=n.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=n.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=s.data instanceof Uint8ClampedArray,n.remove(t),n.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(a.getUserMedia=!1),!s.iOS&&(r.ie||r.firefox||r.chrome)&&(a.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},3922:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",r=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(2776),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},5203:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},2131:(t,e,i)=>{var s=i(4597),r={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};t.exports=function(){if("function"==typeof importScripts)return r;var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(r.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(r.h264=!0,r.mp4=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(r.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(r.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(r.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,"")&&(r.hls=!0))}catch(t){}return t.parentNode&&t.parentNode.removeChild(t),r.getVideoURL=function(t){Array.isArray(t)||(t=[t]);for(var e=0;e{t.exports={os:i(5203),browser:i(2776),features:i(6543),input:i(1454),audio:i(3004),video:i(2131),fullscreen:i(3922),canvasFeatures:i(6505)}},5686:(t,e,i)=>{var s=i(7473),r=new Float32Array(20),n=new s({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(t){return this._matrix.set(t),this._dirty=!0,this},reset:function(){var t=this._matrix;return t.fill(0),t[0]=1,t[6]=1,t[12]=1,t[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var t=this._data;return this._dirty&&(t.set(this._matrix),t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._dirty=!1),t},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),r=.213,n=.715,a=.072;return this.multiply([r+.787*i+s*-r,n+i*-n+s*-n,a+i*-a+.928*s,0,0,r+i*-r+.143*s,n+i*(1-n)+.14*s,a+i*-a+-.283*s,0,0,r+i*-r+-.787*s,n+i*-n+s*n,a+.928*i+s*a,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply(n.BLACK_WHITE,t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply(n.NEGATIVE,t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply(n.DESATURATE_LUMINANCE,t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply(n.SEPIA,t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply(n.LSD,t)},brown:function(t){return void 0===t&&(t=!1),this.multiply(n.BROWN,t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply(n.VINTAGE,t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply(n.KODACHROME,t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply(n.TECHNICOLOR,t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply(n.POLAROID,t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply(n.SHIFT_BGR,t)},multiply:function(t,e){void 0===e&&(e=!1),e||this.reset();var i=this._matrix,s=r;return s.set(i),i.set([s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19]]),this._dirty=!0,this}});n.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],n.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],n.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],n.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],n.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],n.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],n.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],n.KODACHROME=[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],n.TECHNICOLOR=[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],n.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],n.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t.exports=n},8073:(t,e,i)=>{var s,r,n,a=i(9454),o=i(2150),h=[],l=!1;t.exports=(n=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,a.CANVAS)},create:s=function(t,e,i,s,n){var c;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=a.CANVAS),void 0===n&&(n=!1);var u=r(s);return null===u?(u={parent:t,canvas:document.createElement("canvas"),type:s},s===a.CANVAS&&h.push(u),c=u.canvas):(u.parent=t,c=u.canvas),n&&(u.parent=c),c.width=e,c.height=i,l&&s===a.CANVAS&&o.disable(c.getContext("2d",{willReadFrequently:!1})),c},createWebGL:function(t,e,i){return s(t,e,i,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{var s=i(7473),r=i(3649),n=new s({initialize:function(t,e,i,s,r,n){e||(e=t.sys.make.image({x:i,y:s,key:r,frame:n,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,i,s,r){return new n(this.scene,t,e,i,s,r)})),t.exports=n},6726:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,r=this.geometryMask,n=t.maskCount,a=255;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,n,a),s.stencilOp(s.KEEP,s.KEEP,s.INCR),n++):(s.stencilFunc(s.EQUAL,n+1,a),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),this.level=n,r.renderWebGL(t,r,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),this.invertAlpha?s.stencilFunc(s.NOTEQUAL,n,a):s.stencilFunc(s.EQUAL,n,a)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},7340:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.BARREL,t),this.amount=e}});t.exports=a},5170:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===i&&(i=1),void 0===s&&(s=1),void 0===a&&(a=1),void 0===o&&(o=1),void 0===h&&(h=4),r.call(this,n.BLOOM,t),this.steps=h,this.offsetX=i,this.offsetY=s,this.blurStrength=a,this.strength=o,this.glcolor=[1,1,1],null!=e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},4199:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===e&&(e=0),void 0===i&&(i=2),void 0===s&&(s=2),void 0===a&&(a=1),void 0===h&&(h=4),r.call(this,n.BLUR,t),this.quality=0,this.x=i,this.y=s,this.steps=h,this.strength=a,this.glcolor=[1,1,1],null!=o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},3132:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=.5),void 0===i&&(i=1),void 0===s&&(s=.2),void 0===a&&(a=!1),void 0===o&&(o=1),void 0===h&&(h=1),void 0===l&&(l=1),r.call(this,n.BOKEH,t),this.radius=e,this.amount=i,this.contrast=s,this.isTiltShift=a,this.strength=l,this.blurX=o,this.blurY=h}});t.exports=a},6610:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o){void 0===e&&(e=8),void 0===a&&(a=1),void 0===o&&(o=.005),r.call(this,n.CIRCLE,t),this.scale=a,this.feather=o,this.thickness=e,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=i&&(this.color=i),null!=s&&(this.backgroundColor=s)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundColor:{get:function(){var t=this.glcolor2;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor2;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},4931:(t,e,i)=>{var s=i(7473),r=i(5686),n=i(1571),a=new s({Extends:r,initialize:function(t){r.call(this),this.type=n.COLOR_MATRIX,this.gameObject=t,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});t.exports=a},6128:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.type=t,this.gameObject=e,this.active=!0},setActive:function(t){return this.active=t,this},destroy:function(){this.gameObject=null,this.active=!1}});t.exports=s},9195:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s){void 0===e&&(e="__WHITE"),void 0===i&&(i=.005),void 0===s&&(s=.005),r.call(this,n.DISPLACEMENT,t),this.x=i,this.y=s,this.glTexture,this.setTexture(e)},setTexture:function(t){var e=this.gameObject.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this}});t.exports=a},445:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===i&&(i=4),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.GLOW,t),this.outerStrength=i,this.innerStrength=s,this.knockout=a,this.glcolor=[1,1,1,1],void 0!==e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},7724:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l,c){void 0===s&&(s=.2),void 0===a&&(a=0),void 0===o&&(o=0),void 0===h&&(h=0),void 0===l&&(l=1),void 0===c&&(c=0),r.call(this,n.GRADIENT,t),this.alpha=s,this.size=c,this.fromX=a,this.fromY=o,this.toX=h,this.toY=l,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=e&&(this.color1=e),null!=i&&(this.color2=i)},color1:{get:function(){var t=this.glcolor1;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor1;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}},color2:{get:function(){var t=this.glcolor2;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor2;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}}});t.exports=a},4412:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.PIXELATE,t),this.amount=e}});t.exports=a},75:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.1),void 0===a&&(a=1),void 0===h&&(h=6),void 0===l&&(l=1),r.call(this,n.SHADOW,t),this.x=e,this.y=i,this.decay=s,this.power=a,this.glcolor=[0,0,0,1],this.samples=h,this.intensity=l,void 0!==o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},8734:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=3),void 0===a&&(a=!1),r.call(this,n.SHINE,t),this.speed=e,this.lineWidth=i,this.gradient=s,this.reveal=a}});t.exports=a},2437:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=.5),void 0===a&&(a=.5),r.call(this,n.VIGNETTE,t),this.x=e,this.y=i,this.radius=s,this.strength=a}});t.exports=a},5984:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.WIPE,t),this.progress=0,this.wipeWidth=e,this.direction=i,this.axis=s,this.reveal=a}});t.exports=a},1571:t=>{t.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},7347:(t,e,i)=>{var s=i(1030),r=i(1571),n={Barrel:i(7340),Controller:i(6128),Bloom:i(5170),Blur:i(4199),Bokeh:i(3132),Circle:i(6610),ColorMatrix:i(4931),Displacement:i(9195),Glow:i(445),Gradient:i(7724),Pixelate:i(4412),Shadow:i(75),Shine:i(8734),Vignette:i(2437),Wipe:i(5984)};n=s(!1,n,r),t.exports=n},2494:(t,e,i)=>{var s=i(8351),r=i(8361);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var n=r(i,"scale",null);"number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=r(n,"x",1),e.scaleY=r(n,"y",1));var a=r(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(i,"rotation",0);var o=r(i,"angle",null);null!==o&&(e.angle=o),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),c=r(h,"y",.5);e.setOrigin(l,c)}return e.blendMode=r(i,"blendMode",s.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},2273:(t,e,i)=>{var s=i(7473),r=i(6125),n=i(1081),a=i(4399),o=i(3389),h=i(204),l=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(t,e){return this.data||(this.data=new n(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new n(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new n(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new n(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},3649:(t,e,i)=>{var s=i(7473),r=i(8456),n=i(204),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(n.DESTROY,this.destroy,this)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},r.register("GameObjectFactory",a,"add"),t.exports=a},2208:(t,e,i)=>{var s=i(4227),r=new s,n=new s,a=new s,o={camera:r,sprite:n,calc:a};t.exports=function(t,e,i){var s=r,h=n,l=a;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),o}},4344:(t,e,i)=>{var s=i(2915),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},4518:(t,e,i)=>{var s=i(2915),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},5173:(t,e,i)=>{var s=i(8351),r={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},1991:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},8305:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},3131:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},1626:(t,e,i)=>{var s=i(7473),r=i(7347),n=i(8935),a=new s({initialize:function(t,e){this.gameObject=t,this.isPost=e,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(t){return void 0===t&&(t=0),this.padding=t,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(t){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,void 0!==t&&(this.padding=t),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var t=this.list,e=0;e{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},3671:(t,e,i)=>{var s=i(1392),r=i(9876),n=i(2529),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t,e){return void 0===t&&(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getTopLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,n,a,o,h,l;if(void 0===t&&(t=new s),this.parentContainer){var c=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),c.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),c.transformPoint(t.x,t.y,t),r=t.x,n=t.y,this.getBottomLeft(t),c.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),c.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,n=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(i,n,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(i,n,o,l)-t.y,t}};t.exports=a},2246:(t,e,i)=>{var s=i(7499),r=i(6726),n={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,r,n){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,r,n)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=n},5085:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},77:(t,e,i)=>{var s=i(7149),r=i(1864),n=i(5851),a=i(3747),o=i(2529),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=n(t,"from",0),t.to=n(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=n(t,"rotationOffset",0);var l=n(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var c=this.path.getPoint(.1);this.rotation=Math.atan2(c.y-this.y,c.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var n=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-n,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},986:(t,e,i)=>{var s=i(3911),r={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(t){this.pipelineData={};var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){var a=n.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?s(e):e)}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},resetPipeline:function(t){return void 0===t&&(t=!1),this.pipeline=this.defaultPipeline,t&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=r},4461:(t,e,i)=>{var s=i(3911),r=i(1626),n=i(8935),a={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(t){this.postPipelines=[],this.postPipelineData={},this.postFX=new r(this,!0),t&&(this.preFX=new r(this,!1))},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPostPipelineData:function(t,e){var i=this.postPipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],r=0;r=0;s--){var r=i[s];(e&&r.name===t||!e&&r===t)&&(r.destroy(),n(i,s))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};t.exports=a},4627:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},1868:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},4976:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},9243:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=r},5693:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},6125:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},3212:(t,e,i)=>{var s=i(7425),r=i(4227),n=i(7556),a=i(3692),o=i(2820),h=i(2529),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return o(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(e||(e=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var r=s.scrollX,a=s.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):n(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},4227:(t,e,i)=>{var s=i(7473),r=i(7425),n=i(2529),a=new s({initialize:function(t,e,i,s,r,n){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===r&&(r=0),void 0===n&&(n=0),this.matrix=new Float32Array([t,e,i,s,r,n,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||n?r.TAU-(n>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3];return s[0]=r*i+a*e,s[1]=n*i+o*e,s[2]=r*-e+a*i,s[3]=n*-e+o*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,r=i[0],n=i[1],a=i[2],o=i[3],h=i[4],l=i[5],c=s[0],u=s[1],d=s[2],f=s[3],p=s[4],g=s[5],m=void 0===e?i:e.matrix;return m[0]=c*r+u*a,m[1]=c*n+u*o,m[2]=d*r+f*a,m[3]=d*n+f*o,m[4]=p*r+g*a+h,m[5]=p*n+g*o+l,m},multiplyWithOffset:function(t,e,i){var s=this.matrix,r=t.matrix,n=s[0],a=s[1],o=s[2],h=s[3],l=e*n+i*o+s[4],c=e*a+i*h+s[5],u=r[0],d=r[1],f=r[2],p=r[3],g=r[4],m=r[5];return s[0]=u*n+d*o,s[1]=u*a+d*h,s[2]=f*n+p*o,s[3]=f*a+p*h,s[4]=g*n+m*o+l,s[5]=g*a+m*h+c,this},transform:function(t,e,i,s,r,n){var a=this.matrix,o=a[0],h=a[1],l=a[2],c=a[3],u=a[4],d=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*c,a[2]=i*o+s*l,a[3]=i*h+s*c,a[4]=r*o+n*l+u,a[5]=r*h+n*c+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3],h=s[4],l=s[5];return i.x=t*r+e*a+h,i.y=t*n+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=e*r-i*s;return t[0]=r/o,t[1]=-i/o,t[2]=-s/o,t[3]=e/o,t[4]=(s*a-r*n)/o,t[5]=-(e*a-i*n)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,r,n){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=s,a[4]=r,a[5]=n,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],r=e[2],n=e[3],a=i*n-s*r;if(t.translateX=e[4],t.translateY=e[5],i||s){var o=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/o):-Math.acos(i/o),t.scaleX=o,t.scaleY=a/o}else if(r||n){var h=Math.sqrt(r*r+n*n);t.rotation=.5*Math.PI-(n>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,r){var n=this.matrix,a=Math.sin(i),o=Math.cos(i);return n[4]=t,n[5]=e,n[0]=o*s,n[1]=a*s,n[2]=-a*r,n[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new n);var s=this.matrix,r=s[0],a=s[1],o=s[2],h=s[3],l=s[4],c=s[5],u=1/(r*h+o*-a);return i.x=h*u*t+-o*u*e+(c*o-l*h)*u,i.y=r*u*e+-a*u*t+(-c*r+l*a)*u,i},setQuad:function(t,e,i,s,r,n){void 0===n&&(n=this.quad);var a=this.matrix,o=a[0],h=a[1],l=a[2],c=a[3],u=a[4],d=a[5];return n[0]=t*o+e*l+u,n[1]=t*h+e*c+d,n[2]=t*o+s*l+u,n[3]=t*h+s*c+d,n[4]=i*o+s*l+u,n[5]=i*h+s*c+d,n[6]=i*o+e*l+u,n[7]=i*h+e*c+d,r&&n.forEach((function(t,e){n[e]=Math.round(t)})),n},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},8414:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},4286:(t,e,i)=>{t.exports={Alpha:i(4344),AlphaSingle:i(4518),BlendMode:i(5173),ComputedSize:i(1991),Crop:i(8305),Depth:i(3131),Flip:i(9660),FX:i(1626),GetBounds:i(3671),Mask:i(2246),Origin:i(5085),PathFollower:i(77),Pipeline:i(986),PostPipeline:i(4461),ScrollFactor:i(4627),Size:i(1868),Texture:i(4976),TextureCrop:i(9243),Tint:i(5693),ToJSON:i(6125),Transform:i(3212),TransformMatrix:i(4227),Visible:i(8414)}},7361:(t,e,i)=>{var s=i(1953),r=i(8351),n=i(7473),a=i(4286),o=i(3389),h=i(2273),l=i(1392),c=i(3232),u=i(9422),d=i(2529),f=new n({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.PostPipeline,a.Transform,a.Visible,c],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(e,i),this.setBlendMode(r.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,r=!1;t.setEmpty();for(var n=0;n-1},setAll:function(t,e,i,r){return s.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,s=[null],r=this.list.slice(),n=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},3232:(t,e,i)=>{var s=i(1984),r=s,n=s;r=i(4343),t.exports={renderWebGL:r,renderCanvas:n}},4343:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var r=e.list,n=r.length;if(0!==n){var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,c=e.scrollFactorY,u=0;u{t.exports="addedtoscene"},4265:t=>{t.exports="destroy"},8671:t=>{t.exports="removedfromscene"},3420:t=>{t.exports="complete"},601:t=>{t.exports="created"},7919:t=>{t.exports="error"},6231:t=>{t.exports="locked"},5241:t=>{t.exports="loop"},8325:t=>{t.exports="playing"},3356:t=>{t.exports="play"},7513:t=>{t.exports="seeked"},5788:t=>{t.exports="seeking"},7111:t=>{t.exports="stalled"},8118:t=>{t.exports="stop"},9184:t=>{t.exports="textureready"},4287:t=>{t.exports="unlocked"},857:t=>{t.exports="unsupported"},3389:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(6608),DESTROY:i(4265),REMOVED_FROM_SCENE:i(8671),VIDEO_COMPLETE:i(3420),VIDEO_CREATED:i(601),VIDEO_ERROR:i(7919),VIDEO_LOCKED:i(6231),VIDEO_LOOP:i(5241),VIDEO_PLAY:i(3356),VIDEO_PLAYING:i(8325),VIDEO_SEEKED:i(7513),VIDEO_SEEKING:i(5788),VIDEO_STALLED:i(7111),VIDEO_STOP:i(8118),VIDEO_TEXTURE:i(9184),VIDEO_UNLOCKED:i(4287),VIDEO_UNSUPPORTED:i(857)}},1643:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},8881:(t,e,i)=>{var s=i(7655);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},4479:(t,e,i)=>{var s=i(4771),r=i(7655);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=s(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,c=0;c{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},284:(t,e,i)=>{var s=i(7473),r=i(8881),n=i(4479),a=i(1643),o=i(3915),h=i(2529),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return n(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},3915:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},7655:(t,e,i)=>{var s=i(7473),r=i(1643),n=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=n},5956:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},716:(t,e,i)=>{var s=i(7120),r=i(7655);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var n=s(t)*e;return e>.5?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width)),i}},8151:(t,e,i)=>{var s=i(716),r=i(7120);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=r(t)/i);for(var a=0;a{t.exports=function(t){return 2*(t.width+t.height)}},2161:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},1392:(t,e,i)=>{var s=i(7473),r=i(5956),n=i(716),a=i(8151),o=i(1643),h=i(284),l=i(2161),c=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=c},9422:(t,e,i)=>{var s=i(1392);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=Math.min(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-n;return i.setTo(r,n,a,o)}},1593:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=i(4597),o=i(5593),h=i(7410),l=i(5874),c=i(707),u=new s({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=a(e,"url");void 0===s?s=t.path+i+"."+a(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=c(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(n.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(n.FILE_COMPLETE,e,i,t),this.loader.emit(n.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});u.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},u.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=u},9845:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},5593:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},7410:(t,e,i)=>{var s=i(1030),r=i(707);t.exports=function(t,e){var i=void 0===t?r():s({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},3137:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=new s({initialize:function(t,e,i,s){var n=[];s.forEach((function(t){t&&n.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=n,this.state=r.FILE_PENDING,this.complete=!1,this.pending=n.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a{var s=i(7410);t.exports=function(t,e){var i=s(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var n in i.headers)r.setRequestHeader(n,i.headers[n]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},707:t=>{t.exports=function(t,e,i,s,r,n){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===r&&(r=0),void 0===n&&(n=!1),{responseType:t,async:e,user:i,password:s,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}}},4359:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},462:t=>{t.exports="addfile"},7297:t=>{t.exports="complete"},8660:t=>{t.exports="filecomplete"},6484:t=>{t.exports="filecomplete-"},7972:t=>{t.exports="loaderror"},1906:t=>{t.exports="load"},1441:t=>{t.exports="fileprogress"},1072:t=>{t.exports="postprocess"},1927:t=>{t.exports="progress"},6597:t=>{t.exports="start"},1179:(t,e,i)=>{t.exports={ADD:i(462),COMPLETE:i(7297),FILE_COMPLETE:i(8660),FILE_KEY_COMPLETE:i(6484),FILE_LOAD_ERROR:i(7972),FILE_LOAD:i(1906),FILE_PROGRESS:i(1441),POST_PROCESS:i(1072),PROGRESS:i(1927),START:i(6597)}},6732:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=i(5593),c=new s({Extends:n,initialize:function t(e,i,s,r,a){var l,c="png";if(h(i)){var u=i;i=o(u,"key"),s=o(u,"url"),l=o(u,"normalMap"),r=o(u,"xhrSettings"),c=o(u,"extension",c),a=o(u,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:c,responseType:"blob",key:i,url:s,xhrSettings:r,config:a};if(n.call(this,e,d),l){var f=new t(e,this.key,l,r,a);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){n.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){n.revokeObjectURL(t.data),t.onProcessError()},n.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(5851),l=i(2482),c=new s({Extends:n,initialize:function(t,e,i,s,a){var c="json";if(l(e)){var u=e;e=o(u,"key"),i=o(u,"url"),s=o(u,"xhrSettings"),c=o(u,"extension",c),a=o(u,"dataKey",a)}var d={type:"json",cache:t.cacheManager.json,extension:c,responseType:"text",key:e,url:i,xhrSettings:s,config:a};n.call(this,t,d),l(i)&&(this.data=a?h(i,a):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=new s({Extends:n,initialize:function(t,e,i,s){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var c=e;e=o(c,"key"),i=o(c,"url"),s=o(c,"xhrSettings"),a=o(c,"extension",a),r=o(c,"type",r),l=o(c,"cache",l)}var u={type:r,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports=function(t){for(var e=0,i=0;i{var s=i(3916);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},7025:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},48:t=>{t.exports=function(t,e,i,s,r){var n=.5*(s-e),a=.5*(r-i),o=t*t;return(2*i-2*s+n+a)*(t*o)+(-3*i+3*s-2*n-a)*o+n*t+i}},5035:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},2915:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},7149:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.DEG_TO_RAD}},2975:t=>{t.exports=function(t,e){return Math.abs(t-e)}},2107:(t,e,i)=>{var s=i(2915),r=i(7473),n=i(9652),a=i(1984),o=new n,h=new r({initialize:function t(e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,n=r[0],a=r[4],o=r[8],h=r[1],l=r[5],c=r[9],u=r[2],d=r[6],f=r[10],p=0,g=0,m=0,x=.99999;switch(e){case"XYZ":g=Math.asin(s(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},104:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},4941:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},1555:(t,e,i)=>{var s=i(2915);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},5005:t=>{t.exports=function(t,e){return t/e/1e3}},3702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},8820:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},1743:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},3416:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},2149:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=l*n-a*h,u=-l*r+a*o,d=h*r-n*o,f=e*c+i*u+s*d;return f?(f=1/f,t[0]=c*f,t[1]=(-l*i+s*h)*f,t[2]=(a*i-s*n)*f,t[3]=u*f,t[4]=(l*e-s*o)*f,t[5]=(-a*e+s*r)*f,t[6]=d*f,t[7]=(-h*e+i*o)*f,t[8]=(n*e-i*r)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=n*l-a*h,t[1]=s*h-i*l,t[2]=i*a-s*n,t[3]=a*o-r*l,t[4]=e*l-s*o,t[5]=s*r-e*a,t[6]=r*h-n*o,t[7]=i*o-e*h,t[8]=e*n-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*n-a*h)+i*(-l*r+a*o)+s*(h*r-n*o)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],c=e[8],u=t.val,d=u[0],f=u[1],p=u[2],g=u[3],m=u[4],x=u[5],v=u[6],y=u[7],w=u[8];return e[0]=d*i+f*n+p*h,e[1]=d*s+f*a+p*l,e[2]=d*r+f*o+p*c,e[3]=g*i+m*n+x*h,e[4]=g*s+m*a+x*l,e[5]=g*r+m*o+x*c,e[6]=v*i+y*n+w*h,e[7]=v*s+y*a+w*l,e[8]=v*r+y*o+w*c,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*n,e[1]=l*s+h*a,e[2]=l*r+h*o,e[3]=l*n-h*i,e[4]=l*a-h*s,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,r=t.w,n=e+e,a=i+i,o=s+s,h=e*n,l=e*a,c=e*o,u=i*a,d=i*o,f=s*o,p=r*n,g=r*a,m=r*o,x=this.val;return x[0]=1-(u+f),x[3]=l+m,x[6]=c-g,x[1]=l-m,x[4]=1-(h+f),x[7]=d+p,x[2]=c+g,x[5]=d-p,x[8]=1-(h+u),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],r=e[1],n=e[2],a=e[3],o=e[4],h=e[5],l=e[6],c=e[7],u=e[8],d=e[9],f=e[10],p=e[11],g=e[12],m=e[13],x=e[14],v=e[15],y=s*h-r*o,w=s*l-n*o,b=s*c-a*o,A=r*l-n*h,M=r*c-a*h,E=n*c-a*l,S=u*m-d*g,T=u*x-f*g,I=u*v-p*g,C=d*x-f*m,R=d*v-p*m,k=f*v-p*x,F=y*k-w*R+b*C+A*I-M*T+E*S;return F?(F=1/F,i[0]=(h*k-l*R+c*C)*F,i[1]=(l*I-o*k-c*T)*F,i[2]=(o*R-h*I+c*S)*F,i[3]=(n*R-r*k-a*C)*F,i[4]=(s*k-n*I+a*T)*F,i[5]=(r*I-s*R-a*S)*F,i[6]=(m*E-x*M+v*A)*F,i[7]=(x*b-g*E-v*w)*F,i[8]=(g*M-m*b+v*y)*F,this):null}});t.exports=s},9652:(t,e,i)=>{var s=i(7473),r=i(5689),n=1e-6,a=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,r,n,a,o,h,l,c,u,d,f,p,g){var m=this.val;return m[0]=t,m[1]=e,m[2]=i,m[3]=s,m[4]=r,m[5]=n,m[6]=a,m[7]=o,m[8]=h,m[9]=l,m[10]=c,m[11]=u,m[12]=d,m[13]=f,m[14]=p,m[15]=g,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=o.fromQuat(i).val,r=e.x,n=e.y,a=e.z;return this.setValues(s[0]*r,s[1]*r,s[2]*r,0,s[4]*n,s[5]*n,s[6]*n,0,s[8]*a,s[9]*a,s[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],r=t[6],n=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=r,t[11]=t[14],t[12]=s,t[13]=n,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15],x=e*a-i*n,v=e*o-s*n,y=e*h-r*n,w=i*o-s*a,b=i*h-r*a,A=s*h-r*o,M=l*p-c*f,E=l*g-u*f,S=l*m-d*f,T=c*g-u*p,I=c*m-d*p,C=u*m-d*g,R=x*C-v*I+y*T+w*S-b*E+A*M;return R?(R=1/R,this.setValues((a*C-o*I+h*T)*R,(s*I-i*C-r*T)*R,(p*A-g*b+m*w)*R,(u*b-c*A-d*w)*R,(o*S-n*C-h*E)*R,(e*C-s*S+r*E)*R,(g*y-f*A-m*v)*R,(l*A-u*y+d*v)*R,(n*I-a*S+h*M)*R,(i*S-e*I-r*M)*R,(f*b-p*y+m*x)*R,(c*y-l*b-d*x)*R,(a*E-n*T-o*M)*R,(e*T-i*E+s*M)*R,(p*v-f*w-g*x)*R,(l*w-c*v+u*x)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15];return this.setValues(a*(u*m-d*g)-c*(o*m-h*g)+p*(o*d-h*u),-(i*(u*m-d*g)-c*(s*m-r*g)+p*(s*d-r*u)),i*(o*m-h*g)-a*(s*m-r*g)+p*(s*h-r*o),-(i*(o*d-h*u)-a*(s*d-r*u)+c*(s*h-r*o)),-(n*(u*m-d*g)-l*(o*m-h*g)+f*(o*d-h*u)),e*(u*m-d*g)-l*(s*m-r*g)+f*(s*d-r*u),-(e*(o*m-h*g)-n*(s*m-r*g)+f*(s*h-r*o)),e*(o*d-h*u)-n*(s*d-r*u)+l*(s*h-r*o),n*(c*m-d*p)-l*(a*m-h*p)+f*(a*d-h*c),-(e*(c*m-d*p)-l*(i*m-r*p)+f*(i*d-r*c)),e*(a*m-h*p)-n*(i*m-r*p)+f*(i*h-r*a),-(e*(a*d-h*c)-n*(i*d-r*c)+l*(i*h-r*a)),-(n*(c*g-u*p)-l*(a*g-o*p)+f*(a*u-o*c)),e*(c*g-u*p)-l*(i*g-s*p)+f*(i*u-s*c),-(e*(a*g-o*p)-n*(i*g-s*p)+f*(i*o-s*a)),e*(a*u-o*c)-n*(i*u-s*c)+l*(i*o-s*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15];return(e*a-i*n)*(u*m-d*g)-(e*o-s*n)*(c*m-d*p)+(e*h-r*n)*(c*g-u*p)+(i*o-s*a)*(l*m-d*f)-(i*h-r*a)*(l*g-u*f)+(s*h-r*o)*(l*p-c*f)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],c=e[8],u=e[9],d=e[10],f=e[11],p=e[12],g=e[13],m=e[14],x=e[15],v=t.val,y=v[0],w=v[1],b=v[2],A=v[3];return e[0]=y*i+w*a+b*c+A*p,e[1]=y*s+w*o+b*u+A*g,e[2]=y*r+w*h+b*d+A*m,e[3]=y*n+w*l+b*f+A*x,y=v[4],w=v[5],b=v[6],A=v[7],e[4]=y*i+w*a+b*c+A*p,e[5]=y*s+w*o+b*u+A*g,e[6]=y*r+w*h+b*d+A*m,e[7]=y*n+w*l+b*f+A*x,y=v[8],w=v[9],b=v[10],A=v[11],e[8]=y*i+w*a+b*c+A*p,e[9]=y*s+w*o+b*u+A*g,e[10]=y*r+w*h+b*d+A*m,e[11]=y*n+w*l+b*f+A*x,y=v[12],w=v[13],b=v[14],A=v[15],e[12]=y*i+w*a+b*c+A*p,e[13]=y*s+w*o+b*u+A*g,e[14]=y*r+w*h+b*d+A*m,e[15]=y*n+w*l+b*f+A*x,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,r=i[0],n=i[4],a=i[8],o=i[12],h=i[1],l=i[5],c=i[9],u=i[13],d=i[2],f=i[6],p=i[10],g=i[14],m=i[3],x=i[7],v=i[11],y=i[15],w=s[0],b=s[4],A=s[8],M=s[12],E=s[1],S=s[5],T=s[9],I=s[13],C=s[2],R=s[6],k=s[10],F=s[14],L=s[3],P=s[7],O=s[11],Y=s[15];return this.setValues(r*w+n*E+a*C+o*L,h*w+l*E+c*C+u*L,d*w+f*E+p*C+g*L,m*w+x*E+v*C+y*L,r*b+n*S+a*R+o*P,h*b+l*S+c*R+u*P,d*b+f*S+p*R+g*P,m*b+x*S+v*R+y*P,r*A+n*T+a*k+o*O,h*A+l*T+c*k+u*O,d*A+f*T+p*k+g*O,m*A+x*T+v*k+y*O,r*M+n*I+a*F+o*Y,h*M+l*I+c*F+u*Y,d*M+f*I+p*F+g*Y,m*M+x*I+v*F+y*Y)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),r=1-i,n=t.x,a=t.y,o=t.z,h=r*n,l=r*a;return this.setValues(h*n+i,h*a-s*o,h*o+s*a,0,h*a+s*o,l*a+i,l*o-s*n,0,h*o-s*a,l*o+s*n,r*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,r=e.y,a=e.z,o=Math.sqrt(s*s+r*r+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},44:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},5385:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},8585:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==s?(r=(s-t)/(s-i))<0&&(r=0):r=1:r<0&&(r=0),r}},372:(t,e,i)=>{var s=i(7473),r=i(2149),n=i(1984),a=i(5689),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),c=new a(1,0,0),u=new a(0,1,0),d=new a,f=new r,p=new s({initialize:function(t,e,i,s){this.onChangeCallback=n,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=s*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),r+e*(t.z-r),n+e*(t.w-n))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(c).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=f.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*n+i*o-s*a,i*h+r*a+s*n-e*o,s*h+r*o+e*a-i*n,r*h-e*n-i*a-s*o)},slerp:function(t,e){var i=this.x,s=this.y,r=this.z,n=this.w,a=t.x,h=t.y,l=t.z,c=t.w,u=i*a+s*h+r*l+n*c;u<0&&(u=-u,a=-a,h=-h,l=-l,c=-c);var d=1-e,f=e;if(1-u>o){var p=Math.acos(u),g=Math.sin(p);d=Math.sin((1-e)*p)/g,f=Math.sin(e*p)/g}return this.set(d*i+f*a,d*s+f*h,d*r+f*l,d*n+f*c)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s,n=r?1/r:0;return this.set(-t*n,-e*n,-i*n,s*n)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*n,i*a+s*n,s*a-i*n,r*a-e*n)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a-s*n,i*a+r*n,s*a+e*n,r*a-i*n)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*n,i*a-e*n,s*a+r*n,r*a-s*n)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,r=t.z/2,n=Math.cos(i),a=Math.cos(s),o=Math.cos(r),h=Math.sin(i),l=Math.sin(s),c=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+n*l*c,n*l*o-h*a*c,n*a*c+h*l*o,n*a*o-h*l*c,e);break;case"YXZ":this.set(h*a*o+n*l*c,n*l*o-h*a*c,n*a*c-h*l*o,n*a*o+h*l*c,e);break;case"ZXY":this.set(h*a*o-n*l*c,n*l*o+h*a*c,n*a*c+h*l*o,n*a*o-h*l*c,e);break;case"ZYX":this.set(h*a*o-n*l*c,n*l*o+h*a*c,n*a*c-h*l*o,n*a*o+h*l*c,e);break;case"YZX":this.set(h*a*o+n*l*c,n*l*o+h*a*c,n*a*c-h*l*o,n*a*o-h*l*c,e);break;case"XZY":this.set(h*a*o-n*l*c,n*l*o-h*a*c,n*a*c+h*l*o,n*a*o+h*l*c,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],r=i[4],n=i[8],a=i[1],o=i[5],h=i[9],l=i[2],c=i[6],u=i[10],d=s+o+u;return d>0?(e=.5/Math.sqrt(d+1),this.set((c-h)*e,(n-l)*e,(a-r)*e,.25/e)):s>o&&s>u?(e=2*Math.sqrt(1+s-o-u),this.set(.25*e,(r+a)/e,(n+l)/e,(c-h)/e)):o>u?(e=2*Math.sqrt(1+o-s-u),this.set((r+a)/e,.25*e,(h+c)/e,(n-l)/e)):(e=2*Math.sqrt(1+u-s-o),this.set((n+l)/e,(h+c)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var n=h[r],a=h[n];e=Math.sqrt(i[3*r+r]-i[3*n+n]-i[3*a+a]+1),l[r]=.5*e,e=.5/e,l[n]=(i[3*n+r]+i[3*r+n])*e,l[a]=(i[3*a+r]+i[3*r+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+n]-i[3*n+a])*e}return this.onChangeCallback(this),this}});t.exports=p},4208:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.RAD_TO_DEG}},1705:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},6650:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,r=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=s*e,t}},2037:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},6283:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},9876:t=>{t.exports=function(t,e,i,s){var r=Math.cos(s),n=Math.sin(s),a=t.x-e,o=t.y-i;return t.x=a*r-o*n+e,t.y=a*n+o*r+i,t}},8348:t=>{t.exports=function(t,e,i,s,r){var n=s+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},4497:t=>{t.exports=function(t,e,i,s,r){return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},9640:(t,e,i)=>{var s=i(5689),r=i(9652),n=i(372),a=new r,o=new n,h=new s;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},4078:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},855:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},4936:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var r=[],n=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},278:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},163:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r){void 0===r&&(r=new s);var n=0,a=0;return t>0&&t<=e*i&&(n=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(n,a)}},7556:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r,n,a,o,h){void 0===h&&(h=new s);var l=Math.sin(n),c=Math.cos(n),u=c*a,d=l*a,f=-l*o,p=c*o,g=1/(u*p+f*-d);return h.x=p*g*t+-f*g*e+(r*f-i*p)*g,h.y=u*g*e+-d*g*t+(-r*u+i*d)*g,h}},2529:(t,e,i)=>{var s=i(7473),r=i(12),n=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new n(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},5689:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,r=t.z,n=e.x,a=e.y,o=e.z;return this.x=s*o-r*a,this.y=r*n-i*o,this.z=i*a-s*n,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z;return this.x=i*a-s*n,this.y=s*r-e*a,this.z=e*n-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*s,this.y=r[1]*e+r[4]*i+r[7]*s,this.z=r[2]*e+r[5]*i+r[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=1/(r[3]*e+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*s+r[12])*n,this.y=(r[1]*e+r[5]*i+r[9]*s+r[13])*n,this.z=(r[2]*e+r[6]*i+r[10]*s+r[14])*n,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+s*r[6],this.y=e*r[1]+i*r[4]+s*r[7],this.z=e*r[2]+i*r[5]+s*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12],this.y=r[1]*e+r[5]*i+r[9]*s+r[13],this.z=r[2]*e+r[6]*i+r[10]*s+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=e*r[0]+i*r[4]+s*r[8]+r[12],a=e*r[1]+i*r[5]+s*r[9]+r[13],o=e*r[2]+i*r[6]+s*r[10]+r[14],h=e*r[3]+i*r[7]+s*r[11]+r[15];return this.x=n/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,c=o*s+r*i-n*e,u=-r*e-n*i-a*s;return this.x=h*o+u*-r+l*-a-c*-n,this.y=l*o+u*-n+c*-r-h*-a,this.z=c*o+u*-a+h*-n-l*-r,this},project:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=r[0],a=r[1],o=r[2],h=r[3],l=r[4],c=r[5],u=r[6],d=r[7],f=r[8],p=r[9],g=r[10],m=r[11],x=r[12],v=r[13],y=r[14],w=1/(e*h+i*d+s*m+r[15]);return this.x=(e*n+i*l+s*f+x)*w,this.y=(e*a+i*c+s*p+v)*w,this.z=(e*o+i*u+s*g+y)*w,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,r=t.z,n=t.w,a=this.x-i,o=n-this.y-1-s,h=this.z;return this.x=2*a/r-1,this.y=2*o/n-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},9279:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=s*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this.w=n+e*(t.w-n),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+s*s+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12]*r,this.y=n[1]*e+n[5]*i+n[9]*s+n[13]*r,this.z=n[2]*e+n[6]*i+n[10]*s+n[14]*r,this.w=n[3]*e+n[7]*i+n[11]*s+n[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,c=o*s+r*i-n*e,u=-r*e-n*i-a*s;return this.x=h*o+u*-r+l*-a-c*-n,this.y=l*o+u*-n+c*-r-h*-a,this.z=c*o+u*-a+h*-n-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},4119:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},8445:t=>{t.exports=function(t,e,i){if(t>=e&&t<=i)return t;var s=i-e;return e+((t-e)%s+s)%s}},6412:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},760:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},6909:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},6947:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},3426:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},6906:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},3270:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-Math.PI,Math.PI)}},2748:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-180,180)}},936:(t,e,i)=>{var s=i(6906);t.exports=function(t){return s(t+Math.PI)}},1935:(t,e,i)=>{var s=i(7425);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},3692:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},2820:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-180,180)}},1833:(t,e,i)=>{t.exports={Between:i(6412),BetweenPoints:i(760),BetweenPointsY:i(6909),BetweenY:i(6947),CounterClockwise:i(3426),Normalize:i(6906),Random:i(3270),RandomDegrees:i(2748),Reverse:i(936),RotateTo:i(1935),ShortestBetween:i(5393),Wrap:i(3692),WrapDegrees:i(2820)}},7425:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},1518:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return Math.sqrt(r*r+n*n)}},5372:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},4430:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},4361:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},7798:t=>{t.exports=function(t,e,i,s,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(s-e,r))}},8290:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},3788:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return r*r+n*n}},6338:(t,e,i)=>{t.exports={Between:i(1518),BetweenPoints:i(5372),BetweenPointsSquared:i(4430),Chebyshev:i(4361),Power:i(7798),Snake:i(8290),Squared:i(3788)}},5751:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},6203:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},9103:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},4938:(t,e,i)=>{t.exports={In:i(5751),Out:i(9103),InOut:i(6203)}},8677:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},4649:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},504:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},8872:(t,e,i)=>{t.exports={In:i(8677),Out:i(504),InOut:i(4649)}},3170:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},2627:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},1349:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},5006:(t,e,i)=>{t.exports={In:i(3170),Out:i(1349),InOut:i(2627)}},6046:t=>{t.exports=function(t){return t*t*t}},9531:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},4836:t=>{t.exports=function(t){return--t*t*t+1}},875:(t,e,i)=>{t.exports={In:i(6046),Out:i(4836),InOut:i(9531)}},7619:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},7437:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},8119:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},2884:(t,e,i)=>{t.exports={In:i(7619),Out:i(8119),InOut:i(7437)}},5456:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},3461:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},2711:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},6287:(t,e,i)=>{t.exports={In:i(5456),Out:i(2711),InOut:i(3461)}},8613:(t,e,i)=>{t.exports={Back:i(4938),Bounce:i(8872),Circular:i(5006),Cubic:i(875),Elastic:i(2884),Expo:i(6287),Linear:i(4233),Quadratic:i(6341),Quartic:i(762),Quintic:i(345),Sine:i(8698),Stepped:i(7051)}},744:t=>{t.exports=function(t){return t}},4233:(t,e,i)=>{t.exports=i(744)},9810:t=>{t.exports=function(t){return t*t}},8163:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},6123:t=>{t.exports=function(t){return t*(2-t)}},6341:(t,e,i)=>{t.exports={In:i(9810),Out:i(6123),InOut:i(8163)}},7337:t=>{t.exports=function(t){return t*t*t*t}},4878:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},9012:t=>{t.exports=function(t){return 1- --t*t*t*t}},762:(t,e,i)=>{t.exports={In:i(7337),Out:i(9012),InOut:i(4878)}},303:t=>{t.exports=function(t){return t*t*t*t*t}},553:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},1632:t=>{t.exports=function(t){return--t*t*t*t*t+1}},345:(t,e,i)=>{t.exports={In:i(303),Out:i(1632),InOut:i(553)}},8455:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},1844:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},990:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},8698:(t,e,i)=>{t.exports={In:i(8455),Out:i(990),InOut:i(1844)}},6745:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},7051:(t,e,i)=>{t.exports=i(6745)},3158:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},12:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},7373:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},2622:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(3158),Equal:i(12),Floor:i(1326),GreaterThan:i(7373),LessThan:i(2622)}},4675:(t,e,i)=>{var s=i(7425),r=i(1030),n={Angle:i(1833),Distance:i(6338),Easing:i(8613),Fuzzy:i(7927),Interpolation:i(2140),Pow2:i(7897),Snap:i(3943),RandomDataGenerator:i(6957),Average:i(3136),Bernstein:i(785),Between:i(7025),CatmullRom:i(48),CeilTo:i(5035),Clamp:i(2915),DegToRad:i(7149),Difference:i(2975),Euler:i(2107),Factorial:i(3916),FloatBetween:i(104),FloorTo:i(4941),FromPercent:i(1555),GetSpeed:i(5005),IsEven:i(3702),IsEvenStrict:i(8820),Linear:i(1743),LinearXY:i(3416),MaxAdd:i(3733),Median:i(44),MinSub:i(5385),Percent:i(8585),RadToDeg:i(4208),RandomXY:i(1705),RandomXYZ:i(6650),RandomXYZW:i(2037),Rotate:i(6283),RotateAround:i(9876),RotateAroundDistance:i(8348),RotateTo:i(4497),RoundAwayFromZero:i(4078),RoundTo:i(855),SinCosTableGenerator:i(4936),SmootherStep:i(278),SmoothStep:i(2733),ToXY:i(163),TransformXY:i(7556),Within:i(4119),Wrap:i(8445),Vector2:i(2529),Vector3:i(5689),Vector4:i(9279),Matrix3:i(2149),Matrix4:i(9652),Quaternion:i(372),RotateVec3:i(9640)};n=r(!1,n,s),t.exports=n},1640:(t,e,i)=>{var s=i(785);t.exports=function(t,e){for(var i=0,r=t.length-1,n=0;n<=r;n++)i+=Math.pow(1-e,r-n)*Math.pow(e,n)*t[n]*s(r,n);return i}},6105:(t,e,i)=>{var s=i(48);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return t[0]===t[i]?(e<0&&(n=Math.floor(r=i*(1+e))),s(r-n,t[(n-1+i)%i],t[n],t[(n+1)%i],t[(n+2)%i])):e<0?t[0]-(s(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(r-n,t[n?n-1:0],t[n],t[i{t.exports=function(t,e,i,s,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,r)}},6765:(t,e,i)=>{var s=i(1743);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return e<0?s(t[0],t[1],r):e>1?s(t[i],t[i-1],i-r):s(t[n],t[n+1>i?i:n+1],r-n)}},6388:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},5735:(t,e,i)=>{var s=i(2733);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},8705:(t,e,i)=>{var s=i(278);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},2140:(t,e,i)=>{t.exports={Bezier:i(1640),CatmullRom:i(6105),CubicBezier:i(4002),Linear:i(6765),QuadraticBezier:i(6388),SmoothStep:i(5735),SmootherStep:i(8705)}},5443:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},167:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},7897:(t,e,i)=>{t.exports={GetNext:i(5443),IsSize:i(725),IsValue:i(167)}},6957:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},5659:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},5461:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},5131:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},3943:(t,e,i)=>{t.exports={Ceil:i(5659),Floor:i(5461),To:i(5131)}},8666:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},8456:t=>{var e={},i={},s={register:function(t,i,s,r){void 0===r&&(r=!1),e[t]={plugin:i,mapping:s,custom:r}},registerCustom:function(t,e,s,r){i[t]={plugin:e,mapping:s,data:r}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},5722:(t,e,i)=>{var s=i(8666),r=i(7473),n=i(204),a=new r({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(n.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},8351:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},8196:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},3527:t=>{t.exports="resize"},8618:t=>{t.exports="addedtoscene"},4328:t=>{t.exports="boot"},6099:t=>{t.exports="create"},7645:t=>{t.exports="destroy"},2710:t=>{t.exports="pause"},2547:t=>{t.exports="postupdate"},8577:t=>{t.exports="prerender"},8197:t=>{t.exports="preupdate"},8997:t=>{t.exports="ready"},7604:t=>{t.exports="removedfromscene"},8999:t=>{t.exports="render"},9742:t=>{t.exports="resume"},3667:t=>{t.exports="shutdown"},3468:t=>{t.exports="sleep"},7840:t=>{t.exports="start"},9896:t=>{t.exports="transitioncomplete"},5103:t=>{t.exports="transitioninit"},3162:t=>{t.exports="transitionout"},7841:t=>{t.exports="transitionstart"},6454:t=>{t.exports="transitionwake"},6536:t=>{t.exports="update"},3875:t=>{t.exports="wake"},204:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(8618),BOOT:i(4328),CREATE:i(6099),DESTROY:i(7645),PAUSE:i(2710),POST_UPDATE:i(2547),PRE_RENDER:i(8577),PRE_UPDATE:i(8197),READY:i(8997),REMOVED_FROM_SCENE:i(7604),RENDER:i(8999),RESUME:i(9742),SHUTDOWN:i(3667),SLEEP:i(3468),START:i(7840),TRANSITION_COMPLETE:i(9896),TRANSITION_INIT:i(5103),TRANSITION_OUT:i(3162),TRANSITION_START:i(7841),TRANSITION_WAKE:i(6454),UPDATE:i(6536),WAKE:i(3875)}},2362:(t,e,i)=>{var s=i(7473),r=i(2915),n=i(1030),a=new s({initialize:function(t,e,i,s,r,n,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(n,a,s,r)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,n=r.cut;n.x=i,n.y=s,n.w=t,n.h=e,n.r=i+t,n.b=s+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var a=r.drawImage;return a.x=i,a.y=s,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,i,s,r,n){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=s,o.w=r,o.h=n,o.r=i+r,o.b=s+n,this.x=i,this.y=s,this.width=r,this.height=n,this.halfWidth=.5*r,this.halfHeight=.5*n,this.centerX=Math.floor(r/2),this.centerY=Math.floor(n/2),this.updateUVs()},setCropUVs:function(t,e,i,s,n,a,o){var h=this.cutX,l=this.cutY,c=this.cutWidth,u=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=r(e,0,d)),g=l+(i=r(i,0,f)),m=s=r(s,0,d-e),x=n=r(n,0,f-i),v=this.data;if(v.trim){var y=v.spriteSourceSize,w=e+(s=r(s,0,c-e)),b=i+(n=r(n,0,u-i));if(!(y.rw||y.y>b)){var A=Math.max(y.x,e),M=Math.max(y.y,i),E=Math.min(y.r,w)-A,S=Math.min(y.b,b)-M;m=E,x=S,p=a?h+(c-(A-y.x)-E):h+(A-y.x),g=o?l+(u-(M-y.y)-S):l+(M-y.y),e=A,i=M,s=E,n=S}else p=0,g=0,m=0,x=0}else a&&(p=h+(c-e-s)),o&&(g=l+(u-i-n));var T=this.source.width,I=this.source.height;return t.u0=Math.max(0,p/T),t.v0=Math.max(0,g/I),t.u1=Math.min(1,(p+m)/T),t.v1=Math.min(1,(g+x)/I),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=m,t.ch=x,t.width=s,t.height=n,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,r,n){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=i,this.v0=s,this.u1=r,this.v1=n,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,r=this.data.drawImage;r.width=i,r.height=s;var n=this.source.width,a=this.source.height;return this.u0=t/n,this.v0=e/a,this.u1=(t+i)/n,this.v1=(e+s)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=n(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=a},1864:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},3747:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},7473:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,r,a){for(var o in s)if(s.hasOwnProperty(o)){var h=e(s,o,r);if(!1!==h){if(i((a||t).prototype,o)){if(n.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=s[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},1792:t=>{t.exports=function(t,e,i,s,r){if(void 0===r&&(r=t),i>0){var n=i-t.length;if(n<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>n&&(e.splice(n),a=n);for(var o=0;o{t.exports=function(t,e,i,s,r,n){if(void 0===i&&(i=0),void 0===n&&(n=t),s>0){var a=s-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;s>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(n,l)}return e}},2513:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=0;if(s(t,r,n))for(var o=r;o{t.exports=function(t,e,i){var s,r=[null];for(s=3;s{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,r,n=1;if(i){if(te.length&&(n=e.length),i?(s=e[n-1][i],(r=e[n][i])-t<=t-s?e[n]:e[n-1]):(s=e[n-1],(r=e[n])-t<=t-s?r:s)}},4493:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=[];if(s(t,r,n))for(var o=r;o{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},8683:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s>r||(t.splice(s,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},546:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],r=t.indexOf(s);t[i]=s,t[r]=e}return t}},1419:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},6512:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var r,n=[],a=!1;if((i||s)&&(a=!0,i||(i=""),s||(s="")),e=e;r--)a?n.push(i+r.toString()+s):n.push(r);else for(r=t;r<=e;r++)a?n.push(i+r.toString()+s):n.push(r);return n}},1316:(t,e,i)=>{var s=i(4078);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],n=Math.max(s((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,r,n,a,o){for(void 0===n&&(n=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>n;){if(a-n>600){var h=a-n+1,l=r-n+1,c=Math.log(h),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(h-u)/h)*(l-h/2<0?-1:1),f=Math.max(n,Math.floor(r-l*u/h+d)),p=Math.min(a,Math.floor(r+(h-l)*u/h+d));s(t,r,f,p,o)}var g=t[r],m=n,x=a;for(e(t,n,r),o(t[a],g)>0&&e(t,n,a);m0;)x--}0===o(t[n],g)?e(t,n,x):e(t,++x,a),x<=r&&(n=x+1),r<=x&&(a=x-1)}};t.exports=s},9703:(t,e,i)=>{var s=i(5851),r=i(4912),n=function(t,e,i){for(var s=[],r=0;r{var s=i(8935);t.exports=function(t,e,i,r){var n;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(n=t.indexOf(e))?(s(t,n),i&&i.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(n=t.indexOf(h))&&(s(t,n),o.push(h),i&&i.call(r,h)),a--}return o}},4725:(t,e,i)=>{var s=i(8935);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var n=s(t,e);return i&&i.call(r,n),n}},8780:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===n&&(n=t),s(t,e,i)){var a=i-e,o=t.splice(e,a);if(r)for(var h=0;h{var s=i(8935);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return s(t,r)}},6960:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),r=t.indexOf(i);return-1!==s&&-1===r&&(t[s]=i,!0)}},1021:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var r=t.length;if(e<0||e>r||e>=i||i>r){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},5361:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},3718:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},2071:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},8935:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],r=e;r{var s=i(9356);function r(t,e){return String(t).localeCompare(e)}function n(t,e,i,s){var r,n,a,o,h,l=t.length,c=0,u=2*i;for(r=0;rl&&(n=l),a>l&&(a=l),o=r,h=n;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[r]=e,t}},1953:(t,e,i)=>{t.exports={Matrix:i(1237),Add:i(1792),AddAt:i(2280),BringToTop:i(2513),CountAllMatching:i(1771),Each:i(7883),EachInRange:i(5856),FindClosestInSorted:i(3957),Flatten:i(4493),GetAll:i(6245),GetFirst:i(1647),GetRandom:i(5301),MoveDown:i(1842),MoveTo:i(1419),MoveUp:i(6512),MoveAbove:i(8683),MoveBelow:i(546),NumberArray:i(4130),NumberArrayStep:i(1316),QuickSelect:i(9465),Range:i(9703),Remove:i(7161),RemoveAt:i(4725),RemoveBetween:i(8780),RemoveRandomElement:i(5744),Replace:i(6960),RotateLeft:i(1021),RotateRight:i(4027),SafeRange:i(2497),SendToBack:i(5361),SetAll:i(3718),Shuffle:i(4912),SortByDigits:i(2071),SpliceOne:i(8935),StableSort:i(9992),Swap:i(2372)}},1816:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(7222),r=i(1816);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},6063:t=>{t.exports=function(t){for(var e=0;e{var s=i(7116);t.exports=function(t){return s(t,180)}},2597:(t,e,i)=>{var s=i(7116);t.exports=function(t){return s(t,90)}},7116:(t,e,i)=>{var s=i(1816),r=i(4780);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(7116);t.exports=function(t){return s(t,-90)}},7711:(t,e,i)=>{var s=i(1021),r=i(4027);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):r(t,i)),0!==e)for(var n=0;n{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),r=0;r-1;n--)s[r][n]=t[n][r]}return s}},1237:(t,e,i)=>{t.exports={CheckMatrix:i(1816),MatrixToString:i(6655),ReverseColumns:i(582),ReverseRows:i(6063),Rotate180:i(8321),RotateLeft:i(2597),RotateMatrix:i(7116),RotateRight:i(6285),Translate:i(7711),TransposeMatrix:i(4780)}},3911:t=>{var e=function(t){var i,s,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)s=t[r],i[r]=e(s);return i};t.exports=e},1030:(t,e,i)=>{var s=i(2482),r=function(){var t,e,i,n,a,o,h=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof h&&(u=h,h=arguments[1]||{},l=2),c===l&&(h=this,--l);l{var s=i(4675),r=i(5851);t.exports=function(t,e,i){var n=r(t,e,null);if(null===n)return i;if(Array.isArray(n))return s.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return s.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return s.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(e);return n}},4597:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},5851:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),n=t,a=s,o=i,h=i,l=!0,c=!0,u=0;u{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},7222:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var r=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var n=Math.ceil((r=e-t.length)/2);t=new Array(r-n+1).join(i)+t+new Array(n+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}}},e={};var i=function i(s){var r=e[s];if(void 0!==r)return r.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}(4513);window.SpinePlugin=i})(); \ No newline at end of file +(()=>{var t={4399:t=>{"use strict";var e=Object.prototype.hasOwnProperty,i="~";function s(){}function r(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function n(t,e,s,n,a){if("function"!=typeof s)throw new TypeError("The listener must be a function");var o=new r(s,n||t,a),h=i?i+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new s:delete t._events[e]}function o(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),o.prototype.eventNames=function(){var t,s,r=[];if(0===this._eventsCount)return r;for(s in t=this._events)e.call(t,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},o.prototype.listeners=function(t){var e=i?i+t:t,s=this._events[e];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,n=s.length,a=new Array(n);r{(function(){"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r={};((e,i)=>{for(var s in i)t(e,s,{get:i[s],enumerable:!0})})(r,{AlphaTimeline:()=>ft,Animation:()=>C,AnimationState:()=>kt,AnimationStateAdapter:()=>Ot,AnimationStateData:()=>Vt,AssetManager:()=>Ei,AssetManagerBase:()=>ce,AtlasAttachmentLoader:()=>ne,Attachment:()=>b,AttachmentTimeline:()=>mt,BinaryInput:()=>Pe,BlendMode:()=>ke,Bone:()=>he,BoneData:()=>ae,BoundingBoxAttachment:()=>Ut,CURRENT:()=>Nt,CameraController:()=>ji,ClippingAttachment:()=>Wt,Color:()=>h,Color2Attribute:()=>is,ColorAttribute:()=>es,ConstraintData:()=>le,CurveTimeline:()=>Q,CurveTimeline1:()=>$,CurveTimeline2:()=>tt,DebugUtils:()=>m,DeformTimeline:()=>xt,Downloader:()=>ue,DrawOrderTimeline:()=>bt,Event:()=>de,EventData:()=>fe,EventQueue:()=>Lt,EventTimeline:()=>yt,EventType:()=>Pt,FIRST:()=>Dt,FakeTexture:()=>Zt,GLTexture:()=>Mi,HOLD_FIRST:()=>Bt,HOLD_MIX:()=>zt,HOLD_SUBSEQUENT:()=>Xt,IkConstraint:()=>pe,IkConstraintData:()=>ge,IkConstraintTimeline:()=>At,Input:()=>qi,IntSet:()=>n,Interpolation:()=>u,LoadingScreen:()=>Ms,M00:()=>Ti,M01:()=>Ii,M02:()=>Ci,M03:()=>Ri,M10:()=>ki,M11:()=>Fi,M12:()=>Li,M13:()=>Pi,M20:()=>Oi,M21:()=>Yi,M22:()=>Di,M23:()=>Xi,M30:()=>Bi,M31:()=>zi,M32:()=>_i,M33:()=>Ni,ManagedWebGLRenderingContext:()=>yi,MathUtils:()=>c,Matrix4:()=>Ui,Mesh:()=>Ki,MeshAttachment:()=>te,MixBlend:()=>R,MixDirection:()=>k,OrthoCamera:()=>Wi,PathAttachment:()=>ee,PathConstraint:()=>be,PathConstraintData:()=>me,PathConstraintMixTimeline:()=>Tt,PathConstraintPositionTimeline:()=>Et,PathConstraintSpacingTimeline:()=>St,PointAttachment:()=>ie,PolygonBatcher:()=>ns,Pool:()=>x,Position2Attribute:()=>Qi,Position3Attribute:()=>$i,PositionMode:()=>xe,Pow:()=>d,PowOut:()=>f,RGB2Timeline:()=>gt,RGBA2Timeline:()=>pt,RGBATimeline:()=>ut,RGBTimeline:()=>dt,RegionAttachment:()=>re,ResizeMode:()=>ws,RotateMode:()=>ye,RotateTimeline:()=>et,SETUP:()=>_t,SUBSEQUENT:()=>Yt,ScaleTimeline:()=>nt,ScaleXTimeline:()=>at,ScaleYTimeline:()=>ot,SceneRenderer:()=>ys,SequenceTimeline:()=>Ct,Shader:()=>Zi,ShapeRenderer:()=>as,ShapeType:()=>os,ShearTimeline:()=>ht,ShearXTimeline:()=>lt,ShearYTimeline:()=>ct,Skeleton:()=>Se,SkeletonBinary:()=>Le,SkeletonBounds:()=>ci,SkeletonClipping:()=>di,SkeletonData:()=>Te,SkeletonDebugRenderer:()=>ls,SkeletonJson:()=>fi,SkeletonRenderer:()=>ds,Skin:()=>Ce,SkinEntry:()=>Ie,Slot:()=>Ae,SlotData:()=>Re,SpacingMode:()=>ve,SpineCanvas:()=>Ts,StringSet:()=>a,TexCoordAttribute:()=>ts,Texture:()=>qt,TextureAtlas:()=>Kt,TextureAtlasPage:()=>Qt,TextureAtlasRegion:()=>$t,TextureFilter:()=>Gt,TextureRegion:()=>Ht,TextureWrap:()=>jt,TimeKeeper:()=>y,Timeline:()=>J,Touch:()=>Gi,TrackEntry:()=>Ft,TransformConstraint:()=>Me,TransformConstraintData:()=>Fe,TransformConstraintTimeline:()=>Mt,TransformMode:()=>oe,TranslateTimeline:()=>it,TranslateXTimeline:()=>st,TranslateYTimeline:()=>rt,Triangulator:()=>ui,Utils:()=>g,Vector2:()=>v,Vector3:()=>Si,VertexAttachment:()=>M,VertexAttribute:()=>Ji,VertexAttributeType:()=>ss,WebGLBlendModeConverter:()=>bi,WindowedMean:()=>w});var n=class{constructor(){this.array=new Array}add(t){let e=this.contains(t);return this.array[0|t]=0|t,!e}contains(t){return null!=this.array[0|t]}remove(t){this.array[0|t]=void 0}clear(){this.array.length=0}},a=class{constructor(){this.entries={},this.size=0}add(t){let e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){let e=this.size;for(var i=0,s=t.length;i1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}static rgb888ToColor(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}static fromString(t){return(new o).setFromString(t)}},h=o;h.WHITE=new o(1,1,1,1),h.RED=new o(1,0,0,1),h.GREEN=new o(0,1,0,1),h.BLUE=new o(0,0,1,1),h.MAGENTA=new o(1,0,1,1);var l=class{static clamp(t,e,i){return ti?i:t}static cosDeg(t){return Math.cos(t*l.degRad)}static sinDeg(t){return Math.sin(t*l.degRad)}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){let e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return l.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,i){let s=Math.random(),r=e-t;return s<=(i-t)/r?t+Math.sqrt(s*r*(i-t)):e-Math.sqrt((1-s)*r*(e-i))}static isPowerOfTwo(t){return t&&0==(t&t-1)}},c=l;c.PI=3.1415927,c.PI2=2*l.PI,c.radiansToDegrees=180/l.PI,c.radDeg=l.radiansToDegrees,c.degreesToRadians=l.PI/180,c.degRad=l.degreesToRadians;var u=class{apply(t,e,i){return t+(e-t)*this.applyInternal(i)}},d=class extends u{constructor(t){super(),this.power=2,this.power=t}applyInternal(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}},f=class extends d{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}},p=class{static arrayCopy(t,e,i,s,r){for(let n=e,a=s;n=e?t:p.setArraySize(t,e,i)}static newArray(t,e){let i=new Array(t);for(let s=0;s0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},w=class{constructor(t=32){this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e>1)*n;let a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(!l){o.length>0&&(h=o);let a=t.bone,l=a.worldX,c=a.worldY,u=a.a,d=a.b,f=a.c,p=a.d;for(let t=e,a=r;a=this.regions.length&&(i=this.regions.length-1);let s=this.regions[i];e.region!=s&&(e.region=s,e.updateRegion())}getPath(t,e){let i=t,s=(this.start+e).toString();for(let t=this.digits-s.length;t>0;t--)i+="0";return i+=s,i}static nextID(){return E._nextID++}},S=E;S._nextID=0;var T=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(T||{}),I=[0,1,2,3,4,5,6],C=class{constructor(t,e,i){if(this.timelines=[],this.timelineIds=new a,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=i}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));let h=this.timelines;for(let s=0,l=h.length;s(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(R||{}),k=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(k||{}),F=0,L=1,P=2,O=3,Y=4,D=5,X=6,B=7,z=8,_=9,N=10,V=11,U=12,W=13,q=14,G=15,j=16,H=17,Z=18,K=19,J=class{constructor(t,e){this.propertyIds=e,this.frames=g.newFloatArray(t*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search1(t,e){let i=t.length;for(let s=1;se)return s-1;return i-1}static search(t,e,i){let s=t.length;for(let r=i;re)return r-i;return s-i}},Q=class extends J{constructor(t,e,i){super(t,i),this.curves=g.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let e=this.getFrameCount()+18*t;if(this.curves.length>e){let t=g.newFloatArray(e);g.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,i,s,r,n,a,o,h,l,c){let u=this.curves,d=this.getFrameCount()+18*t;0==i&&(u[e]=2+d);let f=.03*(s-2*n+o),p=.03*(r-2*a+h),g=.006*(3*(n-o)-s+l),m=.006*(3*(a-h)-r+c),x=2*f+g,v=2*p+m,y=.3*(n-s)+f+.16666667*g,w=.3*(a-r)+p+.16666667*m,b=s+y,A=r+w;for(let t=d+18;dt){let n=this.frames[e],a=this.frames[e+i];return a+(t-n)/(r[s]-n)*(r[s+1]-a)}let n=s+18;for(s+=2;s=t){let e=r[s-2],i=r[s-1];return i+(t-e)/(r[s]-e)*(r[s+1]-i)}e+=this.getFrameEntries();let a=r[n-2],o=r[n-1];return o+(t-a)/(this.frames[e]-a)*(this.frames[e+i]-o)}},$=class extends Q{constructor(t,e,i){super(t,e,[i])}getFrameEntries(){return 2}setFrame(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+1]=i}getCurveValue(t){let e=this.frames,i=e.length-2;for(let s=2;s<=i;s+=2)if(e[s]>t){i=s-2;break}let s=this.curves[i>>1];switch(s){case 0:let s=e[i],r=e[i+1];return r+(t-s)/(e[i+2]-s)*(e[i+2+1]-r);case 1:return e[i+1]}return this.getBezierValue(t,i,1,s-2)}},tt=class extends Q{constructor(t,e,i,s){super(t,e,[i,s])}getFrameEntries(){return 3}setFrame(t,e,i,s){t*=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s}},et=class extends ${constructor(t,e,i){super(t,e,F+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,s,r,n,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i>2];switch(p){case 0:let t=h[f];c=h[f+1],u=h[f+2],d=h[f+3];let e=(i-t)/(h[f+4]-t);c+=(h[f+4+1]-c)*e,u+=(h[f+4+2]-u)*e,d+=(h[f+4+3]-d)*e;break;case 1:c=h[f+1],u=h[f+2],d=h[f+3];break;default:c=this.getBezierValue(i,f,1,p-2),u=this.getBezierValue(i,f,2,p+18-2),d=this.getBezierValue(i,f,3,p+36-2)}if(1==r)l.r=c,l.g=u,l.b=d;else{if(0==n){let t=o.data.color;l.r=t.r,l.g=t.g,l.b=t.b}l.r+=(c-l.r)*r,l.g+=(u-l.g)*r,l.b+=(d-l.b)*r}}},ft=class extends ${constructor(t,e,i){super(t,e,z+"|"+i),this.slotIndex=0,this.slotIndex=i}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.color;if(i>3];switch(y){case 0:let t=h[v];u=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],g=h[v+5],m=h[v+6],x=h[v+7];let e=(i-t)/(h[v+8]-t);u+=(h[v+8+1]-u)*e,d+=(h[v+8+2]-d)*e,f+=(h[v+8+3]-f)*e,p+=(h[v+8+4]-p)*e,g+=(h[v+8+5]-g)*e,m+=(h[v+8+6]-m)*e,x+=(h[v+8+7]-x)*e;break;case 1:u=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],g=h[v+5],m=h[v+6],x=h[v+7];break;default:u=this.getBezierValue(i,v,1,y-2),d=this.getBezierValue(i,v,2,y+18-2),f=this.getBezierValue(i,v,3,y+36-2),p=this.getBezierValue(i,v,4,y+54-2),g=this.getBezierValue(i,v,5,y+72-2),m=this.getBezierValue(i,v,6,y+90-2),x=this.getBezierValue(i,v,7,y+108-2)}if(1==r)l.set(u,d,f,p),c.r=g,c.g=m,c.b=x;else{if(0==n){l.setFromColor(o.data.color);let t=o.data.darkColor;c.r=t.r,c.g=t.g,c.b=t.b}l.add((u-l.r)*r,(d-l.g)*r,(f-l.b)*r,(p-l.a)*r),c.r+=(g-c.r)*r,c.g+=(m-c.g)*r,c.b+=(x-c.b)*r}}},gt=class extends Q{constructor(t,e,i){super(t,e,[B+"|"+i,_+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,s,r,n,a,o){t*=7,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=s,this.frames[t+3]=r,this.frames[t+4]=n,this.frames[t+5]=a,this.frames[t+6]=o}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,c=o.darkColor;if(it){let r=this.frames[e];return i[s+1]*(t-r)/(i[s]-r)}let r=s+18;for(s+=2;s=t){let e=i[s-2],r=i[s-1];return r+(t-e)/(i[s]-e)*(i[s+1]-r)}let n=i[r-2],a=i[r-1];return a+(1-a)*(t-n)/(this.frames[e+this.getFrameEntries()]-n)}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.getAttachment();if(!h)return;if(!(h instanceof M)||h.timelineAttachment!=this.attachment)return;let l=o.deform;0==l.length&&(n=0);let c=this.vertices,u=c[0].length,d=this.frames;if(i=d[d.length-1]){let t=c[d.length-1];if(1==r)if(3==n){let e=h;if(e.bones)for(let e=0;ei)this.apply(t,e,Number.MAX_VALUE,s,r,n,a),e=-1;else if(e>=o[h-1])return;if(i0&&o[l-1]==t;)l--}for(;l=o[l];l++)s.push(this.events[l])}},yt=vt;yt.propertyIds=[""+U];var wt=class extends J{constructor(t){super(t,wt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.drawOrders[t]=i}apply(t,e,i,s,r,n,a){if(1==a)return void(0==n&&g.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(i>2];switch(f){case 0:let t=u[d];h=u[d+1],l=u[d+2],c=u[d+3];let e=(i-t)/(u[d+4]-t);h+=(u[d+4+1]-h)*e,l+=(u[d+4+2]-l)*e,c+=(u[d+4+3]-c)*e;break;case 1:h=u[d+1],l=u[d+2],c=u[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),c=this.getBezierValue(i,d,3,f+36-2)}if(0==n){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*r,o.mixX=t.mixX+(l-t.mixX)*r,o.mixY=t.mixY+(c-t.mixY)*r}else o.mixRotate+=(h-o.mixRotate)*r,o.mixX+=(l-o.mixX)*r,o.mixY+=(c-o.mixY)*r}},It=class extends J{constructor(t,e,i){super(t,[K+"|"+e+"|"+i.sequence.id]),this.slotIndex=e,this.attachment=i}getFrameEntries(){return It.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,i,s,r){let n=this.frames;n[t*=It.ENTRIES]=e,n[t+It.MODE]=i|s<<4,n[t+It.DELAY]=r}apply(t,e,i,s,r,n,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.attachment,l=this.attachment;if(!(h==l||h instanceof M&&h.timelineAttachment==l))return;let c=this.frames;if(i>4,m=this.attachment.sequence.regions.length,x=I[15&f];if(0!=x)switch(g+=(i-d)/p+1e-5|0,x){case 1:g=Math.min(m-1,g);break;case 2:g%=m;break;case 3:{let t=(m<<1)-2;g=0==t?0:g%t,g>=m&&(g=t-g);break}case 4:g=Math.max(m-1-g,0);break;case 5:g=m-1-g%m;break;case 6:{let t=(m<<1)-2;g=0==t?0:(g+m-1)%t,g>=m&&(g=t-g)}}o.sequenceIndex=g}},Ct=It;Ct.ENTRIES=3,Ct.MODE=1,Ct.DELAY=2;var Rt=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Lt(this),this.propertyIDs=new a,this.animationsChanged=!1,this.trackEntryPool=new x((()=>new Ft)),this.data=t}static emptyAnimation(){return Rt._emptyAnimation}update(t){t*=this.timeScale;let e=this.tracks;for(let i=0,s=e.length;i0){if(s.delay-=r,s.delay>0)continue;r=-s.delay,s.delay=0}let n=s.next;if(n){let e=s.trackLast-n.delay;if(e>=0){for(n.delay=0,n.trackTime+=0==s.timeScale?0:(e/s.timeScale+t)*n.timeScale,s.trackTime+=r,this.setCurrent(i,n,!0);n.mixingFrom;)n.mixTime+=t,n=n.mixingFrom;continue}}else if(s.trackLast>=s.trackEnd&&!s.mixingFrom){e[i]=null,this.queue.end(s),this.clearNext(s);continue}if(s.mixingFrom&&this.updateMixingFrom(s,t)){let t=s.mixingFrom;for(s.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}s.trackTime+=r}this.queue.drain()}updateMixingFrom(t,e){let i=t.mixingFrom;if(!i)return!0;let s=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),s):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let e=this.events,i=this.tracks,s=!1;for(let n=0,a=i.length;n0)continue;s=!0;let o=0==n?1:a.mixBlend,h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let l=a.animationLast,c=a.getAnimationTime(),u=c,d=e;a.reverse&&(u=a.animation.duration-u,d=null);let f=a.animation.timelines,p=f.length;if(0==n&&1==h||3==o)for(let e=0;e1&&(r=1),1!=i&&(i=s.mixBlend));let n=r0&&this.queueEvents(s,d),this.events.length=0,s.nextAnimationLast=d,s.nextTrackLast=s.trackTime,r}applyAttachmentTimeline(t,e,i,s,r){var n=e.slots[t.slotIndex];n.bone.active&&(i0,s=t>=0;c.signum(e)!=c.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*c.signum(t)),s=i),d=f+t-t%360,s!=i&&(d+=360*c.signum(t)),n[a]=d}n[a+1]=f,h.rotation=l+d*s}queueEvents(t,e){let i=t.animationStart,s=t.animationEnd,r=s-i,n=t.trackLast%r,a=this.events,o=0,h=a.length;for(;os||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==r||n>t.trackTime%r:e>=s&&t.animationLast=this.tracks.length)return;let e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let i=e;for(;;){let t=i.mixingFrom;if(!t)break;this.queue.end(t),i.mixingFrom=null,i.mixingTo=null,i=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,i){let s=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,s&&(i&&this.queue.interrupt(s),e.mixingFrom=s,s.mixingTo=e,e.mixTime=0,s.mixingFrom&&s.mixDuration>0&&(e.interruptAlpha*=Math.min(1,s.mixTime/s.mixDuration)),s.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,i=!1){let s=this.data.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,s,i)}setAnimationWith(t,e,i=!1){if(!e)throw new Error("animation cannot be null.");let s=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,s=!1):this.clearNext(r));let n=this.trackEntry(t,e,i,r);return this.setCurrent(t,n,s),this.queue.drain(),n}addAnimation(t,e,i=!1,s=0){let r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,s)}addAnimationWith(t,e,i=!1,s=0){if(!e)throw new Error("animation cannot be null.");let r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;let n=this.trackEntry(t,e,i,r);return r?(r.next=n,n.previous=r,s<=0&&(s+=r.getTrackComplete()-n.mixDuration)):(this.setCurrent(t,n,!0),this.queue.drain()),n.delay=s,n}setEmptyAnimation(t,e=0){let i=this.setAnimationWith(t,Rt.emptyAnimation(),!1);return i.mixDuration=e,i.trackEnd=e,i}addEmptyAnimation(t,e=0,i=0){let s=this.addAnimationWith(t,Rt.emptyAnimation(),!1,i);return i<=0&&(s.delay+=s.mixDuration-e),s.mixDuration=e,s.trackEnd=e,s}setEmptyAnimations(t=0){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,i=this.tracks.length;e0){r[o]=zt,n[o]=i;continue t}break}r[o]=Bt}else r[o]=Yt}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},kt=Rt;kt._emptyAnimation=new C("",[],0);var Ft=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=2,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){let t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(t){this.animationLast=t,this.nextAnimationLast=t}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){let t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime(t[t.start=0]="start",t[t.interrupt=1]="interrupt",t[t.end=2]="end",t[t.dispose=3]="dispose",t[t.complete=4]="complete",t[t.event=5]="event",t))(Pt||{}),Ot=class{start(t){}interrupt(t){}end(t){}dispose(t){}complete(t){}event(t,e){}},Yt=0,Dt=1,Xt=2,Bt=3,zt=4,_t=1,Nt=2,Vt=class{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,i){let s=this.skeletonData.findAnimation(t);if(!s)throw new Error("Animation not found: "+t);let r=this.skeletonData.findAnimation(e);if(!r)throw new Error("Animation not found: "+e);this.setMixWith(s,r,i)}setMixWith(t,e,i){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");let s=t.name+"."+e.name;this.animationToMixTime[s]=i}getMix(t,e){let i=t.name+"."+e.name,s=this.animationToMixTime[i];return void 0===s?this.defaultMix:s}},Ut=class extends M{constructor(t){super(t),this.color=new h(1,1,1,1)}copy(){let t=new Ut(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}},Wt=class extends M{constructor(t){super(t),this.endSlot=null,this.color=new h(.2275,.2275,.8078,1)}copy(){let t=new Wt(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}},qt=class{constructor(t){this._image=t}getImage(){return this._image}},Gt=(t=>(t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear",t))(Gt||{}),jt=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(jt||{}),Ht=class{constructor(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}},Zt=class extends qt{setFilters(t,e){}setWraps(t,e){}dispose(){}},Kt=class{constructor(t){this.pages=new Array,this.regions=new Array;let e=new Jt(t),i=new Array(4),s={size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},format:()=>{},filter:t=>{t.minFilter=g.enumValue(Gt,i[1]),t.magFilter=g.enumValue(Gt,i[2])},repeat:t=>{-1!=i[1].indexOf("x")&&(t.uWrap=10497),-1!=i[1].indexOf("y")&&(t.vWrap=10497)},pma:t=>{t.pma="true"==i[1]}};var r={xy:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2])},size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},bounds:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2]),t.width=parseInt(i[3]),t.height=parseInt(i[4])},offset:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2])},orig:t=>{t.originalWidth=parseInt(i[1]),t.originalHeight=parseInt(i[2])},offsets:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2]),t.originalWidth=parseInt(i[3]),t.originalHeight=parseInt(i[4])},rotate:t=>{let e=i[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:t=>{t.index=parseInt(i[1])}};let n=e.readLine();for(;n&&0==n.trim().length;)n=e.readLine();for(;n&&0!=n.trim().length&&0!=e.readEntry(i,n);)n=e.readLine();let a=null,o=null,h=null;for(;null!==n;)if(0==n.trim().length)a=null,n=e.readLine();else if(a){let t=new $t(a,n);for(;;){let s=e.readEntry(i,n=e.readLine());if(0==s)break;let a=r[i[0]];if(a)a(t);else{o||(o=[]),h||(h=[]),o.push(i[0]);let t=[];for(let e=0;e0&&h&&h.length>0&&(t.names=o,t.values=h,o=null,h=null),t.u=t.x/a.width,t.v=t.y/a.height,90==t.degrees?(t.u2=(t.x+t.height)/a.width,t.v2=(t.y+t.width)/a.height):(t.u2=(t.x+t.width)/a.width,t.v2=(t.y+t.height)/a.height),this.regions.push(t)}else{for(a=new Qt(n.trim());0!=e.readEntry(i,n=e.readLine());){let t=s[i[0]];t&&t(a)}this.pages.push(a)}}findRegion(t){for(let e=0;e=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;let i=e.indexOf(":");if(-1==i)return 0;t[0]=e.substr(0,i).trim();for(let s=1,r=i+1;;s++){let i=e.indexOf(",",r);if(-1==i)return t[s]=e.substr(r).trim(),s;if(t[s]=e.substr(r,i-r).trim(),r=i+1,4==s)return 4}}},Qt=class{constructor(t){this.minFilter=9728,this.magFilter=9728,this.uWrap=33071,this.vWrap=33071,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.name=t}setTexture(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}},$t=class extends Ht{constructor(t,e){super(),this.x=0,this.y=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.index=0,this.degrees=0,this.names=null,this.values=null,this.page=t,this.name=e}},te=class extends M{constructor(t,e){super(t),this.region=null,this.regionUVs=[],this.uvs=[],this.triangles=[],this.color=new h(1,1,1,1),this.width=0,this.height=0,this.hullLength=0,this.edges=[],this.parentMesh=null,this.sequence=null,this.tempColor=new h(0,0,0,0),this.path=e}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=g.newFloatArray(t.length));let e=this.uvs,i=this.uvs.length,s=this.region.u,r=this.region.v,n=0,a=0;if(this.region instanceof $t){let o=this.region,h=o.page.texture.getImage(),l=h.width,c=h.height;switch(o.degrees){case 90:s-=(o.originalHeight-o.offsetY-o.height)/l,r-=(o.originalWidth-o.offsetX-o.width)/c,n=o.originalHeight/l,a=o.originalWidth/c;for(let o=0;o= 0.");if(!e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}},oe=(t=>(t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection",t))(oe||{}),he=class{constructor(t,e,i){if(this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}isActive(){return this.active}update(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(t,e,i,s,r,n,a){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=s,this.ascaleY=r,this.ashearX=n,this.ashearY=a;let o=this.parent;if(!o){let o=this.skeleton,h=i+90+a,l=o.scaleX,u=o.scaleY;return this.a=c.cosDeg(i+n)*s*l,this.b=c.cosDeg(h)*r*l,this.c=c.sinDeg(i+n)*s*u,this.d=c.sinDeg(h)*r*u,this.worldX=t*l+o.x,void(this.worldY=e*u+o.y)}let h=o.a,l=o.b,u=o.c,d=o.d;switch(this.worldX=h*t+l*e+o.worldX,this.worldY=u*t+d*e+o.worldY,this.data.transformMode){case 0:{let t=i+90+a,e=c.cosDeg(i+n)*s,o=c.cosDeg(t)*r,f=c.sinDeg(i+n)*s,p=c.sinDeg(t)*r;return this.a=h*e+l*f,this.b=h*o+l*p,this.c=u*e+d*f,void(this.d=u*o+d*p)}case 1:{let t=i+90+a;this.a=c.cosDeg(i+n)*s,this.b=c.cosDeg(t)*r,this.c=c.sinDeg(i+n)*s,this.d=c.sinDeg(t)*r;break}case 2:{let t=h*h+u*u,e=0;t>1e-4?(t=Math.abs(h*d-l*u)/t,h/=this.skeleton.scaleX,u/=this.skeleton.scaleY,l=u*t,d=h*t,e=Math.atan2(u,h)*c.radDeg):(h=0,u=0,e=90-Math.atan2(d,l)*c.radDeg);let o=i+n-e,f=i+a-e+90,p=c.cosDeg(o)*s,g=c.cosDeg(f)*r,m=c.sinDeg(o)*s,x=c.sinDeg(f)*r;this.a=h*p-l*m,this.b=h*g-l*x,this.c=u*p+d*m,this.d=u*g+d*x;break}case 3:case 4:{let t=c.cosDeg(i),e=c.sinDeg(i),o=(h*t+l*e)/this.skeleton.scaleX,f=(u*t+d*e)/this.skeleton.scaleY,p=Math.sqrt(o*o+f*f);p>1e-5&&(p=1/p),o*=p,f*=p,p=Math.sqrt(o*o+f*f),3==this.data.transformMode&&h*d-l*u<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(p=-p);let g=Math.PI/2+Math.atan2(f,o),m=Math.cos(g)*p,x=Math.sin(g)*p,v=c.cosDeg(n)*s,y=c.cosDeg(90+a)*r,w=c.sinDeg(n)*s,b=c.sinDeg(90+a)*r;this.a=o*v+m*w,this.b=o*y+m*b,this.c=f*v+x*w,this.d=f*y+x*b;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}getWorldRotationX(){return Math.atan2(this.c,this.a)*c.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*c.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}updateAppliedTransform(){let t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*c.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*c.radDeg);let e=t.a,i=t.b,s=t.c,r=t.d,n=1/(e*r-i*s),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*n-o*i*n,this.ay=o*e*n-a*s*n;let h=n*r,l=n*e,u=n*i,d=n*s,f=h*this.a-u*this.c,p=h*this.b-u*this.d,g=l*this.c-d*this.a,m=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+g*g),this.ascaleX>1e-4){let t=f*m-p*g;this.ascaleY=t/this.ascaleX,this.ashearY=Math.atan2(f*p+g*m,t)*c.radDeg,this.arotation=Math.atan2(g,f)*c.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,p)*c.radDeg}worldToLocal(t){let e=1/(this.a*this.d-this.b*this.c),i=t.x-this.worldX,s=t.y-this.worldY;return t.x=i*this.d*e-s*this.b*e,t.y=s*this.a*e-i*this.c*e,t}localToWorld(t){let e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t}worldToLocalRotation(t){let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*c.radDeg+this.rotation-this.shearX}localToWorldRotation(t){t-=this.rotation-this.shearX;let e=c.sinDeg(t),i=c.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*c.radDeg}rotateWorld(t){let e=this.a,i=this.b,s=this.c,r=this.d,n=c.cosDeg(t),a=c.sinDeg(t);this.a=n*e-a*s,this.b=n*i-a*r,this.c=a*e+n*s,this.d=a*i+n*r}},le=class{constructor(t,e,i){this.name=t,this.order=e,this.skinRequired=i}},ce=class{constructor(t,e="",i=new ue){this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=t,this.pathPrefix=e,this.downloader=i}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,i){this.toLoad--,this.loaded++,this.assets[e]=i,t&&t(e,i)}error(t,e,i){this.toLoad--,this.loaded++,this.errors[e]=i,t&&t(e,i)}loadAll(){return new Promise(((t,e)=>{let i=()=>{this.isLoadingComplete()?this.hasErrors()?e(this.errors):t(this):requestAnimationFrame(i)};requestAnimationFrame(i)}))}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadBinary(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load binary ${t}: status ${e}, ${s}`)}))}loadText(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadText(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load text ${t}: status ${e}, ${s}`)}))}loadJson(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadJson(t,(i=>{this.success(e,t,i)}),((e,s)=>{this.error(i,t,`Couldn't load JSON ${t}: status ${e}, ${s}`)}))}loadTexture(t,e=(()=>{}),i=(()=>{})){if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then((e=>e.ok?e.blob():(this.error(i,t,`Couldn't load image: ${t}`),null))).then((t=>t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null)).then((i=>{i&&this.success(e,t,this.textureLoader(i))}));else{let s=new Image;s.crossOrigin="anonymous",s.onload=()=>{this.success(e,t,this.textureLoader(s))},s.onerror=()=>{this.error(i,t,`Couldn't load image: ${t}`)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),s.src=t}}loadTextureAtlas(t,e=(()=>{}),i=(()=>{}),s){let r=t.lastIndexOf("/"),n=r>=0?t.substring(0,r+1):"";t=this.start(t),this.downloader.downloadText(t,(r=>{try{let a=new Kt(r),o=a.pages.length,h=!1;for(let r of a.pages)this.loadTexture(s?s[r.name]:n+r.name,((i,s)=>{h||(r.setTexture(s),0==--o&&this.success(e,t,a))}),((e,s)=>{h||this.error(i,t,`Couldn't load texture atlas ${t} page image: ${e}`),h=!0}))}catch(e){this.error(i,t,`Couldn't parse texture atlas ${t}: ${e.message}`)}}),((e,s)=>{this.error(i,t,`Couldn't load texture atlas ${t}: status ${e}, ${s}`)}))}get(t){return this.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;let e=this.assets[t];if(e)return e;let i=this.errors[t];throw Error("Asset not found: "+t+(i?"\n"+i:""))}remove(t){t=this.pathPrefix+t;let e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}removeAll(){for(let t in this.assets){let e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}isLoadingComplete(){return 0==this.toLoad}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}},ue=class{constructor(){this.callbacks={},this.rawDataUris={}}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return-1!=e?(e+=7,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){for(var e=window.atob(t),i=e.length,s=new Uint8Array(i),r=0;r{this.finish(t,s.status,s.responseText)};s.onload=r,s.onerror=r,s.send()}downloadJson(t,e,i){this.downloadText(t,(t=>{e(JSON.parse(t))}),i)}downloadBinary(t,e,i){if(this.start(t,e,i))return;if(this.rawDataUris[t]){try{let e=this.rawDataUris[t];this.finish(t,200,this.dataUriToUint8Array(e))}catch(e){this.finish(t,400,JSON.stringify(e))}return}let s=new XMLHttpRequest;s.open("GET",t,!0),s.responseType="arraybuffer";let r=()=>{this.finish(t,s.status,s.response)};s.onload=()=>{200==s.status||0==s.status?this.finish(t,200,new Uint8Array(s.response)):r()},s.onerror=r,s.send()}start(t,e,i){let s=this.callbacks[t];try{if(s)return!0;this.callbacks[t]=s=[]}finally{s.push(e,i)}}finish(t,e,i){let s=this.callbacks[t];delete this.callbacks[t];let r=200==e||0==e?[i]:[e,i];for(let t=r.length-1,e=s.length;t180?f-=360:f<-180&&(f+=360);let m=t.ascaleX,x=t.ascaleY;if(s||r){switch(t.data.transformMode){case 3:case 4:p=e-t.worldX,g=i-t.worldY}let o=t.data.length*m,h=Math.sqrt(p*p+g*g);if(s&&ho&&o>1e-4){let t=(h/o-1)*a+1;m*=t,n&&(x*=t)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,m,x,t.ashearX,t.ashearY)}apply2(t,e,i,s,r,n,a,o,h){let l=t.ax,u=t.ay,d=t.ascaleX,f=t.ascaleY,p=d,g=f,m=e.ascaleX,x=0,v=0,y=0;d<0?(d=-d,x=180,y=-1):(x=0,y=1),f<0&&(f=-f,y=-y),m<0?(m=-m,v=180):v=0;let w=e.ax,b=0,A=0,M=0,E=t.a,S=t.b,T=t.c,I=t.d,C=Math.abs(d-f)<=1e-4;!C||n?(b=0,A=E*w+t.worldX,M=T*w+t.worldY):(b=e.ay,A=E*w+S*b+t.worldX,M=T*w+I*b+t.worldY);let R=t.parent;if(!R)throw new Error("IK parent must itself have a parent.");E=R.a,S=R.b,T=R.c,I=R.d;let k,F,L=1/(E*I-S*T),P=A-R.worldX,O=M-R.worldY,Y=(P*I-O*S)*L-l,D=(O*E-P*T)*L-u,X=Math.sqrt(Y*Y+D*D),B=e.data.length*m;if(X<1e-4)return this.apply1(t,i,s,!1,n,!1,h),void e.updateWorldTransformWith(w,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);P=i-R.worldX,O=s-R.worldY;let z=(P*I-O*S)*L-l,_=(O*E-P*T)*L-u,N=z*z+_*_;if(0!=o){o*=d*(m+1)*.5;let t=Math.sqrt(N),e=t-X-B*d+o;if(e>0){let i=Math.min(1,e/(2*o))-1;i=(e-o*(1-i*i))/t,z-=i*z,_-=i*_,N=z*z+_*_}}t:if(C){B*=d;let t=(N-X*X-B*B)/(2*X*B);t<-1?(t=-1,F=Math.PI*r):t>1?(t=1,F=0,n&&(E=(Math.sqrt(N)/(X+B)-1)*h+1,p*=E,a&&(g*=E))):F=Math.acos(t)*r,E=X+B*t,S=B*Math.sin(F),k=Math.atan2(_*E-z*S,z*E+_*S)}else{E=d*B,S=f*B;let t=E*E,e=S*S,i=Math.atan2(_,z);T=e*X*X+t*N-t*e;let s=-2*e*X,n=e-t;if(I=s*s-4*n*T,I>=0){let t=Math.sqrt(I);s<0&&(t=-t),t=.5*-(s+t);let e=t/n,a=T/t,o=Math.abs(e)=-1&&T<=1&&(T=Math.acos(T),P=E*Math.cos(T)+X,O=S*Math.sin(T),I=P*P+O*O,Ig&&(u=T,g=I,p=P,m=O)),N<=.5*(h+g)?(k=i-Math.atan2(l*r,o),F=a*r):(k=i-Math.atan2(m*r,p),F=u*r)}let V=Math.atan2(b,w)*y,U=t.arotation;k=(k-V)*c.radDeg+x-U,k>180?k-=360:k<-180&&(k+=360),t.updateWorldTransformWith(l,u,U+k*h,p,g,0,0),U=e.arotation,F=((F+V)*c.radDeg-e.ashearX)*y+v-U,F>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(w,b,U+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}},ge=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.softness=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},me=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.positionMode=xe.Fixed,this.spacingMode=ve.Fixed,this.rotateMode=ye.Chain,this.offsetRotation=0,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}},xe=(t=>(t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent",t))(xe||{}),ve=(t=>(t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional",t))(ve||{}),ye=(t=>(t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale",t))(ye||{}),we=class{constructor(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(let i=0,s=t.bones.length;i0){t=l/t*f;for(let e=1;e0?c.degRad:-c.degRad}for(let t=0,r=3;t0){let i=h.a,s=h.b,a=h.c,o=h.d,l=0,d=0,f=0;if(l=n?p[r-1]:0==u[t+1]?p[r+2]:Math.atan2(w,g),l-=Math.atan2(a,i),y){d=Math.cos(l),f=Math.sin(l);let t=h.data.length;m+=(t*(d*i-f*a)-g)*e,x+=(t*(f*i+d*a)-w)*e}else l+=v;l>c.PI?l-=c.PI2:l<-c.PI&&(l+=c.PI2),l*=e,d=Math.cos(l),f=Math.sin(l),h.a=d*i-f*a,h.b=d*s-f*o,h.c=f*i+d*a,h.d=f*s+d*o}h.updateAppliedTransform()}}computeWorldPositions(t,e,i){let s=this.target,r=this.position,n=this.spaces,a=g.setArraySize(this.positions,3*e+2),o=this.world,h=t.closed,l=t.worldVerticesLength,c=l/6,u=we.NONE;if(!t.constantSpeed){let d=t.lengths;c-=h?1:2;let f,p=d[c];switch(1==this.data.positionMode&&(r*=p),this.data.spacingMode){case 2:f=p;break;case 3:f=p/e;break;default:f=1}o=g.setArraySize(this.world,8);for(let g=0,m=0,x=0;gp){u!=we.AFTER&&(u=we.AFTER,t.computeWorldVertices(s,l-6,4,o,0,2)),this.addAfterPosition(v-p,o,0,a,m);continue}}for(;;x++){let t=d[x];if(!(v>t)){if(0==x)v/=t;else{let e=d[x-1];v=(v-e)/(t-e)}break}}x!=u&&(u=x,h&&x==c?(t.computeWorldVertices(s,l-4,4,o,0,2),t.computeWorldVertices(s,0,4,o,4,2)):t.computeWorldVertices(s,6*x+2,8,o,0,2)),this.addCurvePosition(v,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],a,m,i||g>0&&0==e)}return a}h?(l+=2,o=g.setArraySize(this.world,l),t.computeWorldVertices(s,2,l-4,o,0,2),t.computeWorldVertices(s,0,2,o,l-4,2),o[l-2]=o[0],o[l-1]=o[1]):(c--,l-=4,o=g.setArraySize(this.world,l),t.computeWorldVertices(s,2,l,o,0,2));let d,f=g.setArraySize(this.curves,c),p=0,m=o[0],x=o[1],v=0,y=0,w=0,b=0,A=0,M=0,E=0,S=0,T=0,I=0,C=0,R=0,k=0,F=0;for(let t=0,e=2;tp){this.addAfterPosition(O-p,o,l-4,a,s);continue}}for(;;c++){let t=f[c];if(!(O>t)){if(0==c)O/=t;else{let e=f[c-1];O=(O-e)/(t-e)}break}}if(c!=u){u=c;let t=6*c;for(m=o[t],x=o[t+1],v=o[t+2],y=o[t+3],w=o[t+4],b=o[t+5],A=o[t+6],M=o[t+7],E=.03*(m-2*v+w),S=.03*(x-2*y+b),T=.006*(3*(v-w)-m+A),I=.006*(3*(y-b)-x+M),C=2*E+T,R=2*S+I,k=.3*(v-m)+E+.16666667*T,F=.3*(y-x)+S+.16666667*I,P=Math.sqrt(k*k+F*F),L[0]=P,t=1;t<8;t++)k+=C,F+=R,C+=T,R+=I,P+=Math.sqrt(k*k+F*F),L[t]=P;k+=C,F+=R,P+=Math.sqrt(k*k+F*F),L[8]=P,k+=C+T,F+=R+I,P+=Math.sqrt(k*k+F*F),L[9]=P,g=0}for(O*=P;;g++){let t=L[g];if(!(O>t)){if(0==g)O/=t;else{let e=L[g-1];O=g+(O-e)/(t-e)}break}}this.addCurvePosition(.1*O,m,x,v,y,w,b,A,M,a,s,i||t>0&&0==e)}return a}addBeforePosition(t,e,i,s,r){let n=e[i],a=e[i+1],o=e[i+2]-n,h=e[i+3]-a,l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addAfterPosition(t,e,i,s,r){let n=e[i+2],a=e[i+3],o=n-e[i],h=a-e[i+1],l=Math.atan2(h,o);s[r]=n+t*Math.cos(l),s[r+1]=a+t*Math.sin(l),s[r+2]=l}addCurvePosition(t,e,i,s,r,n,a,o,h,l,c,u){if(0==t||isNaN(t))return l[c]=e,l[c+1]=i,void(l[c+2]=Math.atan2(r-i,s-e));let d=t*t,f=d*t,p=1-t,g=p*p,m=g*p,x=p*t,v=3*x,y=p*v,w=v*t,b=e*m+s*y+n*w+o*f,A=i*m+r*y+a*w+h*f;l[c]=b,l[c+1]=A,u&&(l[c+2]=t<.001?Math.atan2(r-i,s-e):Math.atan2(A-(i*g+r*x*2+a*d),b-(e*g+s*x*2+n*d)))}},be=we;be.NONE=-1,be.BEFORE=-2,be.AFTER=-3,be.epsilon=1e-5;var Ae=class{constructor(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(t instanceof M&&this.attachment instanceof M&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}},Me=class{constructor(t,e){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new v,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(let i=0;i0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,g=this.data.offsetShearY*f,m=this.bones;for(let f=0,x=m.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=(t.x-x.worldX)*e,x.worldY+=(t.y-x.worldY)*i}if(0!=s){let t=Math.sqrt(x.a*x.a+x.c*x.c);0!=t&&(t=(t+(Math.sqrt(h*h+u*u)-t+this.data.offsetScaleX)*s)/t),x.a*=t,x.c*=t}if(0!=r){let t=Math.sqrt(x.b*x.b+x.d*x.d);0!=t&&(t=(t+(Math.sqrt(l*l+d*d)-t+this.data.offsetScaleY)*r)/t),x.b*=t,x.d*=t}if(n>0){let t=x.b,e=x.d,i=Math.atan2(e,t),s=Math.atan2(d,l)-Math.atan2(u,h)-(i-Math.atan2(x.c,x.a));s>c.PI?s-=c.PI2:s<-c.PI&&(s+=c.PI2),s=i+(s+g)*n;let r=Math.sqrt(t*t+e*e);x.b=Math.cos(s)*r,x.d=Math.sin(s)*r}x.updateAppliedTransform()}}applyRelativeWorld(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=0!=e||0!=i,o=this.target,h=o.a,l=o.b,u=o.c,d=o.d,f=h*d-l*u>0?c.degRad:-c.degRad,p=this.data.offsetRotation*f,g=this.data.offsetShearY*f,m=this.bones;for(let f=0,x=m.length;fc.PI?n-=c.PI2:n<-c.PI&&(n+=c.PI2),n*=t;let a=Math.cos(n),o=Math.sin(n);x.a=a*e-o*s,x.b=a*i-o*r,x.c=o*e+a*s,x.d=o*i+a*r}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=t.x*e,x.worldY+=t.y*i}if(0!=s){let t=(Math.sqrt(h*h+u*u)-1+this.data.offsetScaleX)*s+1;x.a*=t,x.c*=t}if(0!=r){let t=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*r+1;x.b*=t,x.d*=t}if(n>0){let t=Math.atan2(d,l)-Math.atan2(u,h);t>c.PI?t-=c.PI2:t<-c.PI&&(t+=c.PI2);let e=x.b,i=x.d;t=Math.atan2(i,e)+(t-c.PI/2+g)*n;let s=Math.sqrt(e*e+i*i);x.b=Math.cos(t)*s,x.d=Math.sin(t)*s}x.updateAppliedTransform()}}applyAbsoluteLocal(){let t=this.mixRotate,e=this.mixX,i=this.mixY,s=this.mixScaleX,r=this.mixScaleY,n=this.mixShearY,a=this.target,o=this.bones;for(let h=0,l=o.length;h=s.length&&(s.length=t+1),s[t]||(s[t]={}),s[t][e]=i}addSkin(t){for(let e=0;e= 0.");if(!e)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}},ke=(t=>(t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen",t))(ke||{}),Fe=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}},Le=class{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){let e=this.scale,i=new Te;i.name="";let s=new Pe(t),r=s.readInt32(),n=s.readInt32();i.hash=0==n&&0==r?null:n.toString(16)+r.toString(16),i.version=s.readString(),i.x=s.readFloat(),i.y=s.readFloat(),i.width=s.readFloat(),i.height=s.readFloat();let a=s.readBoolean();a&&(i.fps=s.readFloat(),i.imagesPath=s.readString(),i.audioPath=s.readString());let o=0;o=s.readInt(!0);for(let t=0;t>4,t.readFloat())}s.push(e);break}}}}}let n=t.readInt(!0);if(n>0){let e=new bt(n),r=i.slots.length;for(let i=0;i=0;t--)a[t]=-1;let o=g.newArray(r-n,0),h=0,l=0;for(let e=0;e=0;t--)-1==a[t]&&(a[t]=o[--l]);e.setFrame(i,s,a)}s.push(e)}let a=t.readInt(!0);if(a>0){let e=new yt(a);for(let s=0;s>>1^-(1&i)}readStringRef(){let t=this.readInt(!0);return 0==t?null:this.strings[t-1]}readString(){let t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;let e="";for(let i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(t),i++}}return e}readFloat(){let t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}},Oe=class{constructor(t,e,i,s,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=s,this.inheritTimeline=r}},Ye=class{constructor(t=null,e=null){this.bones=t,this.vertices=e}},De=(t=>(t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping",t))(De||{});function Xe(t,e,i){let s=t.readFloat(),r=t.readFloat()*i;for(let n=0,a=0,o=e.getFrameCount()-1;e.setFrame(n,s,r),n!=o;n++){let o=t.readFloat(),h=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(n);break;case li:ze(t,e,a++,n,0,s,o,r,h,i)}s=o,r=h}return e}function Be(t,e,i){let s=t.readFloat(),r=t.readFloat()*i,n=t.readFloat()*i;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,s,r,n),a!=h;a++){let h=t.readFloat(),l=t.readFloat()*i,c=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(a);break;case li:ze(t,e,o++,a,0,s,h,r,l,i),ze(t,e,o++,a,1,s,h,n,c,i)}s=h,r=l,n=c}return e}function ze(t,e,i,s,r,n,a,o,h,l){e.setBezier(i,s,r,n,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,a,h)}var _e,Ne=0,Ve=1,Ue=2,We=3,qe=4,Ge=5,je=6,He=7,Ze=8,Ke=9,Je=0,Qe=1,$e=2,ti=3,ei=4,ii=5,si=0,ri=1,ni=0,ai=1,oi=2,hi=1,li=2,ci=class{constructor(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new x((()=>g.newFloatArray(16)))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");let i=this.boundingBoxes,s=this.polygons,r=this.polygonPool,n=t.slots,a=n.length;i.length=0,r.freeAll(s),s.length=0;for(let t=0;t=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,i,s){let r=this.minX,n=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&i<=r||e<=n&&s<=n||t>=a&&i>=a||e>=o&&s>=o)return!1;let h=(s-e)/(i-t),l=h*(r-t)+e;if(l>n&&ln&&lr&&cr&&ct.minX&&this.minYt.minY}containsPoint(t,e){let i=this.polygons;for(let s=0,r=i.length;s=i||o=i){let h=s[t];h+(i-r)/(o-r)*(s[n]-h)=c&&x<=a||x>=a&&x<=c)&&(x>=e&&x<=s||x>=s&&x<=e)){let t=(l*g-h*f)/m;if((t>=u&&t<=d||t>=d&&t<=u)&&(t>=i&&t<=r||t>=r&&t<=i))return!0}c=a,u=d}return!1}getPolygon(t){if(!t)throw new Error("boundingBox cannot be null.");let e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}},ui=class{constructor(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new x((()=>new Array)),this.polygonIndicesPool=new x((()=>new Array))}triangulate(t){let e=t,i=t.length>>1,s=this.indicesArray;s.length=0;for(let t=0;t3;){let t=i-1,a=0,o=1;for(;;){t:if(!r[a]){let n=s[t]<<1,h=s[a]<<1,l=s[o]<<1,c=e[n],u=e[n+1],d=e[h],f=e[h+1],p=e[l],g=e[l+1];for(let n=(o+1)%i;n!=t;n=(n+1)%i){if(!r[n])continue;let t=s[n]<<1,i=e[t],a=e[t+1];if(ui.positiveArea(p,g,c,u,i,a)&&ui.positiveArea(c,u,d,f,i,a)&&ui.positiveArea(d,f,p,g,i,a))break t}break}if(0==o){do{if(!r[a])break;a--}while(a>0);break}t=a,a=o,o=(o+1)%i}n.push(s[(i+a-1)%i]),n.push(s[a]),n.push(s[(a+1)%i]),s.splice(a,1),r.splice(a,1),i--;let h=(i+a-1)%i,l=a==i?0:a;r[h]=ui.isConcave(h,i,e,s),r[l]=ui.isConcave(l,i,e,s)}return 3==i&&(n.push(s[2]),n.push(s[0]),n.push(s[1])),n}decompose(t,e){let i=t,s=this.convexPolygons;this.polygonPool.freeAll(s),s.length=0;let r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;let n=this.polygonIndicesPool.obtain();n.length=0;let a=this.polygonPool.obtain();a.length=0;let o=-1,h=0;for(let t=0,l=e.length;t0?(s.push(a),r.push(n)):(this.polygonPool.free(a),this.polygonIndicesPool.free(n)),a=this.polygonPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),a.push(g),a.push(m),a.push(x),n=this.polygonIndicesPool.obtain(),n.length=0,n.push(l),n.push(c),n.push(u),h=ui.winding(d,f,p,g,m,x),o=l)}a.length>0&&(s.push(a),r.push(n));for(let t=0,e=s.length;t=0;t--)a=s[t],0==a.length&&(s.splice(t,1),this.polygonPool.free(a),n=r[t],r.splice(t,1),this.polygonIndicesPool.free(n));return s}static isConcave(t,e,i,s){let r=s[(e+t-1)%e]<<1,n=s[t]<<1,a=s[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[n],i[n+1],i[a],i[a+1])}static positiveArea(t,e,i,s,r,n){return t*(n-s)+i*(e-n)+r*(s-e)>=0}static winding(t,e,i,s,r,n){let a=i-t,o=s-e;return r*o-n*a+a*e-t*o>=0?1:-1}},di=class{constructor(){this.triangulator=new ui,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}clipStart(t,e){if(this.clipAttachment)return 0;this.clipAttachment=e;let i=e.worldVerticesLength,s=g.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,s,0,2);let r=this.clippingPolygon;di.makeClockwise(r);let n=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r));for(let t=0,e=n.length;t>1,R=this.clipOutput,k=g.setArraySize(l,e+C*f);for(let h=0;h=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(s),h.push(r),h.push(n),h.push(t),h.push(e),o.length=0;let u=a,d=a.length-4;for(let t=0;;t+=2){let e=u[t],i=u[t+1],s=u[t+2],r=u[t+3],n=e-s,a=i-r,f=h,p=h.length-2,g=o.length;for(let t=0;t0;if(n*(l-r)-a*(h-s)>0){if(p){o.push(u),o.push(d);continue}let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i)}else if(p){let t=d-l,n=u-h,a=t*(s-e)-n*(r-i);if(Math.abs(a)>1e-6){let c=(n*(i-l)-t*(e-h))/a;o.push(e+(s-e)*c),o.push(i+(r-i)*c)}else o.push(e),o.push(i);o.push(u),o.push(d)}c=!0}if(g==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),t==d)break;let m=o;(o=h).length=0,h=m}if(l!=o){l.length=0;for(let t=0,e=o.length-2;t>1;t=0;e--)-1==o[e]&&(o[e]=t[--r])}e.setFrame(n,vi(a,"time",0),o)}r.push(e)}if(t.events){let e=new yt(t.events.length),s=0;for(let r=0;r{t&&t.preventDefault()})),i.addEventListener("webglcontextrestored",(t=>{for(let t=0,e=this.restorables.length;t-1&&this.restorables.splice(e,1)}},wi=771,bi=class{static getDestGLBlendMode(t){switch(t){case 0:case 2:case 3:return wi;case 1:return 1;default:throw new Error("Unknown blend mode: "+t)}}static getSourceColorGLBlendMode(t,e=!1){switch(t){case 0:case 1:return e?1:770;case 2:return 774;case 3:return 1;default:throw new Error("Unknown blend mode: "+t)}}static getSourceAlphaGLBlendMode(t){switch(t){case 0:case 1:return 1;case 2:return wi;case 3:return 769;default:throw new Error("Unknown blend mode: "+t)}}},Ai=class extends qt{constructor(t,e,i=!1){super(e),this.texture=null,this.boundUnit=0,this.useMipMaps=!1,this.context=t instanceof yi?t:new yi(t),this.useMipMaps=i,this.restore(),this.context.addRestorable(this)}setFilters(t,e){let i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,Ai.validateMagFilter(e)),this.useMipMaps=Ai.usesMipMaps(t),this.useMipMaps&&i.generateMipmap(i.TEXTURE_2D)}static validateMagFilter(t){switch(t){case 9987:case 9987:case 9985:case 9986:case 9984:return 9729;default:return t}}static usesMipMaps(t){switch(t){case 9987:case 9987:case 9985:case 9986:case 9984:return!0;default:return!1}}setWraps(t,e){let i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e)}update(t){let e=this.context.gl;this.texture||(this.texture=this.context.gl.createTexture()),this.bind(),Ai.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL&&e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this._image),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t&&e.generateMipmap(e.TEXTURE_2D)}restore(){this.texture=null,this.update(this.useMipMaps)}bind(t=0){let e=this.context.gl;this.boundUnit=t,e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)}unbind(){let t=this.context.gl;t.activeTexture(t.TEXTURE0+this.boundUnit),t.bindTexture(t.TEXTURE_2D,null)}dispose(){this.context.removeRestorable(this),this.context.gl.deleteTexture(this.texture)}},Mi=Ai;Mi.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL=!1;var Ei=class extends ce{constructor(t,e="",i=new ue){super((e=>new Mi(t,e)),e,i)}},Si=class{constructor(t=0,e=0,i=0){this.x=0,this.y=0,this.z=0,this.x=t,this.y=e,this.z=i}setFrom(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}set(t,e,i){return this.x=t,this.y=e,this.z=i,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}scale(t){return this.x*=t,this.y*=t,this.z*=t,this}normalize(){let t=this.length();return 0==t||(t=1/t,this.x*=t,this.y*=t,this.z*=t),this}cross(t){return this.set(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)}multiply(t){let e=t.values;return this.set(this.x*e[Ti]+this.y*e[Ii]+this.z*e[Ci]+e[Ri],this.x*e[ki]+this.y*e[Fi]+this.z*e[Li]+e[Pi],this.x*e[Oi]+this.y*e[Yi]+this.z*e[Di]+e[Xi])}project(t){let e=t.values,i=1/(this.x*e[Bi]+this.y*e[zi]+this.z*e[_i]+e[Ni]);return this.set((this.x*e[Ti]+this.y*e[Ii]+this.z*e[Ci]+e[Ri])*i,(this.x*e[ki]+this.y*e[Fi]+this.z*e[Li]+e[Pi])*i,(this.x*e[Oi]+this.y*e[Yi]+this.z*e[Di]+e[Xi])*i)}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}distance(t){let e=t.x-this.x,i=t.y-this.y,s=t.z-this.z;return Math.sqrt(e*e+i*i+s*s)}},Ti=0,Ii=4,Ci=8,Ri=12,ki=1,Fi=5,Li=9,Pi=13,Oi=2,Yi=6,Di=10,Xi=14,Bi=3,zi=7,_i=11,Ni=15,Vi=class{constructor(){this.temp=new Float32Array(16),this.values=new Float32Array(16);let t=this.values;t[Ti]=1,t[Fi]=1,t[Di]=1,t[Ni]=1}set(t){return this.values.set(t),this}transpose(){let t=this.temp,e=this.values;return t[Ti]=e[Ti],t[Ii]=e[ki],t[Ci]=e[Oi],t[Ri]=e[Bi],t[ki]=e[Ii],t[Fi]=e[Fi],t[Li]=e[Yi],t[Pi]=e[zi],t[Oi]=e[Ci],t[Yi]=e[Li],t[Di]=e[Di],t[Xi]=e[_i],t[Bi]=e[Ri],t[zi]=e[Pi],t[_i]=e[Xi],t[Ni]=e[Ni],this.set(t)}identity(){let t=this.values;return t[Ti]=1,t[Ii]=0,t[Ci]=0,t[Ri]=0,t[ki]=0,t[Fi]=1,t[Li]=0,t[Pi]=0,t[Oi]=0,t[Yi]=0,t[Di]=1,t[Xi]=0,t[Bi]=0,t[zi]=0,t[_i]=0,t[Ni]=1,this}invert(){let t=this.values,e=this.temp,i=t[Bi]*t[Yi]*t[Li]*t[Ri]-t[Oi]*t[zi]*t[Li]*t[Ri]-t[Bi]*t[Fi]*t[Di]*t[Ri]+t[ki]*t[zi]*t[Di]*t[Ri]+t[Oi]*t[Fi]*t[_i]*t[Ri]-t[ki]*t[Yi]*t[_i]*t[Ri]-t[Bi]*t[Yi]*t[Ci]*t[Pi]+t[Oi]*t[zi]*t[Ci]*t[Pi]+t[Bi]*t[Ii]*t[Di]*t[Pi]-t[Ti]*t[zi]*t[Di]*t[Pi]-t[Oi]*t[Ii]*t[_i]*t[Pi]+t[Ti]*t[Yi]*t[_i]*t[Pi]+t[Bi]*t[Fi]*t[Ci]*t[Xi]-t[ki]*t[zi]*t[Ci]*t[Xi]-t[Bi]*t[Ii]*t[Li]*t[Xi]+t[Ti]*t[zi]*t[Li]*t[Xi]+t[ki]*t[Ii]*t[_i]*t[Xi]-t[Ti]*t[Fi]*t[_i]*t[Xi]-t[Oi]*t[Fi]*t[Ci]*t[Ni]+t[ki]*t[Yi]*t[Ci]*t[Ni]+t[Oi]*t[Ii]*t[Li]*t[Ni]-t[Ti]*t[Yi]*t[Li]*t[Ni]-t[ki]*t[Ii]*t[Di]*t[Ni]+t[Ti]*t[Fi]*t[Di]*t[Ni];if(0==i)throw new Error("non-invertible matrix");let s=1/i;return e[Ti]=t[Li]*t[Xi]*t[zi]-t[Pi]*t[Di]*t[zi]+t[Pi]*t[Yi]*t[_i]-t[Fi]*t[Xi]*t[_i]-t[Li]*t[Yi]*t[Ni]+t[Fi]*t[Di]*t[Ni],e[Ii]=t[Ri]*t[Di]*t[zi]-t[Ci]*t[Xi]*t[zi]-t[Ri]*t[Yi]*t[_i]+t[Ii]*t[Xi]*t[_i]+t[Ci]*t[Yi]*t[Ni]-t[Ii]*t[Di]*t[Ni],e[Ci]=t[Ci]*t[Pi]*t[zi]-t[Ri]*t[Li]*t[zi]+t[Ri]*t[Fi]*t[_i]-t[Ii]*t[Pi]*t[_i]-t[Ci]*t[Fi]*t[Ni]+t[Ii]*t[Li]*t[Ni],e[Ri]=t[Ri]*t[Li]*t[Yi]-t[Ci]*t[Pi]*t[Yi]-t[Ri]*t[Fi]*t[Di]+t[Ii]*t[Pi]*t[Di]+t[Ci]*t[Fi]*t[Xi]-t[Ii]*t[Li]*t[Xi],e[ki]=t[Pi]*t[Di]*t[Bi]-t[Li]*t[Xi]*t[Bi]-t[Pi]*t[Oi]*t[_i]+t[ki]*t[Xi]*t[_i]+t[Li]*t[Oi]*t[Ni]-t[ki]*t[Di]*t[Ni],e[Fi]=t[Ci]*t[Xi]*t[Bi]-t[Ri]*t[Di]*t[Bi]+t[Ri]*t[Oi]*t[_i]-t[Ti]*t[Xi]*t[_i]-t[Ci]*t[Oi]*t[Ni]+t[Ti]*t[Di]*t[Ni],e[Li]=t[Ri]*t[Li]*t[Bi]-t[Ci]*t[Pi]*t[Bi]-t[Ri]*t[ki]*t[_i]+t[Ti]*t[Pi]*t[_i]+t[Ci]*t[ki]*t[Ni]-t[Ti]*t[Li]*t[Ni],e[Pi]=t[Ci]*t[Pi]*t[Oi]-t[Ri]*t[Li]*t[Oi]+t[Ri]*t[ki]*t[Di]-t[Ti]*t[Pi]*t[Di]-t[Ci]*t[ki]*t[Xi]+t[Ti]*t[Li]*t[Xi],e[Oi]=t[Fi]*t[Xi]*t[Bi]-t[Pi]*t[Yi]*t[Bi]+t[Pi]*t[Oi]*t[zi]-t[ki]*t[Xi]*t[zi]-t[Fi]*t[Oi]*t[Ni]+t[ki]*t[Yi]*t[Ni],e[Yi]=t[Ri]*t[Yi]*t[Bi]-t[Ii]*t[Xi]*t[Bi]-t[Ri]*t[Oi]*t[zi]+t[Ti]*t[Xi]*t[zi]+t[Ii]*t[Oi]*t[Ni]-t[Ti]*t[Yi]*t[Ni],e[Di]=t[Ii]*t[Pi]*t[Bi]-t[Ri]*t[Fi]*t[Bi]+t[Ri]*t[ki]*t[zi]-t[Ti]*t[Pi]*t[zi]-t[Ii]*t[ki]*t[Ni]+t[Ti]*t[Fi]*t[Ni],e[Xi]=t[Ri]*t[Fi]*t[Oi]-t[Ii]*t[Pi]*t[Oi]-t[Ri]*t[ki]*t[Yi]+t[Ti]*t[Pi]*t[Yi]+t[Ii]*t[ki]*t[Xi]-t[Ti]*t[Fi]*t[Xi],e[Bi]=t[Li]*t[Yi]*t[Bi]-t[Fi]*t[Di]*t[Bi]-t[Li]*t[Oi]*t[zi]+t[ki]*t[Di]*t[zi]+t[Fi]*t[Oi]*t[_i]-t[ki]*t[Yi]*t[_i],e[zi]=t[Ii]*t[Di]*t[Bi]-t[Ci]*t[Yi]*t[Bi]+t[Ci]*t[Oi]*t[zi]-t[Ti]*t[Di]*t[zi]-t[Ii]*t[Oi]*t[_i]+t[Ti]*t[Yi]*t[_i],e[_i]=t[Ci]*t[Fi]*t[Bi]-t[Ii]*t[Li]*t[Bi]-t[Ci]*t[ki]*t[zi]+t[Ti]*t[Li]*t[zi]+t[Ii]*t[ki]*t[_i]-t[Ti]*t[Fi]*t[_i],e[Ni]=t[Ii]*t[Li]*t[Oi]-t[Ci]*t[Fi]*t[Oi]+t[Ci]*t[ki]*t[Yi]-t[Ti]*t[Li]*t[Yi]-t[Ii]*t[ki]*t[Di]+t[Ti]*t[Fi]*t[Di],t[Ti]=e[Ti]*s,t[Ii]=e[Ii]*s,t[Ci]=e[Ci]*s,t[Ri]=e[Ri]*s,t[ki]=e[ki]*s,t[Fi]=e[Fi]*s,t[Li]=e[Li]*s,t[Pi]=e[Pi]*s,t[Oi]=e[Oi]*s,t[Yi]=e[Yi]*s,t[Di]=e[Di]*s,t[Xi]=e[Xi]*s,t[Bi]=e[Bi]*s,t[zi]=e[zi]*s,t[_i]=e[_i]*s,t[Ni]=e[Ni]*s,this}determinant(){let t=this.values;return t[Bi]*t[Yi]*t[Li]*t[Ri]-t[Oi]*t[zi]*t[Li]*t[Ri]-t[Bi]*t[Fi]*t[Di]*t[Ri]+t[ki]*t[zi]*t[Di]*t[Ri]+t[Oi]*t[Fi]*t[_i]*t[Ri]-t[ki]*t[Yi]*t[_i]*t[Ri]-t[Bi]*t[Yi]*t[Ci]*t[Pi]+t[Oi]*t[zi]*t[Ci]*t[Pi]+t[Bi]*t[Ii]*t[Di]*t[Pi]-t[Ti]*t[zi]*t[Di]*t[Pi]-t[Oi]*t[Ii]*t[_i]*t[Pi]+t[Ti]*t[Yi]*t[_i]*t[Pi]+t[Bi]*t[Fi]*t[Ci]*t[Xi]-t[ki]*t[zi]*t[Ci]*t[Xi]-t[Bi]*t[Ii]*t[Li]*t[Xi]+t[Ti]*t[zi]*t[Li]*t[Xi]+t[ki]*t[Ii]*t[_i]*t[Xi]-t[Ti]*t[Fi]*t[_i]*t[Xi]-t[Oi]*t[Fi]*t[Ci]*t[Ni]+t[ki]*t[Yi]*t[Ci]*t[Ni]+t[Oi]*t[Ii]*t[Li]*t[Ni]-t[Ti]*t[Yi]*t[Li]*t[Ni]-t[ki]*t[Ii]*t[Di]*t[Ni]+t[Ti]*t[Fi]*t[Di]*t[Ni]}translate(t,e,i){let s=this.values;return s[Ri]+=t,s[Pi]+=e,s[Xi]+=i,this}copy(){return(new Vi).set(this.values)}projection(t,e,i,s){this.identity();let r=1/Math.tan(i*(Math.PI/180)/2),n=(e+t)/(t-e),a=2*e*t/(t-e),o=this.values;return o[Ti]=r/s,o[ki]=0,o[Oi]=0,o[Bi]=0,o[Ii]=0,o[Fi]=r,o[Yi]=0,o[zi]=0,o[Ci]=0,o[Li]=0,o[Di]=n,o[_i]=-1,o[Ri]=0,o[Pi]=0,o[Xi]=a,o[Ni]=0,this}ortho2d(t,e,i,s){return this.ortho(t,t+i,e,e+s,0,1)}ortho(t,e,i,s,r,n){this.identity();let a=2/(e-t),o=2/(s-i),h=-2/(n-r),l=-(e+t)/(e-t),c=-(s+i)/(s-i),u=-(n+r)/(n-r),d=this.values;return d[Ti]=a,d[ki]=0,d[Oi]=0,d[Bi]=0,d[Ii]=0,d[Fi]=o,d[Yi]=0,d[zi]=0,d[Ci]=0,d[Li]=0,d[Di]=h,d[_i]=0,d[Ri]=l,d[Pi]=c,d[Xi]=u,d[Ni]=1,this}multiply(t){let e=this.temp,i=this.values,s=t.values;return e[Ti]=i[Ti]*s[Ti]+i[Ii]*s[ki]+i[Ci]*s[Oi]+i[Ri]*s[Bi],e[Ii]=i[Ti]*s[Ii]+i[Ii]*s[Fi]+i[Ci]*s[Yi]+i[Ri]*s[zi],e[Ci]=i[Ti]*s[Ci]+i[Ii]*s[Li]+i[Ci]*s[Di]+i[Ri]*s[_i],e[Ri]=i[Ti]*s[Ri]+i[Ii]*s[Pi]+i[Ci]*s[Xi]+i[Ri]*s[Ni],e[ki]=i[ki]*s[Ti]+i[Fi]*s[ki]+i[Li]*s[Oi]+i[Pi]*s[Bi],e[Fi]=i[ki]*s[Ii]+i[Fi]*s[Fi]+i[Li]*s[Yi]+i[Pi]*s[zi],e[Li]=i[ki]*s[Ci]+i[Fi]*s[Li]+i[Li]*s[Di]+i[Pi]*s[_i],e[Pi]=i[ki]*s[Ri]+i[Fi]*s[Pi]+i[Li]*s[Xi]+i[Pi]*s[Ni],e[Oi]=i[Oi]*s[Ti]+i[Yi]*s[ki]+i[Di]*s[Oi]+i[Xi]*s[Bi],e[Yi]=i[Oi]*s[Ii]+i[Yi]*s[Fi]+i[Di]*s[Yi]+i[Xi]*s[zi],e[Di]=i[Oi]*s[Ci]+i[Yi]*s[Li]+i[Di]*s[Di]+i[Xi]*s[_i],e[Xi]=i[Oi]*s[Ri]+i[Yi]*s[Pi]+i[Di]*s[Xi]+i[Xi]*s[Ni],e[Bi]=i[Bi]*s[Ti]+i[zi]*s[ki]+i[_i]*s[Oi]+i[Ni]*s[Bi],e[zi]=i[Bi]*s[Ii]+i[zi]*s[Fi]+i[_i]*s[Yi]+i[Ni]*s[zi],e[_i]=i[Bi]*s[Ci]+i[zi]*s[Li]+i[_i]*s[Di]+i[Ni]*s[_i],e[Ni]=i[Bi]*s[Ri]+i[zi]*s[Pi]+i[_i]*s[Xi]+i[Ni]*s[Ni],this.set(this.temp)}multiplyLeft(t){let e=this.temp,i=this.values,s=t.values;return e[Ti]=s[Ti]*i[Ti]+s[Ii]*i[ki]+s[Ci]*i[Oi]+s[Ri]*i[Bi],e[Ii]=s[Ti]*i[Ii]+s[Ii]*i[Fi]+s[Ci]*i[Yi]+s[Ri]*i[zi],e[Ci]=s[Ti]*i[Ci]+s[Ii]*i[Li]+s[Ci]*i[Di]+s[Ri]*i[_i],e[Ri]=s[Ti]*i[Ri]+s[Ii]*i[Pi]+s[Ci]*i[Xi]+s[Ri]*i[Ni],e[ki]=s[ki]*i[Ti]+s[Fi]*i[ki]+s[Li]*i[Oi]+s[Pi]*i[Bi],e[Fi]=s[ki]*i[Ii]+s[Fi]*i[Fi]+s[Li]*i[Yi]+s[Pi]*i[zi],e[Li]=s[ki]*i[Ci]+s[Fi]*i[Li]+s[Li]*i[Di]+s[Pi]*i[_i],e[Pi]=s[ki]*i[Ri]+s[Fi]*i[Pi]+s[Li]*i[Xi]+s[Pi]*i[Ni],e[Oi]=s[Oi]*i[Ti]+s[Yi]*i[ki]+s[Di]*i[Oi]+s[Xi]*i[Bi],e[Yi]=s[Oi]*i[Ii]+s[Yi]*i[Fi]+s[Di]*i[Yi]+s[Xi]*i[zi],e[Di]=s[Oi]*i[Ci]+s[Yi]*i[Li]+s[Di]*i[Di]+s[Xi]*i[_i],e[Xi]=s[Oi]*i[Ri]+s[Yi]*i[Pi]+s[Di]*i[Xi]+s[Xi]*i[Ni],e[Bi]=s[Bi]*i[Ti]+s[zi]*i[ki]+s[_i]*i[Oi]+s[Ni]*i[Bi],e[zi]=s[Bi]*i[Ii]+s[zi]*i[Fi]+s[_i]*i[Yi]+s[Ni]*i[zi],e[_i]=s[Bi]*i[Ci]+s[zi]*i[Li]+s[_i]*i[Di]+s[Ni]*i[_i],e[Ni]=s[Bi]*i[Ri]+s[zi]*i[Pi]+s[_i]*i[Xi]+s[Ni]*i[Ni],this.set(this.temp)}lookAt(t,e,i){let s=Vi.xAxis,r=Vi.yAxis,n=Vi.zAxis;n.setFrom(e).normalize(),s.setFrom(e).normalize(),s.cross(i).normalize(),r.setFrom(s).cross(n).normalize(),this.identity();let a=this.values;return a[Ti]=s.x,a[Ii]=s.y,a[Ci]=s.z,a[ki]=r.x,a[Fi]=r.y,a[Li]=r.z,a[Oi]=-n.x,a[Yi]=-n.y,a[Di]=-n.z,Vi.tmpMatrix.identity(),Vi.tmpMatrix.values[Ri]=-t.x,Vi.tmpMatrix.values[Pi]=-t.y,Vi.tmpMatrix.values[Xi]=-t.z,this.multiply(Vi.tmpMatrix),this}},Ui=Vi;Ui.xAxis=new Si,Ui.yAxis=new Si,Ui.zAxis=new Si,Ui.tmpMatrix=new Vi;var Wi=class{constructor(t,e){this.position=new Si(0,0,0),this.direction=new Si(0,0,-1),this.up=new Si(0,1,0),this.near=0,this.far=100,this.zoom=1,this.viewportWidth=0,this.viewportHeight=0,this.projectionView=new Ui,this.inverseProjectionView=new Ui,this.projection=new Ui,this.view=new Ui,this.viewportWidth=t,this.viewportHeight=e,this.update()}update(){let t=this.projection,e=this.view,i=this.projectionView,s=this.inverseProjectionView,r=this.zoom,n=this.viewportWidth,a=this.viewportHeight;t.ortho(r*(-n/2),r*(n/2),r*(-a/2),r*(a/2),this.near,this.far),e.lookAt(this.position,this.direction,this.up),i.set(t.values),i.multiply(e),s.set(i.values).invert()}screenToWorld(t,e,i){let s=t.x,r=i-t.y-1;return t.x=2*s/e-1,t.y=2*r/i-1,t.z=2*t.z-1,t.project(this.inverseProjectionView),t}worldToScreen(t,e,i){return t.project(this.projectionView),t.x=e*(t.x+1)/2,t.y=i*(t.y+1)/2,t.z=(t.z+1)/2,t}setViewport(t,e){this.viewportWidth=t,this.viewportHeight=e}},qi=class{constructor(t){this.mouseX=0,this.mouseY=0,this.buttonDown=!1,this.touch0=null,this.touch1=null,this.initialPinchDistance=0,this.listeners=new Array,this.eventListeners=[],this.element=t,this.setupCallbacks(t)}setupCallbacks(t){let e=e=>{if(e instanceof MouseEvent){let i=t.getBoundingClientRect();this.mouseX=e.clientX-i.left,this.mouseY=e.clientY-i.top,this.listeners.map((t=>{this.buttonDown?t.dragged&&t.dragged(this.mouseX,this.mouseY):t.moved&&t.moved(this.mouseX,this.mouseY)}))}},i=s=>{if(s instanceof MouseEvent){let r=t.getBoundingClientRect();this.mouseX=s.clientX-r.left,this.mouseY=s.clientY-r.top,this.buttonDown=!1,this.listeners.map((t=>{t.up&&t.up(this.mouseX,this.mouseY)})),document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",i)}};t.addEventListener("mousedown",(s=>{if(s instanceof MouseEvent){let r=t.getBoundingClientRect();this.mouseX=s.clientX-r.left,this.mouseY=s.clientY-r.top,this.buttonDown=!0,this.listeners.map((t=>{t.down&&t.down(this.mouseX,this.mouseY)})),document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}}),!0),t.addEventListener("mousemove",e,!0),t.addEventListener("mouseup",i,!0),t.addEventListener("wheel",(t=>{t.preventDefault();let e=t.deltaY;t.deltaMode==WheelEvent.DOM_DELTA_LINE&&(e*=8),t.deltaMode==WheelEvent.DOM_DELTA_PAGE&&(e*=24),this.listeners.map((e=>{e.wheel&&e.wheel(t.deltaY)}))}),!0),t.addEventListener("touchstart",(e=>{if(!this.touch0||!this.touch1){let i=e.changedTouches.item(0);if(!i)return;let s=t.getBoundingClientRect(),r=i.clientX-s.left,n=i.clientY-s.top,a=new Gi(i.identifier,r,n);if(this.mouseX=r,this.mouseY=n,this.buttonDown=!0,this.touch0){if(!this.touch1){this.touch1=a;let t=this.touch1.x-this.touch0.x,e=this.touch1.x-this.touch0.x;this.initialPinchDistance=Math.sqrt(t*t+e*e),this.listeners.map((t=>{t.zoom&&t.zoom(this.initialPinchDistance,this.initialPinchDistance)}))}}else this.touch0=a,this.listeners.map((t=>{t.down&&t.down(a.x,a.y)}))}e.preventDefault()}),!1),t.addEventListener("touchmove",(e=>{if(this.touch0){var i=e.changedTouches;let n=t.getBoundingClientRect();for(var s=0;s{i.dragged&&i.dragged(t,e)}))),this.touch1&&this.touch1.identifier===r.identifier&&(this.touch1.x=this.mouseX=t,this.touch1.y=this.mouseY=e)}if(this.touch0&&this.touch1){let t=this.touch1.x-this.touch0.x,e=this.touch1.x-this.touch0.x,i=Math.sqrt(t*t+e*e);this.listeners.map((t=>{t.zoom&&t.zoom(this.initialPinchDistance,i)}))}}e.preventDefault()}),!1);let s=e=>{if(this.touch0){var i=e.changedTouches;let n=t.getBoundingClientRect();for(var s=0;s{i.up&&i.up(t,e)})),!this.touch1){this.buttonDown=!1;break}this.touch0=this.touch1,this.touch1=null,this.mouseX=this.touch0.x,this.mouseX=this.touch0.x,this.buttonDown=!0,this.listeners.map((t=>{t.down&&t.down(this.touch0.x,this.touch0.y)}))}this.touch1&&this.touch1.identifier&&(this.touch1=null)}}e.preventDefault()};t.addEventListener("touchend",s,!1),t.addEventListener("touchcancel",s)}addListener(t){this.listeners.push(t)}removeListener(t){let e=this.listeners.indexOf(t);e>-1&&this.listeners.splice(e,1)}},Gi=class{constructor(t,e,i){this.identifier=t,this.x=e,this.y=i}},ji=class{constructor(t,e){this.canvas=t,this.camera=e;let i=0,s=0,r=0,n=0,a=0,o=0,h=0;new qi(t).addListener({down:(t,l)=>{i=e.position.x,s=e.position.y,r=a=t,n=o=l,h=e.zoom},dragged:(h,l)=>{let c=h-r,u=l-n,d=e.screenToWorld(new Si(0,0),t.clientWidth,t.clientHeight),f=e.screenToWorld(new Si(c,u),t.clientWidth,t.clientHeight).sub(d);e.position.set(i-f.x,s-f.y,0),e.update(),a=h,o=l},wheel:i=>{let s=i/200*e.zoom,r=e.zoom+s;if(r>0){let s=0,n=0;if(i<0)s=a,n=o;else{let e=new Si(t.clientWidth/2+15,t.clientHeight/2),i=a-e.x,r=t.clientHeight-1-o-e.y;s=e.x-i,n=t.clientHeight-1-e.y+r}let h=e.screenToWorld(new Si(s,n),t.clientWidth,t.clientHeight);e.zoom=r,e.update();let l=e.screenToWorld(new Si(s,n),t.clientWidth,t.clientHeight);e.position.add(h.sub(l)),e.update()}},zoom:(t,i)=>{let s=t/i;e.zoom=h*s},up:(t,e)=>{a=t,o=e},moved:(t,e)=>{a=t,o=e}})}},Hi=class{constructor(t,e,i){this.vertexShader=e,this.fragmentShader=i,this.vs=null,this.fs=null,this.program=null,this.tmp2x2=new Float32Array(4),this.tmp3x3=new Float32Array(9),this.tmp4x4=new Float32Array(16),this.vsSource=e,this.fsSource=i,this.context=t instanceof yi?t:new yi(t),this.context.addRestorable(this),this.compile()}getProgram(){return this.program}getVertexShader(){return this.vertexShader}getFragmentShader(){return this.fragmentShader}getVertexShaderSource(){return this.vsSource}getFragmentSource(){return this.fsSource}compile(){let t=this.context.gl;try{if(this.vs=this.compileShader(t.VERTEX_SHADER,this.vertexShader),!this.vs)throw new Error("Couldn't compile vertex shader.");if(this.fs=this.compileShader(t.FRAGMENT_SHADER,this.fragmentShader),!this.fs)throw new Error("Couldn#t compile fragment shader.");this.program=this.compileProgram(this.vs,this.fs)}catch(t){throw this.dispose(),t}}compileShader(t,e){let i=this.context.gl,s=i.createShader(t);if(!s)throw new Error("Couldn't create shader.");if(i.shaderSource(s,e),i.compileShader(s),!i.getShaderParameter(s,i.COMPILE_STATUS)){let t="Couldn't compile shader: "+i.getShaderInfoLog(s);if(i.deleteShader(s),!i.isContextLost())throw new Error(t)}return s}compileProgram(t,e){let i=this.context.gl,s=i.createProgram();if(!s)throw new Error("Couldn't compile program.");if(i.attachShader(s,t),i.attachShader(s,e),i.linkProgram(s),!i.getProgramParameter(s,i.LINK_STATUS)){let t="Couldn't compile shader program: "+i.getProgramInfoLog(s);if(i.deleteProgram(s),!i.isContextLost())throw new Error(t)}return s}restore(){this.compile()}bind(){this.context.gl.useProgram(this.program)}unbind(){this.context.gl.useProgram(null)}setUniformi(t,e){this.context.gl.uniform1i(this.getUniformLocation(t),e)}setUniformf(t,e){this.context.gl.uniform1f(this.getUniformLocation(t),e)}setUniform2f(t,e,i){this.context.gl.uniform2f(this.getUniformLocation(t),e,i)}setUniform3f(t,e,i,s){this.context.gl.uniform3f(this.getUniformLocation(t),e,i,s)}setUniform4f(t,e,i,s,r){this.context.gl.uniform4f(this.getUniformLocation(t),e,i,s,r)}setUniform2x2f(t,e){let i=this.context.gl;this.tmp2x2.set(e),i.uniformMatrix2fv(this.getUniformLocation(t),!1,this.tmp2x2)}setUniform3x3f(t,e){let i=this.context.gl;this.tmp3x3.set(e),i.uniformMatrix3fv(this.getUniformLocation(t),!1,this.tmp3x3)}setUniform4x4f(t,e){let i=this.context.gl;this.tmp4x4.set(e),i.uniformMatrix4fv(this.getUniformLocation(t),!1,this.tmp4x4)}getUniformLocation(t){let e=this.context.gl;if(!this.program)throw new Error("Shader not compiled.");let i=e.getUniformLocation(this.program,t);if(!i&&!e.isContextLost())throw new Error(`Couldn't find location for uniform ${t}`);return i}getAttributeLocation(t){let e=this.context.gl;if(!this.program)throw new Error("Shader not compiled.");let i=e.getAttribLocation(this.program,t);if(-1==i&&!e.isContextLost())throw new Error(`Couldn't find location for attribute ${t}`);return i}dispose(){this.context.removeRestorable(this);let t=this.context.gl;this.vs&&(t.deleteShader(this.vs),this.vs=null),this.fs&&(t.deleteShader(this.fs),this.fs=null),this.program&&(t.deleteProgram(this.program),this.program=null)}static newColoredTextured(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tattribute vec2 ${Hi.TEXCOORDS};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = ${Hi.COLOR};\n\t\t\t\t\tv_texCoords = ${Hi.TEXCOORDS};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t")}static newTwoColoredTextured(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tattribute vec4 ${Hi.COLOR2};\n\t\t\t\tattribute vec2 ${Hi.TEXCOORDS};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_light;\n\t\t\t\tvarying vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_light = ${Hi.COLOR};\n\t\t\t\t\tv_dark = ${Hi.COLOR2};\n\t\t\t\t\tv_texCoords = ${Hi.TEXCOORDS};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_light;\n\t\t\t\tvarying LOWP vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tvec4 texColor = texture2D(u_texture, v_texCoords);\n\t\t\t\t\tgl_FragColor.a = texColor.a * v_light.a;\n\t\t\t\t\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n\t\t\t\t}\n\t\t\t")}static newColored(t){let e=`\n\t\t\t\tattribute vec4 ${Hi.POSITION};\n\t\t\t\tattribute vec4 ${Hi.COLOR};\n\t\t\t\tuniform mat4 ${Hi.MVP_MATRIX};\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = ${Hi.COLOR};\n\t\t\t\t\tgl_Position = ${Hi.MVP_MATRIX} * ${Hi.POSITION};\n\t\t\t\t}\n\t\t\t`;return new Hi(t,e,"\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t")}},Zi=Hi;Zi.MVP_MATRIX="u_projTrans",Zi.POSITION="a_position",Zi.COLOR="a_color",Zi.COLOR2="a_color2",Zi.TEXCOORDS="a_texCoords",Zi.SAMPLER="u_texture";var Ki=class{constructor(t,e,i,s){this.attributes=e,this.verticesBuffer=null,this.verticesLength=0,this.dirtyVertices=!1,this.indicesBuffer=null,this.indicesLength=0,this.dirtyIndices=!1,this.elementsPerVertex=0,this.context=t instanceof yi?t:new yi(t),this.elementsPerVertex=0;for(let t=0;tthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length}setIndices(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length}draw(t,e){this.drawWithOffset(t,e,0,this.indicesLength>0?this.indicesLength:this.verticesLength/this.elementsPerVertex)}drawWithOffset(t,e,i,s){let r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,s,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,s),this.unbind(t)}bind(t){let e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);let i=0;for(let s=0;s0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)}unbind(t){let e=this.context.gl;for(let i=0;i0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)}update(){let t=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=t.createBuffer()),t.bindBuffer(t.ARRAY_BUFFER,this.verticesBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),t.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=t.createBuffer()),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),t.DYNAMIC_DRAW),this.dirtyIndices=!1)}restore(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()}dispose(){this.context.removeRestorable(this);let t=this.context.gl;t.deleteBuffer(this.verticesBuffer),t.deleteBuffer(this.indicesBuffer)}},Ji=class{constructor(t,e,i){this.name=t,this.type=e,this.numElements=i}},Qi=class extends Ji{constructor(){super(Zi.POSITION,ss.Float,2)}},$i=class extends Ji{constructor(){super(Zi.POSITION,ss.Float,3)}},ts=class extends Ji{constructor(t=0){super(Zi.TEXCOORDS+(0==t?"":t),ss.Float,2)}},es=class extends Ji{constructor(){super(Zi.COLOR,ss.Float,4)}},is=class extends Ji{constructor(){super(Zi.COLOR2,ss.Float,4)}},ss=(t=>(t[t.Float=0]="Float",t))(ss||{}),rs=class{constructor(t,e=!0,i=10920){if(this.drawCalls=0,this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,this.cullWasEnabled=!1,i>10920)throw new Error("Can't have more than 10920 triangles per batch: "+i);this.context=t instanceof yi?t:new yi(t);let s=e?[new Qi,new es,new ts,new is]:[new Qi,new es,new ts];this.mesh=new Ki(t,s,i,3*i);let r=this.context.gl;this.srcColorBlend=r.SRC_ALPHA,this.srcAlphaBlend=r.ONE,this.dstBlend=r.ONE_MINUS_SRC_ALPHA}begin(t){if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=t,this.lastTexture=null,this.isDrawing=!0;let e=this.context.gl;e.enable(e.BLEND),e.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend),this.cullWasEnabled=e.isEnabled(e.CULL_FACE),this.cullWasEnabled&&e.disable(e.CULL_FACE)}setBlendMode(t,e,i){if((this.srcColorBlend!=t||this.srcAlphaBlend!=e||this.dstBlend!=i)&&(this.srcColorBlend=t,this.srcAlphaBlend=e,this.dstBlend=i,this.isDrawing)){this.flush(),this.context.gl.blendFuncSeparate(t,i,e,i)}}draw(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.mesh.getVertices().length||this.indicesLength+i.length>this.mesh.getIndices().length)&&this.flush();let s=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);let r=this.mesh.getIndices();for(let t=this.indicesLength,e=0;e0||this.indicesLength>0)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1;let t=this.context.gl;t.disable(t.BLEND),this.cullWasEnabled&&t.enable(t.CULL_FACE)}getDrawCalls(){return this.drawCalls}static getAndResetGlobalDrawCalls(){let t=rs.globalDrawCalls;return rs.globalDrawCalls=0,t}dispose(){this.mesh.dispose()}},ns=rs;ns.globalDrawCalls=0;var as=class{constructor(t,e=10920){if(this.isDrawing=!1,this.shapeType=os.Filled,this.color=new h(1,1,1,1),this.shader=null,this.vertexIndex=0,this.tmp=new v,e>10920)throw new Error("Can't have more than 10920 triangles per batch: "+e);this.context=t instanceof yi?t:new yi(t),this.mesh=new Ki(t,[new Qi,new es],e,0);let i=this.context.gl;this.srcColorBlend=i.SRC_ALPHA,this.srcAlphaBlend=i.ONE,this.dstBlend=i.ONE_MINUS_SRC_ALPHA}begin(t){if(this.isDrawing)throw new Error("ShapeRenderer.begin() has already been called");this.shader=t,this.vertexIndex=0,this.isDrawing=!0;let e=this.context.gl;e.enable(e.BLEND),e.blendFuncSeparate(this.srcColorBlend,this.dstBlend,this.srcAlphaBlend,this.dstBlend)}setBlendMode(t,e,i){if(this.srcColorBlend=t,this.srcAlphaBlend=e,this.dstBlend=i,this.isDrawing){this.flush(),this.context.gl.blendFuncSeparate(t,i,e,i)}}setColor(t){this.color.setFromColor(t)}setColorWith(t,e,i,s){this.color.set(t,e,i,s)}point(t,e,i){this.check(os.Point,1),i||(i=this.color),this.vertex(t,e,i)}line(t,e,i,s,r){this.check(os.Line,2);this.mesh.getVertices(),this.vertexIndex;r||(r=this.color),this.vertex(t,e,r),this.vertex(i,s,r)}triangle(t,e,i,s,r,n,a,o,h,l){this.check(t?os.Filled:os.Line,3);this.mesh.getVertices(),this.vertexIndex;o||(o=this.color),h||(h=this.color),l||(l=this.color),t?(this.vertex(e,i,o),this.vertex(s,r,h),this.vertex(n,a,l)):(this.vertex(e,i,o),this.vertex(s,r,h),this.vertex(s,r,o),this.vertex(n,a,h),this.vertex(n,a,o),this.vertex(e,i,h))}quad(t,e,i,s,r,n,a,o,h,l,c,u,d){this.check(t?os.Filled:os.Line,3);this.mesh.getVertices(),this.vertexIndex;l||(l=this.color),c||(c=this.color),u||(u=this.color),d||(d=this.color),t?(this.vertex(e,i,l),this.vertex(s,r,c),this.vertex(n,a,u),this.vertex(n,a,u),this.vertex(o,h,d),this.vertex(e,i,l)):(this.vertex(e,i,l),this.vertex(s,r,c),this.vertex(s,r,c),this.vertex(n,a,u),this.vertex(n,a,u),this.vertex(o,h,d),this.vertex(o,h,d),this.vertex(e,i,l))}rect(t,e,i,s,r,n){this.quad(t,e,i,e+s,i,e+s,i+r,e,i+r,n,n,n,n)}rectLine(t,e,i,s,r,n,a){this.check(t?os.Filled:os.Line,8),a||(a=this.color);let o=this.tmp.set(r-i,e-s);o.normalize(),n*=.5;let h=o.x*n,l=o.y*n;t?(this.vertex(e+h,i+l,a),this.vertex(e-h,i-l,a),this.vertex(s+h,r+l,a),this.vertex(s-h,r-l,a),this.vertex(s+h,r+l,a),this.vertex(e-h,i-l,a)):(this.vertex(e+h,i+l,a),this.vertex(e-h,i-l,a),this.vertex(s+h,r+l,a),this.vertex(s-h,r-l,a),this.vertex(s+h,r+l,a),this.vertex(e+h,i+l,a),this.vertex(s-h,r-l,a),this.vertex(e-h,i-l,a))}x(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)}polygon(t,e,i,s){if(i<3)throw new Error("Polygon must contain at least 3 vertices");this.check(os.Line,2*i),s||(s=this.color);this.mesh.getVertices(),this.vertexIndex;i<<=1;let r=t[e<<=1],n=t[e+1],a=e+i;for(let o=e,h=e+i-2;o=a?(h=r,l=n):(h=t[o+2],l=t[o+3]),this.vertex(e,i,s),this.vertex(h,l,s)}}circle(t,e,i,s,r,n=0){if(0==n&&(n=Math.max(1,6*c.cbrt(s)|0)),n<=0)throw new Error("segments must be > 0.");r||(r=this.color);let a=2*c.PI/n,o=Math.cos(a),h=Math.sin(a),l=s,u=0;if(t){this.check(os.Filled,3*n+3),n--;for(let t=0;t0;)this.vertex(b,A,l),b+=M,A+=E,M+=S,E+=T,S+=I,T+=C,this.vertex(b,A,l);this.vertex(b,A,l),this.vertex(a,o,l)}vertex(t,e,i){let s=this.vertexIndex,r=this.mesh.getVertices();r[s++]=t,r[s++]=e,r[s++]=i.r,r[s++]=i.g,r[s++]=i.b,r[s++]=i.a,this.vertexIndex=s}end(){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.flush();let t=this.context.gl;t.disable(t.BLEND),this.isDrawing=!1}flush(){if(0!=this.vertexIndex){if(!this.shader)throw new Error("No shader set.");this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0}}check(t,e){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");if(this.shapeType==t){if(!(this.mesh.maxVertices()-this.mesh.numVertices()(t[t.Point=0]="Point",t[t.Line=1]="Line",t[t.Filled=4]="Filled",t))(os||{}),hs=class{constructor(t){this.boneLineColor=new h(1,0,0,1),this.boneOriginColor=new h(0,1,0,1),this.attachmentLineColor=new h(0,0,1,.5),this.triangleLineColor=new h(1,.64,0,.5),this.pathColor=(new h).setFromString("FF7F00"),this.clipColor=new h(.8,0,0,2),this.aabbColor=new h(0,1,0,.5),this.drawBones=!0,this.drawRegionAttachments=!0,this.drawBoundingBoxes=!0,this.drawMeshHull=!0,this.drawMeshTriangles=!0,this.drawPaths=!0,this.drawSkeletonXY=!1,this.drawClipping=!0,this.premultipliedAlpha=!1,this.scale=1,this.boneWidth=2,this.bounds=new ci,this.temp=new Array,this.vertices=g.newFloatArray(2048),this.context=t instanceof yi?t:new yi(t)}draw(t,e,i){let s=e.x,r=e.y,n=this.context.gl,a=this.premultipliedAlpha?n.ONE:n.SRC_ALPHA;t.setBlendMode(a,n.ONE,n.ONE_MINUS_SRC_ALPHA);let o=e.bones;if(this.drawBones){t.setColor(this.boneLineColor);for(let e=0,s=o.length;e-1)continue;if(!s.parent)continue;let r=s.data.length*s.a+s.worldX,n=s.data.length*s.c+s.worldY;t.rectLine(!0,s.worldX,s.worldY,r,n,this.boneWidth*this.scale)}this.drawSkeletonXY&&t.x(s,r,4*this.scale)}if(this.drawRegionAttachments){t.setColor(this.attachmentLineColor);let i=e.slots;for(let e=0,s=i.length;e0){t.setColor(this.attachmentLineColor),h=2*(h>>1);let e=a[h-2],i=a[h-1];for(let s=0,r=h;s-1||t.circle(!0,s.worldX,s.worldY,3*this.scale,this.boneOriginColor,8)}}if(this.drawClipping){let i=e.slots;t.setColor(this.clipColor);for(let e=0,s=i.length;e=0&&i==y.data.index&&(x=!0),!x){h.clipEndWithSlot(y);continue}s>=0&&s==y.data.index&&(x=!1);let w,b=y.getAttachment();if(b instanceof re){let t=b;d.vertices=this.vertices,d.numVertices=4,d.numFloats=v<<2,t.computeWorldVertices(y,d.vertices,0,v),a=us.QUAD_TRIANGLES,n=t.uvs,w=t.region.renderObject.page.texture,o=t.color}else{if(!(b instanceof te)){if(b instanceof Wt){let t=b;h.clipStart(y,t);continue}h.clipEndWithSlot(y);continue}{let t=b;d.vertices=this.vertices,d.numVertices=t.worldVerticesLength>>1,d.numFloats=d.numVertices*v,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=g.newFloatArray(d.numFloats)),t.computeWorldVertices(y,0,t.worldVerticesLength,d.vertices,0,v),a=t.triangles,w=t.region.renderObject.page.texture,n=t.uvs,o=t.color}}if(w){let e=y.color,i=this.tempColor;i.r=p.r*e.r*o.r,i.g=p.g*e.g*o.g,i.b=p.b*e.b*o.b,i.a=p.a*e.a*o.a,l&&(i.r*=i.a,i.g*=i.a,i.b*=i.a);let s=this.tempColor2;y.darkColor?(l?(s.r=y.darkColor.r*i.a,s.g=y.darkColor.g*i.a,s.b=y.darkColor.b*i.a):s.setFromColor(y.darkColor),s.a=l?1:0):s.set(0,0,0,1);let f=y.data.blendMode;if(f!=u&&(u=f,t.setBlendMode(bi.getSourceColorGLBlendMode(u,l),bi.getSourceAlphaGLBlendMode(u),bi.getDestGLBlendMode(u))),h.isClipping()){h.clipTriangles(d.vertices,d.numFloats,a,a.length,n,i,s,c);let e=new Float32Array(h.clippedVertices),o=h.clippedTriangles;r&&r(d.vertices,d.numFloats,m),t.draw(w,e,o)}else{let e=d.vertices;if(c)for(let t=2,r=0,a=d.numFloats;t(t[t.Stretch=0]="Stretch",t[t.Expand=1]="Expand",t[t.Fit=2]="Fit",t))(ws||{}),bs=0,As=163,Ms=class{constructor(t){if(this.logo=null,this.spinner=null,this.angle=0,this.fadeOut=0,this.fadeIn=0,this.timeKeeper=new y,this.backgroundColor=new h(.135,.135,.135,1),this.tempColor=new h,this.renderer=t,this.timeKeeper.maxDelta=9,!ps){let t=navigator.userAgent.indexOf("Safari")>-1,e=()=>bs++;(ps=new Image).src=Ss,t||(ps.crossOrigin="anonymous"),ps.onload=e,(fs=new Image).src=Es,t||(fs.crossOrigin="anonymous"),fs.onload=e}}dispose(){var t,e;null==(t=this.logo)||t.dispose(),null==(e=this.spinner)||e.dispose()}draw(t=!1){if(bs<2||t&&this.fadeOut>1)return;this.timeKeeper.update();let e=Math.abs(Math.sin(this.timeKeeper.totalTime+.25));this.angle-=200*this.timeKeeper.delta*(1+1.5*Math.pow(e,5));let i=this.tempColor,s=this.renderer,r=s.canvas,n=s.context.gl;if(s.resize(1),s.camera.position.set(r.width/2,r.height/2,0),s.batcher.setBlendMode(n.ONE,n.ONE,n.ONE_MINUS_SRC_ALPHA),t){if(this.fadeOut+=this.timeKeeper.delta*(this.timeKeeper.totalTime<1?2:1),this.fadeOut>1)return;i.setFromColor(this.backgroundColor),e=1-this.fadeOut/1,e=1-(e-1)*(e-1),i.a*=e,i.a>0&&(s.camera.zoom=1,s.begin(),s.quad(!0,0,0,r.width,0,r.width,r.height,0,r.height,i,i,i,i),s.end())}else this.fadeIn+=this.timeKeeper.delta,this.backgroundColor.a>0&&(n.clearColor(this.backgroundColor.r,this.backgroundColor.g,this.backgroundColor.b,this.backgroundColor.a),n.clear(n.COLOR_BUFFER_BIT)),e=1;e*=Math.min(this.fadeIn/1,1),i.set(e,e,e,e),this.logo||(this.logo=new Mi(s.context,ps),this.spinner=new Mi(s.context,fs)),s.camera.zoom=Math.max(1,As/r.height),s.begin(),s.drawTexture(this.logo,(r.width-165)/2,(r.height-108)/2,165,108,i),this.spinner&&s.drawTextureRotated(this.spinner,(r.width-As)/2,(r.height-As)/2,As,As,81.5,81.5,this.angle,i),s.end()}},Es="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAALKElEQVR42u2de2iW5R/GPzuqcwfnnKfNmafl5tTNHWzqNi3DEMQykcAoJSsySkspjSIk0iD/07Kf4R+FnVBDUTshZGpWUEJaaiWFgZlUFmXmIe3HNXthyebeZ77P9H13ffBG8Y8H7ut7vff93N/7fu4vGGPiFZiez/Qtw9lytJajfzfw9z/j+efPOv7cV8W+lUNY2a8T/ayTCRsWFLJA5rtUO1LLkV5p9LJeJizQiHeqnlOtmVFtdTGrrZkJCxYXsTgaI6r9MY4/UpNItW4mFDaXsTlaM6qVZlBq3UwofFrJp0HMWJ9DvXUzobCznJ1BzFjWlTLrZkJh/TDWBzFjTgo51s2EgnKI0Rrx+FiOWzNzVaym91Syx5qZsGBWb2ZFa0ZN6dbMhAWTcpkUrRmXD2K5NTNhgVbH0Zpxbl/mWjMTFvRIo0e0ZpzcncnWzISKtvmiMWNRJ4qslwmVXRXsas2Ix8ZwzFqZsGFREYtaM+Oaa1ljrUzYkJ9G/ok6TlzKjJWZVFor0y7c1Zu7WjLiqiGsskamXdHopyT4vALmzS9k/t19uHtKHlOSIMn6xAtARjIZ1sFcUSZ0Y4La+G6M18hS2IlCn4a+WoC0JNL0d/dUupdnUj40g6EJ2VEdMnhrOG/p5f/jUXz8SgmvaGU6KpNRNsLVQV0OdXf24s63h/P2gWoOrBjMCr2GJFQnnxnIM3q5P1PPmaYv+4ev4/C6UtbpV2gzXCkgL5W8Bwt48OIc6ul6Tp+s4+SyASxLiI4+PYCn1bHzDZxvaQW6vZzto7MYnQIpNkf7kp5EuozYUroqEjcNKHHd0Tl9mBPN1pk+hFeieGBnBtog7UXjsj9pWg+m6duecw2cay1OC/uxMC47KmP9OIYfoz1YoC20J/rzRG4quTZK2EAyJGs20qwUbYw0aNRmUxtvfUW/uEtNzc1NB1/X8LVyd15hh82F43AvD+VlXcsSJEZa1CQ3ejleAO7oxR3RDP0XN91X4+NXYb8nkv7UNTwV7e0YTdu7I3g33t7tuaEbNwSZpps2fSyvs4M2Tjhot+jb0Xzbltj8r5j/xVt/6Z1Ob93U1ZYO691EhhzchcHeXosVjcNZysyezLw4xRZt05R+fTeuj8vOj+zKyG0j2aZcVVs6v+QalnjrMFZASQYl2nBoSyz06e3j/Xk8rgWYmMvEICu2pm1HOTuc7okV8FgRj0XukwzanhvCc/F+72TjoQjdObN1OFuDLmh0xP+WHtxiI10ukJlCprb4guiv1fP+avZrS1C7NAkliHZjDtZwMMgqbukAltpMlwuMy2FcEBPqvfLLar5Uqi0hBdEwryy+Mv5n6zkbjTBa+dlMlwvUZFETZKGiFM7tvbhdJ3gSVRO0wzIjnxmvl/J6a6JsGMYGrahtpssFeqbR841S3mhN80OjOaSDEdqd6SjaMKgzgzRK7q1ib3PT9sYyNo7JZoyNFNvRcVMZmy7WOvIuryv/Zvdmdt90+nY0bRp3AvROohFwdwW7dTG7RFlbwlqdrbOBYg005NAQmZU0HWt1rXMBH1Xw0dQ8pmqzoaPmdhun7bHZjNVe9qP9eFQfO1VkUmHjhAVUZ1GtnKFSbjrkrPfy4i4UW5t/6ZxM54J0CqxFe81KpGsQyE4h23oYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjLna+bdOy+IiFquIpGq16Pb79cNYv3IIK/X/ugx+Ui6TVKvYVU9Nc8gX8od8Ir/IN/KPfCQ/yVfyl/6/pfJvLChkQdD6wyqntquCXYuKWJSfRr6D0dEAxV3xlw/khyD+kd/ku/88cHo+09tS3LBpO1HHCVUqcIA6CqB4K+6X6x35L/JM2loXurlWmUmlA5XogOIcK8/If5HncrSWo7F6cKIWPjT/RXGOlWfkv8hzaWsN4uaaysE6WIkOKM6x8oz8F3kusXqo2vxC5jtYiQ4ozrH0TeS5qIZcrB7qkrwdA8U5Vp6R/yLPZV8V+2L14Cl5THGwEh1QnGPlGfkv8lyUlIzFQ1cNYVVHrcjZ0VCcFe9Y+Eb+izy3ceclUl43aFN52DXXssYpnY6a4qFS8ZcP2uIf+e7inRh6pdFrdTGrm8uiHx/L8T2V7NGWzvJBLJ/bl7mTuzO5qBNFDoiJID/IF/KHfCK/yDfyT3O7d/KbfNfS80hNIrU0g9L6HOq1x5iTQo6FNpeLfCQ/yVfyl3xmXYwxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHGGGOMMcYYY4wxxhhjjDHNk9z4JwJ0SqKTdQkbyEwhU393T6V7zzR6pieR3tE1ITeVXImhe6BXDGZFdRbVeank2TBhcaEMr0rwbixj49IBLL2/L/ffmMuNHfqO9tFZjJYBd1ewO3Lx+IcVfKhqna5nHZYR6XFPH+5R3eeI5t9fx/fvjeC9Jdew5OKZKqFR/RDVKL6vL/f9PJafmyvHsL+a/ff24V6NmjZQbGchVbY6UM2BluqHv1rCqzVZ1KQlkZboepCdQvacPsz5bjTfXao+yMEaDt7Wk9tSIMVGig3TejCtJSM2bSpkPjWPqd1S6Zao+lORSYWmgkOjORRNwZqd5ezMSiHLRooNr5XwWjS6/1XHX9vL2T67N7M1iyXa9JCrYjVrS1gbpJyw6hBfsmiNCYT0P9/A+Wj1/6qGr5YNYFlJBiWJogEzezLz/ZG8/9s4fgtSyuvNYbyp1IONFBtu7sHNv4/j9yAxUHWrdaWsG9+N8XHd+YxkMpSy+aySz841cC5oXbmHCnnI74yxAgZ3YbDeB4PEQCOpBpFNZWwa2ZWRcdnxLsl00crtRB0n2lLg8JNRfDKoM4NsolgBSmw/UMADba1+qpmqfyf6x1u/0a/og3I+aEunP6/i86osqmygcGarF4p54dex/Bo0LqfqOfVwIQ/HW5/RSkwV1oN2WLlHTc82TljAwM4M1O5LWwYKZTjibYXNS0N5KcjKTe10PadfLObFuJwK4ozp+UzXDBTUjL+M5ZcBnRkQV53dMIwNQTu6bSTbVEzbi5awuVByd2E/FgaN0Tc1fKOzBHHV2aAdVSdv6s5NNkp7cSH/++xAng2yyHx+CM/H21YhfdPp+0U1X0TbSZnXx8faG9Aop0MS0cToh1p+iLcpOkLj9t/JOk5eqoPHxnDsyf486an5yqCDK7XZ1O4oZ4dWyy3FSXHUAYq47uyYbMZoGmhpG3DlEFb6uNiVBhpyaHhnBO8oJmfqOROJjzIiP43hJ8UxITqqX56S2Hur2KsOnq3nrE6PPNKPRwrSKbAZrjTQNZmuE7oxYXMZmxWbw9dxWFu4W4ezVedOE6qzI7oyYkY+M7TPeWsPbk2UX1qioSN+E3OZqOR2cReKE+qQRFN0Pi7y73g/UawU1KzezJpXwLz5hczX1ueUPKYkNb6GJQZ+j7/aAfRZREsv+quGsMoamXZBW2Gt5eU0alorEzYsKmJRa/m4NdeyxlqZsCGa84DKnVorEzboC7podis69DfIJmwufHMc7famvvmxZiYsKOtKWbRm1OcW1syEBboSJFozLh/EcmtmwgIluaM14/phrLdmJixYXMTiaM24p5I91syEBTphFOR7Y2tmwgJNvUFOr+tov3UzoaAv44KYUatv62ZCoemdhtG0+hzqrZsJBR08DWLG0gxKrZu50qvpxos3U5NItW4mFPp1ot+lPlpq2lYXs9qamVBZUMiC1ox4pJYjvlfStAu6GmTLcLboMtPIV4/6im5fFfuUi9QIap2MiWP+D96R1vPmsD/fAAAAAElFTkSuQmCC",Ss="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKUAAABsCAYAAAALzHKmAAAQ7klEQVR42u3da4xdVRUA4D0zd2Y6nZY59DVtZ1puS9+lzC0YAi2UQ8AAQczFpPgA9VIeIQbirRqJ0cBUBVGjDr/QCKSNRSMmpuODxAdxqhgwxkhFjf6Sxh/+UUNVNGJCzR7uTvas7LXX2q9zzp3em6y0gTN3Zu75utZe5+yztxC9V+/Ve5X9En1Vjd7J6SFbLNF7naPw+l2jh7YHMBWssqMHtlsRdim4qsLtIawaPiHEQOLoNrA9iIkQDnRrVA1qD2LZ8ISoxYqKo13sQAtBWBayQWZUAXGRQM9JjCngDVY0UqJNDbQrMcaGmArdUKpIjbYiQLsCZCyIMQBy8QwnilR4Q5AuCpxFYvRFmBLbEiwKwpsSaWycVQGZBKMrwBjA9BhxDe57u2L2hOoKNCbOrgAZitEVYUxoKSMErQvSxYIzCkguRg5EF4AUhqUlhy/YUKSxcRaKsioYOQhD4I0yYxkR3PcJBcuFysmgsXAWBTMJyBCMIQh9kGGxXIXvexCQXbHGAMrBWTbM2CCpMSMLIxehC77lSJwXGth7M0FzoVJIXXDWQnGmhOkL0ic7YhhtWdGGkAuPAjUWGoF4faCmwBkbZmyUqUCyMqMLRA4+E6IsdTjidUHKBYrh9CnpRcH0ypKxsyOGEYNIIeTCOz91OIJ1QYoB5eAMyZo+MFNnyVTZ0YiRC9EGEMOyAgshxErHsL2XK1gOUgwohtM1a5YNM7Rsu4K0ZkcbRm4mpPBRwFZ5hg9eCqkrUB+csWGGogzNkqEgrdnRhpGLkINudaLgwvVB6oqzCjCTZElb2Y4B0gUjBtEG0ARnDRLjjoG9DwcshtQGlIPTljVjwUySLWNkyRCQVHa0ZUUTRAwgF91a33BEy0VKAcVwwqwZC2bqbOlUurllOxQkJzNyINoAYqjWhYYjWg5SCiiG05Q1U8FMjTIoS8YE6YORi1BHtJ4KIcQEEtTXUWAxpK44YVlPBdO1jCdFWTZIE8bVGEYMIRPcZGBw4HKQcoBiOE1ZMzbMgVQwU6JMAdKEEcuIJogUvg1YCCE2gsCO42DlIIVAKZwpYJaSLVNnSU6XjYHUmxhTmXaFaMO3EYkLqMC+FsLlIoVAKZzMrEnBhJeLfLNlKMrYWRIDCbOkFSSVHbHM6AKRC6/ODUewNqQ+OLlZkxpjUmV8MBbMUJSxyzY3Q1IgTRgxiBRCHdem0KDAUkBh9sRwwjEnAXMMgTnKhFlUtiwkS5rGka4g9SaGgxFmRC7AzTCEEBcyA36dDSsXqAtOLkysjGMwY5XxVChjZ0kuSCo7YlkRQsQQYtDEFsegsLoCxUp7Kpgps2UslFGzJGccSYHUmxhOZqwzEZqAbfUMCisHKIZzgsCpl3MTzMwTpi1bYp2477gyFKUxS7qWbdjY2EBS2dGE0QQRA7gNCyHEdhjE8RhUDlBT9tzgmjWZMFNlSy+Urk1OzCyJlW0XkK4YOQh1cDtcgwBrQmoDWkdgboBZE8mYsJSHlnFbJ+5bwmOPJ7lZkirbC8aRsMvmgtTHjBhGE0QbwJ2egUE1ITVlUC5OmDVdYNrKuN70xM6WoShjlW4464dbtiFIWK6x7GjESEHUUe0iYncnbMdQSE0Z1ITTNOb0hRmjjLtmS9dmJ2rp1jtuKktyyrb6YLEMCUHq2dGG0QQRQ7f72kzc+cJecerne8Wvv7JNPHPvenEkz8Sh3UtFc92QyGt9Yko/HgOLAIUZlItTz5ouMF3KuE+2jFLCQ1D6lm6fLMkBacuOJowYRBUXyfjuHjF3NhdnsfjvAfH6E9vFt9XxKgikEKgJZyyYalzOLeMu2bLbULI6bh+QGwmQ+rgRlumdGEQAao+K56bEL2woVUwOiev0r8OAUjiJrMmFCbvykGxZRAmPitK1dHM7bohyMsuyi/I8f0+e57fJYIKEZXpXo9E4mOf5XTKyLLvCBLETF8uY2SKepkC+dpX4T02Ivepr4HvZcOZ5fmee54fyPL+DmTUhzAs6n4n8bN5dr9f3YdkSg8nsxG0lPBVKVpNjG0/aGhzfLDmRZdnumZmZp8+c+cdZPV555fSr7Xb7s0jJ3i5Pcue4MxKkPPkvvXTqz/B92u32l0wYOzG1fkhcd/py8Rcbyq/vFM/KY1WA95h/3zzP71bfU6JsNpsfgj+P/FlbrdaDGExYyuXvLz8H+DudODH700ajcSM3W6Yu4alQ1spCOTd38jcKocTZbh9+9NixY99XJ8AEUkcpo9W64yH197m5k7+bnZ19QT+J09NHntQhwji/Jg58qi6++ofLxJ8gSFneVw2Ka4QQDfh1Ok4dZavVmtZ/nrm5k7/Vf55O1tRhboUw5+ZOvqyOl5+R/FyOHj32PYVU/tloNG5IXcKrhJIzngwp3fNjomazea/64BuNxts646f50lWv169utw9/DmtqdJQyZFaSJVuV6nq9fqMEof5/vV6/CYBqgJDlee+yAbF/+4i4ZWqZeNfaIfHWzn+Hx0KcEuU9+s8jv3ej0bhVlXOZydX/k0iRMeb8P0D5e6tj8zy/Xb9UJIc56h/yqVOnXul8lmuZ2bJslKmbHG7XrbpCmCXFRLvdfqQD6jTS3Jiy5I4OykM6ADV+1Eu1DmV6evopBORexzDi1L+X/HnGxsb2w3Hm9PSRJ9QxWPOTZdmlKht2hi+w6dkox5bqffI8fye3hDteGqKaHVsHXihKl0tB+h0cY+lute54AGRKDCW89LNTRynHb7ChUWVVjetOnJh9EYBUyPZeNCoOtsbFQwdXi4/esELcd+tq8cCHJ8UXp+viy9efLz7AgamjlKXc1AA1m83DoIRDlFubzeb96hhZLVTlgJ24gttutx+ONa50bHZKRenaeTs1OfpAfnr6yOOdE7EZdNwmlKocntXLNkA5JTGq47Ds+Lf94lWsyfnXleLfnIwJUN4DOnNYwuUxh2A3Ln9XULrfK8t3J27Tu3BVwiOjXJqoAy8UZej1yclGo3GTLN+gu3w+z/P3YaWbQqk3Ne12e4ZC+c8rxWsYytcPiP9RpZxCqWDKnxOiBNlyAUpOnGsoh4tA2Rm8X9xqtT6md5wyZmYe+0YRKL+1S/wYQ3n8zctBl5SBUv5djivfjMOPduIzcizeiYfr9foVvUwZG+XCuzibZKnSceZ5/v4QlKp8y7ElhnJlTeTP7BI/kllRYfzrfvHqFy4UX1vaL/aVlSmROzwbwdS29T2UcEwZF+V8ozM2lu1VY812u/15akypGh3TmFJesJbHHD167IdUxz3YJy5bNySuX1mbvy55CbMLtzU6tjGlsdFptVqfUMc0Go23F4wy1l2dSnbfvpMwVPe9WWVLDsrOJaF9MFu2Wq1PqmNkGce67xiXhTjdNwdlvV6/BgxfbPfBfVCetxi6b9/rlCup65QzM48dl2OjLMv26CibzeZ96sTIzEFdpwQXz9U1yrtVlpR/Zll2Fec65Y6l4pbbx8XHH9kknvzJlPjlHy8Tp29eKT5ou0aJoIT3w3dBlLDzVpfAJEZ1XOdaJZxnOSlvPMjPzxFljIvng914RwebsjYO7uhMyHu46sOfnf3Oz2TXDW6vvYxdFoIXz3Wc8J5zs9n8iOn2IrxTc2BM3Glqdp7dI553uaOjxrhwcob+MyuUpjs6WZZdon8OcigjPx8V+u+GTWFTSWEx3WYcdJ225jNDSE4q0GHCzlueHOyujn6bUWYgeb9ZZUaQPe+GzQ+Gc8+oOGhC+c1d4gfI16n3XDAhQ7+9qE9l01E2Go132GYKyXE1NiFDTcpoNpv3LOYJGWXNErJNW9sEp63p2RKiVPMn1bS1DgxsyhoGdGpmizj+xtXiDYnx7/vFmce3iWdW1cTVGEY4hQ2ZW0nNq8Qm/M6XbXm3S100lwGedFybuvNOibLI+ZS2ceU4eAxiEuvCkfmU8ycToDxETe6FgCBQHeqyAbFvfEhcO7BwDuXFCEbTZF840XeHK0jYcbs2OIGle0mVJ/mmnClEPQqxyTY5I8/zFhif7fSZee4bnrPOU4AssnRXHaVTCTd14dRDY3UbTIiSeFhsN/aMjgnqthFx880rxX3yATL5p3y4LPXzOaBkUyBjZMlYpbtQlIOBD475ZEusjMNSvkXe6VEoJVDkeZ2dzIfIFsRzU+JF2OyM9M9fTC/6SUYOyFQPjQ2nWiUjxnPfw5EeHqMWIqAeIFsAU847lJM2JM6xsewt1OIDLs99P7ZFHNdB/upS8XtPiD7PfLuCXJNolYyyFiNI/Zit65ItrOVafFbHcFohY7hPTN21Tjz4uc3iqfsnxKdX1MTl1OoYRFaMsToGB6Trw2JFP/OdZC2hJZ7ZkrMoAbbSGmelDJ91hFKuJeS7jlBMkJnrAqqJlgMUZS/dArPlGHNdSg5M3xXXtvquuEatvIYtDRhpxbUJuIgqsU5lGWtUploK0KuEU9mSW8YpmFQ556xNuYW7NiW13B+FkMiKHIy+C6eGgBxJvMR0oSv5hi6+z4HJyZoU0M2RVvDlrOQbcxVfX5AhZbuqy0v7ZstYMLHlAVlLTF9ALLbvu9Y5Zylpn/XOsd0ibIvxr2KCLHpp6SCUIdnSZSF+WzfOhem6GD+1KwR3Z4jNjrtDpNoZwmWd8yrupZN6Hx3fbMmFSe0Swdq2ZIPjxk1112Duo8OBGLrBkw/IoncdK2XHsdC9dHz204m50xh3tzFq1zFqtzHXrfCw7OgDsqyNnZLszVijsmXgrmNcmGtS78lIoMX2aJz03fKO2sDJddPQSCDPiQ1DfWBycY6XtXstc2PQKuxgG2McmXTPb9/9vmuJYXKyJrWjbeg+3xPM4O73nWqvbyw7xgZZSJbEUBa157cNJjdr2vb+5iA1YV3HxYscj30PDCEHIgcjtfm8K8hSsmRotkwFk5s1TTghUAopB6xrjHMBBkI0YYTZ0dZlxwLpkiWDULpmy5gwqayZgZNkA7oKQQCxctByYg0XIIEQQuRitGVHblMTA2ShKGPDpC6wu+DEgJqg2rDGDBtAF4Q6RAojp1xXGmSMbImVcR+YWNY04eQCtUG1ofUJ2/uvcETIgUhhdAE5GAlkKShjwHTNmhhODKgJqQ2sC14uOgyfD0IbRF+MlQaZAiZWyn2yJsTJATqGnHQO2Jhh+xlsACFCG0QbRtdyzQFZCZSxYPpmTS7Q5cjJHYNBYIkZpu99HoUQ/o4QIYSIZUZfjJ4ZMjZI32wZBDMU5yhy8pZTULl4XYP5fagMyEVoy4oupTpGduwnkloSlKEwY+AcQU4MhRTD6ovXBRwFzwWgCSEF0QVjJUGmgEllTS5OLlCIlIN1mS9mx/cZ5eLDALpCTI2RAhkTZQqYoTgpoCPECbaBHQ2ETL3PUl98ECAXYijG0OyYAmQoTG7W5ODkAF1CnVgm2JQx4okPA+gCMTbGskBGgRmaOblAh5GTORIrfKFx4VH4EIAxIXIxlg2SBbMvECY3e7oApbDaIgQu5/2HmeEKEINYiwSRi7EQkLFgumZOCuggctKGI4ULZN/vMeSLj0AYMytWEqMLzFg4fYDaoKaC6wvOFR4FkIPQFaILxrJAOsHsc/zlfYDWXE8qF22s8Pz5KHxcgEVALBtjJXBSSEOwFhk1Zgy4hitCT4hVw+gFs8/zwxqIBbUgyK7fcyA0PD9XX4iVxhiC0xdof6STWCsoBmKF7+cVCWFXQYyBMxRpf+STX1b0x45AhN0OMSrOGEirhrY/dfQAdjvS7oy+WCF6r1RIFxXWvlTRg1YVqFWBmxZbD99ig9pt0YPQw9rD1nstVri9V+/Ve3XrS/wfim4P5fIFxLoAAAAASUVORK5CYII=",Ts=class{constructor(t,e){this.time=new y,e.pathPrefix||(e.pathPrefix=""),e.app||(e.app={loadAssets:()=>{},initialize:()=>{},update:()=>{},render:()=>{},error:()=>{}}),e.webglConfig&&(e.webglConfig={alpha:!0}),this.htmlCanvas=t,this.context=new yi(t,e.webglConfig),this.renderer=new ys(t,this.context),this.gl=this.context.gl,this.assetManager=new Ei(this.context,e.pathPrefix),this.input=new qi(t),e.app.loadAssets&&e.app.loadAssets(this);let i=()=>{requestAnimationFrame(i),this.time.update(),e.app.update&&e.app.update(this,this.time.delta),e.app.render&&e.app.render(this)},s=()=>{this.assetManager.isLoadingComplete()?this.assetManager.hasErrors()?e.app.error&&e.app.error(this,this.assetManager.getErrors()):(e.app.initialize&&e.app.initialize(this),i()):requestAnimationFrame(s)};requestAnimationFrame(s)}clear(t,e,i,s){this.gl.clearColor(t,e,i,s),this.gl.clear(this.gl.COLOR_BUFFER_BIT)}};return gs=r,((r,n,a,o)=>{if(n&&"object"==typeof n||"function"==typeof n)for(let h of i(n))s.call(r,h)||h===a||t(r,h,{get:()=>n[h],enumerable:!(o=e(n,h))||o.enumerable});return r})(t({},"__esModule",{value:!0}),gs)})();t.exports=e}).call(window)},3524:(t,e,i)=>{var s=i(7473),r=i(4597),n=i(6732),a=i(2482),o=i(704),h=i(3137),l=i(1192),c=new s({Extends:h,initialize:function(t,e,i,s,n,c,u){var d,f,p,g=[],m=t.cacheManager.custom.spine;if(a(e)){var x=e;for(e=r(x,"key"),f=new o(t,{key:e,url:r(x,"jsonURL"),extension:r(x,"jsonExtension","json"),xhrSettings:r(x,"jsonXhrSettings")}),s=r(x,"atlasURL"),n=r(x,"preMultipliedAlpha"),Array.isArray(s)||(s=[s]),d=0;d{var s=i(2494),r=i(7473),n=i(5851),a=i(3527),o=i(5722),h={canvas:i(6937),webgl:i(6937)},l=i(3524),c=i(8332),u=i(5782),d=i(1984),f=new r({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var r=e.game;this.isWebGL=2===r.config.renderType,this.cache=r.cache.addCustom("spine"),this.spineTextures=r.cache.addCustom("spineTextures"),this.json=r.cache.json,this.textures=r.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=r.renderer,this.gl=r.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=r.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:r.scale.width,height:r.scale.height,preRender:d,postRender:d,render:d,destroy:d});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,s,r,n){var a=this.scene.sys[i],o=new c(this.scene,a,t,e,s,r,n);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var r=n(t,"key",null),a=n(t,"animationName",null),o=n(t,"loop",!1),h=this.scene.sys[i],l=new c(this.scene,h,0,0,r,a,o);void 0!==e&&(t.add=e),s(this.scene,l,t);var u=n(t,"skinName",!1);u&&l.setSkinByName(u);var d=n(t,"slotName",!1),f=n(t,"attachmentName",null);return d&&l.setAttachment(d,f),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,s){var r=this.scene.sys[i],n=new u(this.scene,r,t,e,s);return this.displayList.add(n),n}),(function(t,e){void 0===t&&(t={});var r=n(t,"x",0),a=n(t,"y",0),o=n(t,"children",null),h=this.scene.sys[i],l=new u(this.scene,h,r,a,o);return void 0!==e&&(t.add=e),s(this.scene,l,t),l}))},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(a,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=this.renderer.spineSceneRenderer;t||(t=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0),this.renderer.spineSceneRenderer=t),this.sceneRenderer=t,this.skeletonRenderer=t.skeletonRenderer,this.skeletonDebugRenderer=t.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures;i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(r.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,s=this.spineTextures;if(s.has(t))i=s.get(t);else{var r=this.textures,n=this.sceneRenderer.context.gl;n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(n,r.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,s,r,n,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h{var s=i(7473),r=i(7361),n=i(7738),a=new s({Extends:r,Mixins:[n],initialize:function(t,e,i,s,n){r.call(this,t,i,s,n),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},7738:(t,e,i)=>{var s=i(1984),r=i(1984);s=i(434),t.exports={renderWebGL:s,renderCanvas:r}},434:t=>{t.exports=function(t,e,i,s){var r=e.plugin.sceneRenderer,n=e.list;if(0!==n.length){i.addToRenderList(e);var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.newType&&(t.pipelines.clear(),r.begin());var o=t.nextTypeMatch;t.nextTypeMatch=!0,t.newType=!1;for(var h=0;h{t.exports="complete"},8621:t=>{t.exports="dispose"},8944:t=>{t.exports="end"},7494:t=>{t.exports="event"},1908:t=>{t.exports="interrupted"},5591:t=>{t.exports="start"},5146:(t,e,i)=>{t.exports={COMPLETE:i(6576),DISPOSE:i(8621),END:i(8944),EVENT:i(7494),INTERRUPTED:i(1908),START:i(5591)}},8332:(t,e,i)=>{var s=i(6412),r=i(2915),n=i(7473),a=i(1991),o=i(3131),h=i(9660),l=i(4627),c=i(3212),u=i(8414),d=i(3426),f=i(7149),p=i(2273),g=i(4208),m=i(5146),x=i(2762),v=new n({Extends:p,Mixins:[a,o,h,l,c,u,x],initialize:function(t,e,i,s,r,n,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,s),r&&this.setSkeleton(r,n,a)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var s=this.plugin,r=s.sceneRenderer;s.gl&&r.batcher.isDrawing&&(r.end(),s.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=r(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=r(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,s=(t>>8&255)/255,r=(255&t)/255,n=t>16777215?(t>>>24)/255:null,a=this.skeleton;if(e){var o=this.findSlot(e);o&&(a=o)}return a.color.r=i,a.color.g=s,a.color.b=r,null!==n&&(a.color.a=n),this},setSkeletonFromJSON:function(t,e,i,s){return this.setSkeleton(t,e,i,s)},setSkeleton:function(t,e,i,s){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,s);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var n=r.skeleton;return n.setSkin(),n.setToSetupPose(),this.skeleton=n,r=this.plugin.createAnimationState(n),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=g(d(this.rotation))+90),this.state.apply(n),n.updateCache(),this.updateSize()},onComplete:function(t){this.emit(m.COMPLETE,t)},onDispose:function(t){this.emit(m.DISPOSE,t)},onEnd:function(t){this.emit(m.END,t)},onEvent:function(t,e){this.emit(m.EVENT,t,e)},onInterrupted:function(t){this.emit(m.INTERRUPTED,t)},onStart:function(t){this.emit(m.START,t)},refresh:function(){return this.root&&(this.root.rotation=g(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,s){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===s&&(s=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-s,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,s=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=i,t.scaleY=s,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i{var s=i(1984),r=i(1984),n=i(1984);s=i(4290),n=i(780),t.exports={renderWebGL:s,renderCanvas:r,renderDirect:n}},780:(t,e,i)=>{var s=i(2915),r=i(3426),n=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var c=e.plugin,u=e.skeleton,d=c.sceneRenderer;t.pipelines.clear(),d.begin();var f=e.scrollFactorX,p=e.scrollFactorY,g=u.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,u.color.a=s(g*l.alpha,0,1)),i.addToRenderList(e);var m=n(e,i,h).calc,x=t.height;if(u.x=m.tx,u.y=x-m.ty,u.scaleX=m.scaleX,u.scaleY=m.scaleY,e.scaleX<0?(u.scaleX*=-1,e.root.rotation=o(a(m.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(m.rotationNormalized))+90,0,360),e.scaleY<0&&(u.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(m.rotationNormalized):e.root.rotation+=2*a(m.rotationNormalized)),u.updateWorldTransform(),d.drawSkeleton(u,e.preMultipliedAlpha),l&&(e.scrollFactorX=f,e.scrollFactorY=p,u.color.a=g),c.drawDebug||e.drawDebug){var v=u.x,y=u.y;u.x=0,u.y=0,d.drawSkeletonDebug(u,e.preMultipliedAlpha),u.x=v,u.y=y}d.end(),t.pipelines.rebind()}},4290:(t,e,i)=>{var s=i(2915),r=i(3426),n=i(2208),a=i(4208),o=i(8445);t.exports=function(t,e,i,h,l){var c=e.plugin,u=e.skeleton,d=c.sceneRenderer;t.newType&&(t.pipelines.clear(),d.begin());var f=e.scrollFactorX,p=e.scrollFactorY,g=u.color.a;l&&(e.scrollFactorX=l.scrollFactorX,e.scrollFactorY=l.scrollFactorY,u.color.a=s(g*l.alpha,0,1)),i.addToRenderList(e);var m=n(e,i,h).calc,x=t.height;if(u.x=m.tx,u.y=x-m.ty,u.scaleX=m.scaleX,u.scaleY=m.scaleY,e.scaleX<0?(u.scaleX*=-1,e.root.rotation=o(a(m.rotationNormalized)-180,0,360)):e.root.rotation=o(a(r(m.rotationNormalized))+90,0,360),e.scaleY<0&&(u.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*a(m.rotationNormalized):e.root.rotation+=2*a(m.rotationNormalized)),u.updateWorldTransform(),d.drawSkeleton(u,e.preMultipliedAlpha),l&&(e.scrollFactorX=f,e.scrollFactorY=p,u.color.a=g),c.drawDebug||e.drawDebug){var v=u.x,y=u.y;u.x=0,u.y=0,d.drawSkeletonDebug(u,e.preMultipliedAlpha),u.x=v,u.y=y}t.nextTypeMatch||(d.end(),t.pipelines.rebind())}},9454:(t,e,i)=>{var s={VERSION:"3.70.0",BlendModes:i(8351),ScaleModes:i(8196),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=s},1081:(t,e,i)=>{var s=i(7473),r=i(6748),n=new s({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(r.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],s=0;s{t.exports="changedata"},7801:t=>{t.exports="changedata-"},4873:t=>{t.exports="destroy"},9966:t=>{t.exports="removedata"},4586:t=>{t.exports="setdata"},6748:(t,e,i)=>{t.exports={CHANGE_DATA:i(9044),CHANGE_DATA_KEY:i(7801),DESTROY:i(4873),REMOVE_DATA:i(9966),SET_DATA:i(4586)}},3004:(t,e,i)=>{var s=i(2776),r={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return r;r.audioData=!!window.Audio,r.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var s=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(s||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(s)};if(r.ogg=i('ogg; codecs="vorbis"'),r.opus=i('ogg; codecs="opus"',"opus"),r.mp3=i("mpeg"),r.wav=i("wav"),r.m4a=i("x-m4a"),r.aac=i("aac"),r.flac=i("flac","x-flac"),r.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(s.edge)r.dolby=!0;else if(s.safari&&s.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var n=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===n&&a>=11||n>10)&&(r.dolby=!0)}}}catch(t){}return r}()},2776:(t,e,i)=>{var s,r=i(5203),n={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(s=navigator.userAgent,/Edg\/\d+/.test(s)?(n.edge=!0,n.es2019=!0):/OPR/.test(s)?(n.opera=!0,n.es2019=!0):/Chrome\/(\d+)/.test(s)&&!r.windowsPhone?(n.chrome=!0,n.chromeVersion=parseInt(RegExp.$1,10),n.es2019=n.chromeVersion>69):/Firefox\D+(\d+)/.test(s)?(n.firefox=!0,n.firefoxVersion=parseInt(RegExp.$1,10),n.es2019=n.firefoxVersion>10):/AppleWebKit/.test(s)&&r.iOS?(n.mobileSafari=!0,n.es2019=!0):/MSIE (\d+\.\d+);/.test(s)?(n.ie=!0,n.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(s)&&!r.windowsPhone?(n.safari=!0,n.safariVersion=parseInt(RegExp.$1,10),n.es2019=n.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(s)&&(n.ie=!0,n.trident=!0,n.tridentVersion=parseInt(RegExp.$1,10),n.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(s)&&(n.silk=!0),n)},6505:(t,e,i)=>{var s,r,n,a=i(8073),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",r="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(n=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(n,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=s+"/wCKxvRF"+r},n.src=s+"AP804Oa6"+r,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),s=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return a.remove(this),s}()),o)},6543:(t,e,i)=>{var s=i(5203),r=i(2776),n=i(8073),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=n.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=n.create2D(this),s=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=s.data instanceof Uint8ClampedArray,n.remove(t),n.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,r.firefox&&r.firefoxVersion<21&&(a.getUserMedia=!1),!s.iOS&&(r.ie||r.firefox||r.chrome)&&(a.canvasBitBltShift=!0),(r.safari||r.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},3922:t=>{var e={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return e;var t,i="Fullscreen",s="FullScreen",r=["request"+i,"request"+s,"webkitRequest"+i,"webkitRequest"+s,"msRequest"+i,"msRequest"+s,"mozRequest"+s,"mozRequest"+i];for(t=0;t{var s=i(2776),r={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(r.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(r.mspointer=!0),navigator.getGamepads&&(r.gamepads=!0),"onwheel"in window||s.ie&&"WheelEvent"in window?r.wheelEvent="wheel":"onmousewheel"in window?r.wheelEvent="mousewheel":s.firefox&&"MouseScrollEvent"in window&&(r.wheelEvent="DOMMouseScroll")),r)},5203:t=>{var e={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return e;var t=navigator.userAgent;/Windows/.test(t)?e.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(e.iOS=!0,e.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),e.iOSVersion=parseInt(RegExp.$1,10)):e.macOS=!0:/Android/.test(t)?e.android=!0:/Linux/.test(t)?e.linux=!0:/iP[ao]d|iPhone/i.test(t)?(e.iOS=!0,navigator.appVersion.match(/OS (\d+)/),e.iOSVersion=parseInt(RegExp.$1,10),e.iPhone=-1!==t.toLowerCase().indexOf("iphone"),e.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?e.kindle=!0:/CrOS/.test(t)&&(e.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(e.android=!1,e.iOS=!1,e.macOS=!1,e.windows=!0,e.windowsPhone=!0);var i=/Silk/.test(t);return(e.windows||e.macOS||e.linux&&!i||e.chromeOS)&&(e.desktop=!0),(e.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(e.desktop=!1),navigator.standalone&&(e.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(e.cordova=!0),void 0!==window.ejecta&&(e.ejecta=!0)),"undefined"!=typeof process&&process.versions&&process.versions.node&&(e.node=!0),e.node&&"object"==typeof process.versions&&(e.nodeWebkit=!!process.versions["node-webkit"],e.electron=!!process.versions.electron),/Crosswalk/.test(t)&&(e.crosswalk=!0),e.pixelRatio=window.devicePixelRatio||1,e}()},2131:(t,e,i)=>{var s=i(4597),r={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1,hasRequestVideoFrame:!1};t.exports=function(){if("function"==typeof importScripts)return r;var t=document.createElement("video"),e=!!t.canPlayType,i=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(i,"")&&(r.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(i,"")&&(r.h264=!0,r.mp4=!0),t.canPlayType("video/x-m4v").replace(i,"")&&(r.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(i,"")&&(r.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(i,"")&&(r.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(i,"")&&(r.hls=!0))}catch(t){}return t.parentNode&&t.parentNode.removeChild(t),r.getVideoURL=function(t){Array.isArray(t)||(t=[t]);for(var e=0;e{t.exports={os:i(5203),browser:i(2776),features:i(6543),input:i(1454),audio:i(3004),video:i(2131),fullscreen:i(3922),canvasFeatures:i(6505)}},5686:(t,e,i)=>{var s=i(7473),r=new Float32Array(20),n=new s({initialize:function(){this._matrix=new Float32Array(20),this.alpha=1,this._dirty=!0,this._data=new Float32Array(20),this.reset()},set:function(t){return this._matrix.set(t),this._dirty=!0,this},reset:function(){var t=this._matrix;return t.fill(0),t[0]=1,t[6]=1,t[12]=1,t[18]=1,this.alpha=1,this._dirty=!0,this},getData:function(){var t=this._data;return this._dirty&&(t.set(this._matrix),t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,this._dirty=!1),t},brightness:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t;return this.multiply([i,0,0,0,0,0,i,0,0,0,0,0,i,0,0,0,0,0,1,0],e)},saturate:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=2*t/3+1,s=-.5*(i-1);return this.multiply([i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0],e)},desaturate:function(t){return void 0===t&&(t=!1),this.saturate(-1,t)},hue:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1),t=t/180*Math.PI;var i=Math.cos(t),s=Math.sin(t),r=.213,n=.715,a=.072;return this.multiply([r+.787*i+s*-r,n+i*-n+s*-n,a+i*-a+.928*s,0,0,r+i*-r+.143*s,n+i*(1-n)+.14*s,a+i*-a+-.283*s,0,0,r+i*-r+-.787*s,n+i*-n+s*n,a+.928*i+s*a,0,0,0,0,0,1,0],e)},grayscale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=!1),this.saturate(-t,e)},blackWhite:function(t){return void 0===t&&(t=!1),this.multiply(n.BLACK_WHITE,t)},contrast:function(t,e){void 0===t&&(t=0),void 0===e&&(e=!1);var i=t+1,s=-.5*(i-1);return this.multiply([i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0],e)},negative:function(t){return void 0===t&&(t=!1),this.multiply(n.NEGATIVE,t)},desaturateLuminance:function(t){return void 0===t&&(t=!1),this.multiply(n.DESATURATE_LUMINANCE,t)},sepia:function(t){return void 0===t&&(t=!1),this.multiply(n.SEPIA,t)},night:function(t,e){return void 0===t&&(t=.1),void 0===e&&(e=!1),this.multiply([-2*t,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0],e)},lsd:function(t){return void 0===t&&(t=!1),this.multiply(n.LSD,t)},brown:function(t){return void 0===t&&(t=!1),this.multiply(n.BROWN,t)},vintagePinhole:function(t){return void 0===t&&(t=!1),this.multiply(n.VINTAGE,t)},kodachrome:function(t){return void 0===t&&(t=!1),this.multiply(n.KODACHROME,t)},technicolor:function(t){return void 0===t&&(t=!1),this.multiply(n.TECHNICOLOR,t)},polaroid:function(t){return void 0===t&&(t=!1),this.multiply(n.POLAROID,t)},shiftToBGR:function(t){return void 0===t&&(t=!1),this.multiply(n.SHIFT_BGR,t)},multiply:function(t,e){void 0===e&&(e=!1),e||this.reset();var i=this._matrix,s=r;return s.set(i),i.set([s[0]*t[0]+s[1]*t[5]+s[2]*t[10]+s[3]*t[15],s[0]*t[1]+s[1]*t[6]+s[2]*t[11]+s[3]*t[16],s[0]*t[2]+s[1]*t[7]+s[2]*t[12]+s[3]*t[17],s[0]*t[3]+s[1]*t[8]+s[2]*t[13]+s[3]*t[18],s[0]*t[4]+s[1]*t[9]+s[2]*t[14]+s[3]*t[19]+s[4],s[5]*t[0]+s[6]*t[5]+s[7]*t[10]+s[8]*t[15],s[5]*t[1]+s[6]*t[6]+s[7]*t[11]+s[8]*t[16],s[5]*t[2]+s[6]*t[7]+s[7]*t[12]+s[8]*t[17],s[5]*t[3]+s[6]*t[8]+s[7]*t[13]+s[8]*t[18],s[5]*t[4]+s[6]*t[9]+s[7]*t[14]+s[8]*t[19]+s[9],s[10]*t[0]+s[11]*t[5]+s[12]*t[10]+s[13]*t[15],s[10]*t[1]+s[11]*t[6]+s[12]*t[11]+s[13]*t[16],s[10]*t[2]+s[11]*t[7]+s[12]*t[12]+s[13]*t[17],s[10]*t[3]+s[11]*t[8]+s[12]*t[13]+s[13]*t[18],s[10]*t[4]+s[11]*t[9]+s[12]*t[14]+s[13]*t[19]+s[14],s[15]*t[0]+s[16]*t[5]+s[17]*t[10]+s[18]*t[15],s[15]*t[1]+s[16]*t[6]+s[17]*t[11]+s[18]*t[16],s[15]*t[2]+s[16]*t[7]+s[17]*t[12]+s[18]*t[17],s[15]*t[3]+s[16]*t[8]+s[17]*t[13]+s[18]*t[18],s[15]*t[4]+s[16]*t[9]+s[17]*t[14]+s[18]*t[19]+s[19]]),this._dirty=!0,this}});n.BLACK_WHITE=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],n.NEGATIVE=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],n.DESATURATE_LUMINANCE=[.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,.2764723,.929708,.0938197,0,-37.1,0,0,0,1,0],n.SEPIA=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],n.LSD=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],n.BROWN=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],n.VINTAGE=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],n.KODACHROME=[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],n.TECHNICOLOR=[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],n.POLAROID=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],n.SHIFT_BGR=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t.exports=n},8073:(t,e,i)=>{var s,r,n,a=i(9454),o=i(2150),h=[],l=!1;t.exports=(n=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return s(t,e,i,a.CANVAS)},create:s=function(t,e,i,s,n){var c;void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=a.CANVAS),void 0===n&&(n=!1);var u=r(s);return null===u?(u={parent:t,canvas:document.createElement("canvas"),type:s},s===a.CANVAS&&h.push(u),c=u.canvas):(u.parent=t,c=u.canvas),n&&(u.parent=c),c.width=e,c.height=i,l&&s===a.CANVAS&&o.disable(c.getContext("2d",{willReadFrequently:!1})),c},createWebGL:function(t,e,i){return s(t,e,i,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:r=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e{var e,i="";t.exports={disable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!1),t},enable:function(t){return""===i&&(i=e(t)),i&&(t[i]=!0),t},getPrefix:e=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i{var s=i(7473),r=i(3649),n=new s({initialize:function(t,e,i,s,r,n){e||(e=t.sys.make.image({x:i,y:s,key:r,frame:n,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});r.register("bitmapMask",(function(t,e,i,s,r){return new n(this.scene,t,e,i,s,r)})),t.exports=n},6726:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var s=t.gl;t.flush(),0===t.maskStack.length&&(s.enable(s.STENCIL_TEST),s.clear(s.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var s=t.gl,r=this.geometryMask,n=t.maskCount,a=255;s.colorMask(!1,!1,!1,!1),i?(s.stencilFunc(s.EQUAL,n,a),s.stencilOp(s.KEEP,s.KEEP,s.INCR),n++):(s.stencilFunc(s.EQUAL,n+1,a),s.stencilOp(s.KEEP,s.KEEP,s.DECR)),this.level=n,r.renderWebGL(t,r,e),t.flush(),s.colorMask(!0,!0,!0,!0),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),this.invertAlpha?s.stencilFunc(s.NOTEQUAL,n,a):s.stencilFunc(s.EQUAL,n,a)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var s=t.maskStack[t.maskStack.length-1];s.mask.applyStencil(t,s.camera,!1),t.currentCameraMask.mask!==s.mask?(i.mask=s.mask,i.camera=s.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var s=this.geometryMask;t.currentContext.save(),s.renderCanvas(t,s,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=s},7340:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.BARREL,t),this.amount=e}});t.exports=a},5170:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===i&&(i=1),void 0===s&&(s=1),void 0===a&&(a=1),void 0===o&&(o=1),void 0===h&&(h=4),r.call(this,n.BLOOM,t),this.steps=h,this.offsetX=i,this.offsetY=s,this.blurStrength=a,this.strength=o,this.glcolor=[1,1,1],null!=e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},4199:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h){void 0===e&&(e=0),void 0===i&&(i=2),void 0===s&&(s=2),void 0===a&&(a=1),void 0===h&&(h=4),r.call(this,n.BLUR,t),this.quality=e,this.x=i,this.y=s,this.steps=h,this.strength=a,this.glcolor=[1,1,1],null!=o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},3132:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=.5),void 0===i&&(i=1),void 0===s&&(s=.2),void 0===a&&(a=!1),void 0===o&&(o=1),void 0===h&&(h=1),void 0===l&&(l=1),r.call(this,n.BOKEH,t),this.radius=e,this.amount=i,this.contrast=s,this.isTiltShift=a,this.strength=l,this.blurX=o,this.blurY=h}});t.exports=a},6610:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o){void 0===e&&(e=8),void 0===a&&(a=1),void 0===o&&(o=.005),r.call(this,n.CIRCLE,t),this.scale=a,this.feather=o,this.thickness=e,this.glcolor=[1,.2,.7],this.glcolor2=[1,0,0,.4],null!=i&&(this.color=i),null!=s&&(this.backgroundColor=s)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundColor:{get:function(){var t=this.glcolor2;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor2;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}},backgroundAlpha:{get:function(){return this.glcolor2[3]},set:function(t){this.glcolor2[3]=t}}});t.exports=a},4931:(t,e,i)=>{var s=i(7473),r=i(5686),n=i(1571),a=new s({Extends:r,initialize:function(t){r.call(this),this.type=n.COLOR_MATRIX,this.gameObject=t,this.active=!0},destroy:function(){this.gameObject=null,this._matrix=null,this._data=null}});t.exports=a},6128:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e){this.type=t,this.gameObject=e,this.active=!0},setActive:function(t){return this.active=t,this},destroy:function(){this.gameObject=null,this.active=!1}});t.exports=s},9195:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s){void 0===e&&(e="__WHITE"),void 0===i&&(i=.005),void 0===s&&(s=.005),r.call(this,n.DISPLACEMENT,t),this.x=i,this.y=s,this.glTexture,this.setTexture(e)},setTexture:function(t){var e=this.gameObject.scene.sys.textures.getFrame(t);return e&&(this.glTexture=e.glTexture),this}});t.exports=a},445:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===i&&(i=4),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.GLOW,t),this.outerStrength=i,this.innerStrength=s,this.knockout=a,this.glcolor=[1,1,1,1],void 0!==e&&(this.color=e)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},7724:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l,c){void 0===s&&(s=.2),void 0===a&&(a=0),void 0===o&&(o=0),void 0===h&&(h=0),void 0===l&&(l=1),void 0===c&&(c=0),r.call(this,n.GRADIENT,t),this.alpha=s,this.size=c,this.fromX=a,this.fromY=o,this.toX=h,this.toY=l,this.glcolor1=[255,0,0],this.glcolor2=[0,255,0],null!=e&&(this.color1=e),null!=i&&(this.color2=i)},color1:{get:function(){var t=this.glcolor1;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor1;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}},color2:{get:function(){var t=this.glcolor2;return(t[0]<<16)+(t[1]<<8)+(0|t[2])},set:function(t){var e=this.glcolor2;e[0]=t>>16&255,e[1]=t>>8&255,e[2]=255&t}}});t.exports=a},4412:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e){void 0===e&&(e=1),r.call(this,n.PIXELATE,t),this.amount=e}});t.exports=a},75:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a,o,h,l){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=.1),void 0===a&&(a=1),void 0===h&&(h=6),void 0===l&&(l=1),r.call(this,n.SHADOW,t),this.x=e,this.y=i,this.decay=s,this.power=a,this.glcolor=[0,0,0,1],this.samples=h,this.intensity=l,void 0!==o&&(this.color=o)},color:{get:function(){var t=this.glcolor;return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},set:function(t){var e=this.glcolor;e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255}}});t.exports=a},8734:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=3),void 0===a&&(a=!1),r.call(this,n.SHINE,t),this.speed=e,this.lineWidth=i,this.gradient=s,this.reveal=a}});t.exports=a},2437:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.5),void 0===i&&(i=.5),void 0===s&&(s=.5),void 0===a&&(a=.5),r.call(this,n.VIGNETTE,t),this.x=e,this.y=i,this.radius=s,this.strength=a}});t.exports=a},5984:(t,e,i)=>{var s=i(7473),r=i(6128),n=i(1571),a=new s({Extends:r,initialize:function(t,e,i,s,a){void 0===e&&(e=.1),void 0===i&&(i=0),void 0===s&&(s=0),void 0===a&&(a=!1),r.call(this,n.WIPE,t),this.progress=0,this.wipeWidth=e,this.direction=i,this.axis=s,this.reveal=a}});t.exports=a},1571:t=>{t.exports={GLOW:4,SHADOW:5,PIXELATE:6,VIGNETTE:7,SHINE:8,BLUR:9,GRADIENT:12,BLOOM:13,COLOR_MATRIX:14,CIRCLE:15,BARREL:16,DISPLACEMENT:17,WIPE:18,BOKEH:19}},7347:(t,e,i)=>{var s=i(1030),r=i(1571),n={Barrel:i(7340),Controller:i(6128),Bloom:i(5170),Blur:i(4199),Bokeh:i(3132),Circle:i(6610),ColorMatrix:i(4931),Displacement:i(9195),Glow:i(445),Gradient:i(7724),Pixelate:i(4412),Shadow:i(75),Shine:i(8734),Vignette:i(2437),Wipe:i(5984)};n=s(!1,n,r),t.exports=n},2494:(t,e,i)=>{var s=i(8351),r=i(8361);t.exports=function(t,e,i){e.x=r(i,"x",0),e.y=r(i,"y",0),e.depth=r(i,"depth",0),e.flipX=r(i,"flipX",!1),e.flipY=r(i,"flipY",!1);var n=r(i,"scale",null);"number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=r(n,"x",1),e.scaleY=r(n,"y",1));var a=r(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=r(a,"x",1),e.scrollFactorY=r(a,"y",1)),e.rotation=r(i,"rotation",0);var o=r(i,"angle",null);null!==o&&(e.angle=o),e.alpha=r(i,"alpha",1);var h=r(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=r(h,"x",.5),c=r(h,"y",.5);e.setOrigin(l,c)}return e.blendMode=r(i,"blendMode",s.NORMAL),e.visible=r(i,"visible",!0),r(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},2273:(t,e,i)=>{var s=i(7473),r=i(6125),n=i(1081),a=i(4399),o=i(3389),h=i(204),l=new s({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new n(this)),this},setData:function(t,e){return this.data||(this.data=new n(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new n(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new n(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new n(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.preFX&&(this.preFX.destroy(),this.preFX=void 0),this.postFX&&(this.postFX.destroy(),this.postFX=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},3649:(t,e,i)=>{var s=i(7473),r=i(8456),n=i(204),a=new s({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(n.BOOT,this.boot,this),this.events.on(n.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(n.DESTROY,this.destroy,this)},start:function(){this.events.once(n.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(n.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(n.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},r.register("GameObjectFactory",a,"add"),t.exports=a},2208:(t,e,i)=>{var s=i(4227),r=new s,n=new s,a=new s,o={camera:r,sprite:n,calc:a};t.exports=function(t,e,i){var s=r,h=n,l=a;return h.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),s.copyFrom(e.matrix),i?(s.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),h.e=t.x,h.f=t.y):(h.e-=e.scrollX*t.scrollFactorX,h.f-=e.scrollY*t.scrollFactorY),s.multiply(h,l),o}},4344:(t,e,i)=>{var s=i(2915),r={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,r){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=s(t,0,1),this._alphaTR=s(e,0,1),this._alphaBL=s(i,0,1),this._alphaBR=s(r,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=s(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=s(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=s(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=s(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=r},4518:(t,e,i)=>{var s=i(2915),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=s(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},5173:(t,e,i)=>{var s=i(8351),r={_blendMode:s.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=s[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},1991:t=>{t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},8305:t=>{var e={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=e},3131:t=>{var e={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=e},1626:(t,e,i)=>{var s=i(7473),r=i(7347),n=i(8935),a=new s({initialize:function(t,e){this.gameObject=t,this.isPost=e,this.enabled=!1,this.list=[],this.padding=0},setPadding:function(t){return void 0===t&&(t=0),this.padding=t,this.gameObject},onFXCopy:function(){},onFX:function(){},enable:function(t){if(!this.isPost){var e=this.gameObject.scene.sys.renderer;e&&e.pipelines?(this.gameObject.pipeline=e.pipelines.FX_PIPELINE,void 0!==t&&(this.padding=t),this.enabled=!0):this.enabled=!1}},clear:function(){if(this.isPost)this.gameObject.resetPostPipeline(!0);else{for(var t=this.list,e=0;e{t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},3671:(t,e,i)=>{var s=i(1392),r=i(9876),n=i(2529),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&r(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t,e){return void 0===t&&(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getTopLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new n),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,r,n,a,o,h,l;if(void 0===t&&(t=new s),this.parentContainer){var c=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),c.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),c.transformPoint(t.x,t.y,t),r=t.x,n=t.y,this.getBottomLeft(t),c.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),c.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),r=t.x,n=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,r,a,h),t.y=Math.min(i,n,o,l),t.width=Math.max(e,r,a,h)-t.x,t.height=Math.max(i,n,o,l)-t.y,t}};t.exports=a},2246:(t,e,i)=>{var s=i(7499),r=i(6726),n={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,r,n){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new s(this.scene,t,e,i,r,n)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new r(this.scene,t)}};t.exports=n},5085:t=>{var e={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=e},77:(t,e,i)=>{var s=i(7149),r=i(1864),n=i(5851),a=i(3747),o=i(2529),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=n(t,"from",0),t.to=n(t,"to",1);var h=r(t,"positionOnPath",!1);this.rotateToPath=r(t,"rotateToPath",!1),this.pathRotationOffset=n(t,"rotationOffset",0);var l=n(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var c=this.path.getPoint(.1);this.rotation=Math.atan2(c.y-this.y,c.x-this.x)+s(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t&&t.data){var e=t.data[0],i=this.pathDelta,r=this.pathVector;if(i.copy(r).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,r),i.add(r),r.add(this.pathOffset),void this.setPosition(r.x,r.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),r),i.add(r),r.add(this.pathOffset);var n=this.x,o=this.y;this.setPosition(r.x,r.y);var h=this.x-n,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+s(this.pathRotationOffset))}}};t.exports=h},986:(t,e,i)=>{var s=i(3911),r={defaultPipeline:null,pipeline:null,pipelineData:null,initPipeline:function(t){this.pipelineData={};var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(i){void 0===t&&(t=i.default);var s=i.get(t);if(s)return this.defaultPipeline=s,this.pipeline=s,!0}return!1},setPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){var a=n.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?s(e):e)}return this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},resetPipeline:function(t){return void 0===t&&(t=!1),this.pipeline=this.defaultPipeline,t&&(this.pipelineData={}),null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=r},4461:(t,e,i)=>{var s=i(3911),r=i(1626),n=i(8935),a={hasPostPipeline:!1,postPipelines:null,postPipelineData:null,preFX:null,postFX:null,initPostPipeline:function(t){this.postPipelines=[],this.postPipelineData={},this.postFX=new r(this,!0),t&&(this.preFX=new r(this,!1))},setPostPipeline:function(t,e,i){var r=this.scene.sys.renderer;if(!r)return this;var n=r.pipelines;if(n){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPostPipelineData:function(t,e){var i=this.postPipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,s=[],r=0;r=0;s--){var r=i[s];(e&&r.name===t||!e&&r===t)&&(r.destroy(),n(i,s))}return this.hasPostPipeline=this.postPipelines.length>0,this},clearFX:function(){return this.preFX&&this.preFX.clear(),this.postFX&&this.postFX.clear(),this}};t.exports=a},4627:t=>{var e={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=e},1868:t=>{var e={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){t||(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=e},4976:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setTexture:function(t,e,i,s){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e,i,s)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=r},9243:(t,e,i)=>{var s=i(2362),r={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,s){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,s,this.flipX,this.flipY);else{var r=t;this.frame.setCropUVs(this._crop,r.x,r.y,r.width,r.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof s?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=r},5693:t=>{var e={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,s){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,s=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=s,this.tintFill=!1,this},setTintFill:function(t,e,i,s){return this.setTint(t,e,i,s),this.tintFill=!0,this},tint:{get:function(){return this.tintTopLeft},set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=e},6125:t=>{t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},3212:(t,e,i)=>{var s=i(7425),r=i(4227),n=i(7556),a=i(3692),o=i(2820),h=i(2529),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:0!==this._scaleY&&(this.renderFlags|=4)}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:0!==this._scaleX&&(this.renderFlags|=4)}},angle:{get:function(){return o(this._rotation*s.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*s.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(t)}},setPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===s&&(s=0),this.x=t,this.y=e,this.z=i,this.w=s,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===s&&(s=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*s,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(e||(e=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,s){i||(i=new h),s||(s=this.scene.sys.cameras.main);var r=s.scrollX,a=s.scrollY,o=t+r*this.scrollFactorX-r,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):n(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},4227:(t,e,i)=>{var s=i(7473),r=i(7425),n=i(2529),a=new s({initialize:function(t,e,i,s,r,n){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=1),void 0===r&&(r=0),void 0===n&&(n=0),this.matrix=new Float32Array([t,e,i,s,r,n,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],n=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):s||n?r.TAU-(n>0?Math.acos(-s/this.scaleY):-Math.acos(s/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3];return s[0]=r*i+a*e,s[1]=n*i+o*e,s[2]=r*-e+a*i,s[3]=n*-e+o*i,this},multiply:function(t,e){var i=this.matrix,s=t.matrix,r=i[0],n=i[1],a=i[2],o=i[3],h=i[4],l=i[5],c=s[0],u=s[1],d=s[2],f=s[3],p=s[4],g=s[5],m=void 0===e?i:e.matrix;return m[0]=c*r+u*a,m[1]=c*n+u*o,m[2]=d*r+f*a,m[3]=d*n+f*o,m[4]=p*r+g*a+h,m[5]=p*n+g*o+l,m},multiplyWithOffset:function(t,e,i){var s=this.matrix,r=t.matrix,n=s[0],a=s[1],o=s[2],h=s[3],l=e*n+i*o+s[4],c=e*a+i*h+s[5],u=r[0],d=r[1],f=r[2],p=r[3],g=r[4],m=r[5];return s[0]=u*n+d*o,s[1]=u*a+d*h,s[2]=f*n+p*o,s[3]=f*a+p*h,s[4]=g*n+m*o+l,s[5]=g*a+m*h+c,this},transform:function(t,e,i,s,r,n){var a=this.matrix,o=a[0],h=a[1],l=a[2],c=a[3],u=a[4],d=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*c,a[2]=i*o+s*l,a[3]=i*h+s*c,a[4]=r*o+n*l+u,a[5]=r*h+n*c+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var s=this.matrix,r=s[0],n=s[1],a=s[2],o=s[3],h=s[4],l=s[5];return i.x=t*r+e*a+h,i.y=t*n+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=e*r-i*s;return t[0]=r/o,t[1]=-i/o,t[2]=-s/o,t[3]=e/o,t[4]=(s*a-r*n)/o,t[5]=-(e*a-i*n)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){return t.setTransform(this),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,s,r,n){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=s,a[4]=r,a[5]=n,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],s=e[1],r=e[2],n=e[3],a=i*n-s*r;if(t.translateX=e[4],t.translateY=e[5],i||s){var o=Math.sqrt(i*i+s*s);t.rotation=s>0?Math.acos(i/o):-Math.acos(i/o),t.scaleX=o,t.scaleY=a/o}else if(r||n){var h=Math.sqrt(r*r+n*n);t.rotation=.5*Math.PI-(n>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,s,r){var n=this.matrix,a=Math.sin(i),o=Math.cos(i);return n[4]=t,n[5]=e,n[0]=o*s,n[1]=a*s,n[2]=-a*r,n[3]=o*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new n);var s=this.matrix,r=s[0],a=s[1],o=s[2],h=s[3],l=s[4],c=s[5],u=1/(r*h+o*-a);return i.x=h*u*t+-o*u*e+(c*o-l*h)*u,i.y=r*u*e+-a*u*t+(-c*r+l*a)*u,i},setQuad:function(t,e,i,s,r,n){void 0===r&&(r=!1),void 0===n&&(n=this.quad);var a=this.matrix,o=a[0],h=a[1],l=a[2],c=a[3],u=a[4],d=a[5];return r?(n[0]=Math.round(t*o+e*l+u),n[1]=Math.round(t*h+e*c+d),n[2]=Math.round(t*o+s*l+u),n[3]=Math.round(t*h+s*c+d),n[4]=Math.round(i*o+s*l+u),n[5]=Math.round(i*h+s*c+d),n[6]=Math.round(i*o+e*l+u),n[7]=Math.round(i*h+e*c+d)):(n[0]=t*o+e*l+u,n[1]=t*h+e*c+d,n[2]=t*o+s*l+u,n[3]=t*h+s*c+d,n[4]=i*o+s*l+u,n[5]=i*h+s*c+d,n[6]=i*o+e*l+u,n[7]=i*h+e*c+d),n},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var s=this.getX(t,e);return i&&(s=Math.round(s)),s},getYRound:function(t,e,i){var s=this.getY(t,e);return i&&(s=Math.round(s)),s},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},8414:t=>{var e={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=e},4286:(t,e,i)=>{t.exports={Alpha:i(4344),AlphaSingle:i(4518),BlendMode:i(5173),ComputedSize:i(1991),Crop:i(8305),Depth:i(3131),Flip:i(9660),FX:i(1626),GetBounds:i(3671),Mask:i(2246),Origin:i(5085),PathFollower:i(77),Pipeline:i(986),PostPipeline:i(4461),ScrollFactor:i(4627),Size:i(1868),Texture:i(4976),TextureCrop:i(9243),Tint:i(5693),ToJSON:i(6125),Transform:i(3212),TransformMatrix:i(4227),Visible:i(8414)}},7361:(t,e,i)=>{var s=i(1953),r=i(8351),n=i(7473),a=i(4286),o=i(3389),h=i(2273),l=i(1392),c=i(3232),u=i(9422),d=i(2529),f=new n({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.PostPipeline,a.Transform,a.Visible,c],initialize:function(t,e,i,s){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPostPipeline(),this.setPosition(e,i),this.setBlendMode(r.SKIP_CHECK),s&&this.add(s)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,s=new l,r=!1;t.setEmpty();for(var n=0;n-1},setAll:function(t,e,i,r){return s.SetAll(this.list,t,e,i,r),this},each:function(t,e){var i,s=[null],r=this.list.slice(),n=r.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},3232:(t,e,i)=>{var s=i(1984),r=s,n=s;r=i(4343),t.exports={renderWebGL:r,renderCanvas:n}},4343:t=>{t.exports=function(t,e,i,s){i.addToRenderList(e);var r=e.list,n=r.length;if(0!==n){var a=e.localTransform;s?(a.loadIdentity(),a.multiply(s),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.pipelines.preBatch(e);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var h=e.alpha,l=e.scrollFactorX,c=e.scrollFactorY,u=0;u{t.exports="addedtoscene"},4265:t=>{t.exports="destroy"},8671:t=>{t.exports="removedfromscene"},3420:t=>{t.exports="complete"},601:t=>{t.exports="created"},7919:t=>{t.exports="error"},6231:t=>{t.exports="locked"},5241:t=>{t.exports="loop"},8325:t=>{t.exports="playing"},3356:t=>{t.exports="play"},7513:t=>{t.exports="seeked"},5788:t=>{t.exports="seeking"},7111:t=>{t.exports="stalled"},8118:t=>{t.exports="stop"},9184:t=>{t.exports="textureready"},4287:t=>{t.exports="unlocked"},857:t=>{t.exports="unsupported"},3389:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(6608),DESTROY:i(4265),REMOVED_FROM_SCENE:i(8671),VIDEO_COMPLETE:i(3420),VIDEO_CREATED:i(601),VIDEO_ERROR:i(7919),VIDEO_LOCKED:i(6231),VIDEO_LOOP:i(5241),VIDEO_PLAY:i(3356),VIDEO_PLAYING:i(8325),VIDEO_SEEKED:i(7513),VIDEO_SEEKING:i(5788),VIDEO_STALLED:i(7111),VIDEO_STOP:i(8118),VIDEO_TEXTURE:i(9184),VIDEO_UNLOCKED:i(4287),VIDEO_UNSUPPORTED:i(857)}},1643:t=>{t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},8881:(t,e,i)=>{var s=i(7655);t.exports=function(t,e,i){return void 0===i&&(i=new s),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},4479:(t,e,i)=>{var s=i(4771),r=i(7655);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=s(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,c=0;c{t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},284:(t,e,i)=>{var s=i(7473),r=i(8881),n=i(4479),a=i(1643),o=i(3915),h=i(2529),l=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=s},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return n(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,s){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.x1=t,this.y1=e,this.x2=i,this.y2=s,this},setFromObjects:function(t,e){return this.x1=t.x,this.y1=t.y,this.x2=e.x,this.y2=e.y,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},3915:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){void 0===e&&(e=new s);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},7655:(t,e,i)=>{var s=i(7473),r=i(1643),n=new s({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=n},5956:t=>{t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},716:(t,e,i)=>{var s=i(7120),r=i(7655);t.exports=function(t,e,i){if(void 0===i&&(i=new r),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var n=s(t)*e;return e>.5?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width)),i}},8151:(t,e,i)=>{var s=i(716),r=i(7120);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&i>0&&(e=r(t)/i);for(var a=0;a{t.exports=function(t){return 2*(t.width+t.height)}},2161:(t,e,i)=>{var s=i(7655);t.exports=function(t,e){return void 0===e&&(e=new s),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},1392:(t,e,i)=>{var s=i(7473),r=i(5956),n=i(716),a=i(8151),o=i(1643),h=i(284),l=i(2161),c=new s({initialize:function(t,e,i,s){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=s},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return n(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,s){return this.x=t,this.y=e,this.width=i,this.height=s,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=c},9422:(t,e,i)=>{var s=i(1392);t.exports=function(t,e,i){void 0===i&&(i=new s);var r=Math.min(t.x,e.x),n=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-r,o=Math.max(t.bottom,e.bottom)-n;return i.setTo(r,n,a,o)}},1593:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=i(4597),o=i(5593),h=i(7410),l=i(5874),c=i(707),u=new s({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var s=a(e,"url");void 0===s?s=t.path+i+"."+a(e,"extension",""):"string"!=typeof s||s.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(s=t.path+s),this.url=s,this.src="",this.xhrSettings=c(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,s=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(s=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,s)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(n.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==r.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(n.FILE_COMPLETE,e,i,t),this.loader.emit(n.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=r.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});u.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var s=new FileReader;s.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+s.result.split(",")[1]},s.onerror=t.onerror,s.readAsDataURL(e)}},u.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=u},9845:t=>{var e={},i={install:function(t){for(var i in e)t[i]=e[i]},register:function(t,i){e[t]=i},destroy:function(){e={}}};t.exports=i},5593:t=>{t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},7410:(t,e,i)=>{var s=i(1030),r=i(707);t.exports=function(t,e){var i=void 0===t?r():s({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},3137:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1179),a=new s({initialize:function(t,e,i,s){var n=[];s.forEach((function(t){t&&n.push(t)})),this.loader=t,this.type=e,this.key=i;var a=this.key;t.prefix&&""!==t.prefix&&(this.key=t.prefix+a),this.multiKeyIndex=t.multiKeyIndex++,this.files=n,this.state=r.FILE_PENDING,this.complete=!1,this.pending=n.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var o=0;o{var s=i(7410);t.exports=function(t,e){var i=s(e,t.xhrSettings),r=new XMLHttpRequest;if(r.open("GET",t.src,i.async,i.user,i.password),r.responseType=t.xhrSettings.responseType,r.timeout=i.timeout,i.headers)for(var n in i.headers)r.setRequestHeader(n,i.headers[n]);return i.header&&i.headerValue&&r.setRequestHeader(i.header,i.headerValue),i.requestedWith&&r.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&r.overrideMimeType(i.overrideMimeType),i.withCredentials&&(r.withCredentials=!0),r.onload=t.onLoad.bind(t,r),r.onerror=t.onError.bind(t,r),r.onprogress=t.onProgress.bind(t),r.send(),r}},707:t=>{t.exports=function(t,e,i,s,r,n){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===s&&(s=""),void 0===r&&(r=0),void 0===n&&(n=!1),{responseType:t,async:e,user:i,password:s,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:n}}},4359:t=>{t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19,FILE_PENDING_DESTROY:20}},462:t=>{t.exports="addfile"},7297:t=>{t.exports="complete"},8660:t=>{t.exports="filecomplete"},6484:t=>{t.exports="filecomplete-"},7972:t=>{t.exports="loaderror"},1906:t=>{t.exports="load"},1441:t=>{t.exports="fileprogress"},1072:t=>{t.exports="postprocess"},1927:t=>{t.exports="progress"},6597:t=>{t.exports="start"},1179:(t,e,i)=>{t.exports={ADD:i(462),COMPLETE:i(7297),FILE_COMPLETE:i(8660),FILE_KEY_COMPLETE:i(6484),FILE_LOAD_ERROR:i(7972),FILE_LOAD:i(1906),FILE_PROGRESS:i(1441),POST_PROCESS:i(1072),PROGRESS:i(1927),START:i(6597)}},6732:(t,e,i)=>{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=i(5593),c=new s({Extends:n,initialize:function t(e,i,s,r,a){var l,c="png";if(h(i)){var u=i;i=o(u,"key"),s=o(u,"url"),l=o(u,"normalMap"),r=o(u,"xhrSettings"),c=o(u,"extension",c),a=o(u,"frameConfig")}Array.isArray(s)&&(l=s[1],s=s[0]);var d={type:"image",cache:e.textureManager,extension:c,responseType:"blob",key:i,url:s,xhrSettings:r,config:a};if(n.call(this,e,d),l){var f=new t(e,this.key,l,r,a);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){n.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){n.revokeObjectURL(t.data),t.onProcessError()},n.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=r.FILE_PROCESSING,t===r.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=r.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=r.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=r.FILE_COMPLETE&&("spritesheet"===t.type?t.addToCache():"normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(5851),l=i(2482),c=new s({Extends:n,initialize:function(t,e,i,s,a){var c="json";if(l(e)){var u=e;e=o(u,"key"),i=o(u,"url"),s=o(u,"xhrSettings"),c=o(u,"extension",c),a=o(u,"dataKey",a)}var d={type:"json",cache:t.cacheManager.json,extension:c,responseType:"text",key:e,url:i,xhrSettings:s,config:a};n.call(this,t,d),l(i)&&(this.data=a?h(i,a):i,this.state=r.FILE_POPULATED)},onProcess:function(){if(this.state!==r.FILE_POPULATED){this.state=r.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,s){if(Array.isArray(t))for(var r=0;r{var s=i(7473),r=i(4359),n=i(1593),a=i(9845),o=i(4597),h=i(2482),l=new s({Extends:n,initialize:function(t,e,i,s){var r="text",a="txt",l=t.cacheManager.text;if(h(e)){var c=e;e=o(c,"key"),i=o(c,"url"),s=o(c,"xhrSettings"),a=o(c,"extension",a),r=o(c,"type",r),l=o(c,"cache",l)}var u={type:r,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:s};n.call(this,t,u)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var s=0;s{t.exports=function(t){for(var e=0,i=0;i{var s=i(3916);t.exports=function(t,e){return s(t)/s(e)/s(t-e)}},7025:t=>{t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},48:t=>{t.exports=function(t,e,i,s,r){var n=.5*(s-e),a=.5*(r-i),o=t*t;return(2*i-2*s+n+a)*(t*o)+(-3*i+3*s-2*n-a)*o+n*t+i}},5035:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.ceil(t*s)/s}},2915:t=>{t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},7149:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.DEG_TO_RAD}},2975:t=>{t.exports=function(t,e){return Math.abs(t-e)}},2107:(t,e,i)=>{var s=i(2915),r=i(7473),n=i(9652),a=i(1984),o=new n,h=new r({initialize:function t(e,i,s,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=s,this._order=r,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,s){return void 0===s&&(s=this._order),this._x=t,this._y=e,this._z=i,this._order=s,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var r=t.val,n=r[0],a=r[4],o=r[8],h=r[1],l=r[5],c=r[9],u=r[2],d=r[6],f=r[10],p=0,g=0,m=0,x=.99999;switch(e){case"XYZ":g=Math.asin(s(o,-1,1)),Math.abs(o){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},104:t=>{t.exports=function(t,e){return Math.random()*(e-t)+t}},4941:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.floor(t*s)/s}},1555:(t,e,i)=>{var s=i(2915);t.exports=function(t,e,i){return(i-e)*(t=s(t,0,1))+e}},5005:t=>{t.exports=function(t,e){return t/e/1e3}},3702:t=>{t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},8820:t=>{t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},1743:t=>{t.exports=function(t,e,i){return(e-t)*i+t}},3416:t=>{t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},2149:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=s,this},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=l*n-a*h,u=-l*r+a*o,d=h*r-n*o,f=e*c+i*u+s*d;return f?(f=1/f,t[0]=c*f,t[1]=(-l*i+s*h)*f,t[2]=(a*i-s*n)*f,t[3]=u*f,t[4]=(l*e-s*o)*f,t[5]=(-a*e+s*r)*f,t[6]=d*f,t[7]=(-h*e+i*o)*f,t[8]=(n*e-i*r)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=n*l-a*h,t[1]=s*h-i*l,t[2]=i*a-s*n,t[3]=a*o-r*l,t[4]=e*l-s*o,t[5]=s*r-e*a,t[6]=r*h-n*o,t[7]=i*o-e*h,t[8]=e*n-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*n-a*h)+i*(-l*r+a*o)+s*(h*r-n*o)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],c=e[8],u=t.val,d=u[0],f=u[1],p=u[2],g=u[3],m=u[4],x=u[5],v=u[6],y=u[7],w=u[8];return e[0]=d*i+f*n+p*h,e[1]=d*s+f*a+p*l,e[2]=d*r+f*o+p*c,e[3]=g*i+m*n+x*h,e[4]=g*s+m*a+x*l,e[5]=g*r+m*o+x*c,e[6]=v*i+y*n+w*h,e[7]=v*s+y*a+w*l,e[8]=v*r+y*o+w*c,this},translate:function(t){var e=this.val,i=t.x,s=t.y;return e[6]=i*e[0]+s*e[3]+e[6],e[7]=i*e[1]+s*e[4]+e[7],e[8]=i*e[2]+s*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*n,e[1]=l*s+h*a,e[2]=l*r+h*o,e[3]=l*n-h*i,e[4]=l*a-h*s,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,i=t.x,s=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=s*e[3],e[4]=s*e[4],e[5]=s*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,s=t.z,r=t.w,n=e+e,a=i+i,o=s+s,h=e*n,l=e*a,c=e*o,u=i*a,d=i*o,f=s*o,p=r*n,g=r*a,m=r*o,x=this.val;return x[0]=1-(u+f),x[3]=l+m,x[6]=c-g,x[1]=l-m,x[4]=1-(h+f),x[7]=d+p,x[2]=c+g,x[5]=d-p,x[8]=1-(h+u),this},normalFromMat4:function(t){var e=t.val,i=this.val,s=e[0],r=e[1],n=e[2],a=e[3],o=e[4],h=e[5],l=e[6],c=e[7],u=e[8],d=e[9],f=e[10],p=e[11],g=e[12],m=e[13],x=e[14],v=e[15],y=s*h-r*o,w=s*l-n*o,b=s*c-a*o,A=r*l-n*h,M=r*c-a*h,E=n*c-a*l,S=u*m-d*g,T=u*x-f*g,I=u*v-p*g,C=d*x-f*m,R=d*v-p*m,k=f*v-p*x,F=y*k-w*R+b*C+A*I-M*T+E*S;return F?(F=1/F,i[0]=(h*k-l*R+c*C)*F,i[1]=(l*I-o*k-c*T)*F,i[2]=(o*R-h*I+c*S)*F,i[3]=(n*R-r*k-a*C)*F,i[4]=(s*k-n*I+a*T)*F,i[5]=(r*I-s*R-a*S)*F,i[6]=(m*E-x*M+v*A)*F,i[7]=(x*b-g*E-v*w)*F,i[8]=(g*M-m*b+v*y)*F,this):null}});t.exports=s},9652:(t,e,i)=>{var s=i(7473),r=i(5689),n=1e-6,a=new s({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new a(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,s,r,n,a,o,h,l,c,u,d,f,p,g){var m=this.val;return m[0]=t,m[1]=e,m[2]=i,m[3]=s,m[4]=r,m[5]=n,m[6]=a,m[7]=o,m[8]=h,m[9]=l,m[10]=c,m[11]=u,m[12]=d,m[13]=f,m[14]=p,m[15]=g,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var s=o.fromQuat(i).val,r=e.x,n=e.y,a=e.z;return this.setValues(s[0]*r,s[1]*r,s[2]*r,0,s[4]*n,s[5]*n,s[6]*n,0,s[8]*a,s[9]*a,s[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var s=this.val;return s[12]=t,s[13]=e,s[14]=i,this},scaling:function(t,e,i){this.zero();var s=this.val;return s[0]=t,s[5]=e,s[10]=i,s[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],s=t[3],r=t[6],n=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=r,t[11]=t[14],t[12]=s,t[13]=n,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15],x=e*a-i*n,v=e*o-s*n,y=e*h-r*n,w=i*o-s*a,b=i*h-r*a,A=s*h-r*o,M=l*p-c*f,E=l*g-u*f,S=l*m-d*f,T=c*g-u*p,I=c*m-d*p,C=u*m-d*g,R=x*C-v*I+y*T+w*S-b*E+A*M;return R?(R=1/R,this.setValues((a*C-o*I+h*T)*R,(s*I-i*C-r*T)*R,(p*A-g*b+m*w)*R,(u*b-c*A-d*w)*R,(o*S-n*C-h*E)*R,(e*C-s*S+r*E)*R,(g*y-f*A-m*v)*R,(l*A-u*y+d*v)*R,(n*I-a*S+h*M)*R,(i*S-e*I-r*M)*R,(f*b-p*y+m*x)*R,(c*y-l*b-d*x)*R,(a*E-n*T-o*M)*R,(e*T-i*E+s*M)*R,(p*v-f*w-g*x)*R,(l*w-c*v+u*x)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15];return this.setValues(a*(u*m-d*g)-c*(o*m-h*g)+p*(o*d-h*u),-(i*(u*m-d*g)-c*(s*m-r*g)+p*(s*d-r*u)),i*(o*m-h*g)-a*(s*m-r*g)+p*(s*h-r*o),-(i*(o*d-h*u)-a*(s*d-r*u)+c*(s*h-r*o)),-(n*(u*m-d*g)-l*(o*m-h*g)+f*(o*d-h*u)),e*(u*m-d*g)-l*(s*m-r*g)+f*(s*d-r*u),-(e*(o*m-h*g)-n*(s*m-r*g)+f*(s*h-r*o)),e*(o*d-h*u)-n*(s*d-r*u)+l*(s*h-r*o),n*(c*m-d*p)-l*(a*m-h*p)+f*(a*d-h*c),-(e*(c*m-d*p)-l*(i*m-r*p)+f*(i*d-r*c)),e*(a*m-h*p)-n*(i*m-r*p)+f*(i*h-r*a),-(e*(a*d-h*c)-n*(i*d-r*c)+l*(i*h-r*a)),-(n*(c*g-u*p)-l*(a*g-o*p)+f*(a*u-o*c)),e*(c*g-u*p)-l*(i*g-s*p)+f*(i*u-s*c),-(e*(a*g-o*p)-n*(i*g-s*p)+f*(i*o-s*a)),e*(a*u-o*c)-n*(i*u-s*c)+l*(i*o-s*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],c=t[9],u=t[10],d=t[11],f=t[12],p=t[13],g=t[14],m=t[15];return(e*a-i*n)*(u*m-d*g)-(e*o-s*n)*(c*m-d*p)+(e*h-r*n)*(c*g-u*p)+(i*o-s*a)*(l*m-d*f)-(i*h-r*a)*(l*g-u*f)+(s*h-r*o)*(l*p-c*f)},multiply:function(t){var e=this.val,i=e[0],s=e[1],r=e[2],n=e[3],a=e[4],o=e[5],h=e[6],l=e[7],c=e[8],u=e[9],d=e[10],f=e[11],p=e[12],g=e[13],m=e[14],x=e[15],v=t.val,y=v[0],w=v[1],b=v[2],A=v[3];return e[0]=y*i+w*a+b*c+A*p,e[1]=y*s+w*o+b*u+A*g,e[2]=y*r+w*h+b*d+A*m,e[3]=y*n+w*l+b*f+A*x,y=v[4],w=v[5],b=v[6],A=v[7],e[4]=y*i+w*a+b*c+A*p,e[5]=y*s+w*o+b*u+A*g,e[6]=y*r+w*h+b*d+A*m,e[7]=y*n+w*l+b*f+A*x,y=v[8],w=v[9],b=v[10],A=v[11],e[8]=y*i+w*a+b*c+A*p,e[9]=y*s+w*o+b*u+A*g,e[10]=y*r+w*h+b*d+A*m,e[11]=y*n+w*l+b*f+A*x,y=v[12],w=v[13],b=v[14],A=v[15],e[12]=y*i+w*a+b*c+A*p,e[13]=y*s+w*o+b*u+A*g,e[14]=y*r+w*h+b*d+A*m,e[15]=y*n+w*l+b*f+A*x,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,s=e.val,r=i[0],n=i[4],a=i[8],o=i[12],h=i[1],l=i[5],c=i[9],u=i[13],d=i[2],f=i[6],p=i[10],g=i[14],m=i[3],x=i[7],v=i[11],y=i[15],w=s[0],b=s[4],A=s[8],M=s[12],E=s[1],S=s[5],T=s[9],I=s[13],C=s[2],R=s[6],k=s[10],F=s[14],L=s[3],P=s[7],O=s[11],Y=s[15];return this.setValues(r*w+n*E+a*C+o*L,h*w+l*E+c*C+u*L,d*w+f*E+p*C+g*L,m*w+x*E+v*C+y*L,r*b+n*S+a*R+o*P,h*b+l*S+c*R+u*P,d*b+f*S+p*R+g*P,m*b+x*S+v*R+y*P,r*A+n*T+a*k+o*O,h*A+l*T+c*k+u*O,d*A+f*T+p*k+g*O,m*A+x*T+v*k+y*O,r*M+n*I+a*F+o*Y,h*M+l*I+c*F+u*Y,d*M+f*I+p*F+g*Y,m*M+x*I+v*F+y*Y)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var s=this.val;return s[12]=s[0]*t+s[4]*e+s[8]*i+s[12],s[13]=s[1]*t+s[5]*e+s[9]*i+s[13],s[14]=s[2]*t+s[6]*e+s[10]*i+s[14],s[15]=s[3]*t+s[7]*e+s[11]*i+s[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var s=this.val;return s[0]=s[0]*t,s[1]=s[1]*t,s[2]=s[2]*t,s[3]=s[3]*t,s[4]=s[4]*e,s[5]=s[5]*e,s[6]=s[6]*e,s[7]=s[7]*e,s[8]=s[8]*i,s[9]=s[9]*i,s[10]=s[10]*i,s[11]=s[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),s=Math.sin(e),r=1-i,n=t.x,a=t.y,o=t.z,h=r*n,l=r*a;return this.setValues(h*n+i,h*a-s*o,h*o+s*a,0,h*a+s*o,l*a+i,l*o-s*n,0,h*o-s*a,l*o+s*n,r*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,s=e.x,r=e.y,a=e.z,o=Math.sqrt(s*s+r*r+a*a);if(Math.abs(o){t.exports=function(t,e,i){return Math.min(t+e,i)}},44:t=>{t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},5385:t=>{t.exports=function(t,e,i){return Math.max(t-e,i)}},8585:t=>{t.exports=function(t,e,i,s){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return r>1?void 0!==s?(r=(s-t)/(s-i))<0&&(r=0):r=1:r<0&&(r=0),r}},372:(t,e,i)=>{var s=i(7473),r=i(2149),n=i(1984),a=i(5689),o=1e-6,h=new Int8Array([1,2,0]),l=new Float32Array([0,0,0]),c=new a(1,0,0),u=new a(0,1,0),d=new a,f=new r,p=new s({initialize:function(t,e,i,s){this.onChangeCallback=n,this.set(t,e,i,s)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,s,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=s||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=s*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.set(i+e*(t.x-i),s+e*(t.y-s),r+e*(t.z-r),n+e*(t.w-n))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(d.copy(c).cross(t).length().999999?this.set(0,0,0,1):(d.copy(t).cross(e),this._x=d.x,this._y=d.y,this._z=d.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var s=f.val;return s[0]=e.x,s[3]=e.y,s[6]=e.z,s[1]=i.x,s[4]=i.y,s[7]=i.z,s[2]=-t.x,s[5]=-t.y,s[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*n+i*o-s*a,i*h+r*a+s*n-e*o,s*h+r*o+e*a-i*n,r*h-e*n-i*a-s*o)},slerp:function(t,e){var i=this.x,s=this.y,r=this.z,n=this.w,a=t.x,h=t.y,l=t.z,c=t.w,u=i*a+s*h+r*l+n*c;u<0&&(u=-u,a=-a,h=-h,l=-l,c=-c);var d=1-e,f=e;if(1-u>o){var p=Math.acos(u),g=Math.sin(p);d=Math.sin((1-e)*p)/g,f=Math.sin(e*p)/g}return this.set(d*i+f*a,d*s+f*h,d*r+f*l,d*n+f*c)},invert:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s,n=r?1/r:0;return this.set(-t*n,-e*n,-i*n,s*n)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*n,i*a+s*n,s*a-i*n,r*a-e*n)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a-s*n,i*a+r*n,s*a+e*n,r*a-i*n)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,s=this.z,r=this.w,n=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*n,i*a-e*n,s*a+r*n,r*a-s*n)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,s=t.y/2,r=t.z/2,n=Math.cos(i),a=Math.cos(s),o=Math.cos(r),h=Math.sin(i),l=Math.sin(s),c=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+n*l*c,n*l*o-h*a*c,n*a*c+h*l*o,n*a*o-h*l*c,e);break;case"YXZ":this.set(h*a*o+n*l*c,n*l*o-h*a*c,n*a*c-h*l*o,n*a*o+h*l*c,e);break;case"ZXY":this.set(h*a*o-n*l*c,n*l*o+h*a*c,n*a*c+h*l*o,n*a*o-h*l*c,e);break;case"ZYX":this.set(h*a*o-n*l*c,n*l*o+h*a*c,n*a*c-h*l*o,n*a*o+h*l*c,e);break;case"YZX":this.set(h*a*o+n*l*c,n*l*o+h*a*c,n*a*c-h*l*o,n*a*o-h*l*c,e);break;case"XZY":this.set(h*a*o-n*l*c,n*l*o-h*a*c,n*a*c+h*l*o,n*a*o+h*l*c,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,s=i[0],r=i[4],n=i[8],a=i[1],o=i[5],h=i[9],l=i[2],c=i[6],u=i[10],d=s+o+u;return d>0?(e=.5/Math.sqrt(d+1),this.set((c-h)*e,(n-l)*e,(a-r)*e,.25/e)):s>o&&s>u?(e=2*Math.sqrt(1+s-o-u),this.set(.25*e,(r+a)/e,(n+l)/e,(c-h)/e)):o>u?(e=2*Math.sqrt(1+o-s-u),this.set((r+a)/e,.25*e,(h+c)/e,(n-l)/e)):(e=2*Math.sqrt(1+u-s-o),this.set((n+l)/e,(h+c)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,i=t.val,s=i[0]+i[4]+i[8];if(s>0)e=Math.sqrt(s+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var n=h[r],a=h[n];e=Math.sqrt(i[3*r+r]-i[3*n+n]-i[3*a+a]+1),l[r]=.5*e,e=.5/e,l[n]=(i[3*n+r]+i[3*r+n])*e,l[a]=(i[3*a+r]+i[3*r+a])*e,this._x=l[0],this._y=l[1],this._z=l[2],this._w=(i[3*a+n]-i[3*n+a])*e}return this.onChangeCallback(this),this}});t.exports=p},4208:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t*s.RAD_TO_DEG}},1705:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},6650:t=>{t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,s=2*Math.random()-1,r=Math.sqrt(1-s*s)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=s*e,t}},2037:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},6283:t=>{t.exports=function(t,e){var i=t.x,s=t.y;return t.x=i*Math.cos(e)-s*Math.sin(e),t.y=i*Math.sin(e)+s*Math.cos(e),t}},9876:t=>{t.exports=function(t,e,i,s){var r=Math.cos(s),n=Math.sin(s),a=t.x-e,o=t.y-i;return t.x=a*r-o*n+e,t.y=a*n+o*r+i,t}},8348:t=>{t.exports=function(t,e,i,s,r){var n=s+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),t}},4497:t=>{t.exports=function(t,e,i,s,r){return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},9640:(t,e,i)=>{var s=i(5689),r=i(9652),n=i(372),a=new r,o=new n,h=new s;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},4078:t=>{t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},855:t=>{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var s=Math.pow(i,-e);return Math.round(t*s)/s}},4936:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=1),void 0===i&&(i=1),void 0===s&&(s=1),s*=Math.PI/t;for(var r=[],n=[],a=0;a{t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},278:t=>{t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},163:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r){void 0===r&&(r=new s);var n=0,a=0;return t>0&&t<=e*i&&(n=t>e-1?t-(a=Math.floor(t/e))*e:t),r.set(n,a)}},7556:(t,e,i)=>{var s=i(2529);t.exports=function(t,e,i,r,n,a,o,h){void 0===h&&(h=new s);var l=Math.sin(n),c=Math.cos(n),u=c*a,d=l*a,f=-l*o,p=c*o,g=1/(u*p+f*-d);return h.x=p*g*t+-f*g*e+(r*f-i*p)*g,h.y=u*g*e+-d*g*t+(-r*u+i*d)*g,h}},2529:(t,e,i)=>{var s=i(7473),r=i(12),n=new s({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new n(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this},transformMat3:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this},transformMat4:function(t){var e=this.x,i=this.y,s=t.val;return this.x=s[0]*e+s[4]*i+s[12],this.y=s[1]*e+s[5]*i+s[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},5689:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new s(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,s=t.y,r=t.z,n=e.x,a=e.y,o=e.z;return this.x=s*o-r*a,this.y=r*n-i*o,this.z=i*a-s*n,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return Math.sqrt(e*e+i*i+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0;return e*e+i*i+s*s},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,s=t*t+e*e+i*i;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z;return this.x=i*a-s*n,this.y=s*r-e*a,this.z=e*n-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*s,this.y=r[1]*e+r[4]*i+r[7]*s,this.z=r[2]*e+r[5]*i+r[8]*s,this},applyMatrix4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=1/(r[3]*e+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*s+r[12])*n,this.y=(r[1]*e+r[5]*i+r[9]*s+r[13])*n,this.z=(r[2]*e+r[6]*i+r[10]*s+r[14])*n,this},transformMat3:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+s*r[6],this.y=e*r[1]+i*r[4]+s*r[7],this.z=e*r[2]+i*r[5]+s*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12],this.y=r[1]*e+r[5]*i+r[9]*s+r[13],this.z=r[2]*e+r[6]*i+r[10]*s+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=e*r[0]+i*r[4]+s*r[8]+r[12],a=e*r[1]+i*r[5]+s*r[9]+r[13],o=e*r[2]+i*r[6]+s*r[10]+r[14],h=e*r[3]+i*r[7]+s*r[11]+r[15];return this.x=n/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,c=o*s+r*i-n*e,u=-r*e-n*i-a*s;return this.x=h*o+u*-r+l*-a-c*-n,this.y=l*o+u*-n+c*-r-h*-a,this.z=c*o+u*-a+h*-n-l*-r,this},project:function(t){var e=this.x,i=this.y,s=this.z,r=t.val,n=r[0],a=r[1],o=r[2],h=r[3],l=r[4],c=r[5],u=r[6],d=r[7],f=r[8],p=r[9],g=r[10],m=r[11],x=r[12],v=r[13],y=r[14],w=1/(e*h+i*d+s*m+r[15]);return this.x=(e*n+i*l+s*f+x)*w,this.y=(e*a+i*c+s*p+v)*w,this.z=(e*o+i*u+s*g+y)*w,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,s=t.y,r=t.z,n=t.w,a=this.x-i,o=n-this.y-1-s,h=this.z;return this.x=2*a/r-1,this.y=2*o/n-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});s.ZERO=new s,s.RIGHT=new s(1,0,0),s.LEFT=new s(-1,0,0),s.UP=new s(0,-1,0),s.DOWN=new s(0,1,0),s.FORWARD=new s(0,0,1),s.BACK=new s(0,0,-1),s.ONE=new s(1,1,1),t.exports=s},9279:(t,e,i)=>{var s=new(i(7473))({initialize:function(t,e,i,s){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0)},clone:function(){return new s(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,s){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=s||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return Math.sqrt(t*t+e*e+i*i+s*s)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,s=this.w;return t*t+e*e+i*i+s*s},normalize:function(){var t=this.x,e=this.y,i=this.z,s=this.w,r=t*t+e*e+i*i+s*s;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=s*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,s=this.y,r=this.z,n=this.w;return this.x=i+e*(t.x-i),this.y=s+e*(t.y-s),this.z=r+e*(t.z-r),this.w=n+e*(t.w-n),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+s*s+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,s=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+s*s+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,s=this.z,r=this.w,n=t.val;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12]*r,this.y=n[1]*e+n[5]*i+n[9]*s+n[13]*r,this.z=n[2]*e+n[6]*i+n[10]*s+n[14]*r,this.w=n[3]*e+n[7]*i+n[11]*s+n[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=o*e+n*s-a*i,l=o*i+a*e-r*s,c=o*s+r*i-n*e,u=-r*e-n*i-a*s;return this.x=h*o+u*-r+l*-a-c*-n,this.y=l*o+u*-n+c*-r-h*-a,this.z=c*o+u*-a+h*-n-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});s.prototype.sub=s.prototype.subtract,s.prototype.mul=s.prototype.multiply,s.prototype.div=s.prototype.divide,s.prototype.dist=s.prototype.distance,s.prototype.distSq=s.prototype.distanceSq,s.prototype.len=s.prototype.length,s.prototype.lenSq=s.prototype.lengthSq,t.exports=s},4119:t=>{t.exports=function(t,e,i){return Math.abs(t-e)<=i}},8445:t=>{t.exports=function(t,e,i){var s=i-e;return e+((t-e)%s+s)%s}},6412:t=>{t.exports=function(t,e,i,s){return Math.atan2(s-e,i-t)}},760:t=>{t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},6909:t=>{t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},6947:t=>{t.exports=function(t,e,i,s){return Math.atan2(i-t,s-e)}},3426:(t,e,i)=>{var s=i(7425);t.exports=function(t){return t>Math.PI&&(t-=s.PI2),Math.abs(((t+s.TAU)%s.PI2-s.PI2)%s.PI2)}},6906:t=>{t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},3270:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-Math.PI,Math.PI)}},2748:(t,e,i)=>{var s=i(104);t.exports=function(){return s(-180,180)}},936:(t,e,i)=>{var s=i(6906);t.exports=function(t){return s(t+Math.PI)}},1935:(t,e,i)=>{var s=i(7425);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=s.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e{t.exports=function(t,e){var i=e-t;return 0===i?0:i-360*Math.floor((i- -180)/360)}},3692:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-Math.PI,Math.PI)}},2820:(t,e,i)=>{var s=i(8445);t.exports=function(t){return s(t,-180,180)}},1833:(t,e,i)=>{t.exports={Between:i(6412),BetweenPoints:i(760),BetweenPointsY:i(6909),BetweenY:i(6947),CounterClockwise:i(3426),Normalize:i(6906),Random:i(3270),RandomDegrees:i(2748),Reverse:i(936),RotateTo:i(1935),ShortestBetween:i(5393),Wrap:i(3692),WrapDegrees:i(2820)}},7425:t=>{var e={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=e},1518:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return Math.sqrt(r*r+n*n)}},5372:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)}},4430:t=>{t.exports=function(t,e){var i=t.x-e.x,s=t.y-e.y;return i*i+s*s}},4361:t=>{t.exports=function(t,e,i,s){return Math.max(Math.abs(t-i),Math.abs(e-s))}},7798:t=>{t.exports=function(t,e,i,s,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(s-e,r))}},8290:t=>{t.exports=function(t,e,i,s){return Math.abs(t-i)+Math.abs(e-s)}},3788:t=>{t.exports=function(t,e,i,s){var r=t-i,n=e-s;return r*r+n*n}},6338:(t,e,i)=>{t.exports={Between:i(1518),BetweenPoints:i(5372),BetweenPointsSquared:i(4430),Chebyshev:i(4361),Power:i(7798),Snake:i(8290),Squared:i(3788)}},5751:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},6203:t=>{t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},9103:t=>{t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},4938:(t,e,i)=>{t.exports={In:i(5751),Out:i(9103),InOut:i(6203)}},8677:t=>{t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},4649:t=>{t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},504:t=>{t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},8872:(t,e,i)=>{t.exports={In:i(8677),Out:i(504),InOut:i(4649)}},3170:t=>{t.exports=function(t){return 1-Math.sqrt(1-t*t)}},2627:t=>{t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},1349:t=>{t.exports=function(t){return Math.sqrt(1- --t*t)}},5006:(t,e,i)=>{t.exports={In:i(3170),Out:i(1349),InOut:i(2627)}},6046:t=>{t.exports=function(t){return t*t*t}},9531:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},4836:t=>{t.exports=function(t){return--t*t*t+1}},875:(t,e,i)=>{t.exports={In:i(6046),Out:i(4836),InOut:i(9531)}},7619:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)}},7437:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/i)*.5+1}},8119:t=>{t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var s=i/4;return e<1?e=1:s=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/i)+1}},2884:(t,e,i)=>{t.exports={In:i(7619),Out:i(8119),InOut:i(7437)}},5456:t=>{t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},3461:t=>{t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},2711:t=>{t.exports=function(t){return 1-Math.pow(2,-10*t)}},6287:(t,e,i)=>{t.exports={In:i(5456),Out:i(2711),InOut:i(3461)}},8613:(t,e,i)=>{t.exports={Back:i(4938),Bounce:i(8872),Circular:i(5006),Cubic:i(875),Elastic:i(2884),Expo:i(6287),Linear:i(4233),Quadratic:i(6341),Quartic:i(762),Quintic:i(345),Sine:i(8698),Stepped:i(7051)}},744:t=>{t.exports=function(t){return t}},4233:(t,e,i)=>{t.exports=i(744)},9810:t=>{t.exports=function(t){return t*t}},8163:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},6123:t=>{t.exports=function(t){return t*(2-t)}},6341:(t,e,i)=>{t.exports={In:i(9810),Out:i(6123),InOut:i(8163)}},7337:t=>{t.exports=function(t){return t*t*t*t}},4878:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},9012:t=>{t.exports=function(t){return 1- --t*t*t*t}},762:(t,e,i)=>{t.exports={In:i(7337),Out:i(9012),InOut:i(4878)}},303:t=>{t.exports=function(t){return t*t*t*t*t}},553:t=>{t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},1632:t=>{t.exports=function(t){return--t*t*t*t*t+1}},345:(t,e,i)=>{t.exports={In:i(303),Out:i(1632),InOut:i(553)}},8455:t=>{t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},1844:t=>{t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},990:t=>{t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},8698:(t,e,i)=>{t.exports={In:i(8455),Out:i(990),InOut:i(1844)}},6745:t=>{t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},7051:(t,e,i)=>{t.exports=i(6745)},3158:t=>{t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},12:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},7373:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},2622:t=>{t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t{t.exports={Ceil:i(3158),Equal:i(12),Floor:i(1326),GreaterThan:i(7373),LessThan:i(2622)}},4675:(t,e,i)=>{var s=i(7425),r=i(1030),n={Angle:i(1833),Distance:i(6338),Easing:i(8613),Fuzzy:i(7927),Interpolation:i(2140),Pow2:i(7897),Snap:i(3943),RandomDataGenerator:i(6957),Average:i(3136),Bernstein:i(785),Between:i(7025),CatmullRom:i(48),CeilTo:i(5035),Clamp:i(2915),DegToRad:i(7149),Difference:i(2975),Euler:i(2107),Factorial:i(3916),FloatBetween:i(104),FloorTo:i(4941),FromPercent:i(1555),GetSpeed:i(5005),IsEven:i(3702),IsEvenStrict:i(8820),Linear:i(1743),LinearXY:i(3416),MaxAdd:i(3733),Median:i(44),MinSub:i(5385),Percent:i(8585),RadToDeg:i(4208),RandomXY:i(1705),RandomXYZ:i(6650),RandomXYZW:i(2037),Rotate:i(6283),RotateAround:i(9876),RotateAroundDistance:i(8348),RotateTo:i(4497),RoundAwayFromZero:i(4078),RoundTo:i(855),SinCosTableGenerator:i(4936),SmootherStep:i(278),SmoothStep:i(2733),ToXY:i(163),TransformXY:i(7556),Within:i(4119),Wrap:i(8445),Vector2:i(2529),Vector3:i(5689),Vector4:i(9279),Matrix3:i(2149),Matrix4:i(9652),Quaternion:i(372),RotateVec3:i(9640)};n=r(!1,n,s),t.exports=n},1640:(t,e,i)=>{var s=i(785);t.exports=function(t,e){for(var i=0,r=t.length-1,n=0;n<=r;n++)i+=Math.pow(1-e,r-n)*Math.pow(e,n)*t[n]*s(r,n);return i}},6105:(t,e,i)=>{var s=i(48);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return t[0]===t[i]?(e<0&&(n=Math.floor(r=i*(1+e))),s(r-n,t[(n-1+i)%i],t[n],t[(n+1)%i],t[(n+2)%i])):e<0?t[0]-(s(-r,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(s(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(r-n,t[n?n-1:0],t[n],t[i{t.exports=function(t,e,i,s,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,s)+function(t,e){return t*t*t*e}(t,r)}},6765:(t,e,i)=>{var s=i(1743);t.exports=function(t,e){var i=t.length-1,r=i*e,n=Math.floor(r);return e<0?s(t[0],t[1],r):e>1?s(t[i],t[i-1],i-r):s(t[n],t[n+1>i?i:n+1],r-n)}},6388:t=>{t.exports=function(t,e,i,s){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,s)}},5735:(t,e,i)=>{var s=i(2733);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},8705:(t,e,i)=>{var s=i(278);t.exports=function(t,e,i){return e+(i-e)*s(t,0,1)}},2140:(t,e,i)=>{t.exports={Bezier:i(1640),CatmullRom:i(6105),CubicBezier:i(4002),Linear:i(6765),QuadraticBezier:i(6388),SmoothStep:i(5735),SmootherStep:i(8705)}},5443:t=>{t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<{t.exports=function(t,e){return t>0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},167:t=>{t.exports=function(t){return t>0&&0==(t&t-1)}},7897:(t,e,i)=>{t.exports={GetNext:i(5443),IsSize:i(725),IsValue:i(167)}},6957:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var s=0;s>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),s=t[i];t[i]=t[e],t[e]=s}return t}});t.exports=s},5659:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),s?(i+t)/e:i+t)}},5461:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),s?(i+t)/e:i+t)}},5131:t=>{t.exports=function(t,e,i,s){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),s?(i+t)/e:i+t)}},3943:(t,e,i)=>{t.exports={Ceil:i(5659),Floor:i(5461),To:i(5131)}},8666:(t,e,i)=>{var s=new(i(7473))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=s},8456:t=>{var e={},i={},s={register:function(t,i,s,r){void 0===r&&(r=!1),e[t]={plugin:i,mapping:s,custom:r}},registerCustom:function(t,e,s,r){i[t]={plugin:e,mapping:s,data:r}},hasCore:function(t){return e.hasOwnProperty(t)},hasCustom:function(t){return i.hasOwnProperty(t)},getCore:function(t){return e[t]},getCustom:function(t){return i[t]},getCustomClass:function(t){return i.hasOwnProperty(t)?i[t].plugin:null},remove:function(t){e.hasOwnProperty(t)&&delete e[t]},removeCustom:function(t){i.hasOwnProperty(t)&&delete i[t]},destroyCorePlugins:function(){for(var t in e)e.hasOwnProperty(t)&&delete e[t]},destroyCustomPlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]}};t.exports=s},5722:(t,e,i)=>{var s=i(8666),r=i(7473),n=i(204),a=new r({Extends:s,initialize:function(t,e,i){s.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(n.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},8351:t=>{t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},8196:t=>{t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},3527:t=>{t.exports="resize"},8618:t=>{t.exports="addedtoscene"},4328:t=>{t.exports="boot"},6099:t=>{t.exports="create"},7645:t=>{t.exports="destroy"},2710:t=>{t.exports="pause"},2547:t=>{t.exports="postupdate"},8577:t=>{t.exports="prerender"},8197:t=>{t.exports="preupdate"},8997:t=>{t.exports="ready"},7604:t=>{t.exports="removedfromscene"},8999:t=>{t.exports="render"},9742:t=>{t.exports="resume"},3667:t=>{t.exports="shutdown"},3468:t=>{t.exports="sleep"},7840:t=>{t.exports="start"},9896:t=>{t.exports="transitioncomplete"},5103:t=>{t.exports="transitioninit"},3162:t=>{t.exports="transitionout"},7841:t=>{t.exports="transitionstart"},6454:t=>{t.exports="transitionwake"},6536:t=>{t.exports="update"},3875:t=>{t.exports="wake"},204:(t,e,i)=>{t.exports={ADDED_TO_SCENE:i(8618),BOOT:i(4328),CREATE:i(6099),DESTROY:i(7645),PAUSE:i(2710),POST_UPDATE:i(2547),PRE_RENDER:i(8577),PRE_UPDATE:i(8197),READY:i(8997),REMOVED_FROM_SCENE:i(7604),RENDER:i(8999),RESUME:i(9742),SHUTDOWN:i(3667),SLEEP:i(3468),START:i(7840),TRANSITION_COMPLETE:i(9896),TRANSITION_INIT:i(5103),TRANSITION_OUT:i(3162),TRANSITION_START:i(7841),TRANSITION_WAKE:i(6454),UPDATE:i(6536),WAKE:i(3875)}},2362:(t,e,i)=>{var s=i(7473),r=i(2915),n=i(1030),a=new s({initialize:function(t,e,i,s,r,n,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0},is3Slice:!1,scale9:!1,scale9Borders:{x:0,y:0,w:0,h:0}},this.setSize(n,a,s,r)},setSize:function(t,e,i,s){void 0===i&&(i=0),void 0===s&&(s=0),this.cutX=i,this.cutY=s,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var r=this.data,n=r.cut;n.x=i,n.y=s,n.w=t,n.h=e,n.r=i+t,n.b=s+e,r.sourceSize.w=t,r.sourceSize.h=e,r.spriteSourceSize.w=t,r.spriteSourceSize.h=e,r.radius=.5*Math.sqrt(t*t+e*e);var a=r.drawImage;return a.x=i,a.y=s,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,i,s,r,n){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=s,o.w=r,o.h=n,o.r=i+r,o.b=s+n,this.x=i,this.y=s,this.width=r,this.height=n,this.halfWidth=.5*r,this.halfHeight=.5*n,this.centerX=Math.floor(r/2),this.centerY=Math.floor(n/2),this.updateUVs()},setScale9:function(t,e,i,s){var r=this.data;return r.scale9=!0,r.is3Slice=0===e&&s===this.height,r.scale9Borders.x=t,r.scale9Borders.y=e,r.scale9Borders.w=i,r.scale9Borders.h=s,this},setCropUVs:function(t,e,i,s,n,a,o){var h=this.cutX,l=this.cutY,c=this.cutWidth,u=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=r(e,0,d)),g=l+(i=r(i,0,f)),m=s=r(s,0,d-e),x=n=r(n,0,f-i),v=this.data;if(v.trim){var y=v.spriteSourceSize,w=e+(s=r(s,0,c-e)),b=i+(n=r(n,0,u-i));if(!(y.rw||y.y>b)){var A=Math.max(y.x,e),M=Math.max(y.y,i),E=Math.min(y.r,w)-A,S=Math.min(y.b,b)-M;m=E,x=S,p=a?h+(c-(A-y.x)-E):h+(A-y.x),g=o?l+(u-(M-y.y)-S):l+(M-y.y),e=A,i=M,s=E,n=S}else p=0,g=0,m=0,x=0}else a&&(p=h+(c-e-s)),o&&(g=l+(u-i-n));var T=this.source.width,I=this.source.height;return t.u0=Math.max(0,p/T),t.v0=Math.max(0,g/I),t.u1=Math.min(1,(p+m)/T),t.v1=Math.min(1,(g+x)/I),t.x=e,t.y=i,t.cx=p,t.cy=g,t.cw=m,t.ch=x,t.width=s,t.height=n,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,s,r,n){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=i,this.v0=s,this.u1=r,this.v1=n,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,s=this.cutHeight,r=this.data.drawImage;r.width=i,r.height=s;var n=this.source.width,a=this.source.height;return this.u0=t/n,this.v0=e/a,this.u1=(t+i)/n,this.v1=(e+s)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=n(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.texture=null,this.source=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},scale9:{get:function(){return this.data.scale9}},is3Slice:{get:function(){return this.data.is3Slice}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=a},1864:t=>{t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},3747:t=>{t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},7473:t=>{function e(t,e,i){var s=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&s.value&&"object"==typeof s.value&&(s=s.value),!(!s||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(s))&&(void 0===s.enumerable&&(s.enumerable=!0),void 0===s.configurable&&(s.configurable=!0),s)}function i(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,s,r,a){for(var o in s)if(s.hasOwnProperty(o)){var h=e(s,o,r);if(!1!==h){if(i((a||t).prototype,o)){if(n.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=s[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i{t.exports=function(){}},1792:t=>{t.exports=function(t,e,i,s,r){if(void 0===r&&(r=t),i>0){var n=i-t.length;if(n<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),s&&s.call(r,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>n&&(e.splice(n),a=n);for(var o=0;o{t.exports=function(t,e,i,s,r,n){if(void 0===i&&(i=0),void 0===n&&(n=t),s>0){var a=s-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(n,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;s>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),r&&r.call(n,l)}return e}},2513:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=0;if(s(t,r,n))for(var o=r;o{t.exports=function(t,e,i){var s,r=[null];for(s=3;s{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n)){var a,o=[null];for(a=5;a{t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var s,r,n=1;if(i){if(te.length&&(n=e.length),i?(s=e[n-1][i],(r=e[n][i])-t<=t-s?e[n]:e[n-1]):(s=e[n-1],(r=e[n])-t<=t-s?r:s)}},4493:t=>{var e=function(t,i){void 0===i&&(i=[]);for(var s=0;s{var s=i(2497);t.exports=function(t,e,i,r,n){void 0===r&&(r=0),void 0===n&&(n=t.length);var a=[];if(s(t,r,n))for(var o=r;o{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return void 0===t[s]?null:t[s]}},8683:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s>r||(t.splice(s,1),r===t.length-1?t.push(e):t.splice(r,0,e)),t}},546:t=>{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return s{t.exports=function(t,e){var i=t.indexOf(e);if(i>0){var s=t[i-1],r=t.indexOf(s);t[i]=s,t[r]=e}return t}},1419:t=>{t.exports=function(t,e,i){var s=t.indexOf(e);if(-1===s||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return s!==i&&(t.splice(s,1),t.splice(i,0,e)),e}},6512:t=>{t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&i{t.exports=function(t,e,i,s){var r,n=[],a=!1;if((i||s)&&(a=!0,i||(i=""),s||(s="")),e=e;r--)a?n.push(i+r.toString()+s):n.push(r);else for(r=t;r<=e;r++)a?n.push(i+r.toString()+s):n.push(r);return n}},1316:(t,e,i)=>{var s=i(4078);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var r=[],n=Math.max(s((e-t)/(i||1)),0),a=0;a{function e(t,e,i){var s=t[e];t[e]=t[i],t[i]=s}function i(t,e){return te?1:0}var s=function(t,r,n,a,o){for(void 0===n&&(n=0),void 0===a&&(a=t.length-1),void 0===o&&(o=i);a>n;){if(a-n>600){var h=a-n+1,l=r-n+1,c=Math.log(h),u=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*u*(h-u)/h)*(l-h/2<0?-1:1),f=Math.max(n,Math.floor(r-l*u/h+d)),p=Math.min(a,Math.floor(r+(h-l)*u/h+d));s(t,r,f,p,o)}var g=t[r],m=n,x=a;for(e(t,n,r),o(t[a],g)>0&&e(t,n,a);m0;)x--}0===o(t[n],g)?e(t,n,x):e(t,++x,a),x<=r&&(n=x+1),r<=x&&(a=x-1)}};t.exports=s},9703:(t,e,i)=>{var s=i(5851),r=i(4912),n=function(t,e,i){for(var s=[],r=0;r{var s=i(8935);t.exports=function(t,e,i,r){var n;if(void 0===r&&(r=t),!Array.isArray(e))return-1!==(n=t.indexOf(e))?(s(t,n),i&&i.call(r,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(n=t.indexOf(h))&&(s(t,n),o.push(h),i&&i.call(r,h)),a--}return o}},4725:(t,e,i)=>{var s=i(8935);t.exports=function(t,e,i,r){if(void 0===r&&(r=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var n=s(t,e);return i&&i.call(r,n),n}},8780:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===n&&(n=t),s(t,e,i)){var a=i-e,o=t.splice(e,a);if(r)for(var h=0;h{var s=i(8935);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var r=e+Math.floor(Math.random()*i);return s(t,r)}},6960:t=>{t.exports=function(t,e,i){var s=t.indexOf(e),r=t.indexOf(i);return-1!==s&&-1===r&&(t[s]=i,!0)}},1021:t=>{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,s=0;s{t.exports=function(t,e,i,s){var r=t.length;if(e<0||e>r||e>=i||i>r){if(s)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},5361:t=>{t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},3718:(t,e,i)=>{var s=i(2497);t.exports=function(t,e,i,r,n){if(void 0===r&&(r=0),void 0===n&&(n=t.length),s(t,r,n))for(var a=r;a{t.exports=function(t){for(var e=t.length-1;e>0;e--){var i=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[i],t[i]=s}return t}},2071:t=>{t.exports=function(t){var e=/\D/g;return t.sort((function(t,i){return parseInt(t.replace(e,""),10)-parseInt(i.replace(e,""),10)})),t}},8935:t=>{t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,s=t[e],r=e;r{var s=i(9356);function r(t,e){return String(t).localeCompare(e)}function n(t,e,i,s){var r,n,a,o,h,l=t.length,c=0,u=2*i;for(r=0;rl&&(n=l),a>l&&(a=l),o=r,h=n;;)if(o{t.exports=function(t,e,i){if(e===i)return t;var s=t.indexOf(e),r=t.indexOf(i);if(s<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[s]=i,t[r]=e,t}},1953:(t,e,i)=>{t.exports={Matrix:i(1237),Add:i(1792),AddAt:i(2280),BringToTop:i(2513),CountAllMatching:i(1771),Each:i(7883),EachInRange:i(5856),FindClosestInSorted:i(3957),Flatten:i(4493),GetAll:i(6245),GetFirst:i(1647),GetRandom:i(5301),MoveDown:i(1842),MoveTo:i(1419),MoveUp:i(6512),MoveAbove:i(8683),MoveBelow:i(546),NumberArray:i(4130),NumberArrayStep:i(1316),QuickSelect:i(9465),Range:i(9703),Remove:i(7161),RemoveAt:i(4725),RemoveBetween:i(8780),RemoveRandomElement:i(5744),Replace:i(6960),RotateLeft:i(1021),RotateRight:i(4027),SafeRange:i(2497),SendToBack:i(5361),SetAll:i(3718),Shuffle:i(4912),SortByDigits:i(2071),SpliceOne:i(8935),StableSort:i(9992),Swap:i(2372)}},1816:t=>{t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i{var s=i(7222),r=i(1816);t.exports=function(t){var e="";if(!r(t))return e;for(var i=0;i{t.exports=function(t){return t.reverse()}},6063:t=>{t.exports=function(t){for(var e=0;e{var s=i(7116);t.exports=function(t){return s(t,180)}},2597:(t,e,i)=>{var s=i(7116);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i{var s=i(1816),r=i(4780);t.exports=function(t,e){if(void 0===e&&(e=90),!s(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i{var s=i(7116);t.exports=function(t,e){void 0===e&&(e=1);for(var i=0;i{var s=i(1021),r=i(4027);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):r(t,i)),0!==e)for(var n=0;n{t.exports=function(t){for(var e=t.length,i=t[0].length,s=new Array(i),r=0;r-1;n--)s[r][n]=t[n][r]}return s}},1237:(t,e,i)=>{t.exports={CheckMatrix:i(1816),MatrixToString:i(6655),ReverseColumns:i(582),ReverseRows:i(6063),Rotate180:i(8321),RotateLeft:i(2597),RotateMatrix:i(7116),RotateRight:i(6285),Translate:i(7711),TransposeMatrix:i(4780)}},3911:t=>{var e=function(t){var i,s,r;if("object"!=typeof t||null===t)return t;for(r in i=Array.isArray(t)?[]:{},t)s=t[r],i[r]=e(s);return i};t.exports=e},1030:(t,e,i)=>{var s=i(2482),r=function(){var t,e,i,n,a,o,h=arguments[0]||{},l=1,c=arguments.length,u=!1;for("boolean"==typeof h&&(u=h,h=arguments[1]||{},l=2),c===l&&(h=this,--l);l{var s=i(4675),r=i(5851);t.exports=function(t,e,i){var n=r(t,e,null);if(null===n)return i;if(Array.isArray(n))return s.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return s.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return s.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(e);return n}},4597:t=>{t.exports=function(t,e,i){var s=typeof t;return t&&"number"!==s&&"string"!==s&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},5851:t=>{t.exports=function(t,e,i,s){if(!t&&!s||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(s&&s.hasOwnProperty(e))return s[e];if(-1!==e.indexOf(".")){for(var r=e.split("."),n=t,a=s,o=i,h=i,l=!0,c=!0,u=0;u{t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},7222:t=>{t.exports=function(t,e,i,s){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===s&&(s=3);var r=0;if(e+1>=(t=t.toString()).length)switch(s){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var n=Math.ceil((r=e-t.length)/2);t=new Array(r-n+1).join(i)+t+new Array(n+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}}},e={};var i=function i(s){var r=e[s];if(void 0!==r)return r.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,i),n.exports}(4513);window.SpinePlugin=i})(); \ No newline at end of file