var util = require('util'); var buf = sprintf('%-9.1A\n', 10.19); console.log(util.inspect(buf, {colors: true, depth: null}));
966931
function parseFormatDescriptor(formatStr, pos) {

    var fd = {};    // return object

    if (typeof formatStr !== 'string' || pos >= formatStr.length)
        return fd;

    // check argument sanity
    if (typeof pos !== 'number' || typeof formatStr !== 'string' || formatStr.length <= pos)
        return fd;

    if (formatStr[pos] !== '%') return fd;
    fd.startPos = pos;      // startPos is the character position where the '%' is
    if (++pos >= formatStr.length) return fd;   // skip the '%'

    // get the flags
    // Flag    Meaning
    // -       The output is left justified in its field, not right justified (the default).
    // +       Signed numbers will always be printed with a leading sign (+ or -).
    // space   Positive numbers are preceded by a space (negative numbers by a - sign).
    // 0       For numeric conversions, pad with leading zeros to the field width.
    // #       An alternative output form. For o, the first digit will be '0'. For x or X,
    //          "0x" or "0X" will be prefixed to a non-zero result. For e, E, f, F, g and G,
    //          the output will always have a decimal point; for g and G, trailing zeros will
    //          not be removed.
    fd.flags = {};
    fd.flags.leftJustified = false;
    fd.flags.forceSign = false;
    fd.flags.showNegSign = false;
    fd.flags.leadingZeros = false;
    fd.flags.altNumeric = false;

    while (pos < formatStr.length && (formatStr[pos] === '-' || formatStr[pos] === '+' ||
             formatStr[pos] === ' ' || formatStr[pos] === '0' || formatStr[pos] === '#')) {
        switch (formatStr[pos]) {
        case '-':
            fd.flags.leftJustified = true;
            break;
        case '+':
            fd.flags.forceSign = true;
            break;
        case ' ':
            fd.flags.showNegSign = true;
            break;
        case '0':
            fd.flags.leadingZeros = true;
            break;
        case '#':
            fd.flags.altNumeric = true;
            break;
        }
        pos++;
    }

    if (pos >= formatStr.length) return fd;

    // get the field width
    // The converted argument will be printed in a field at least this wide, and wider if
    // necessary. If the converted argument has fewer characters than the field width, it
    // will be padded on the left (or right, if left adjustment has been requested) to make
    // up the field width. The padding character is normally ' ' (space), but is '0' if the
    // zero padding flag (0) is present.
    //
    // If the field width is specified as *, the value is computed from the next argument,
    // which must be an int.
    if (formatStr[pos] === '*') {
        fd.fieldWidth = '*';
        pos++;
    } else if (formatStr[pos] >= '0' && formatStr[pos] <= '9') {
        fd.fieldWidth = formatStr[pos++];
        while (pos <= formatStr.length && formatStr[pos] >= '0' && formatStr[pos] <= '9')
            fd.fieldWidth += formatStr[pos++];
        fd.fieldWidth = parseInt(fd.fieldWidth, 10);
    }

    if (pos >= formatStr.length) return fd;

    // get the percision
    // A dot '.' separates the field width from the precision.
    // If the precision is specified as *, the value is computed from the next argument, which must be an int.
    if (formatStr[pos] === '.') {
        if (++pos >= formatStr.length) return fd;

        if (formatStr[pos] === '*') {
            fd.precision = '*';
            pos++;
        } else if (formatStr[pos] >= '0' && formatStr[pos] <= '9') {
            fd.precision = formatStr[pos++];
            while (pos <= formatStr.length && formatStr[pos] >= '0' && formatStr[pos] <= '9')
                fd.precision += formatStr[pos++];
            fd.precision = parseInt(fd.precision, 10);
        }
    }

    if (pos >= formatStr.length) return fd;

    // Get the lenth modifier
    // Char Meaning
    // h    The value is to be displayed as a short or unsigned short.
    // l    For d, i, o, u, x or X conversions: the argument is a long, not an int.
    // L    For e, f, g or G conversions: the argument is a long double.
    // NOTE: We handle a length modifier, if present but don't do anything with it
    if (formatStr[pos] === 'h' || formatStr[pos] === 'l' || formatStr[pos] === 'L')
        pos++;

    if (pos >= formatStr.length) return fd;

    // get the conversion character
    // Conversion   Meaning
    // s    The maximum number of characters to be printed from the string.
    // e, E, f  The number of digits to be printed after the decimal point.
    // g, G The number of significant digits.
    // d, i, o, u, x, X The minimum number of digits to be printed. Leading
    //    zeros will be added to make up the field width.
    if (isConversionChar(formatStr[pos]))
        fd.conversion = formatStr[pos++];
    else
        fd.conversion = false;

    fd.endPos = pos;
    return fd;
}
597799
function() {
           
            var hex = this.get(this.OPT.HEX),
                l   = hex.length,
                c,i,rgb;

            // support #369 -> #336699 shorthand
            if (l === 3) {
                c = hex.split("");
                for (i=0; i<l; i=i+1) {
                    c[i] = c[i] + c[i];
                }

                hex = c.join("");
            }

            if (hex.length !== 6) {
                this.logger.log(this.get(this.TXT.ILLEGAL_HEX), "error");
                return false;
            }

            rgb = Color.hex2rgb(hex);

            this.logger.log(sub("Hex value set to {hex} ({rgb})", {
                    hex: hex, rgb: rgb
                }));

            this.setValue(rgb);
        }
