********************
requireConfig/config.js
********************
966084
function (events) {
        "use strict";
    
        onError(events);
    
        // register the paths of the imported libraries by the application
        var hosts = beyond.hosts;
        var paths = {};
        var host;
    
        if (hosts.application && typeof hosts.application.js === 'string') {
    
            if (location.protocol === 'file:') {
                host = hosts.application.js;
                if (!host) {
                    host = '.';
                }
            }
            else {
                host = location.origin + hosts.application.js;
            }
    
            // Remove the last '/' of the host
            if (host.substr(host.length - 1) === '/') {
                host = host.substr(0, host.length - 1);
            }
    
            paths.application = host;
    
        }
    
        for (var name in hosts.libraries) {
    
            var library = hosts.libraries[name];
    
            if (location.protocol === 'file:') {
                host = library.js;
            }
            else {
                host = location.origin;
                host += (library.js.substr(0, 1) !== '/') ? '/' : '';
                host += library.js;
            }
    
            // Remove the last '/' of the host
            if (host.substr(host.length - 1) === '/') {
                host = host.substr(0, host.length - 1);
            }
    
            paths['libraries/' + name] = host;
    
        }
    
        requirejs.config({'paths': paths});
    
        Object.defineProperty(this, 'paths', {
            'get': function () {
                return requirejs.s.contexts._.config.paths;
            }
        });
    
    }
715694
function (config) {
  this.globals = config.globals || {};
  this.templates = {};
  this.config = _.extend({}, defaults, config);
  this.config.optionsRegex = new RegExp("^" + this.config.optionsDelimiter + "([\\S\\s]+)" + this.config.optionsDelimiter + "([\\S\\s]+)");
}
659094
function(module, exports, __webpack_require__) {

	/* WEBPACK VAR INJECTION */(function(Vue) {'use strict';
	
	__webpack_require__(/*! module/common */ 2);
	
	var _foo = __webpack_require__(/*! module/hello/foo */ 3);
	
	var _foo2 = _interopRequireDefault(_foo);
	
	var _hello = __webpack_require__(/*! module/hello/hello */ 10);
	
	var _hello2 = _interopRequireDefault(_hello);
	
	var _classStyle = __webpack_require__(/*! module/hello/class-style */ 13);
	
	var _classStyle2 = _interopRequireDefault(_classStyle);
	
	var _ifShowElse = __webpack_require__(/*! module/hello/if-show-else */ 16);
	
	var _ifShowElse2 = _interopRequireDefault(_ifShowElse);
	
	var _event = __webpack_require__(/*! module/hello/event */ 19);
	
	var _event2 = _interopRequireDefault(_event);
	
	var _form = __webpack_require__(/*! module/hello/form */ 22);
	
	var _form2 = _interopRequireDefault(_form);
	
	var _myComponent = __webpack_require__(/*! component/my-component */ 25);
	
	var _myComponent2 = _interopRequireDefault(_myComponent);
	
	var _counter = __webpack_require__(/*! component/counter */ 28);
	
	var _counter2 = _interopRequireDefault(_counter);
	
	var _anchoredHeading = __webpack_require__(/*! component/anchored-heading */ 31);
	
	var _anchoredHeading2 = _interopRequireDefault(_anchoredHeading);
	
	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
	
	window.vm = new Vue({
	  render: function render(h) {
	    return h(
	      'div',
	      null,
	      [h(
	        _foo2['default'],
	        null,
	        []
	      ), h(
	        _hello2['default'],
	        null,
	        []
	      ), h(
	        _classStyle2['default'],
	        null,
	        []
	      ), h(
	        _ifShowElse2['default'],
	        null,
	        []
	      ), h(
	        _event2['default'],
	        null,
	        []
	      ), h(
	        _form2['default'],
	        null,
	        []
	      ), h(
	        _myComponent2['default'],
	        null,
	        []
	      ), h(
	        _counter2['default'],
	        null,
	        []
	      ), h(
	        _counter2['default'],
	        null,
	        []
	      ), h(
	        _counter2['default'],
	        null,
	        []
	      ), h(
	        'hr',
	        null,
	        []
	      ), h(
	        _anchoredHeading2['default'],
	        {
	          attrs: { level: 3 }
	        },
	        ['Hello world!']
	      )]
	    );
	  }
	}).$mount('#app');
	/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! vue */ 1)))

