Esempio n. 1
0
	return through.obj(function(file, enc, cb) {
		if (file.isNull()) {
			cb(null, file);
			return;
		}

		if (file.isStream()) {
			cb(new gutil.PluginError(PLUGIN_NAME, 'Streaming not supported'));
			return;
		}

		var optimizeOptions = generateOptions(file);
		if (typeof optimizeOptions !== 'object') {
			cb(new gutil.PluginError(PLUGIN_NAME, 'Options function must produce an options object'));
			return;
		}

		optimizeOptions = defaults({}, optimizeOptions, {
			logLevel: 2,
			baseUrl: file.base,
			out: file.relative,
			generateSourceMaps: !!file.sourceMap
		});

		if (optimizeOptions.generateSourceMaps) {
			defaults(optimizeOptions, {
				preserveLicenseComments: false,
				optimize: 'uglify2'
			});
		}

		if (!optimizeOptions.include && !optimizeOptions.name) {
			optimizeOptions.include = file.relative;
		}

		if (typeof optimizeOptions.out !== 'string') {
			cb(new gutil.PluginError(PLUGIN_NAME, 'If `out` is supplied, it must be a string'));
			return;
		}

		var out = optimizeOptions.out;
		optimizeOptions.out = function(text, sourceMapText) {
			var file = new gutil.File({
				path: out,
				contents: new Buffer(text)
			});

			if (sourceMapText) {
				applySourceMap(file, sourceMapText);
			}

			cb(null, file);
		};

		gutil.log('Optimizing ' + chalk.magenta(file.path));
		requirejs.optimize(optimizeOptions, null, function(err) {
			error = err;
			cb();
		});
	}, function(cb) {
Esempio n. 2
0
ConfigReader.prototype.getConfig = function () {
  var parameterConfig = this.parameterConfig
  var systemConfig = this._getSystemConfig()
  var envVarConfig = this._getEnvVarConfig()
  var defaultConfig = this._getDefaultConfig()

  var config = defaults({}, parameterConfig, systemConfig, envVarConfig)

  var configFilePath = parameterConfig.configPath || envVarConfig.configPath || defaultConfig.configPath

  var fileConfig = this._getFileConfig(configFilePath)

  config = defaults(
    config,
    fileConfig,
    defaultConfig
  )

  config.whiteListHosts = [url.parse(config.collectorApiUrl).host]

  if (!config.apiKey) {
    throw new Error('Missing apiKey')
  }

  if (!config.serviceName) {
    throw new Error('Missing serviceName')
  }

  return config
}
Esempio n. 3
0
  setOptions: function (opts) {
    var me = this;
    opts = opts || {};

    var jsxOptions = opts['jsx'] || {};

    me.jsxOptions = defaults(jsxOptions, {
      formatJSX: true,
      attrsOnSameLineAsTag: true,
      maxAttrsOnTag: null,
      firstAttributeOnSameLine: false,
      alignWithFirstAttribute: true
    });

    if (me.jsxOptions.maxAttrsOnTag < 1) {
      me.jsxOptions.maxAttrsOnTag = 1;
    }

    var htmlOptions = jsxOptions.htmlOptions || {};
    me.htmlOptions = defaults(htmlOptions ,  {
      brace_style: "collapse",
      indent_char: " ",
      //indentScripts: "keep",
      indent_size: 2,
      max_preserve_newlines: 2,
      preserve_newlines: true,
      //indent_handlebars: true
      unformatted: ['a', 'span', 'img', 'bdo', 'em', 'strong', 'dfn', 'code', 'samp', 'kbd', 'var', 'cite', 'abbr', 'acronym', 'q', 'sub', 'sup', 'tt', 'i', 'b', 'big', 'small', 'u', 's', 'strike', 'font', 'ins', 'del', 'pre', 'address', 'dt', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6']
      //wrapLineLength: 0
    });

    //}
  },
Esempio n. 4
0
module.exports = function throng(options, startFunction) {
  options = options || {};
  let startFn = options.start || startFunction || options;
  let masterFn = options.master || NOOP;

  if (typeof startFn !== 'function') {
    throw new Error('Start function required');
  }
  if (cluster.isWorker) {
    return startFn(cluster.worker.id);
  }

  let opts = isNaN(options) ?
    defaults(options, DEFAULT_OPTIONS) : defaults({ workers: options }, DEFAULT_OPTIONS);
  let emitter = new EventEmitter();
  let running = true;
  let runUntil = Date.now() + opts.lifetime;

  listen();
  masterFn();
  fork();

  function listen() {
    cluster.on('exit', revive);
    emitter.once('shutdown', shutdown);
    process
      .on('SIGINT', proxySignal)
      .on('SIGTERM', proxySignal);
  }

  function fork() {
    for (var i = 0; i < opts.workers; i++) {
      cluster.fork();
    }
  }

  function proxySignal() {
    emitter.emit('shutdown');
  }

  function shutdown() {
    running = false;
    for (var id in cluster.workers) {
      cluster.workers[id].process.kill();
    }
    setTimeout(forceKill, opts.grace).unref();
  }

  function revive(worker, code, signal) {
    if (running && Date.now() < runUntil) cluster.fork();
  }

  function forceKill() {
    for (var id in cluster.workers) {
      cluster.workers[id].kill();
    }
    process.exit();
  }
};
function createPhysicsBody(params) {
	defaults(params, defaultActorParams);
	var shape;
	switch(params.shape) {
		case 'circle':
			defaults(params, defaultCircleParams);

			delete fixDef.width;
			delete fixDef.height;
			fixDef.radius = params.radius;

			shape = new Box2D.b2CircleShape();
			shape.m_radius = params.radius * SCALE;
			
			break;
		case 'rectangle':
			defaults(params, defaultRectangleParams);

			delete fixDef.radius;
			fixDef.width = params.width;
			fixDef.height = params.height;

			shape = new Box2D.b2PolygonShape();

			// half width, half height.
			shape.SetAsBox(params.width * 0.5 * SCALE, params.height * 0.5 * SCALE);
			fixDef.width = params.width;
			fixDef.height = params.height;

			break;
		default:
			throw new Error('unkown shape');
	}
	bodyDef.fixedRotation = params.fixedRotation;
	bodyDef.type = params.staticBody ? Box2D.b2Body.b2_staticBody : Box2D.b2Body.b2_dynamicBody;

	bodyDef.position = new Box2D.b2Vec2(params.x * SCALE, params.y * SCALE);
	bodyDef.angularDamping = params.angularDamping;
	bodyDef.linearDamping = params.linearDamping;
	bodyDef.bullet = params.bullet;

	fixDef.density = params.density;
	fixDef.friction = params.friction;
	fixDef.restitution = params.restitution;
	
	fixDef.shape = shape;

	filter.categoryBits = params.categoryBits;
	filter.maskBits = params.maskBits;

	var body = addBody(bodyDef, fixDef, params.mesh);
	body.name = params.name;
	return body;
}
Esempio n. 6
0
  getConfig: function() {
    var projectConfig = ((this.project.config(process.env.EMBER_ENV) || {}).moment || {});
    var momentPath = path.dirname(require.resolve('moment'));

    var config = defaults(projectConfig, {
      momentPath: momentPath,
      includeTimezone: null,
      includeLocales: []
    });

    if (Array.isArray(config.includeLocales)) {
      config.includeLocales = config.includeLocales.filter(function(locale) {
        return typeof locale === 'string';
      }).map(function(locale) {
        return locale.replace('.js', '').trim().toLowerCase();
      }).filter(function(locale) {
        if (locale === 'en') {
          // `en` is included by default.  quietly ignore if user specifies it in the list
          return false;
        }

        if (!existsSync(momentPath + '/locale/' + locale + '.js')) {
          console.log(chalk.red('ember-moment: Specified locale `' + locale + '` but could not find in moment/locale.\nVisit https://github.com/moment/moment/tree/master/locale to view the full list of supported locales.'));
          return false;
        }

        return true;
      });
    }

    return config;
  },
function consoleTasks(app, options) {
  options = _defaults({}, options, {
    'tasksPath': require('path').resolve() + '/server/tasks/'
  });

  var cls = {};

  cls.intercept = function () {
    var argv = require('minimist')(process.argv.slice(2));

    if (argv.task) {
      console.log('Welcome to console!');

      if (fs.existsSync(options.tasksPath + argv.task + '.js')) {
        console.log('Executing "' + argv.task + '":');

        require(options.tasksPath + argv.task)(app, argv);

        return true;
      } else {
        console.log('Task "' + argv.task + '" not found');

        return process.exit(0);
      }
    }

    return false;
  }

  return cls;
}
Esempio n. 8
0
function Drag(phys, opts, start) {
  var handles

  this._phys = phys
  if(typeof opts === 'function') {
    this._startFn = opts
    opts = {}
  } else {
    this._startFn = start
  }

  this._opts = defaults({}, defaultOpts, opts)

  //Warn of deprecated option
  if(this._opts.boundry){
    console.warn("Warning: Misspelled option 'boundry' is being deprecated. Please use 'boundary' instead.");
    this._opts.boundary = this._opts.boundry;
    delete this._opts.boundry;
  }

  handles = this._opts.handle


  if(handles && !handles.length) {
    handles = [handles]
  } else if(handles && handles.length) {
    handles = [].slice.call(handles)
  } else {
    handles = phys.els
  }
  handles.forEach(this._setupHandle, this)
}
Esempio n. 9
0
exports.getTermFrequency = function (docVector, options) {
  options = _defaults(options || {}, {
    scheme: 'raw',
    weight: 0
  })
  //handle empty docVector
  if (!docVector) {
    return []
  }
  if (docVector.length == 0) {
    return []
  }
  if (options.scheme === 'logNormalization') {
    return docVector.map(function (item) {
      return [item[0], +options.weight + Math.log(1 + (+item[1]))]
    })
  } else if (options.scheme === 'doubleLogNormalization0.5') {
    var maxFreq = docVector.sort(function (a, b) {
      a[1] - b[1]
    })[docVector.length - 1][1]
    return docVector.map(function (item) {
      return [item[0], +options.weight + 0.5 + ((Math.log((0.5 + (+item[1])))) / maxFreq)]
    })
  } else if (options.scheme === 'raw') {
    return docVector.map(function (item) {
      return [item[0], +options.weight + item[1]]
    })
  }
}
function CommandOptions(options) {
  const defaultOptions = {};
  new FastbootCommand().availableOptions.forEach(o => {
    defaultOptions[camelize(o.name)] = o.default;
  });
  return defaults(options || {}, defaultOptions);
};
Esempio n. 11
0
 ], function(err, results){
   var options = defaults(givenOptions, results[0])
   if (results[1] != null) {
     options.indexes = results[1]
   }
   return callbacky(err, options)
 })
Esempio n. 12
0
Ads1x15.prototype.readADCSingleEnded = function(opts , cb) {
  var self = this;

  defaults(opts, {
    channel: 0,
    pga: pgaDefault,
    sps: self.ic.spsDefault,
  });

  var config = defaultConfig;

  try {
    config = self._configSps(config, opts.sps);
    config = self._configPga(config, opts.pga);
  } catch (err) {
    return cb(err);
  };

  // Set the channel to be converted

  if (!channels[opts.channel]) {
    return cb({message: "ADS1x15: Invalid channel specified: " + opts.channel});
  }
  config |= channels[opts.channel];

  // Set 'start single-conversion' bit
  config |= ADS1015_REG_CONFIG_OS_SINGLE

  self._useConfig(config, opts.sps, function() {
    self._readResult(opts.pga, cb);
  });
};
Esempio n. 13
0
Agent.prototype.openSpan = function (data) {
  var traceId = data.id

  if (!traceId) {
    return
  }

  var dataTrace = {
    trace: traceId,
    service: this.serviceKey
  }

  dataTrace.span = data.url
  dataTrace.host = data.host

  // fallback to appName if service id is not present
  if (!isNumber(this.serviceKey)) {
    dataTrace.serviceName = this.serviceName
  }

  this.partials[traceId] = defaults(this.partials[traceId] || {}, dataTrace, {
    events: []
  })

  return this.partials[traceId]
}
Esempio n. 14
0
/**
 * The entry point of the program. Configures the cluster
 * in the master process and then creates workers.
 *
 * If `forkee` is a function, the worker processes will simply execute it.
 * However, if `forkee` is a string it is assumed to be a path and worker
 * processes will run the file at that path instead.
 *
 * @param {Function|String} forkee Function to call or file to require.
 * @param {Object} options The options passed to the program.
 */
function clusterfork (forkee, options) {
  options = defaults(options, { verbose: false, refork: true });

  const log = message => options.verbose && console.log(message);

  if (cluster.isMaster) {
    if (typeof forkee === 'string') {
      cluster.setupMaster({ exec: join(process.cwd(), forkee) });
    }

    cluster
      .on('fork', (worker) => {
        log(`created worker (pid=${worker.process.pid})`);
      })
      .on('listening', (worker, addr) => {
        log(`worker (pid=${worker.process.pid}) listening on ${addr.port}`);
      })
      .on('exit', (worker, code, signal) => {
        log(`worker (pid=${worker.process.pid}) died (${signal || code})`);
        if (options.refork && code > 0) {
          cluster.fork();
        }
      });

    times(options.concurrency || cpus().length, cluster.fork);
  } else {
    forkee();
  }
}
export default function createActionAsync(description, api, options = defaultOption) {
  _defaults(options, defaultOption);
  let actions = {
    request: createAction(`${description}_REQUEST`, options.request.payloadReducer, options.request.metaReducer),
    ok: createAction(`${description}_OK`, options.ok.payloadReducer, options.ok.metaReducer),
    error: createAction(`${description}_ERROR`, options.error.payloadReducer, options.error.metaReducer)
  }

  let actionAsync = (...args) => {
    return (dispatch, getState) => {
      dispatch(actions.request(...args));
      return api(...args, dispatch, getState)
      .then(response => {
        dispatch(actions.ok({
            request: args,
            response: response
        }))
      })
      .catch(error => {
        const errorOut = {
            request: args,
            error: error
        }
        dispatch(actions.error(errorOut))
        if(options.rethrow) throw errorOut;
      })
    }
  }
  actionAsync.request = actions.request;
  actionAsync.ok = actions.ok;
  actionAsync.error = actions.error;
  return actionAsync;

};
Esempio n. 16
0
function src(glob, opt) {
  if (!isValidGlob(glob)) {
    throw new Error('Invalid glob argument');
  }

  var options = defaults({}, opt, {
    read: true,
    buffer: true
  });

  var globStream = gs.create(glob, options);

  // when people write to use just pass it through
  var outputStream = globStream
    .pipe(formatStream())
    .pipe(getStats(options));

  if (options.read !== false) {
    outputStream = outputStream
      .pipe(getContents(options));
  }

  return outputStream
    .pipe(through.obj());
}
Esempio n. 17
0
function getEntryConfig(file, fileLastMod, config) {
    var mappingsForFile = find(config.mappings, function(item) {
        return multimatch(file, item.pages).length > 0;
    }) || {};

    var properties = ['lastmod', 'priority', 'changefreq', 'hreflang'];

    var entry = defaults(
        pick(mappingsForFile, properties),
        pick(config, properties)
    );

    if (entry.lastmod === null) {
        entry.lastmod = fileLastMod || Date.now();
    }

    //turn index.html into -> /
    var relativeFile = file.replace(/(index)\.(html?){1}$/, '', 'i');
    //url location. Use slash to convert windows \\ or \ to /
    var adjustedFile = slash(relativeFile);
    entry.loc = config.siteUrl + adjustedFile;
    entry.file = adjustedFile;

    return entry;
}
Esempio n. 18
0
module.exports = function (source, bundle, opts) {
    if (opts === undefined) opts = {};
    defaults(opts, {
        returnCheerio: false,
        stripDataAttributes: true
    });

    var out = translate('', source);
    if (opts.returnCheerio) return $.load(out);
    return out;


    function translate(_head, _tail) {
        var result = re.exec(_tail)
        if(result === null) {
            return _head.concat(_tail);
        }
        
        var start = result.index;
        var len = result[0].length;
        var end = start + len;

        var head = _head.concat(_tail.slice(0, start));
        var tail = _tail.slice(end);
        var $tag = $(_tail.slice(start, end));

        var key = $tag.attr('data-l10n');
        $tag.html(selectn(key, bundle));
        if (opts.stripDataAttributes) $tag.removeAttr('data-l10n');

        return translate(head.concat($.html($tag)), tail);
    }

};
function Strategy(options, verify) {
	const defaultOptions = {
		authorizationURL: 'https://musicbrainz.org/oauth2/authorize',
		tokenURL: 'https://musicbrainz.org/oauth2/token'
	};

	if (!verify) {
		throw new TypeError(
			'MusicBrainzOAuth2Strategy requires a verify callback'
		);
	}

	const REQUIRED_OPTIONS = [
		'clientID', 'clientSecret', 'callbackURL', 'scope'
	];
	REQUIRED_OPTIONS.forEach((requiredOption) => {
		if (!options[requiredOption]) {
			throw new TypeError(
				`MusicBrainzOAuth2Strategy requires a ${requiredOption} option`
			);
		}
	});

	const modifiedOptions = _defaults(options, defaultOptions);
	OAuth2Strategy.call(this, modifiedOptions, verify);
	this.name = 'musicbrainz-oauth2';
}
Esempio n. 20
0
Ads1x15.prototype.readADCDifferential = function(opts, cb) {
  var self = this;

  defaults(opts, {
    chP: 0,
    chN: 1,
    pga: pgaDefault,
    sps: self.ic.defaultSps,
  });

  var config = defaultConfig;

  // Set channels
  if (!diffs.hasOwnProperty(opts.chP) || !diffs[opts.chP].hasOwnProperty(opts.chN)) {
    return cb({message: "ADS1x15: Invalid channels specified: " + opts.chP + ", " + opts.chN});
  };
  config |= diffs[opts.chP][opts.chN];

  try {
    config = self._configSps(config, opts.sps);
    config = self._configPga(config, opts.pga);
  } catch (err) {
    return cb(err);
  };

  // Set 'start single-conversion' bit
  config |= ADS1015_REG_CONFIG_OS_SINGLE;

  self._useConfig(config, opts.sps, function() {
    self._readResult(opts.pga, cb);
  });
};
// Easy wrapper around createRoute
function createAPIDoc(def) {
  return routeHelper.routeToAPIDoc(_defaults(def, {
    path: '/test',
    verb: 'GET',
    method: 'test.get'
  }));
}
Esempio n. 22
0
function BaseSampler(db, collectionName, opts) {
  this.db = db;
  this.collectionName = collectionName;
  this.opts = opts;

  opts = _defaults(opts || {}, {
    query: {},
    size: 5,
    fields: null,
    raw: false,
    sort: {
      _id: -1
    },
    maxTimeMS: undefined,
    promoteValues: true
  });

  this.query = opts.query || {};
  this.size = opts.size;
  this.raw = opts.raw;
  this.fields = opts.fields;
  this.sort = opts.sort;
  this.maxTimeMS = opts.maxTimeMS;
  this.promoteValues = opts.promoteValues;

  Readable.call(this, {
    objectMode: true
  });
}
Esempio n. 23
0
function createConfig(userConfig) {
  var env = process.env;
  var config = userConfig || {};

  defaults(config, {
    username: env.TUNNELSSH_USER || env.USER || env.USERNAME,
    port: 22,
    srcPort: 0,
    srcHost: '127.0.0.1',
    dstPort: null,
    dstHost: '127.0.0.1',
    host: config.dstHost,
    localHost: '127.0.0.1',
    localPort: null,
    agent: process.env.SSH_AUTH_SOCK
  });

  // No local route, no remote route.. exit here
  if (!config.dstPort || !config.dstHost || !config.host) {
    throw new Error('invalid configuration.');
  }

  // Use the same port number local
  if (config.localPort === undefined) {
    config.localPort = config.dstPort;
  }
  return config;
};
Esempio n. 24
0
module.exports = function reactInliner(options){
  var userOptions = merge(options || {}, { reactId: true });

  var render = userOptions.reactId ? React.renderToString : React.renderToStaticMarkup;

  return through(function(chunk, enc, done){
    var frag = chunk.toString('utf8');
    var html = '';
    var reactMod = null;
    var re = /data-react-(inject|inliner)="([^"]+)"([^>]*)>/gm;
    var attrMatch;

    while(attrMatch = re.exec(frag)){
      try {
        reactMod = require(path.join(basePath, attrMatch[2]));
        html = render(React.createElement(reactMod, reactMod.__reactData || null));
      }
      catch (err){
        return done(err);
      }

      frag = frag.replace(attrMatch[0], attrMatch[0] + html);
    }

    done(null, frag);
  });
};
Esempio n. 25
0
exports.available = function(opts, fn) {
  opts = defaults(opts || {}, {
    stable: false,
    unstable: false,
    rc: false
  });

  versions(function(err, res) {
    if (err) return fn(err);
    res = res.map(function(v) {
      return semver.parse(v);
    })
      .filter(function(v) {
        v.stable = v.minor % 2 === 0;
        v.unstable = !v.stable;
        v.rc = v.prerelease.length > 0;

        if (!opts.rc && v.rc) return false;
        if (!opts.stable && v.stable) return false;
        if (!opts.unstable && v.unstable) return false;
        return true;
      })
      .map(function(v) {
        return v.version;
      });
    fn(null, res);
  });
};
Esempio n. 26
0
  }).then(function (inliner) {
    // checks for available update and returns an instance
    // note: we're doing this after we kick off inliner, since there's a
    // noticeable lag in boot because of it
    var defaults = require('lodash.defaults');
    var pkg = JSON.parse(readFileSync(__dirname + '/../package.json'));

    require('update-notifier')({
      pkg: defaults(pkg, { version: '0.0.0' }),
    }).notify();

    inliner.on('warning', function progress(event) {
      console.warn('warning: ' + event);
    });

    if (argv.verbose) {
      inliner.on('progress', function progress(event) {
        console.error(event);
      });

      inliner.on('jobs', function jobs(event) {
        console.error(event);
      });
    }
  });