578265
def do_inspect(self, arg):
        
        if arg in self.curframe.f_locals:
            obj = self.curframe.f_locals[arg]
        elif arg in self.curframe.f_globals:
            obj = self.curframe.f_globals[arg]
        else:
            obj = WebPdb.null
        if obj is not WebPdb.null:
            self.console.writeline(
                '{0} = {1}:\n'.format(arg, type(obj))
            )
            for name, value in inspect.getmembers(obj):
                if not (name.startswith('__') and (name.endswith('__'))):
                    self.console.writeline('    {0}: {1}\n'.format(
                        name, self._get_repr(value, pretty=True, indent=8)
                    ))
        else:
            self.console.writeline(
                'NameError: name "{0}" is not defined\n'.format(arg)
            )
        self.console.flush()
530036
function (color, func) {
  exports[color] = function(str) {
    return func.apply(str);
  };
  String.prototype.__defineGetter__(color, func);
}
954653
function(item) {
  // Drop newline symbol in error string
  item.msg = (Array.isArray(item.msg) ? item.msg.join(' ') : item.msg).replace('\n', '');
  // Using zero instead of undefined
  item.column = (item.column === undefined) ? 0 : item.column;
  // Drop `PUG:LINT_` prefix in error code
  item.code = chalk.grey(item.code.replace(/(PUG:|LINT_)/g, ''));
  // Formatting output
  var position = chalk.grey(item.line + ':' + item.column);
  return ['', position, chalk.red('error'), item.msg, item.code];
}
430018
function print(object) {
    console.log(util.inspect(object, null, null, true));
}
885648
function parseVarInt(cursor) {
    var result = 0, byte;

    do {
        byte = cursor.readUInt8();

        result <<= 7;
        result |= byte & 0x7F;
    } while (byte & 0x80);

    return result;
}
80514
function parse_PtgAttrIfError(blob) {
	var bitIf = (blob[blob.l+1] & 0xFF) ? 1 : 0;
	blob.l += 2;
	return [bitIf, blob.read_shift(2)];
}
1353068
function getValueBuffer(key, req, stringify) {
  var val = this.getKey(key, req);
  // should have buffer, string or number
  if(val !== undefined) {
    if(typeof val === 'number' && !stringify) val = new Buffer([val]);
    val = (val instanceof Buffer) ? val : new Buffer('' + val);
  }
  return val;
}
593561
function(f)
	{
		var str = null;

		if (f != null)
		{
			if (f.name != null)
			{
				str = f.name;
			}
			else
			{
				str = mxUtils.trim(f.toString());
				
				if (/^function\s/.test(str))
				{
					str = mxUtils.ltrim(str.substring(9));
					var idx2 = str.indexOf('(');
					
					if (idx2 > 0)
					{
						str = str.substring(0, idx2);
					}
				}
			}
		}
		
		return str;
	}
