@param {*} src
@param {*} conf

@returns {*}
770562
function conform(src, conf) {
  var dest = {};

  var rec = function(dest, src, conf) {
    Object.keys(conf).forEach(function(key) {
      if((typeof conf[key] === 'object' && !Array.isArray(conf[key]))) {
        dest[key] = rec({}, src[key] || {}, conf[key]);
      } else if(typeof conf[key] === 'object' && Array.isArray(conf[key])) {
        dest[key] = conf[key];
      } else {
        if(Object.prototype.hasOwnProperty.call(src, key)) {
          dest[key] = src[key];
        } else {
          dest[key] = src[key] || conf[key];
        }
      }
    });

    return dest;
  };

  return rec(dest, src, conf);
}
788302
function(){
        var _replace    = "$1" + this.config.tp + "$2" + this.config.tp,
            _al         = this.config.jade.replace( /(^\s*)(script\([^\)|^\n|^\r]*\))/gm , _replace ).split( this.config.tp ),
            _url ,
            _filePath;
        for( var i = _al.length; i--; ){
            if( i % 2 ){
                _al[ i ]    = _al[ i ].replace( /\s/gi , "" );
                tool.checkFileStatus( _al[ i ].replace( /[^\:]*src=['|"]([^'|^"]*)['|"].*/gi , "$1" ) , function( exists , filePath ){
                    if( !config.filePath.fetchUrl[ filePath ] ){
                        _url    = tool.getFileTs( filePath );
                        if( exists ){
                            _filePath   = Path.parse( filePath );
                            _url = tool.uglifyJs( Path.join( config.dir.srcDir , filePath ) , _filePath.dir + "/" + _filePath.name + "." );
                            _url = config.redirectOrigin + _url;
                        }
                        config.filePath.fetchUrl[ filePath ] = _url;
                    }
                    _al[ i ] = _al[ i ].replace( /(.*src=['|"])([^'|^"]*)(['|"].*)/gi , "$1" + config.filePath.fetchUrl[ filePath ] + "$3" );
                } );
            };
        };
        return _al.join( "" );
    }
768233
function(){
		var conf = {};
		for(var idname in this.list){
			if(this.getexec(idname)){ conf[idname] = this.get(idname);}
		}
		return conf;
	}
