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K,IAC1D,GAUC,CACD,IAAK,sBACL,MAAO,SAA6B,EAAU,GAY5C,MAXiB,SAAb,IACF,EAAW,KAAK,QAAQ,EAAS,iBAC5B,GAAG,WAAW,KACjB,EAAW,KAAK,KAAK,UAAW,wBAIL,IAA3B,EAAS,QAAQ,OACnB,EAAW,QAAQ,QAAQ,mBAAqB,IAAM,KAAK,QAAQ,EAAS,IAGvE,EAAS,QAAQ,+CAA+C,SAAU,EAAO,EAAQ,EAAU,GACxG,OAAO,EAAS,KAAK,QAAQ,GAAY,CAC3C,GACF,GAOC,CACD,IAAK,gBACL,MAAO,SAAuB,GAC5B,IAAI,EAAQ,EAAE,KAAK,OAAO,KAAK,GAAQ,QAAO,SAAU,GACtD,MAAqB,WAAd,GAA0B,EAAO,EAC1C,IAAG,QAAO,SAAU,EAAO,GACzB,OAAO,EAAM,OAAO,EAAO,GAC7B,GAAG,KAEH,OADA,EAAM,OACC,CACT,KAGK,CACT,CAl2BwB,GAo2BxB,SAAS,4BAA4B,EAAa,EAAQ,EAAW,GACnE,MAAO,CACL,YAAa,EACb,cAAe,EAAY,QAC3B,kBAAmB,CACjB,KAAM,EACN,MAAO,EACP,QAAS,GAGf,CAMA,kBAAkB,QAAU,EAO5B,kBAAkB,SAAW,0BAC7B,kBAAkB,oBAAsB,oBAExC,OAAO,QAAU","file":"/npm/za-extend-html-webpack-plugin@1.0.3/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/za-extend-html-webpack-plugin@1.0.3/dist/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","\"use strict\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// @ts-check\n// Import types\n\n// use Polyfill for util.promisify in node versions < v8\nvar promisify = require(\"./util.promisify\");\n\nvar vm = require(\"vm\");\nvar fs = require(\"fs\");\nvar _ = require(\"lodash\");\nvar path = require(\"path\");\nvar loaderUtils = require(\"loader-utils\");\n\nvar _require = require(\"./lib/html-tags\"),\n    createHtmlTagObject = _require.createHtmlTagObject,\n    htmlTagObjectToString = _require.htmlTagObjectToString;\n\nvar childCompiler = require(\"./lib/compiler.js\");\nvar prettyError = require(\"./lib/errors.js\");\nvar chunkSorter = require(\"./lib/chunksorter.js\");\nvar getHtmlWebpackPluginHooks = require(\"./lib/hooks.js\").getHtmlWebpackPluginHooks;\n\nvar fsStatAsync = promisify(fs.stat);\nvar fsReadFileAsync = promisify(fs.readFile);\n\nvar HtmlWebpackPlugin = function () {\n  function HtmlWebpackPlugin(options) {\n    _classCallCheck(this, HtmlWebpackPlugin);\n\n    var userOptions = options || {};\n\n    var defaultOptions = {\n      template: \"auto\",\n      templateContent: false,\n      templateParameters: templateParametersGenerator,\n      filename: \"index.html\",\n      hash: false,\n      inject: true,\n      compile: true,\n      favicon: false,\n      publicPath: false,\n      minify: \"auto\",\n      cache: true,\n      showErrors: true,\n      chunks: \"all\",\n      excludeChunks: [],\n      chunksSortMode: \"auto\",\n      meta: {},\n      base: false,\n      title: \"Webpack App\",\n      xhtml: false\n    };\n\n    this.options = Object.assign(defaultOptions, userOptions);\n\n    // Default metaOptions if no template is provided\n    if (!userOptions.template && this.options.templateContent === false && this.options.meta) {\n      var defaultMeta = {\n        // From https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag\n        viewport: \"width=device-width, initial-scale=1\"\n      };\n      this.options.meta = Object.assign({}, this.options.meta, defaultMeta, userOptions.meta);\n    }\n\n    // Instance variables to keep caching information\n    // for multiple builds\n    this.childCompilerHash = undefined;\n    /**\n     * @type {string | undefined}\n     */\n    this.childCompilationOutputName = undefined;\n    this.assetJson = undefined;\n    this.hash = undefined;\n    this.version = HtmlWebpackPlugin.version;\n  }\n\n  _createClass(HtmlWebpackPlugin, [{\n    key: \"apply\",\n    value: function apply(compiler) {\n      var _this = this;\n\n      var self = this;\n      var isCompilationCached = false;\n      /** @type Promise<string> */\n      var compilationPromise = void 0;\n\n      this.options.template = this.getFullTemplatePath(this.options.template, compiler.context);\n\n      // convert absolute filename into relative so that webpack can\n      // generate it at correct location\n      var filename = this.options.filename;\n      if (path.resolve(filename) === path.normalize(filename)) {\n        this.options.filename = path.relative(compiler.options.output.path, filename);\n      }\n\n      // `contenthash` is introduced in webpack v4.3\n      // which conflicts with the plugin's existing `contenthash` method,\n      // hence it is renamed to `templatehash` to avoid conflicts\n      this.options.filename = this.options.filename.replace(/\\[(?:(\\w+):)?contenthash(?::([a-z]+\\d*))?(?::(\\d+))?\\]/gi, function (match) {\n        return match.replace(\"contenthash\", \"templatehash\");\n      });\n\n      // Check if webpack is running in production mode\n      // @see https://github.com/webpack/webpack/blob/3366421f1784c449f415cda5930a8e445086f688/lib/WebpackOptionsDefaulter.js#L12-L14\n      var isProductionLikeMode = compiler.options.mode === \"production\" || !compiler.options.mode;\n\n      var minify = this.options.minify;\n      if (minify === true || minify === \"auto\" && isProductionLikeMode) {\n        /** @type { import('html-minifier').Options } */\n        this.options.minify = {\n          // https://github.com/kangax/html-minifier#options-quick-reference\n          collapseWhitespace: true,\n          removeComments: true,\n          removeRedundantAttributes: true,\n          removeScriptTypeAttributes: true,\n          removeStyleLinkTypeAttributes: true,\n          useShortDoctype: true\n        };\n      }\n\n      // Clear the cache once a new HtmlWebpackPlugin is added\n      childCompiler.clearCache(compiler);\n\n      // Register all HtmlWebpackPlugins instances at the child compiler\n      compiler.hooks.thisCompilation.tap(\"HtmlWebpackPlugin\", function (compilation) {\n        // Clear the cache if the child compiler is outdated\n        if (childCompiler.hasOutDatedTemplateCache(compilation)) {\n          childCompiler.clearCache(compiler);\n        }\n        // Add this instances template to the child compiler\n        childCompiler.addTemplateToCompiler(compiler, _this.options.template);\n        // Add file dependencies of child compiler to parent compiler\n        // to keep them watched even if we get the result from the cache\n        compilation.hooks.additionalChunkAssets.tap(\"HtmlWebpackPlugin\", function () {\n          var childCompilerDependencies = childCompiler.getFileDependencies(compiler);\n          childCompilerDependencies.forEach(function (fileDependency) {\n            compilation.compilationDependencies.add(fileDependency);\n          });\n        });\n      });\n\n      compiler.hooks.make.tapAsync(\"HtmlWebpackPlugin\", function (compilation, callback) {\n        // Compile the template (queued)\n        compilationPromise = childCompiler.compileTemplate(self.options.template, self.options.filename, compilation).catch(function (err) {\n          compilation.errors.push(prettyError(err, compiler.context).toString());\n          return {\n            content: self.options.showErrors ? prettyError(err, compiler.context).toJsonHtml() : \"ERROR\",\n            outputName: self.options.filename,\n            hash: \"\"\n          };\n        }).then(function (compilationResult) {\n          // If the compilation change didnt change the cache is valid\n          isCompilationCached = Boolean(compilationResult.hash) && self.childCompilerHash === compilationResult.hash;\n          self.childCompilerHash = compilationResult.hash;\n          self.childCompilationOutputName = compilationResult.outputName;\n          callback();\n          return compilationResult.content;\n        });\n      });\n\n      compiler.hooks.emit.tapAsync(\"HtmlWebpackPlugin\", function (compilation, callback) {\n        // Get all entry point names for this html file\n        var entryNames = Array.from(compilation.entrypoints.keys());\n        var filteredEntryNames = self.filterChunks(entryNames, self.options.chunks, self.options.excludeChunks);\n        var sortedEntryNames = self.sortEntryChunks(filteredEntryNames, _this.options.chunksSortMode, compilation);\n        var childCompilationOutputName = self.childCompilationOutputName;\n\n        if (childCompilationOutputName === undefined) {\n          throw new Error(\"Did not receive child compilation result\");\n        }\n\n        // Turn the entry point names into file paths\n        var assets = self.htmlWebpackPluginAssets(compilation, childCompilationOutputName, sortedEntryNames);\n\n        // If this is a hot update compilation, move on!\n        // This solves a problem where an `index.html` file is generated for hot-update js files\n        // It only happens in Webpack 2, where hot updates are emitted separately before the full bundle\n        if (self.isHotUpdateCompilation(assets)) {\n          return callback();\n        }\n\n        // If the template and the assets did not change we don't have to emit the html\n        var assetJson = JSON.stringify(self.getAssetFiles(assets));\n        if (isCompilationCached && self.options.cache && assetJson === self.assetJson) {\n          return callback();\n        } else {\n          self.assetJson = assetJson;\n        }\n\n        // The html-webpack plugin uses a object representation for the html-tags which will be injected\n        // to allow altering them more easily\n        // Just before they are converted a third-party-plugin author might change the order and content\n        var assetsPromise = _this.getFaviconPublicPath(_this.options.favicon, compilation, assets.publicPath).then(function (faviconPath) {\n          assets.favicon = faviconPath;\n          return getHtmlWebpackPluginHooks(compilation).beforeAssetTagGeneration.promise({\n            assets: assets,\n            outputName: childCompilationOutputName,\n            plugin: self\n          });\n        });\n\n        // Turn the js and css paths into grouped HtmlTagObjects\n        var assetTagGroupsPromise = assetsPromise\n        // And allow third-party-plugin authors to reorder and change the assetTags before they are grouped\n        .then(function (_ref) {\n          var assets = _ref.assets;\n          return getHtmlWebpackPluginHooks(compilation).alterAssetTags.promise({\n            assetTags: {\n              scripts: self.generatedScriptTags(assets.js),\n              styles: self.generateStyleTags(assets.css),\n              meta: [].concat(_toConsumableArray(self.generateBaseTag(self.options.base)), _toConsumableArray(self.generatedMetaTags(self.options.meta)), _toConsumableArray(self.generateFaviconTags(assets.favicon)))\n            },\n            outputName: childCompilationOutputName,\n            plugin: self\n          });\n        }).then(function (_ref2) {\n          var assetTags = _ref2.assetTags;\n\n          // Inject scripts to body unless it set explictly to head\n          var scriptTarget = self.options.inject === \"head\" ? \"head\" : \"body\";\n          // Group assets to `head` and `body` tag arrays\n          var assetGroups = _this.generateAssetGroups(assetTags, scriptTarget);\n          // Allow third-party-plugin authors to reorder and change the assetTags once they are grouped\n          return getHtmlWebpackPluginHooks(compilation).alterAssetTagGroups.promise({\n            headTags: assetGroups.headTags,\n            bodyTags: assetGroups.bodyTags,\n            outputName: childCompilationOutputName,\n            plugin: self\n          });\n        });\n\n        // Turn the compiled tempalte into a nodejs function or into a nodejs string\n        var templateEvaluationPromise = compilationPromise.then(function (compiledTemplate) {\n          // Allow to use a custom function / string instead\n          if (self.options.templateContent !== false) {\n            return self.options.templateContent;\n          }\n          // Once everything is compiled evaluate the html factory\n          // and replace it with its content\n          return self.evaluateCompilationResult(compilation, compiledTemplate);\n        });\n\n        var templateExectutionPromise = Promise.all([assetsPromise, assetTagGroupsPromise, templateEvaluationPromise])\n        // Execute the template\n        .then(function (_ref3) {\n          var _ref4 = _slicedToArray(_ref3, 3),\n              assetsHookResult = _ref4[0],\n              assetTags = _ref4[1],\n              compilationResult = _ref4[2];\n\n          return typeof compilationResult !== \"function\" ? compilationResult : self.executeTemplate(compilationResult, assetsHookResult.assets, {\n            headTags: assetTags.headTags,\n            bodyTags: assetTags.bodyTags\n          }, compilation);\n        });\n\n        var injectedHtmlPromise = Promise.all([assetTagGroupsPromise, templateExectutionPromise])\n        // Allow plugins to change the html before assets are injected\n        .then(function (_ref5) {\n          var _ref6 = _slicedToArray(_ref5, 2),\n              assetTags = _ref6[0],\n              html = _ref6[1];\n\n          var pluginArgs = {\n            html: html,\n            headTags: assetTags.headTags,\n            bodyTags: assetTags.bodyTags,\n            plugin: self,\n            outputName: childCompilationOutputName\n          };\n          return getHtmlWebpackPluginHooks(compilation).afterTemplateExecution.promise(pluginArgs);\n        }).then(function (_ref7) {\n          var html = _ref7.html,\n              headTags = _ref7.headTags,\n              bodyTags = _ref7.bodyTags;\n\n          return self.postProcessHtml(html, assets, { headTags: headTags, bodyTags: bodyTags });\n        });\n\n        var emitHtmlPromise = injectedHtmlPromise\n        // Allow plugins to change the html after assets are injected\n        .then(function (html) {\n          var pluginArgs = {\n            html: html,\n            plugin: self,\n            outputName: childCompilationOutputName\n          };\n          return getHtmlWebpackPluginHooks(compilation).beforeEmit.promise(pluginArgs).then(function (result) {\n            return result.html;\n          });\n        }).catch(function (err) {\n          // In case anything went wrong the promise is resolved\n          // with the error message and an error is logged\n          compilation.errors.push(prettyError(err, compiler.context).toString());\n          // Prevent caching\n          self.hash = null;\n          return self.options.showErrors ? prettyError(err, compiler.context).toHtml() : \"ERROR\";\n        }).then(function (html) {\n          // Allow to use [templatehash] as placeholder for the html-webpack-plugin name\n          // See also https://survivejs.com/webpack/optimizing/adding-hashes-to-filenames/\n          // From https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/8de6558e33487e7606e7cd7cb2adc2cccafef272/src/index.js#L212-L214\n          var finalOutputName = childCompilationOutputName.replace(/\\[(?:(\\w+):)?templatehash(?::([a-z]+\\d*))?(?::(\\d+))?\\]/gi, function (_, hashType, digestType, maxLength) {\n            return loaderUtils.getHashDigest(Buffer.from(html, \"utf8\"), hashType, digestType, parseInt(maxLength, 10));\n          });\n          // Add the evaluated html code to the webpack assets\n          compilation.assets[finalOutputName] = {\n            source: function source() {\n              return html;\n            },\n            size: function size() {\n              return html.length;\n            }\n          };\n          return finalOutputName;\n        }).then(function (finalOutputName) {\n          return getHtmlWebpackPluginHooks(compilation).afterEmit.promise({\n            outputName: finalOutputName,\n            plugin: self\n          }).catch(function (err) {\n            console.error(err);\n            return null;\n          }).then(function () {\n            return null;\n          });\n        });\n\n        // Once all files are added to the webpack compilation\n        // let the webpack compiler continue\n        emitHtmlPromise.then(function () {\n          callback();\n        });\n      });\n    }\n  }, {\n    key: \"evaluateCompilationResult\",\n    value: function evaluateCompilationResult(compilation, source) {\n      if (!source) {\n        return Promise.reject(new Error(\"The child compilation didn't provide a result\"));\n      }\n      // The LibraryTemplatePlugin stores the template result in a local variable.\n      // To extract the result during the evaluation this part has to be removed.\n      source = source.replace(\"var HTML_WEBPACK_PLUGIN_RESULT =\", \"\");\n      var template = this.options.template.replace(/^.+!/, \"\").replace(/\\?.+$/, \"\");\n      var vmContext = vm.createContext(_.extend({ HTML_WEBPACK_PLUGIN: true, require: require }, global));\n      var vmScript = new vm.Script(source, { filename: template });\n      // Evaluate code and cast to string\n      var newSource = void 0;\n      try {\n        newSource = vmScript.runInContext(vmContext);\n      } catch (e) {\n        return Promise.reject(e);\n      }\n      if ((typeof newSource === \"undefined\" ? \"undefined\" : _typeof(newSource)) === \"object\" && newSource.__esModule && newSource.default) {\n        newSource = newSource.default;\n      }\n      return typeof newSource === \"string\" || typeof newSource === \"function\" ? Promise.resolve(newSource) : Promise.reject(new Error('The loader \"' + this.options.template + \"\\\" didn't return html.\"));\n    }\n  }, {\n    key: \"getTemplateParameters\",\n    value: function getTemplateParameters(compilation, assets, assetTags) {\n      var _this2 = this;\n\n      var templateParameters = this.options.templateParameters;\n      if (templateParameters === false) {\n        return Promise.resolve({});\n      }\n      if (typeof templateParameters === \"function\") {\n        var preparedAssetTags = {\n          headTags: this.prepareAssetTagGroupForRendering(assetTags.headTags),\n          bodyTags: this.prepareAssetTagGroupForRendering(assetTags.bodyTags)\n        };\n        return Promise.resolve().then(function () {\n          return templateParameters(compilation, assets, preparedAssetTags, _this2.options);\n        });\n      }\n      if ((typeof templateParameters === \"undefined\" ? \"undefined\" : _typeof(templateParameters)) === \"object\") {\n        return Promise.resolve(templateParameters);\n      }\n      throw new Error(\"templateParameters has to be either a function or an object\");\n    }\n  }, {\n    key: \"executeTemplate\",\n    value: function executeTemplate(templateFunction, assets, assetTags, compilation) {\n      // Template processing\n      var templateParamsPromise = this.getTemplateParameters(compilation, assets, assetTags);\n      return templateParamsPromise.then(function (templateParams) {\n        try {\n          // If html is a promise return the promise\n          // If html is a string turn it into a promise\n          return templateFunction(templateParams);\n        } catch (e) {\n          compilation.errors.push(new Error(\"Template execution failed: \" + e));\n          return Promise.reject(e);\n        }\n      });\n    }\n  }, {\n    key: \"postProcessHtml\",\n    value: function postProcessHtml(html, assets, assetTags) {\n      if (typeof html !== \"string\") {\n        return Promise.reject(new Error(\"Expected html to be a string but got \" + JSON.stringify(html)));\n      }\n      var htmlAfterInjection = this.options.inject ? this.injectAssetsIntoHtml(html, assets, assetTags) : html;\n      var htmlAfterMinification = _typeof(this.options.minify) === \"object\" ? require(\"html-minifier-terser\").minify(htmlAfterInjection, this.options.minify) : htmlAfterInjection;\n      return Promise.resolve(htmlAfterMinification);\n    }\n\n    /*\n     * Pushes the content of the given filename to the compilation assets\n     * @param {string} filename\n     * @param {WebpackCompilation} compilation\n     *\n     * @returns {string} file basename\n     */\n\n  }, {\n    key: \"addFileToAssets\",\n    value: function addFileToAssets(filename, compilation) {\n      filename = path.resolve(compilation.compiler.context, filename);\n      return Promise.all([fsStatAsync(filename), fsReadFileAsync(filename)]).then(function (_ref8) {\n        var _ref9 = _slicedToArray(_ref8, 2),\n            size = _ref9[0],\n            source = _ref9[1];\n\n        return {\n          size: size,\n          source: source\n        };\n      }).catch(function () {\n        return Promise.reject(new Error(\"HtmlWebpackPlugin: could not load file \" + filename));\n      }).then(function (results) {\n        var basename = path.basename(filename);\n        compilation.fileDependencies.add(filename);\n        compilation.assets[basename] = {\n          source: function source() {\n            return results.source;\n          },\n          size: function size() {\n            return results.size.size;\n          }\n        };\n        return basename;\n      });\n    }\n  }, {\n    key: \"sortEntryChunks\",\n    value: function sortEntryChunks(entryNames, sortMode, compilation) {\n      // Custom function\n      if (typeof sortMode === \"function\") {\n        return entryNames.sort(sortMode);\n      }\n      // Check if the given sort mode is a valid chunkSorter sort mode\n      if (typeof chunkSorter[sortMode] !== \"undefined\") {\n        return chunkSorter[sortMode](entryNames, compilation, this.options);\n      }\n      throw new Error('\"' + sortMode + '\" is not a valid chunk sort mode');\n    }\n\n    /**\n     * Return all chunks from the compilation result which match the exclude and include filters\n     * @param {any} chunks\n     * @param {string[]|'all'} includedChunks\n     * @param {string[]} excludedChunks\n     */\n\n  }, {\n    key: \"filterChunks\",\n    value: function filterChunks(chunks, includedChunks, excludedChunks) {\n      return chunks.filter(function (chunkName) {\n        // Skip if the chunks should be filtered and the given chunk was not added explicity\n        if (Array.isArray(includedChunks) && includedChunks.indexOf(chunkName) === -1) {\n          return false;\n        }\n        // Skip if the chunks should be filtered and the given chunk was excluded explicity\n        if (Array.isArray(excludedChunks) && excludedChunks.indexOf(chunkName) !== -1) {\n          return false;\n        }\n        // Add otherwise\n        return true;\n      });\n    }\n\n    /**\n     * Check if the given asset object consists only of hot-update.js files\n     *\n     * @param {{\n        publicPath: string,\n        js: Array<string>,\n        css: Array<string>,\n        manifest?: string,\n        favicon?: string\n      }} assets\n     */\n\n  }, {\n    key: \"isHotUpdateCompilation\",\n    value: function isHotUpdateCompilation(assets) {\n      return assets.js.length && assets.js.every(function (assetPath) {\n        return (/\\.hot-update\\.js$/.test(assetPath)\n        );\n      });\n    }\n  }, {\n    key: \"htmlWebpackPluginAssets\",\n    value: function htmlWebpackPluginAssets(compilation, childCompilationOutputName, entryNames) {\n      var _this3 = this;\n\n      var compilationHash = compilation.hash;\n      /**\n       * @type {string} the configured public path to the asset root\n       * if a path publicPath is set in the current webpack config use it otherwise\n       * fallback to a realtive path\n       */\n      var webpackPublicPath = compilation.mainTemplate.getPublicPath({\n        hash: compilationHash\n      });\n      var isPublicPathDefined = webpackPublicPath.trim() !== \"\";\n      var publicPath = this.options.publicPath ? this.options.publicPath : isPublicPathDefined ? // If a hard coded public path exists use it\n      webpackPublicPath : // If no public path was set get a relative url path\n      path.relative(path.resolve(compilation.options.output.path, path.dirname(childCompilationOutputName)), compilation.options.output.path).split(path.sep).join(\"/\");\n      if (publicPath.length && publicPath.substr(-1, 1) !== \"/\") {\n        publicPath += \"/\";\n      }\n\n      /**\n       * @type {{\n          publicPath: string,\n          js: Array<string>,\n          css: Array<string>,\n          manifest?: string,\n          favicon?: string\n        }}\n       */\n      var assets = {\n        // The public path\n        publicPath: publicPath,\n        // Will contain all js and mjs files\n        js: [],\n        // Will contain all css files\n        css: [],\n        // Will contain the html5 appcache manifest files if it exists\n        manifest: Object.keys(compilation.assets).find(function (assetFile) {\n          return path.extname(assetFile) === \".appcache\";\n        }),\n        // Favicon\n        favicon: undefined\n      };\n\n      // Append a hash for cache busting\n      if (this.options.hash && assets.manifest) {\n        assets.manifest = this.appendHash(assets.manifest, compilationHash);\n      }\n\n      // Extract paths to .js, .mjs and .css files from the current compilation\n      var entryPointPublicPathMap = {};\n      var extensionRegexp = /\\.(css|js|mjs)(\\?|$)/;\n      for (var i = 0; i < entryNames.length; i++) {\n        var entryName = entryNames[i];\n        var entryPointFiles = compilation.entrypoints.get(entryName).getFiles();\n        // Prepend the publicPath and append the hash depending on the\n        // webpack.output.publicPath and hashOptions\n        // E.g. bundle.js -> /bundle.js?hash\n        var entryPointPublicPaths = entryPointFiles.map(function (chunkFile) {\n          var entryPointPublicPath = publicPath + _this3.urlencodePath(chunkFile);\n          return _this3.options.hash ? _this3.appendHash(entryPointPublicPath, compilationHash) : entryPointPublicPath;\n        });\n\n        entryPointPublicPaths.forEach(function (entryPointPublicPath) {\n          var extMatch = extensionRegexp.exec(entryPointPublicPath);\n          // Skip if the public path is not a .css, .mjs or .js file\n          if (!extMatch) {\n            return;\n          }\n          // Skip if this file is already known\n          // (e.g. because of common chunk optimizations)\n          if (entryPointPublicPathMap[entryPointPublicPath]) {\n            return;\n          }\n          entryPointPublicPathMap[entryPointPublicPath] = true;\n          // ext will contain .js or .css, because .mjs recognizes as .js\n          var ext = extMatch[1] === \"mjs\" ? \"js\" : extMatch[1];\n          assets[ext].push(entryPointPublicPath);\n        });\n      }\n      return assets;\n    }\n  }, {\n    key: \"getFaviconPublicPath\",\n    value: function getFaviconPublicPath(faviconFilePath, compilation, publicPath) {\n      var _this4 = this;\n\n      if (!faviconFilePath) {\n        return Promise.resolve(undefined);\n      }\n      return this.addFileToAssets(faviconFilePath, compilation).then(function (faviconName) {\n        var faviconPath = publicPath + faviconName;\n        if (_this4.options.hash) {\n          return _this4.appendHash(faviconPath, compilation.hash);\n        }\n        return faviconPath;\n      });\n    }\n  }, {\n    key: \"getMetaTags\",\n    value: function getMetaTags() {\n      var metaOptions = this.options.meta;\n      if (metaOptions === false) {\n        return [];\n      }\n      // Make tags self-closing in case of xhtml\n      // Turn { \"viewport\" : \"width=500, initial-scale=1\" } into\n      // [{ name:\"viewport\" content:\"width=500, initial-scale=1\" }]\n      var metaTagAttributeObjects = Object.keys(metaOptions).map(function (metaName) {\n        var metaTagContent = metaOptions[metaName];\n        return typeof metaTagContent === \"string\" ? {\n          name: metaName,\n          content: metaTagContent\n        } : metaTagContent;\n      }).filter(function (attribute) {\n        return attribute !== false;\n      });\n      // Turn [{ name:\"viewport\" content:\"width=500, initial-scale=1\" }] into\n      // the html-webpack-plugin tag structure\n      return metaTagAttributeObjects.map(function (metaTagAttributes) {\n        if (metaTagAttributes === false) {\n          throw new Error(\"Invalid meta tag\");\n        }\n        return {\n          tagName: \"meta\",\n          voidTag: true,\n          attributes: metaTagAttributes\n        };\n      });\n    }\n  }, {\n    key: \"generatedScriptTags\",\n    value: function generatedScriptTags(jsAssets) {\n      return jsAssets.map(function (scriptAsset) {\n        return {\n          tagName: \"script\",\n          voidTag: false,\n          attributes: {\n            src: scriptAsset\n          }\n        };\n      });\n    }\n  }, {\n    key: \"generateStyleTags\",\n    value: function generateStyleTags(cssAssets) {\n      return cssAssets.map(function (styleAsset) {\n        return {\n          tagName: \"link\",\n          voidTag: true,\n          attributes: {\n            href: styleAsset,\n            rel: \"stylesheet\"\n          }\n        };\n      });\n    }\n  }, {\n    key: \"generateBaseTag\",\n    value: function generateBaseTag(baseOption) {\n      if (baseOption === false) {\n        return [];\n      } else {\n        return [{\n          tagName: \"base\",\n          voidTag: true,\n          attributes: typeof baseOption === \"string\" ? {\n            href: baseOption\n          } : baseOption\n        }];\n      }\n    }\n  }, {\n    key: \"generatedMetaTags\",\n    value: function generatedMetaTags(metaOptions) {\n      if (metaOptions === false) {\n        return [];\n      }\n      // Make tags self-closing in case of xhtml\n      // Turn { \"viewport\" : \"width=500, initial-scale=1\" } into\n      // [{ name:\"viewport\" content:\"width=500, initial-scale=1\" }]\n      var metaTagAttributeObjects = Object.keys(metaOptions).map(function (metaName) {\n        var metaTagContent = metaOptions[metaName];\n        return typeof metaTagContent === \"string\" ? {\n          name: metaName,\n          content: metaTagContent\n        } : metaTagContent;\n      }).filter(function (attribute) {\n        return attribute !== false;\n      });\n      // Turn [{ name:\"viewport\" content:\"width=500, initial-scale=1\" }] into\n      // the html-webpack-plugin tag structure\n      return metaTagAttributeObjects.map(function (metaTagAttributes) {\n        if (metaTagAttributes === false) {\n          throw new Error(\"Invalid meta tag\");\n        }\n        return {\n          tagName: \"meta\",\n          voidTag: true,\n          attributes: metaTagAttributes\n        };\n      });\n    }\n  }, {\n    key: \"generateFaviconTags\",\n    value: function generateFaviconTags(faviconPath) {\n      if (!faviconPath) {\n        return [];\n      }\n      return [{\n        tagName: \"link\",\n        voidTag: true,\n        attributes: {\n          rel: \"shortcut icon\",\n          href: faviconPath\n        }\n      }];\n    }\n  }, {\n    key: \"generateAssetGroups\",\n    value: function generateAssetGroups(assetTags, scriptTarget) {\n      var result = {\n        headTags: [].concat(_toConsumableArray(assetTags.meta), _toConsumableArray(assetTags.styles)),\n        bodyTags: []\n      };\n      // Add script tags to head or body depending on\n      // the htmlPluginOptions\n      if (scriptTarget === \"body\") {\n        var _result$bodyTags;\n\n        (_result$bodyTags = result.bodyTags).push.apply(_result$bodyTags, _toConsumableArray(assetTags.scripts));\n      } else {\n        var _result$headTags;\n\n        (_result$headTags = result.headTags).push.apply(_result$headTags, _toConsumableArray(assetTags.scripts));\n      }\n      return result;\n    }\n  }, {\n    key: \"prepareAssetTagGroupForRendering\",\n    value: function prepareAssetTagGroupForRendering(assetTagGroup) {\n      var xhtml = this.options.xhtml;\n      var preparedTags = assetTagGroup.map(function (assetTag) {\n        var copiedAssetTag = Object.assign({}, assetTag);\n        copiedAssetTag.toString = function () {\n          return htmlTagObjectToString(this, xhtml);\n        };\n        return copiedAssetTag;\n      });\n      preparedTags.toString = function () {\n        return this.join(\"\");\n      };\n      return preparedTags;\n    }\n  }, {\n    key: \"injectAssetsIntoHtml\",\n    value: function injectAssetsIntoHtml(html, assets, assetTags) {\n      var _this5 = this;\n\n      var htmlRegExp = /(<html[^>]*>)/i;\n      var headRegExp = /(<\\/head\\s*>)/i;\n      var bodyRegExp = /(<\\/body\\s*>)/i;\n      var body = assetTags.bodyTags.map(function (assetTagObject) {\n        return htmlTagObjectToString(assetTagObject, _this5.options.xhtml);\n      });\n      var head = assetTags.headTags.map(function (assetTagObject) {\n        return htmlTagObjectToString(assetTagObject, _this5.options.xhtml);\n      });\n\n      if (body.length) {\n        if (bodyRegExp.test(html)) {\n          // Append assets to body element\n          html = html.replace(bodyRegExp, function (match) {\n            return body.join(\"\") + match;\n          });\n        } else {\n          // Append scripts to the end of the file if no <body> element exists:\n          html += body.join(\"\");\n        }\n      }\n\n      if (head.length) {\n        // Create a head tag if none exists\n        if (!headRegExp.test(html)) {\n          if (!htmlRegExp.test(html)) {\n            html = \"<head></head>\" + html;\n          } else {\n            html = html.replace(htmlRegExp, function (match) {\n              return match + \"<head></head>\";\n            });\n          }\n        }\n\n        // Append assets to head element\n        html = html.replace(headRegExp, function (match) {\n          return head.join(\"\") + match;\n        });\n      }\n\n      // Inject manifest into the opening html tag\n      if (assets.manifest) {\n        html = html.replace(/(<html[^>]*)(>)/i, function (match, start, end) {\n          // Append the manifest only if no manifest was specified\n          if (/\\smanifest\\s*=/.test(match)) {\n            return match;\n          }\n          return start + ' manifest=\"' + assets.manifest + '\"' + end;\n        });\n      }\n      return html;\n    }\n\n    /**\n     * Appends a cache busting hash to the query string of the url\n     * E.g. http://localhost:8080/ -> http://localhost:8080/?50c9096ba6183fd728eeb065a26ec175\n     * @param {string} url\n     * @param {string} hash\n     */\n\n  }, {\n    key: \"appendHash\",\n    value: function appendHash(url, hash) {\n      if (!url) {\n        return url;\n      }\n      return url + (url.indexOf(\"?\") === -1 ? \"?\" : \"&\") + hash;\n    }\n\n    /**\n     * Encode each path component using `encodeURIComponent` as files can contain characters\n     * which needs special encoding in URLs like `+ `.\n     *\n     * @param {string} filePath\n     */\n\n  }, {\n    key: \"urlencodePath\",\n    value: function urlencodePath(filePath) {\n      return filePath.split(\"/\").map(encodeURIComponent).join(\"/\");\n    }\n\n    /**\n     * Helper to return the absolute template path with a fallback loader\n     * @param {string} template\n     * The path to the template e.g. './index.html'\n     * @param {string} context\n     * The webpack base resolution path for relative paths e.g. process.cwd()\n     */\n\n  }, {\n    key: \"getFullTemplatePath\",\n    value: function getFullTemplatePath(template, context) {\n      if (template === \"auto\") {\n        template = path.resolve(context, \"src/index.ejs\");\n        if (!fs.existsSync(template)) {\n          template = path.join(__dirname, \"default_index.ejs\");\n        }\n      }\n      // If the template doesn't use a loader use the lodash template loader\n      if (template.indexOf(\"!\") === -1) {\n        template = require.resolve(\"./lib/loader.js\") + \"!\" + path.resolve(context, template);\n      }\n      // Resolve template path\n      return template.replace(/([!])([^/\\\\][^!?]+|[^/\\\\!?])($|\\?[^!?\\n]+$)/, function (match, prefix, filepath, postfix) {\n        return prefix + path.resolve(filepath) + postfix;\n      });\n    }\n\n    /**\n     * Helper to return a sorted unique array of all asset files out of the\n     * asset object\n     */\n\n  }, {\n    key: \"getAssetFiles\",\n    value: function getAssetFiles(assets) {\n      var files = _.uniq(Object.keys(assets).filter(function (assetType) {\n        return assetType !== \"chunks\" && assets[assetType];\n      }).reduce(function (files, assetType) {\n        return files.concat(assets[assetType]);\n      }, []));\n      files.sort();\n      return files;\n    }\n  }]);\n\n  return HtmlWebpackPlugin;\n}();\n\nfunction templateParametersGenerator(compilation, assets, assetTags, options) {\n  return {\n    compilation: compilation,\n    webpackConfig: compilation.options,\n    htmlWebpackPlugin: {\n      tags: assetTags,\n      files: assets,\n      options: options\n    }\n  };\n}\n\n// Statics:\n/**\n * The major version number of this plugin\n */\nHtmlWebpackPlugin.version = 4;\n\n/**\n * A static helper to get the hooks for this plugin\n *\n * Usage: HtmlWebpackPlugin.getHooks(compilation).HOOK_NAME.tapAsync('YourPluginName', () => { ... });\n */\nHtmlWebpackPlugin.getHooks = getHtmlWebpackPluginHooks;\nHtmlWebpackPlugin.createHtmlTagObject = createHtmlTagObject;\n\nmodule.exports = HtmlWebpackPlugin;"]}