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ent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/gulp-dart-scss@1.1.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const PluginError = require(\"plugin-error\");\nconst Transform = require(\"stream\").Transform;\nconst path = require(\"path\");\nconst applySourceMap = require(\"vinyl-sourcemaps-apply\");\nconst dartSass = require(\"sass\");\n\nconst PLUGIN_NAME = \"gulp-dart-scss\";\n\nmodule.exports = (options = {}) => {\n  return new Transform({\n    objectMode: true,\n    transform(chunk, encoding, callback) {\n      // Return chunk if not scss extension\n      if (path.extname(chunk.path) !== \".scss\") {\n        return callback(null, chunk);\n      }\n\n      // Ignore if empty or null\n      if (chunk._contents.length === 0 || chunk.isNull()) {\n        return callback(null);\n      }\n\n      // Ignore _name.scss files\n      if (path.basename(chunk.path).indexOf(\"_\") === 0) {\n        return callback(null);\n      }\n\n      if (chunk.isBuffer()) {\n        options.sourceMap = chunk.sourceMap ? chunk.path : false;\n        options.file = chunk.path || options.file;\n\n        // Rename extension\n        chunk.path = path.join(\n          path.dirname(chunk.path),\n          path.basename(chunk.path, path.extname(chunk.path)) + \".css\"\n        );\n\n        try {\n          const renderResult = dartSass.renderSync(options);\n          chunk._contents = Buffer.from(renderResult.css);\n\n          if (renderResult.map && chunk.sourceMap) {\n            const map = JSON.parse(renderResult.map);\n            map.file = chunk.relative;\n            map.sources = map.sources.map((source) =>\n              path.relative(chunk.base, source)\n            );\n            applySourceMap(chunk, map);\n          }\n\n          return callback(null, chunk);\n        } catch (error) {\n          return callback(\n            new PluginError(PLUGIN_NAME, error.message, {\n              fileName: chunk.relative,\n            })\n          );\n        }\n      } else if (chunk.isStream()) {\n        return callback(\n          new PluginError(PLUGIN_NAME, \"Streaming is not supported.\")\n        );\n      }\n    },\n  });\n};\n"]}