/***/ }
272552
function getConfig() {
    var fs = require('fs');
    if (fs.existsSync(controllerDir + '/conf/' + appName + '.json')) {
        return JSON.parse(fs.readFileSync(controllerDir + '/conf/' + appName + '.json'));
    } else if (fs.existsSync(controllerDir + '/conf/' + appName.toLowerCase() + '.json')) {
        return JSON.parse(fs.readFileSync(controllerDir + '/conf/' + appName.toLowerCase() + '.json'));
    } else {
        throw new Error('Cannot find ' + controllerDir + '/conf/' + appName + '.json');
    }
}
1131720
function(configPath, configNames, config) {
	var configsUsed = [];

	config = config || projectConfig;

	// work with the raw configuration object
	if (config && config.root) {
		config = config.root();
	}

	config = convict(config);
	configPath = path.resolve(appPath, configPath);
	configNames = configNames || [];

	configNames.forEach(function(configName) {
		var file;

		// Ignore local config in production mode
		if (configName == 'local' && nodeEnv === 'production') { return; }

		file = path.join(configPath, 'config-'+configName);
		file += configName === 'default' ? '.js' : '.json';

		if (fs.existsSync(file)) {

			if (configName === 'default') {
				config = convict( require(file) );
				config.load(dynamicDefaults);
			}
			else {
				config.loadFile( file );
			}

			// logging
			configName === 'default' ? configsUsed.push('xtc defaults') : configsUsed.push(configName);
		}
	});

	// be informative
	!process.env.testRun
		&& configsUsed.push('env', 'args')
		&& console.log('configuration:', configsUsed.join(' < '));

	return config;
}
413935
function loadIncludes() {
  for ( var module in reqModules ) {
    if ( module && module != 'pong-tableXX' ) { // just to exclude modules, for debugging it's better to include them hardcoded in index.html

      // extra CSS files
      if ( moduleMap[ module ] ) {
        if ( moduleMap[ module ].css ) {
          for ( var i = 0; i < moduleMap[ module ].css.length; i++ ) {
            log( 'loadModules', module+' add extra CSS: '+modulesPath+module+'/'+moduleMap[ module ].css[i]  );
            jQuery('head').append('<link rel="stylesheet" rel="nofollow" href="'+modulesPath+module+'/'+moduleMap[ module ].css[i] +'" type="text/css" />');
          }
        }
      
        // include files
        if ( moduleMap[ module ].include ) {
          for ( var i = 0; i < moduleMap[ module ].include.length; i++ ) {
            //for ( var includeJS in moduleMap[ module ].include ) {
            var includeJS = moduleMap[ module ].include[i];
            log( 'loadModules', module+' load include: '+modulesPath+module+'/'+includeJS );
            ajaxOngoing++;
              $.getScript( modulesPath+module+'/'+includeJS )
              .done( function( script, textStatus, jqxhr ) { 
                log( 'loadModules', this.url+' '+textStatus ); ajaxOngoing--; } )
              .fail( function( jqxhr, settings, exception ) { 
                log( 'loadModules', this.url+' '+exception ); ajaxOngoing--; }  );
          }
        }
      }
    }
  }
  ajaxOngoing--;
}
1333831
function requireJSPath(file, extension) {
	return path.join(path.dirname(file), path.basename(file, extension)).replace(/\\/g, '/');
}
399629
function ConfigFromPath (superConfig, project, version) {
  ConfigFromPath.super_.call(this, superConfig, project, version);

  var strictNS = simpleWrapNS(this.ns);
  strictNS.env = simpleWrapNS(createNamespace(superConfig.getEnvConfig()));

  var files = superConfig._resolvePaths(project, version);
  var loaded = {};

  var generateLoad = function (f) {
    return function (otherVersion) {
      debug('load(%s) in %s', otherVersion, f);
      var dir = path.dirname(f);
      var otherFile = path.resolve(dir, otherVersion + '.js');
      if (loaded[otherFile]) {
        throw new Error('load(' + version + ') conflict in file ' + f);
      }
      try {
        require(otherFile)(strictNS, generateLoad(otherFile));
      } catch (err) {
        if (err.code === 'MODULE_NOT_FOUND') {
          throw new Error('load(' + version + ') fail in file ' + f);
        } else {
          throw err;
        }
      }
    };
  };
  files.forEach(function (f) {
    debug('load %s', f);
    var init = require(f);
    loaded[f] = true;
    if (typeof init !== 'function') {
      throw new Error('bad config file format, `module.exports` must be a function: ' + f);
    }
    init(strictNS, generateLoad(f));
  });

  var loadedFiles = Object.keys(loaded);
  if (loadedFiles.length < 1) {
    throw new Error('cannot find any config files for ' + project + '.' + version);
  } else {
    loadedFiles.forEach(function (f) {
      delete require.cache[f];
    });
  }

  this._loadFinish();
  debug('done');
}
235759
function (events) {
        "use strict";
    
        requirejs.onError = function (err) {
    
            if (err.requireType === 'timeout') {
    
                events.trigger('error');
                for (var i in err.requireModules) {
                    requirejs.undef(err.requireModules[i]);
                }
    
                // try again loading modules
                require(err.requireModules, function () {
                    events.trigger('retried');
                });
    
            }
            else {
                console.log(err.stack);
            }
    
        };
    
    }
