/*! * @pixi/spritesheet - v6.5.10 * Compiled Thu, 06 Jul 2023 15:25:11 UTC * * @pixi/spritesheet is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ import{Rectangle as t}from"@pixi/math";import{Texture as e,BaseTexture as r,ExtensionType as s}from"@pixi/core";import{getResolutionOfUrl as i,url as o}from"@pixi/utils";import{LoaderResource as a}from"@pixi/loaders";var n=function(){function s(t,s,i){void 0===i&&(i=null),this.linkedSheets=[],this._texture=t instanceof e?t:null,this.baseTexture=t instanceof r?t:this._texture.baseTexture,this.textures={},this.animations={},this.data=s;var o=this.baseTexture.resource;this.resolution=this._updateResolution(i||(o?o.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return s.prototype._updateResolution=function(t){void 0===t&&(t=null);var e=this.data.meta.scale,r=i(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&this.baseTexture.setResolution(r),r},s.prototype.parse=function(t){var e=this;return new Promise((function(r){e._callback=function(e){null==t||t(e),r(e)},e._batchIndex=0,e._frameKeys.length<=s.BATCH_SIZE?(e._processFrames(0),e._processAnimations(),e._parseComplete()):e._nextBatch()}))},s.prototype._processFrames=function(r){for(var i=r,o=s.BATCH_SIZE;i-r