shadow$provide.module$node_modules$pixi_DOT_js$lib$compressed_textures$shared$detectCompressed = function(global, require, module, exports) {
  function extractExtensionsForCompressedTextureFormats(formats) {
    const extensions = ["basis"], dupeMap = {};
    formats.forEach(format => {
      (format = format.split("-")[0]) && !dupeMap[format] && (dupeMap[format] = !0, extensions.push(format));
    });
    extensions.sort((a, b) => {
      a = resolveCompressedTextureUrl.validFormats.indexOf(a);
      b = resolveCompressedTextureUrl.validFormats.indexOf(b);
      return -1 === a ? 1 : -1 === b ? -1 : a - b;
    });
    return extensions;
  }
  global = require("module$node_modules$pixi_DOT_js$lib$extensions$Extensions");
  var getSupportedCompressedTextureFormats = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$shared$texture$utils$getSupportedCompressedTextureFormats"), isWebGLSupported = require("module$node_modules$pixi_DOT_js$lib$utils$browser$isWebGLSupported"), isWebGPUSupported = require("module$node_modules$pixi_DOT_js$lib$utils$browser$isWebGPUSupported"), resolveCompressedTextureUrl = require("module$node_modules$pixi_DOT_js$lib$compressed_textures$shared$resolveCompressedTextureUrl");
  "use strict";
  let compressedTextureExtensions;
  exports.detectCompressed = {extension:{type:global.ExtensionType.DetectionParser, priority:2}, test:async() => await isWebGPUSupported.isWebGPUSupported() || isWebGLSupported.isWebGLSupported() ? !0 : !1, add:async formats => {
    const supportedCompressedTextureFormats = await getSupportedCompressedTextureFormats.getSupportedCompressedTextureFormats();
    compressedTextureExtensions = extractExtensionsForCompressedTextureFormats(supportedCompressedTextureFormats);
    return [...compressedTextureExtensions, ...formats];
  }, remove:async formats => compressedTextureExtensions ? formats.filter(f => !(f in compressedTextureExtensions)) : formats};
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$compressed_textures$shared$detectCompressed.js.map