Esempio n. 27
0
  uid.generate(5, efh(cb)(function (id) {
    var pkg = defaults((typeof input === 'object' ? input : {}), {
      name: id,
      version: '0.0.0',
      devDependencies: {
        'semantic-release': 'file:../../../'
      },
      scripts: {
        prepublish: 'semantic-release pre',
        postpublish: 'semantic-release post'
      },
      publishConfig: {
        registry: 'http://*****:*****@test" && ' +
      'git config user.name "Integration Test" && ' +
      'git commit -m "initial" && ' +
      'npm install'
    , efh(cb)(function (stdout) {
      cb(null, id, cwd)
    }))
  }))
const buildEditorContextMenu = function(selection, mainTemplate, suggestionsTemplate) {

  selection = defaults({}, selection, {
    isMisspelled: false,
    spellingSuggestions: []
  });

  const template = getTemplate(mainTemplate, DEFAULT_MAIN_TPL);
  const suggestionsTpl = getTemplate(suggestionsTemplate, DEFAULT_SUGGESTIONS_TPL);

  if (selection.isMisspelled) {
    const suggestions = selection.spellingSuggestions;
    if (isEmpty(suggestions)) {
      template.unshift.apply(template, suggestionsTpl);
    } else {
      template.unshift.apply(template, suggestions.map(function(suggestion) {
        return {
          label: suggestion,
          click: function() {
            currentWebContents().replaceMisspelling(suggestion);
          }
        };
      }).concat({
        type: 'separator'
      }));
    }
  }

  return Menu.buildFromTemplate(template);
};
Esempio n. 29
0
function options(opts) {
  if (typeof opts === 'string') {
    opts = {
      version: opts
    };
  }

  opts = opts || {};

  defaults(opts, {
    version: process.env.MONGODB_VERSION || 'stable',
    arch: ARCH,
    platform: PLATFORM,
    branch: 'master',
    bits: '64',
    debug: false
  });

  parsePlatform(opts);
  parseBits(opts);
  parseFileExtension(opts);
  parseDistro(opts);
  parseArch(opts);
  return opts;
}
Esempio n. 30
0
// Generates list of @import paths for a given Vinyl file
function getLessFileImports(file, options, cb) {
	var imports = [];

	// Support (file, cb) signature
	if(typeof options === 'function') {
		cb = options; options = null;
	}

	// Create new parser instance, using file path as `filename` option
	var parser = new less.Parser(mergeDefaults({
		filename: file.path
	}, 
	options || {}));

	// Parse the source into AST tree via LESS and return `imports` array
	parser.parse(file.contents.toString('utf8'), function (err, tree) {
		// Add a better error message / properties
		if (err) { 
			err.lineNumber = err.line;
			err.fileName = err.filename;
			err.message = err.message + ' in file ' + err.fileName + ' line no. ' + err.lineNumber;
		} 

		// Generate imports list from the files hash (sorted)
		var imports = Object.keys(parser.imports.files).sort();

		cb(err, imports);
	});
};