1294712
function verifyTsConfig(configFilePath) {
	/**
	 * @type {string[]}
	 */
	const warnings = [];
	const createConfigFileHost = {
		onUnRecoverableConfigFileDiagnostic() {},
		useCaseSensitiveFileNames: false,
		readDirectory: typescript.sys.readDirectory,
		fileExists: typescript.sys.fileExists,
		readFile: typescript.sys.readFile,
		getCurrentDirectory: typescript.sys.getCurrentDirectory,
	};
	const tsconfig = typescript.getParsedCommandLineOfConfigFile(configFilePath, {}, createConfigFileHost);
	if (!tsconfig) {
		return [`could not parse "${configFilePath}"`];
	}
	if (tsconfig.options.skipLibCheck === undefined) {
		warnings.push(
			'skipLibCheck option was NOT specified\n' +
				'By default the fork-ts-checker-webpack-plugin will check all types inside the node_modules directory\n' +
				'even for unused dependencies and slow down the type checking a lot.\n' +
				'To skip that checking add the following line to your tsconfig.json compilerOptions configuration:\n' +
				'"skipLibCheck": true\n' +
				'To keep the default behaviour with possible performance penalties set skipLibCheck to false to hide this warning.\n'
		);
	}
	if (tsconfig.options.moduleResolution === undefined) {
		warnings.push(
			'moduleResolution option was NOT specified\n' +
				'This will result in typescript warnings like "module not found".\n' +
				'To fix that add the following line to your tsconfig.json compilerOptions configuration:\n' +
				'"moduleResolution": "node"\n' +
				'To keep the default behaviour with possible type checking errors set moduleResolution to "classic" to hide this warning.\n'
		);
	}

	return warnings;
}
1370892
function getVcl(conf) {
  const config = _.extend({
    version: new Date().toISOString(),
    timeout: defaultTimeout,
    urlPassList: ['cache-control=no-cache'],
    hash: [
      'req.url',
      [
        'req.http.host',
        'server.ip',
      ],
    ],
    hisForPassTTL: 120,
  }, conf);
  /* istanbul ignore if */
  if (!config.directors || !config.name) {
    throw new Error('directors, name can not be null');
  }
  if (!config.directors.length) {
    throw new Error('directors can not be empty');
  }
  if (config.name === '$HOSTNAME') {
    config.name = os.hostname();
  } else if (config.name[0] === '$') {
    config.name = process.env[config.name.substring(1)];
  }
  _.forEach(config.directors, (item) => {
    if (!item.timeout) {
      /* eslint no-param-reassign:0 */
      item.timeout = config.timeout;
    }
    if (item.type === 'shard') {
      throw new Error('shard director is not support');
    }
  });
  const cloneConfig = _.extend({
    stale: 3,
    varnish: '5',
    hashConfig: getHash(config.hash),
    passRules: getPassRules(config.urlPassList),
  }, config);
  return getConfig(cloneConfig.directors).then((data) => {
    _.extend(cloneConfig, data);
    return readFilePromise(path.join(__dirname, 'template/varnish.tpl'));
  }).then(tpl => _.template(tpl)(cloneConfig));
}
319489
function toObject(src, dest, options) {
  if (!utils.isObject(options)) {
    options = {};
  }

  var config = {};
  if (utils.isObject(dest)) {
    options = extend({}, options, dest);
    dest = null;
  }

  if (utils.isObject(src)) {
    config = src;
  }

  if (isValidSrc(src)) {
    config.src = src;
  } else if (Array.isArray(src)) {
    config = normalize(src);
  }

  if (typeof dest === 'string') {
    config.dest = dest;
  }

  if (options.hasOwnProperty('options')) {
    options = extend({}, options, options.options);
    delete options.options;
  }

  config.options = extend({}, config.options, options);
  return config;
}
390764
function commonjsMain (args) {
    var cwd = require("file").path(require("file").cwd());
    if (!args[1])
        throw new Error('Usage: '+args[0]+' FILE');
    var source = cwd.join(args[1]).read({charset: "utf-8"});
    exports.parser.parse(source);
}
376888
function getOptions(conf) {
  var parts = [];
  if(!conf.expansions && !conf.flags) {
    return parts;
  }
  var start = conf.start, end = conf.end;
  var sre = /^-[a-zA-Z0-9]$/, lre = /^--/;
  var chars = '';
  var lng = [];
  var opts = this.cmd._options, z, arg, names, i, options = [];
  for(z in opts) {
    arg = opts[z];
    if(arg.isFlag()) {
      names = arg.names();
      for(i = 0;i < names.length;i++) {
        if(conf.expansions && sre.test(names[i])) {
          chars += names[i].substr(1);
        }else if(conf.flags && !conf.combine && lre.test(names[i])) {
          lng.push(start + names[i] + end);
        }
      }
      if(conf.combine) {
        if(conf.no) {
          names = flutil.getNoExpansions(names);
        }
        lng.push(start + names.join('|') + end);
      }
    }else if(arg.isOption()){
      if(conf.options) {
        options.push(start + getOptionValue(arg, conf) + end);
      }
    }
  }
  var expansions = chars.length ? start + HYPHEN + chars + end : '';
  var commands = Object.keys(this.cmd._commands).length > 0;
  if(commands && conf.command && conf.prepend) {
    parts.push(conf.scommand
      + this.messages.usage.command + conf.ecommand);
  }
  if(expansions) {
    parts.push(expansions);
  }
  if(lng.length) {
    parts.push(lng.join(' '));
  }
  if(options.length) {
    parts.push(options.join(' '));
  }
  if(commands && conf.command && !conf.prepend) {
    parts.push(conf.scommand
      + this.messages.usage.command + conf.ecommand);
  }
  if(conf.args) {
    parts.push(conf.sargs
      + this.messages.usage.args + conf.eargs);
  }
  return parts;
}
669107
function (src) {
            return can.map(src.toString().split(/\/|\./g), function (part) {
                // Dont include empty strings in toId functions
                if (part) {
                    return part;
                }
            }).join("_");
        }
1108666
function findConfigFile(filePath) {
		let prev = null
		do {
			const testPath = path.join(filePath, 'tsconfig.json')
			if (fs.existsSync(testPath)) {
				return testPath
			}
			prev = filePath
			filePath = path.dirname(filePath)
		} while (prev !== filePath)
		return undefined
	}