1307228
function(value) {
        if(value.length != 6)
            throw new Error("Hexa color: bad length");
        value = value.toLowerCase();
        for(i in value) {
            var c = value.charCodeAt(i);
            console.log(c);
            if( !((c>=49 && c<=57) || (c>=97 && c<=102)) )
                throw new Error("Hexa color: out of range for " + value + " at position " + i);
        }
    }
395467
function tlid__toDate(str) {
  // var dt = new Date(str); //@s 181223 Wont work as it require "-"
  var tlidValue = tlid__xtr(str);
  var r = "";

  var y = "20" + getchk_sub(tlidValue, 0, 2); // will bug in 82 years, well, I am not pessimistic here but possibly will not be there or if I do, I wont care so much... I must add a reminder for 2099/12/31 to update tlid.todate.... ;)

  var m = getchk_sub(tlidValue, 2, 4) - 1;
  var d = getchk_sub(tlidValue, 4, 6);

  r = `${y}/${m != "" ? m : 1}/${d != "" ? d : 1}`;

  if (debugDt) console.log(`Year: ${y}`);
  if (debugDt) console.log(`Month: ${m}`);
  if (debugDt) console.log(`Day: ${d}`);
  var h = "00";
  var M = "00";
  var s = "00";
  var ms = "000";

  try {

    h = getchk_sub(tlidValue, 6, 8);
    if (debugDt) console.log(`Hour: ${h}`);




    M = getchk_sub(tlidValue, 8, 10);
    if (debugDt) console.log(`Minutes: ${M}`);



    s = getchk_sub(tlidValue, 10, 12);
    if (debugDt) console.log(`Seconds: ${s}`);



    ms = getchk_sub(tlidValue, 12, 13);
    ms = getchk_sub(tlidValue, 12, 14);
    ms = getchk_sub(tlidValue, 12, 15);
    ms = getchk_sub(tlidValue, 12, 16);

    if (debugDt) console.log(`MiliSeconds: ${ms}`);


  } catch (error) {

  }
  if (debugDt) console.log("R: " + r);

  var dt = new Date(r);

  if (y != "")
    if (m != "")
      if (d != "")
        if (h != "")
          if (M != "")
            if (s != "")
              if (ms != "")
                dt = new Date(Date.UTC(y, m, d, h, M, s, ms));
              else
                dt = new Date(Date.UTC(y, m, d, h, M, s));
            else
              dt = new Date(Date.UTC(y, m, d, h, M));
          else
            dt = new Date(Date.UTC(y, m, d, h));
        else
          dt = new Date(Date.UTC(y, m, d));
      else
        dt = new Date(Date.UTC(y, m));
    else
      dt = new Date(Date.UTC(y));

  if (debugDt) console.log("TZ: " + dt.getTimezoneOffset());

  return dt;
}
129528
function(color) {
				if (!color || color === "") {
					return _colorLookup.black;
				} else if (_colorLookup[color]) {
					return _colorLookup[color];
				} else if (typeof(color) === "number") {
					return [color >> 16, (color >> 8) & 255, color & 255];
				} else if (color.charAt(0) === "#") {
					if (color.length === 4) { //for shorthand like #9F0
						color = "#" + color.charAt(1) + color.charAt(1) + color.charAt(2) + color.charAt(2) + color.charAt(3) + color.charAt(3);
					}
					color = parseInt(color.substr(1), 16);
					return [color >> 16, (color >> 8) & 255, color & 255];
				} else {
					return color.match(_numExp) || _colorLookup.transparent;
				}
			}
