shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$svg$parseSVGStyle = function(global, require, module, exports) {
  function parseAttribute(session, result, id, value) {
    switch(id) {
      case "stroke":
        "none" !== value && (value.startsWith("url(") ? (id = extractSvgUrlId.extractSvgUrlId(value), result.strokeStyle.fill = session.defs[id]) : result.strokeStyle.color = Color.Color.shared.setValue(value).toNumber(), result.useStroke = !0);
        break;
      case "stroke-width":
        result.strokeStyle.width = Number(value);
        break;
      case "fill":
        "none" !== value && (value.startsWith("url(") ? (id = extractSvgUrlId.extractSvgUrlId(value), result.fillStyle.fill = session.defs[id]) : result.fillStyle.color = Color.Color.shared.setValue(value).toNumber(), result.useFill = !0);
        break;
      case "fill-opacity":
        result.fillStyle.alpha = Number(value);
        break;
      case "stroke-opacity":
        result.strokeStyle.alpha = Number(value);
        break;
      case "opacity":
        result.fillStyle.alpha = Number(value), result.strokeStyle.alpha = Number(value);
    }
  }
  var Color = require("module$node_modules$pixi_DOT_js$lib$color$Color"), extractSvgUrlId = require("module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$svg$utils$extractSvgUrlId");
  "use strict";
  const styleAttributes = {fill:{type:"paint", default:0}, "fill-opacity":{type:"number", default:1}, stroke:{type:"paint", default:0}, "stroke-width":{type:"number", default:1}, "stroke-opacity":{type:"number", default:1}, "stroke-linecap":{type:"string", default:"butt"}, "stroke-linejoin":{type:"string", default:"miter"}, "stroke-miterlimit":{type:"number", default:10}, "stroke-dasharray":{type:"string", default:"none"}, "stroke-dashoffset":{type:"number", default:0}, opacity:{type:"number", default:1}};
  exports.parseSVGStyle = function(svg, session) {
    var style = svg.getAttribute("style");
    const strokeStyle = {}, fillStyle = {}, result = {strokeStyle, fillStyle, useFill:!1, useStroke:!1};
    for (var key$jscomp$0 in styleAttributes) {
      const attribute = svg.getAttribute(key$jscomp$0);
      attribute && parseAttribute(session, result, key$jscomp$0, attribute.trim());
    }
    if (style) {
      for (svg = style.split(";"), style = 0; style < svg.length; style++) {
        key$jscomp$0 = svg[style].trim();
        const [key, value] = key$jscomp$0.split(":");
        styleAttributes[key] && parseAttribute(session, result, key, value.trim());
      }
    }
    return {strokeStyle:result.useStroke ? strokeStyle : null, fillStyle:result.useFill ? fillStyle : null, useFill:result.useFill, useStroke:result.useStroke};
  };
  exports.styleAttributes = styleAttributes;
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$svg$parseSVGStyle.js.map
