{"version":3,"sources":["jsdelivr-header.js","/npm/react-i-cli@1.0.0/lib/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;ACJA,IAAI,GAAK,QAAQ,MACb,QAAU,QAAQ,WAClB,KAAO,QAAQ,QACf,KAAO,QAAQ,QACf,KAAO,IAAI,KAEX,eAAiB,CAAC,SAAS,GAC3B,MAAQ,QAAQ,KAAK,MAAM,GAI/B,SAAS,KAAK,EAAM,GAClB,IAAI,EAAU,GAAG,aAAa,EAAM,QACpC,KAAK,SAAS,GAAS,SAAS,GAC9B,EAAG,QAAQ,KAAK,EAAO,KAAM,gBAC/B,GACF,CAEA,SAAS,QAAQ,EAAG,GAClB,IAAI,EAAO,EAAE,OACb,EAAK,KAAK,eAAe,SACzB,EAAK,KAAK,QAAQ,WAAW,QAC7B,EAAK,KAAK,QAAQ,WAAW,aAC7B,IACI,EAAS,gBAAkB,EAAO,eADtB,EAAE,IAAI,EAAK,YACwC,OACnE,QAAQ,IAAI,EACd,CAEA,SAAS,cAAc,GAErB,OADe,KAAK,SAAS,GAAM,MAAM,KAAK,GAC9B,cAAc,QAAQ,aAAa,SAAS,GAC1D,OAAO,EAAE,cAAc,QAAQ,IAAI,GACrC,GACF,EAxBC,MAAM,QAAU,QAAQ,IAAI,mCA0B7B,MAAM,SAAQ,SAAS,GACrB,IAAI,EAAO,cAAc,GACzB,KAAK,GAAM,SAAU,GACnB,QAAQ,EAAG,EACb,GACF","file":"/npm/react-i-cli@1.0.0/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-i-cli@1.0.0/lib/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","#!/usr/bin/env node\n\nvar fs = require('fs')\nvar cheerio = require('cheerio')\nvar path = require('path')\nvar SVGO = require('svgo')\nvar svgo = new SVGO()\n\nvar cheerioOptions = {xmlMode: true}\nvar files = process.argv.slice(2)\n\n!files.length && console.log('Need to specify a file to clean')\n\nfunction read(file, cb) {\n  var content = fs.readFileSync(file, 'utf8')\n  svgo.optimize(content, function(result) {\n    cb(cheerio.load(result.data, cheerioOptions))\n  })\n}\n\nfunction convert($, name) {\n  var node = $('svg')\n  node.find('[fill=none]').remove()\n  node.find('path').removeAttr('fill')\n  node.find('path').removeAttr('fill-rule')\n  var innerHTML = $.xml(node.children())\n  var output = 'export const ' + name + ' = () => <g>' + innerHTML + '</g>'\n  console.log(output)\n}\n\nfunction path2IconName(file) {\n  var filename = path.basename(file).split('.')[0]\n  return filename.toLowerCase().replace(/(\\b|-)\\w/g, function(m) {\n    return m.toUpperCase().replace(/-/,'')\n  })\n}\n\nfiles.forEach(function(file) {\n  var name = path2IconName(file)\n  read(file, function ($) {\n    convert($, name)\n  })\n})\n"]}