718320
function ConfigReader(path) {
  const self = this;
  const fs = require('fs');
  const util = require('util');
  const yaml = require('js-yaml');
  const _ = require('lodash');
  const allowedEnvironmentVars = {
    token: 'CF_API_KEY',
    email: 'CF_API_EMAIL',
    domain: 'CF_API_DOMAIN'
  };

  const homePath = process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME'];


  path = path ? path.replace('~', homePath) : false;
  self.readConfig = readConfig;

  function readConfig(account) {
    let config = {};
    //Load allowed environment variables
    const envConfig = _.fromPairs(
      _.filter(_.map(allowedEnvironmentVars, function (envVar, key) {
          if (process.env[envVar]) {
            return [key, process.env[envVar]];
          } else {
            return false;
          }
        }
      ), function (value) {
        return value !== false;
      })
    );
    if (path && fs.existsSync(path)) {
      try {
        const ymlConfig = yaml.safeLoad(fs.readFileSync(path, 'utf8'));
        if (ymlConfig !== undefined) {
          if (ymlConfig.defaults.account || account) {
            account = (account) ? account : ymlConfig.defaults.account;
            if (ymlConfig.accounts[account] !== undefined) {
              config = ymlConfig.accounts[account];
            } else {
              console.log(util.format('Unable to find account %s', account));
              console.log('Available accounts: ');
              _.each(ymlConfig.accounts, function (acc, name) {
                console.log(util.format(' - %s', name));
              });
              return false;
            }
          } else {
            config = ymlConfig.defaults;
          }
        } else {
          throw new Error(util.format('Unable to parse file: %s', path));
        }
      } catch (error) {
        throw new Error(util.format('Invalid config file: %s message: ', path, error.message));
      }
    }
    return _.extend(config, envConfig);
  }
}
559229
async function buildConfig(file) {
  const { default: config } = await import(`${CONFIGS_PATH}/${file}`);
  const { creator, name, packageName } = config;

  creator
    .then((data) => {
      const stringifiedData = JSON.stringify(data);
      const generatedData = TEMPLATE.replace(/{{ data }}/, stringifiedData);
      const packageFile = path.resolve(PACKAGES_PATH, packageName, 'index.js');
      fs.writeFileSync(packageFile, generatedData);
    })
    .then(
      () => console.log(`Finished building ${name} config to ./packages/${packageName}`),
      error => console.log(error),
    );
}
1053673
function argv(args) {
  var out = {directives: {}}
    , i = 0;

  /* istanbul ignore next: never use process.argv in tests */
  args = args || process.argv.slice(2);
  if(!args.length) return out;

  // read conf from stdin
  if(args[i] === STDIN) {
    out.stdin = true;
    i++;
  // conf should be first arg
  }else if(!PTN.test(args[i])) {
    out.file = args[i];
    i++;
  }

  function add(key, value) {
    if(!key || value === null) return;
    if(!out.directives[key]) {
      out.directives[key] = value;
    // handle repeated directives, create an array
    }else if(out.directives[key]
      && !Array.isArray(out.directives[key])){
      out.directives[key] = [out.directives[key]];
      out.directives[key].push(value)
    // append to existing array value
    }else{
      out.directives[key].push(value)
    }
  }

  function gobble(arg, key, value) {
    if(arg === undefined) return add(key, value);
    value = value || '';
    if(PTN.test(arg)) {
      key = arg.replace(PTN, '');
      // gobble up value arguments
      while((arg = args[i++]) !== undefined && !PTN.test(arg)) {
        if(value) value += ' ';
        value += arg;
      }
      if(PTN.test(arg)) i--;
      add(key, value);
      value = null;
    }else{
      if(value) value += ' ';
      value += arg;
    }
    gobble(args[i++], key, value);
  }
  gobble(args[i]);
  return out;
}
786932
function _configFilter ( f ) {
        var parts = f.split("."),
            ext = parts[ parts.length - 1 ],
            pre = parts[ parts.length - 2 ],
            name = parts[ parts.length - 3];

        return !!(ext === "dist" && pre === "json" &&
                    exports.__ignores.indexOf( name ) === -1 && exports.__ignores.indexOf( f ) === -1 );
    }
1323546
function process(src, filename) {
  // strip out <style> tags to prevent failure when unable to parse PostCSS etc.
  const re = /<style[^>]*>([\S\s]*?)<\/style>/g;
  const normalised = src.replace(re, '');

  const result = svelte.compile(normalised, {
    filename,
    css: false,
    format: 'cjs',
  });

  return {
    code: result.js.code,
    map: result.js.map,
  };
}
1098228
function loadConfig(configPath) {
	return new Promise((resolve, reject) => {
		configPath = resolveConfigPath(configPath);
		let config;
		try {
			config = loadLocalConfigUnmodified(configPath);
			if (!config) {
				config = loadLocalConfigWithJs(configPath);
			}
			if (!config) {
				config = loadLocalConfigWithJson(configPath);
			}
			if (program.config && !config) {
				return reject(new Error(`The config file "${configPath}" could not be loaded`));
			}
		} catch (error) {
			return reject(
				new Error(`There was a problem loading "${configPath}":\n${error.stack}`)
			);
		}

		// Allow loaded configs to return a promise
		Promise.resolve(config).then(config => {
			resolve(defaultConfig(config || {}));
		});
	});
}
159352
function jslintFile(file, extraArgs) {
    return readConf(homeDir, {})
        .then(function (homeConf) {
            if (Array.isArray(file)) {
                return file.reduce(function (prom, file) {
                    return prom.then(function (oldReport) {
                        return jslintFile(file, extraArgs)
                            .then(function (newReport) {
                                return oldReport.concat(newReport);
                            });
                    });
                }, Promise.resolve([]));
            }
            return readFile(file, "utf8")
                .then(function (data) {
                    const opts = (
                        typeof extraArgs === "object" && extraArgs !== null
                    )
                        ? extraArgs
                        : {};
                    const projectDir = opts.projectDir || process.cwd();
                    return readConf(projectDir, path.dirname(file), homeConf)
                        .then(function (conf) {
                            const newConf = Object.assign(
                                {},
                                conf,
                                opts.options
                            );
                            const lines = Array.isArray(data)
                                ? data
                                : data.split(/\n|\r\n?/);
                            const sb = opts.shaBang
                                ? lines[0].startsWith("#!")
                                    ? [""].concat(lines.slice(1))
                                    : lines
                                : lines;
                            const report = {
                                pathname: file,
                                report: jslint(sb, newConf, opts.globals)
                            };

                            return typeof opts.callback === "function"
                                ? opts.callback(report)
                                : report;
                        });
                });
        });
}