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AAI,EAEF,EAD0B,iBAAjB,EAAO,MACH,CAAC,EAAO,OACZ,MAAM,QAAQ,EAAO,OACjB,EAAO,MAEP,OAAO,OAAO,EAAO,OAAS,IAAI,QAAO,CAAC,EAAY,IAC1D,EAAW,OAAO,IACxB,IAGL,EAAa,EAAW,KAAI,GAAQ,KAAK,QAAQ,KAAK,QAAS,KAC/D,QAAQ,IAAI,oBAAsB,KAAK,UAAU,EACnD,CAEA,OAAO,CACT,CAIA,eAAA,GACE,MAAM,WAAE,EAAU,eAAE,GAAmB,eAAe,KAAK,SAE3D,OAAI,UAAU,GACL,EACJ,MAAK,GAAO,EAAI,UAChB,MAAK,GAAgB,kBAAkB,CACtC,cAAe,KAAK,cACpB,UAAW,KAAK,IAAI,IACpB,WAAY,EACZ,qBAIC,kBAAkB,CACvB,cAAe,KAAK,cACpB,UAAW,KAAK,IAAI,IACpB,aACA,kBAEJ,GAkBF,OAAO,QAAQ,aAAgB,GAAW","file":"/npm/@vue/cli-service@5.0.9/lib/Service.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@vue/cli-service@5.0.9/lib/Service.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 path = require('path')\nconst debug = require('debug')\nconst { merge } = require('webpack-merge')\nconst Config = require('webpack-chain')\nconst PluginAPI = require('./PluginAPI')\nconst dotenv = require('dotenv')\nconst dotenvExpand = require('dotenv-expand')\nconst defaultsDeep = require('lodash.defaultsdeep')\nconst { warn, error, isPlugin, resolvePluginId, loadModule, resolvePkg, resolveModule, sortPlugins } = require('@vue/cli-shared-utils')\n\nconst { defaults } = require('./options')\nconst loadFileConfig = require('./util/loadFileConfig')\nconst resolveUserConfig = require('./util/resolveUserConfig')\n\n// Seems we can't use `instanceof Promise` here (would fail the tests)\nconst isPromise = p => p && typeof p.then === 'function'\nmodule.exports = class Service {\n  constructor (context, { plugins, pkg, inlineOptions, useBuiltIn } = {}) {\n    process.VUE_CLI_SERVICE = this\n    this.initialized = false\n    this.context = context\n    this.inlineOptions = inlineOptions\n    this.webpackChainFns = []\n    this.webpackRawConfigFns = []\n    this.devServerConfigFns = []\n    this.commands = {}\n    // Folder containing the target package.json for plugins\n    this.pkgContext = context\n    // package.json containing the plugins\n    this.pkg = this.resolvePkg(pkg)\n    // If there are inline plugins, they will be used instead of those\n    // found in package.json.\n    // When useBuiltIn === false, built-in plugins are disabled. This is mostly\n    // for testing.\n    this.plugins = this.resolvePlugins(plugins, useBuiltIn)\n    // pluginsToSkip will be populated during run()\n    this.pluginsToSkip = new Set()\n    // resolve the default mode to use for each command\n    // this is provided by plugins as module.exports.defaultModes\n    // so we can get the information without actually applying the plugin.\n    this.modes = this.plugins.reduce((modes, { apply: { defaultModes } }) => {\n      return Object.assign(modes, defaultModes)\n    }, {})\n  }\n\n  resolvePkg (inlinePkg, context = this.context) {\n    if (inlinePkg) {\n      return inlinePkg\n    }\n    const pkg = resolvePkg(context)\n    if (pkg.vuePlugins && pkg.vuePlugins.resolveFrom) {\n      this.pkgContext = path.resolve(context, pkg.vuePlugins.resolveFrom)\n      return this.resolvePkg(null, this.pkgContext)\n    }\n    return pkg\n  }\n\n  init (mode = process.env.VUE_CLI_MODE) {\n    if (this.initialized) {\n      return\n    }\n    this.initialized = true\n    this.mode = mode\n\n    // load mode .env\n    if (mode) {\n      this.loadEnv(mode)\n    }\n    // load base .env\n    this.loadEnv()\n\n    // load user config\n    const userOptions = this.loadUserOptions()\n    const loadedCallback = (loadedUserOptions) => {\n      this.projectOptions = defaultsDeep(loadedUserOptions, defaults())\n\n      debug('vue:project-config')(this.projectOptions)\n\n      // apply plugins.\n      this.plugins.forEach(({ id, apply }) => {\n        if (this.pluginsToSkip.has(id)) return\n        apply(new PluginAPI(id, this), this.projectOptions)\n      })\n\n      // apply webpack configs from project config file\n      if (this.projectOptions.chainWebpack) {\n        this.webpackChainFns.push(this.projectOptions.chainWebpack)\n      }\n      if (this.projectOptions.configureWebpack) {\n        this.webpackRawConfigFns.push(this.projectOptions.configureWebpack)\n      }\n    }\n\n    if (isPromise(userOptions)) {\n      return userOptions.then(loadedCallback)\n    } else {\n      return loadedCallback(userOptions)\n    }\n  }\n\n  loadEnv (mode) {\n    const logger = debug('vue:env')\n    const basePath = path.resolve(this.context, `.env${mode ? `.${mode}` : ``}`)\n    const localPath = `${basePath}.local`\n\n    const load = envPath => {\n      try {\n        const env = dotenv.config({ path: envPath, debug: process.env.DEBUG })\n        dotenvExpand(env)\n        logger(envPath, env)\n      } catch (err) {\n        // only ignore error if file is not found\n        if (err.toString().indexOf('ENOENT') < 0) {\n          error(err)\n        }\n      }\n    }\n\n    load(localPath)\n    load(basePath)\n\n    // by default, NODE_ENV and BABEL_ENV are set to \"development\" unless mode\n    // is production or test. However the value in .env files will take higher\n    // priority.\n    if (mode) {\n      // always set NODE_ENV during tests\n      // as that is necessary for tests to not be affected by each other\n      const shouldForceDefaultEnv = (\n        process.env.VUE_CLI_TEST &&\n        !process.env.VUE_CLI_TEST_TESTING_ENV\n      )\n      const defaultNodeEnv = (mode === 'production' || mode === 'test')\n        ? mode\n        : 'development'\n      if (shouldForceDefaultEnv || process.env.NODE_ENV == null) {\n        process.env.NODE_ENV = defaultNodeEnv\n      }\n      if (shouldForceDefaultEnv || process.env.BABEL_ENV == null) {\n        process.env.BABEL_ENV = defaultNodeEnv\n      }\n    }\n  }\n\n  setPluginsToSkip (args, rawArgv) {\n    let skipPlugins = args['skip-plugins']\n    const pluginsToSkip = new Set()\n    if (skipPlugins) {\n      // When only one appearence, convert to array to prevent duplicate code\n      if (!Array.isArray(skipPlugins)) {\n        skipPlugins = Array.from([skipPlugins])\n      }\n      // Iter over all --skip-plugins appearences\n      for (const value of skipPlugins.values()) {\n        for (const plugin of value.split(',').map(id => resolvePluginId(id))) {\n          pluginsToSkip.add(plugin)\n        }\n      }\n    }\n    this.pluginsToSkip = pluginsToSkip\n\n    delete args['skip-plugins']\n    // Delete all --skip-plugin appearences\n    let index\n    while ((index = rawArgv.indexOf('--skip-plugins')) > -1) {\n      rawArgv.splice(index, 2) // Remove the argument and its value\n    }\n  }\n\n  resolvePlugins (inlinePlugins, useBuiltIn) {\n    const idToPlugin = (id, absolutePath) => ({\n      id: id.replace(/^.\\//, 'built-in:'),\n      apply: require(absolutePath || id)\n    })\n\n    let plugins\n\n    const builtInPlugins = [\n      './commands/serve',\n      './commands/build',\n      './commands/inspect',\n      './commands/help',\n      // config plugins are order sensitive\n      './config/base',\n      './config/assets',\n      './config/css',\n      './config/prod',\n      './config/app'\n    ].map((id) => idToPlugin(id))\n\n    if (inlinePlugins) {\n      plugins = useBuiltIn !== false\n        ? builtInPlugins.concat(inlinePlugins)\n        : inlinePlugins\n    } else {\n      const projectPlugins = Object.keys(this.pkg.devDependencies || {})\n        .concat(Object.keys(this.pkg.dependencies || {}))\n        .filter(isPlugin)\n        .map(id => {\n          if (\n            this.pkg.optionalDependencies &&\n            id in this.pkg.optionalDependencies\n          ) {\n            let apply = loadModule(id, this.pkgContext)\n            if (!apply) {\n              warn(`Optional dependency ${id} is not installed.`)\n              apply = () => {}\n            }\n\n            return { id, apply }\n          } else {\n            return idToPlugin(id, resolveModule(id, this.pkgContext))\n          }\n        })\n\n      plugins = builtInPlugins.concat(projectPlugins)\n    }\n\n    // Local plugins\n    if (this.pkg.vuePlugins && this.pkg.vuePlugins.service) {\n      const files = this.pkg.vuePlugins.service\n      if (!Array.isArray(files)) {\n        throw new Error(`Invalid type for option 'vuePlugins.service', expected 'array' but got ${typeof files}.`)\n      }\n      plugins = plugins.concat(files.map(file => ({\n        id: `local:${file}`,\n        apply: loadModule(`./${file}`, this.pkgContext)\n      })))\n    }\n    debug('vue:plugins')(plugins)\n\n    const orderedPlugins = sortPlugins(plugins)\n    debug('vue:plugins-ordered')(orderedPlugins)\n\n    return orderedPlugins\n  }\n\n  async run (name, args = {}, rawArgv = []) {\n    // resolve mode\n    // prioritize inline --mode\n    // fallback to resolved default modes from plugins or development if --watch is defined\n    const mode = args.mode || (name === 'build' && args.watch ? 'development' : this.modes[name])\n\n    // --skip-plugins arg may have plugins that should be skipped during init()\n    this.setPluginsToSkip(args, rawArgv)\n\n    // load env variables, load user config, apply plugins\n    await this.init(mode)\n\n    args._ = args._ || []\n    let command = this.commands[name]\n    if (!command && name) {\n      error(`command \"${name}\" does not exist.`)\n      process.exit(1)\n    }\n    if (!command || args.help || args.h) {\n      command = this.commands.help\n    } else {\n      args._.shift() // remove command itself\n      rawArgv.shift()\n    }\n    const { fn } = command\n    return fn(args, rawArgv)\n  }\n\n  resolveChainableWebpackConfig () {\n    const chainableConfig = new Config()\n    // apply chains\n    this.webpackChainFns.forEach(fn => fn(chainableConfig))\n    return chainableConfig\n  }\n\n  resolveWebpackConfig (chainableConfig = this.resolveChainableWebpackConfig()) {\n    if (!this.initialized) {\n      throw new Error('Service must call init() before calling resolveWebpackConfig().')\n    }\n    // get raw config\n    let config = chainableConfig.toConfig()\n    const original = config\n    // apply raw config fns\n    this.webpackRawConfigFns.forEach(fn => {\n      if (typeof fn === 'function') {\n        // function with optional return value\n        const res = fn(config)\n        if (res) config = merge(config, res)\n      } else if (fn) {\n        // merge literal values\n        config = merge(config, fn)\n      }\n    })\n\n    // #2206 If config is merged by merge-webpack, it discards the __ruleNames\n    // information injected by webpack-chain. Restore the info so that\n    // vue inspect works properly.\n    if (config !== original) {\n      cloneRuleNames(\n        config.module && config.module.rules,\n        original.module && original.module.rules\n      )\n    }\n\n    // check if the user has manually mutated output.publicPath\n    const target = process.env.VUE_CLI_BUILD_TARGET\n    if (\n      !process.env.VUE_CLI_TEST &&\n      (target && target !== 'app') &&\n      config.output.publicPath !== this.projectOptions.publicPath\n    ) {\n      throw new Error(\n        `Do not modify webpack output.publicPath directly. ` +\n        `Use the \"publicPath\" option in vue.config.js instead.`\n      )\n    }\n\n    if (\n      !process.env.VUE_CLI_ENTRY_FILES &&\n      typeof config.entry !== 'function'\n    ) {\n      let entryFiles\n      if (typeof config.entry === 'string') {\n        entryFiles = [config.entry]\n      } else if (Array.isArray(config.entry)) {\n        entryFiles = config.entry\n      } else {\n        entryFiles = Object.values(config.entry || []).reduce((allEntries, curr) => {\n          return allEntries.concat(curr)\n        }, [])\n      }\n\n      entryFiles = entryFiles.map(file => path.resolve(this.context, file))\n      process.env.VUE_CLI_ENTRY_FILES = JSON.stringify(entryFiles)\n    }\n\n    return config\n  }\n\n  // Note: we intentionally make this function synchronous by default\n  // because eslint-import-resolver-webpack does not support async webpack configs.\n  loadUserOptions () {\n    const { fileConfig, fileConfigPath } = loadFileConfig(this.context)\n\n    if (isPromise(fileConfig)) {\n      return fileConfig\n        .then(mod => mod.default)\n        .then(loadedConfig => resolveUserConfig({\n          inlineOptions: this.inlineOptions,\n          pkgConfig: this.pkg.vue,\n          fileConfig: loadedConfig,\n          fileConfigPath\n        }))\n    }\n\n    return resolveUserConfig({\n      inlineOptions: this.inlineOptions,\n      pkgConfig: this.pkg.vue,\n      fileConfig,\n      fileConfigPath\n    })\n  }\n}\n\nfunction cloneRuleNames (to, from) {\n  if (!to || !from) {\n    return\n  }\n  from.forEach((r, i) => {\n    if (to[i]) {\n      Object.defineProperty(to[i], '__ruleNames', {\n        value: r.__ruleNames\n      })\n      cloneRuleNames(to[i].oneOf, r.oneOf)\n    }\n  })\n}\n\n/** @type {import('../types/index').defineConfig} */\nmodule.exports.defineConfig = (config) => config\n"]}