169146
function maybe_type() {
  skip_horiz_white();
  if (look(/\{/)) {
    var tdf = typedef();
    current_tag["type"] = tdf["type"];
    current_tag["optional"] = tdf["optional"] ? true : false;
  }
}
1250926
function(str) {
            var root, error = null;

            i = j = current = 0;
            chunks = [];
            input = str.replace(/\r\n/g, '\n');
            if (env.filename) {
                that.env.inputs[env.filename] = input;
            }

            // Split the input into chunks.
            chunks = (function (chunks) {
                var j = 0,
                    skip = /(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,
                    comment = /\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,
                    string = /"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,
                    level = 0,
                    match,
                    chunk = chunks[0],
                    inParam;

                for (var i = 0, c, cc; i < input.length;) {
                    skip.lastIndex = i;
                    match = skip.exec(input);
                    if (match) {
                        if (match.index === i) {
                            i += match[0].length;
                            chunk.push(match[0]);
                        }
                    }
                    c = input.charAt(i);
                    comment.lastIndex = string.lastIndex = i;

                    match = string.exec(input)
                    if (match) {
                        if (match.index === i) {
                            i += match[0].length;
                            chunk.push(match[0]);
                            continue;
                        }
                    }

                    if (!inParam && c === '/') {
                        cc = input.charAt(i + 1);
                        if (cc === '/' || cc === '*') {
                            match = comment.exec(input);
                            if (match) {
                                if (match.index === i) {
                                    i += match[0].length;
                                    chunk.push(match[0]);
                                    continue;
                                }
                            }
                        }
                    }

                    switch (c) {
                        case '{':
                            if (!inParam) {
                                level ++;
                            }
                            else {
                                inParam = false;
                            }
                            chunk.push(c);
                            break;
                        case '}':
                            if (!inParam) {
                                level --;
                                chunk.push(c);
                                chunks[++j] = chunk = [];
                            }
                            else {
                                inParam = false;
                                chunk.push(c);
                            }
                            break;
                        case '(':
                            if (!inParam) {
                                inParam = true;
                            }
                            else {
                                inParam = false;
                            }
                            chunk.push(c);
                            break;
                        case ')':
                            if (inParam) {
                                inParam = false;
                            }
                            chunk.push(c);
                            break;
                        default:
                            chunk.push(c);
                    }

                    i++;
                }
                if (level !== 0) {
                    error = {
                        index: i - 1,
                        message: (level > 0) ? "missing closing `}`" : "missing opening `{`",
                        filename: env.filename
                    };
                }

                return chunks.map(function (c) { return c.join(''); });
            })([[]]);

            if (error) {
                util.error(env, error);
                throw new Error('N/A');
            }

            // Start with the primary rule.
            // The whole syntax tree is held under a Ruleset node,
            // with the `root` property set to true, so no `{}` are
            // output.
            root = new tree.Ruleset([], $(this.parsers.primary));
            root.root = true;

            // Get an array of Ruleset objects, flattened
            // and sorted according to specificitySort
            root.toList = (function() {
                return function(env) {
                    env.frames = env.frames || [];


                    // call populates Invalid-caused errors
                    var definitions = this.flatten([], [], env);
                    definitions.sort(specificitySort);
                    return definitions;
                };
            })();

            // Sort rules by specificity: this function expects selectors to be
            // split already.
            //
            // Written to be used as a .sort(Function);
            // argument.
            //
            // [1, 0, 0, 467] > [0, 0, 1, 520]
            var specificitySort = function(a, b) {
                var as = a.specificity;
                var bs = b.specificity;

                if (as[0] != bs[0]) return bs[0] - as[0];
                if (as[1] != bs[1]) return bs[1] - as[1];
                if (as[2] != bs[2]) return bs[2] - as[2];
                return bs[3] - as[3];
            };

            return root;
        }
684653
async function main(inputFile, outputFile) {
  const Canvas = require('canvas');
  outputFile = outputFile || 'out.png';
  const faces = await detectFaces(inputFile);
  console.log('Highlighting...');
  await highlightFaces(inputFile, faces, outputFile, Canvas);
  console.log('Finished!');
}
1203567
function parseBrowserPackOutput(buf) {
  const m = /\n\/\/# sourceMappingURL=data:application\/json;charset=utf-8;base64,([^\s]+)\n?$/.exec(buf)
  if (!m) throw new Error('browser-pack did not insert source-map data URL in output: ' + buf.toString('utf-8'))
  const javascript = buf.slice(0, m.index)
  const sourceMap = JSON.parse(Buffer.from(m[1], 'base64'))
  return {
    javascript: javascript,
    sourceMap: sourceMap
  }
}