{"version":3,"sources":["jsdelivr-header.js","/npm/html-webpack-element-plugin@1.0.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,kBAAoB,QAAQ,uBAE5B,eAAiB,MACjB,aAAe,MACf,cAAgB,0EAEtB,MAAM,yBACJ,WAAA,CAAY,GACV,IAAI,EAAgB,EACpB,GAAuB,iBAAZ,EAAsB,CAC/B,IAAI,EACmB,iBAAZ,EACT,EAAQ,OACoB,IAAZ,IAChB,KAAK,cAAgB,eAEvB,EAAgB,CACd,QAfe,MAgBf,MAAO,GAfM,MAiBjB,CAEA,KAAK,QAAU,EAAc,SApBV,MAqBnB,KAAK,MAAQ,EAAc,OApBV,KAqBnB,CAEA,KAAA,CAAM,GACJ,EAAS,MAAM,YAAY,IAAI,+BAAgC,IAC7D,kBAAkB,SAAS,GAAa,WAAW,SACjD,+BACA,CAAC,EAAM,KACL,MAAM,KAAE,GAAS,EACX,EAAQ,EAAK,QAAQ,UAAY,GAChC,EAAO,GAAQ,CAAC,EAAK,MAAM,EAAG,GAAQ,EAAK,MAAM,EAAO,EAAK,SAKpE,EAAG,KAJa,CACd,KAAM,GAAG,KAAS,KAAK,eAAe,KAAK,YAAY,KAAK,WAAW,KAGxD,GAEpB,GAEL,EAGF,OAAO,QAAU","file":"/npm/html-webpack-element-plugin@1.0.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/html-webpack-element-plugin@1.0.2/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 HtmlWebpackPlugin = require('html-webpack-plugin');\n\nconst defaultTagName = 'div';\nconst defaultTagId = 'app';\nconst configWarning = 'HtmlWebpackElementPlugin: Invalid configuration. Using default options.';\n\nclass HtmlWebpackElementPlugin {\n  constructor(options) {\n    let pluginOptions = options;\n    if (typeof options !== 'object') {\n      let tagId;\n      if (typeof options === 'string') {\n        tagId = options;\n      } else if (typeof options !== 'undefined') {\n        this.configWarning = configWarning;\n      }\n      pluginOptions = {\n        tagName: defaultTagName,\n        tagId: tagId || defaultTagId,\n      };\n    }\n\n    this.tagName = pluginOptions.tagName || defaultTagName;\n    this.tagId = pluginOptions.tagId || defaultTagId;\n  }\n\n  apply(compiler) {\n    compiler.hooks.compilation.tap('html-webpack-element-plugin', (compilation) => {\n      HtmlWebpackPlugin.getHooks(compilation).beforeEmit.tapAsync(\n        'html-webpack-element-plugin',\n        (data, cb) => {\n          const { html } = data;\n          const index = html.indexOf('<body>') + '<body>'.length;\n          const [first, last] = [html.slice(0, index), html.slice(index, html.length)];\n          const newData = {\n            html: `${first}<${this.tagName} id=\"${this.tagId}\"></${this.tagName}>${last}`,\n          };\n\n          cb(null, newData);\n        },\n      );\n    });\n  }\n}\n\nmodule.exports = HtmlWebpackElementPlugin;\n"]}