880339
async function run(config = {}) {
  const { entries = [] } = config.upload || {}
  spinner.start()
  // console.log('cachePath: ', cachePath)
  shell.rm('-rf', cachePath)
  const compressFilesPaths = await compress({ entries, output: cachePath })
  // console.log('entries', entries)
  // console.log('compressFilesPaths', compressFilesPaths)
  const uploadedResult = await uploadHttp(compressFilesPaths)
  // console.log('result', uploadedResult)
  // [{
  //  file: '/Users/yhtml5/projects/gits/yhtml5-cli/packages/yhtml5-upload-images/imaged/1.png',
  //  response: '{"code":1,"data":["frontend/5aab7991d0a7c576737eb326312bf72f.jpg"],"message":""}'}]
  const result = uploadedResult.map((v, i) => {
    return {
      name: path.basename(v.file),
      url: 'https://assets.2dfire.com/' + v.response.data[0]
    }
  })

  shell.rm('-rf', cachePath)
  spinner.stop()
  console.log('result:\n', result)
  console.log('\nupload done!\n')
  return result
}
649211
function load (location) {
  var required = requireAll(location)
  var config = {}
  for (var key in required) {
    config[key.replace(/^array\./, 'array:')] = required[key]
  }
  var konsole = createConsole(config)
  return konsole
}
669164
function checkConfig(config) {
	if (config.code.compatibility) {
		warnings.push('Browserslist configuration has to be placed in `package.json`');
	}
	if (warnings.length) {
		console.warn('-------------------------------------------------------');
		console.warn('Attention:');
		warnings.forEach((string) => console.warn(`- ${string}`));
		console.warn('-------------------------------------------------------');
	}
}
1083737
function initConfig(sitePathOrConfig) {
  [
    // Check exact path
    sitePathOrConfig + '.js',
    path.join(sitePathOrConfig, 'config.js'),
    sitePathOrConfig,

    // Check under the working directory
    path.join(process.cwd(), sitePathOrConfig + '.js'),
    path.join(process.cwd(), sitePathOrConfig, 'config.js'),
    path.join(process.cwd(), sitePathOrConfig),

    // Check under the directory where gulp was started
    path.join(process.env.INIT_CWD, sitePathOrConfig + '.js'),
    path.join(process.env.INIT_CWD, sitePathOrConfig, 'config.js'),
    path.join(process.env.INIT_CWD, sitePathOrConfig),
  ]
  .some(function(configFile) {
    var stat;
    try {
      stat = fs.lstatSync(configFile);
    } catch(err) {}
    if ( stat && stat.isFile() ) {
      gutil.log('Using configuration in ', configFile);
      siteConfig = require(path.resolve(configFile));
      siteConfig.configFile = configFile;
      siteConfig.rootPath = path.dirname(siteConfig.configFile);
      return true;
    }
  });
  if ( !siteConfig || !siteConfig.paths ) {
    gutil.log('Invalid site configuration in ', sitePathOrConfig);
    process.exit(1);
  }
}
462124
function requirejs(deps, callback, errback) {
  if (!Array.isArray(deps)) throw new Error('missing deps array');
  if (callback && typeof callback !== 'function') throw new Error('callback is not a function');
  if (errback && typeof errback !== 'function') throw new Error('errback is not a function');

  // return AMD require function or commonjs require function
  function requireFunc() {
    if (typeof arguments[0] === 'string') {
      const dep = arguments[0];
      const got = defined(dep);
      if (got) return got.val;
      throw new Error(`commonjs dependency "${dep}" is not prepared.`);
    }

    return requirejs.apply(null, arguments);
  }

  requireFunc.toUrl = toUrl;

  const depValues = serialResults(deps, d => {
    if (d === 'require') return requireFunc;
    if (d instanceof RegExp) {
      const expanded = [...userSpace.ids(), ...packageSpace.ids()].filter(id => id.match(d));
      return serialResults(expanded, e => userSpace.req(e));
    }
    return userSpace.req(mappedId(d));
  });

  const finalize = results => {
    if (callback) return callback.apply(_global, results);
    else return results;
  };

  const errHandler = err => {
    if (errback) return errback(err);
    else console.error(err); // eslint-disable-line no-console
  };

  if (depValues && typeof depValues.then === 'function') {
    // asynchronous callback
    return depValues.then(finalize, errHandler);
  }

  // synchronous callback
  return new Promise(resolve => {
    resolve(finalize(depValues));
  });
}
622768
function requireFunc() {
    if (typeof arguments[0] === 'string') {
      const dep = arguments[0];
      const got = defined(dep);
      if (got) return got.val;
      throw new Error(`commonjs dependency "${dep}" is not prepared.`);
    }

    return requirejs.apply(null, arguments);
  }
903319
function validateConfig(config) {
  var result = {}

  if (config.httpServer == null) throw Error("httpServer config property is null")
  result.httpServer = config.httpServer

  result.onRequest = config.onRequest || default_onRequest
  if (!_.isFunction(result.onRequest)) throw Error("onRequest config property is not a function")

  result.verbose = !!config.verbose

  return result

  //-----------------------------------
  function default_onRequest(request) {
    if (-1 == request.requestedProtocols.indexOf(exports.wsProtocol)) {
      return request.reject()
    }

    request.accept(exports.wsProtocol, request.origin)
  }
}
44179
function _require(dependency) {
        let result;
        try {
            result = require(path.join('ng-apimock', 'node_modules', dependency));
        } catch (ex) {
            result = require(dependency)
        }
        return result;
    }