text: /*!
   * Copyright (C) 2011, 2013 by Vitaly Puzrin
   * 
   * Permission is hereby granted, free of charge, to any person obtaining a copy
   * of this software and associated documentation files (the "Software"), to deal
   * in the Software without restriction, including without limitation the rights
   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   * copies of the Software, and to permit persons to whom the Software is
   * furnished to do so, subject to the following conditions:
   * 
   * The above copyright notice and this permission notice shall be included in
   * all copies or substantial portions of the Software.
   * 
   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   * THE SOFTWARE.
   */
  
  var jsyaml = window.jsyaml = (function () {
  require=(function(e,t,n,r){function i(r){if(!n[r]){if(!t[r]){if(e)return e(r);throw new Error("Cannot find module '"+r+"'")}var s=n[r]={exports:{}};t[r][0](function(e){var n=t[r][1][e];return i(n?n:e)},s,s.exports)}return n[r].exports}for(var s=0;s<r.length;s++)i(r[s]);return i})(typeof require!=="undefined"&&require,{"./index":[function(require,module,exports){module.exports = require('0xXynW');
  },{}],"0xXynW":[function(require,module,exports){module.exports = require('./lib/js-yaml.js');
  
  },{"./lib/js-yaml.js":1}],1:[function(require,module,exports){'use strict';
  
  
  var loader = require('./js-yaml/loader');
  var dumper = require('./js-yaml/dumper');
  
  
  function deprecated(name) {
    return function () {
      throw new Error('Function ' + name + ' is deprecated and cannot be used.');
    };
  }
  
  
  module.exports.Type           = require('./js-yaml/type');
  module.exports.Schema         = require('./js-yaml/schema');
  module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/minimal');
  module.exports.SAFE_SCHEMA    = require('./js-yaml/schema/safe');
  module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default');
  module.exports.load           = loader.load;
  module.exports.loadAll        = loader.loadAll;
  module.exports.safeLoad       = loader.safeLoad;
  module.exports.safeLoadAll    = loader.safeLoadAll;
  module.exports.dump           = dumper.dump;
  module.exports.safeDump       = dumper.safeDump;
  module.exports.YAMLException  = require('./js-yaml/exception');
  module.exports.scan           = deprecated('scan');
  module.exports.parse          = deprecated('parse');
  module.exports.compose        = deprecated('compose');
  module.exports.addConstructor = deprecated('addConstructor');
  
  
  require('./js-yaml/require');
  
  },{"./js-yaml/loader":2,"./js-yaml/dumper":3,"./js-yaml/type":4,"./js-yaml/schema":5,"./js-yaml/schema/minimal":6,"./js-yaml/schema/safe":7,"./js-yaml/schema/default":8,"./js-yaml/exception":9,"./js-yaml/require":10}],2:[function(require,module,exports){'use strict';
  
  
  var common         = require('./common');
  var YAMLException  = require('./exception');
  var Mark           = require('./mark');
  var NIL            = common.NIL;
  var SAFE_SCHEMA    = require('./schema/safe');
  var DEFAULT_SCHEMA = require('./schema/default');
  
  
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
  
  
  var KIND_STRING = 'string';
  var KIND_ARRAY  = 'array';
  var KIND_OBJECT = 'object';
  
  
  var CONTEXT_FLOW_IN   = 1;
  var CONTEXT_FLOW_OUT  = 2;
  var CONTEXT_BLOCK_IN  = 3;
  var CONTEXT_BLOCK_OUT = 4;
  
  
  var CHOMPING_CLIP  = 1;
  var CHOMPING_STRIP = 2;
  var CHOMPING_KEEP  = 3;
  
  
  var CHAR_TAB                  = 0x09;   /* Tab */
  var CHAR_LINE_FEED            = 0x0A;   /* LF */
  var CHAR_CARRIAGE_RETURN      = 0x0D;   /* CR */
  var CHAR_SPACE                = 0x20;   /* Space */
  var CHAR_EXCLAMATION          = 0x21;   /* ! */
  var CHAR_DOUBLE_QUOTE         = 0x22;   /* " */
  var CHAR_SHARP                = 0x23;   /* # */
  var CHAR_PERCENT              = 0x25;   /* % */
  var CHAR_AMPERSAND            = 0x26;   /* & */
  var CHAR_SINGLE_QUOTE         = 0x27;   /* ' */
  var CHAR_ASTERISK             = 0x2A;   /* * */
  var CHAR_PLUS                 = 0x2B;   /* + */
  var CHAR_COMMA                = 0x2C;   /* , */
  var CHAR_MINUS                = 0x2D;   /* - */
  var CHAR_DOT                  = 0x2E;   /* . */
  var CHAR_SLASH                = 0x2F;   /* / */
  var CHAR_DIGIT_ZERO           = 0x30;   /* 0 */
  var CHAR_DIGIT_ONE            = 0x31;   /* 1 */
  var CHAR_DIGIT_NINE           = 0x39;   /* 9 */
  var CHAR_COLON                = 0x3A;   /* : */
  var CHAR_LESS_THAN            = 0x3C;   /* < */
  var CHAR_GREATER_THAN         = 0x3E;   /* > */
  var CHAR_QUESTION             = 0x3F;   /* ? */
  var CHAR_COMMERCIAL_AT        = 0x40;   /* @ */
  var CHAR_CAPITAL_A            = 0x41;   /* A */
  var CHAR_CAPITAL_F            = 0x46;   /* F */
  var CHAR_CAPITAL_L            = 0x4C;   /* L */
  var CHAR_CAPITAL_N            = 0x4E;   /* N */
  var CHAR_CAPITAL_P            = 0x50;   /* P */
  var CHAR_CAPITAL_U            = 0x55;   /* U */
  var CHAR_LEFT_SQUARE_BRACKET  = 0x5B;   /* [ */
  var CHAR_BACKSLASH            = 0x5C;   /* \ */
  var CHAR_RIGHT_SQUARE_BRACKET = 0x5D;   /* ] */
  var CHAR_UNDERSCORE           = 0x5F;   /* _ */
  var CHAR_GRAVE_ACCENT         = 0x60;   /* ` */
  var CHAR_SMALL_A              = 0x61;   /* a */
  var CHAR_SMALL_B              = 0x62;   /* b */
  var CHAR_SMALL_E              = 0x65;   /* e */
  var CHAR_SMALL_F              = 0x66;   /* f */
  var CHAR_SMALL_N              = 0x6E;   /* n */
  var CHAR_SMALL_R              = 0x72;   /* r */
  var CHAR_SMALL_T              = 0x74;   /* t */
  var CHAR_SMALL_U              = 0x75;   /* u */
  var CHAR_SMALL_V              = 0x76;   /* v */
  var CHAR_SMALL_X              = 0x78;   /* x */
  var CHAR_LEFT_CURLY_BRACKET   = 0x7B;   /* { */
  var CHAR_VERTICAL_LINE        = 0x7C;   /* | */
  var CHAR_RIGHT_CURLY_BRACKET  = 0x7D;   /* } */
  
  
  var SIMPLE_ESCAPE_SEQUENCES = {};
  
  SIMPLE_ESCAPE_SEQUENCES[CHAR_DIGIT_ZERO]   = '\x00';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_A]      = '\x07';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_B]      = '\x08';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_T]      = '\x09';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_TAB]          = '\x09';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_N]      = '\x0A';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_V]      = '\x0B';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_F]      = '\x0C';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_R]      = '\x0D';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_SMALL_E]      = '\x1B';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_SPACE]        = ' ';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_DOUBLE_QUOTE] = '\x22';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_SLASH]        = '/';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_BACKSLASH]    = '\x5C';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_CAPITAL_N]    = '\x85';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_UNDERSCORE]   = '\xA0';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_CAPITAL_L]    = '\u2028';
  SIMPLE_ESCAPE_SEQUENCES[CHAR_CAPITAL_P]    = '\u2029';
  
  
  var HEXADECIMAL_ESCAPE_SEQUENCES = {};
  
  HEXADECIMAL_ESCAPE_SEQUENCES[CHAR_SMALL_X]   = 2;
  HEXADECIMAL_ESCAPE_SEQUENCES[CHAR_SMALL_U]   = 4;
  HEXADECIMAL_ESCAPE_SEQUENCES[CHAR_CAPITAL_U] = 8;
  
  
  var PATTERN_NON_PRINTABLE         = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uD800-\uDFFF\uFFFE\uFFFF]/;
  var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
  var PATTERN_FLOW_INDICATORS       = /[,\[\]\{\}]/;
  var PATTERN_TAG_HANDLE            = /^(?:!|!!|![a-z\-]+!)$/i;
  var PATTERN_TAG_URI               = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
  
  
  function loadAll(input, output, options) {
    options = options || {};
  
    var filename = options['filename'] || null,
        schema   = options['schema']   || DEFAULT_SCHEMA,
        resolve  = options['resolve']  || true,
        validate = options['validate'] || true,
        strict   = options['strict']   || false,
        legacy   = options['legacy']   || false,
  
        directiveHandlers = {},
        implicitTypes     = schema.compiledImplicit,
        typeMap           = schema.compiledTypeMap,
  
        length     = input.length,
        position   = 0,
        line       = 0,
        lineStart  = 0,
        lineIndent = 0,
        character  = input.charCodeAt(position),
  
        version,
        checkLineBreaks,
        tagMap,
        anchorMap,
        tag,
        anchor,
        kind,
        result;
  
    function generateError(message) {
      return new YAMLException(
        message,
        new Mark(filename, input, position, line, (position - lineStart)));
    }
  
    function throwError(message) {
      throw generateError(message);
    }
  
    function throwWarning(message) {
      var error = generateError(message);
  
      if (strict) {
        throw error;
      } else {
        console.warn(error.toString());
      }
    }
  
    directiveHandlers['YAML'] = function handleYamlDirective(name, args) {
      var match, major, minor;
  
      if (null !== version) {
        throwError('duplication of %YAML directive');
      }
  
      if (1 !== args.length) {
        throwError('YAML directive accepts exactly one argument');
      }
  
      match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
  
      if (null === match) {
        throwError('ill-formed argument of the YAML directive');
      }
  
      major = parseInt(match[1], 10);
      minor = parseInt(match[2], 10);
  
      if (1 !== major) {
        throwError('unacceptable YAML version of the document');
      }
  
      version = args[0];
      checkLineBreaks = (minor < 2);
  
      if (1 !== minor && 2 !== minor) {
        throwWarning('unsupported YAML version of the document');
      }
    };
  
    directiveHandlers['TAG'] = function handleTagDirective(name, args) {
      var handle, prefix;
  
      if (2 !== args.length) {
        throwError('TAG directive accepts exactly two arguments');
      }
  
      handle = args[0];
      prefix = args[1];
  
      if (!PATTERN_TAG_HANDLE.test(handle)) {
        throwError('ill-formed tag handle (first argument) of the TAG directive');
      }
  
      if (_hasOwnProperty.call(tagMap, handle)) {
        throwError('there is a previously declared suffix for "' + handle + '" tag handle');
      }
  
      if (!PATTERN_TAG_URI.test(prefix)) {
        throwError('ill-formed tag prefix (second argument) of the TAG directive');
      }
  
      tagMap[handle] = prefix;
    };
  
    function captureSegment(start, end, checkJson) {
      var _position, _length, _character, _result;
  
      if (start < end) {
        _result = input.slice(start, end);
  
        if (checkJson && validate) {
          for (_position = 0, _length = _result.length;
               _position < _length;
               _position += 1) {
            _character = _result.charCodeAt(_position);
            if (!(0x09 === _character ||
                  0x20 <= _character && _character <= 0x10FFFF)) {
              throwError('expected valid JSON character');
            }
          }
        }
  
        result += _result;
      }
    }
  
    function mergeMappings(destination, source) {
      var sourceKeys, key, index, quantity;
  
      if (!common.isObject(source)) {
        throwError('cannot merge mappings; the provided source object is unacceptable');
      }
  
      sourceKeys = Object.keys(source);
  
      for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
        key = sourceKeys[index];
  
        if (!_hasOwnProperty.call(destination, key)) {
          destination[key] = source[key];
        }
      }
    }
  
    function storeMappingPair(_result, keyTag, keyNode, valueNode) {
      var index, quantity;
  
      keyNode = String(keyNode);
  
      if (null === _result) {
        _result = {};
      }
  
      if ('tag:yaml.org,2002:merge' === keyTag) {
        if (Array.isArray(valueNode)) {
          for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
            mergeMappings(_result, valueNode[index]);
          }
        } else {
          mergeMappings(_result, valueNode);
        }
      } else {
        _result[keyNode] = valueNode;
      }
  
      return _result;
    }
  
    function readLineBreak() {
      if (CHAR_LINE_FEED === character) {
        position += 1;
      } else if (CHAR_CARRIAGE_RETURN === character) {
        if (CHAR_LINE_FEED === input.charCodeAt(position + 1)) {
          position += 2;
        } else {
          position += 1;
        }
      } else {
        throwError('a line break is expected');
      }
  
      line += 1;
      lineStart = position;
      character = input.charCodeAt(position);
    }
  
    function skipSeparationSpace(allowComments, checkIndent) {
      var lineBreaks = 0;
  
      while (position < length) {
        while (CHAR_SPACE === character || CHAR_TAB === character) {
          character = input.charCodeAt(++position);
        }
  
        if (allowComments && CHAR_SHARP === character) {
          do { character = input.charCodeAt(++position); }
          while (position < length &&
                 CHAR_LINE_FEED !== character &&
                 CHAR_CARRIAGE_RETURN !== character);
        }
  
        if (CHAR_LINE_FEED === character || CHAR_CARRIAGE_RETURN === character) {
          readLineBreak();
          lineBreaks += 1;
          lineIndent = 0;
  
          while (CHAR_SPACE === character) {
            lineIndent += 1;
            character = input.charCodeAt(++position);
          }
  
          if (lineIndent < checkIndent) {
            throwWarning('deficient indentation');
          }
        } else {
          break;
        }
      }
  
      return lineBreaks;
    }
  
    function testDocumentSeparator() {
      var _position, _character;
  
      if (position === lineStart &&
          (CHAR_MINUS === character || CHAR_DOT === character) &&
          input.charCodeAt(position + 1) === character &&
          input.charCodeAt(position + 2) === character) {
  
        _position = position + 3;
        _character = input.charCodeAt(_position);
  
        if (_position >= length ||
            CHAR_SPACE           === _character ||
            CHAR_TAB             === _character ||
            CHAR_LINE_FEED       === _character ||
            CHAR_CARRIAGE_RETURN === _character) {
          return true;
        }
      }
  
      return false;
    }
  
    function writeFoldedLines(count) {
      if (1 === count) {
        result += ' ';
      } else if (count > 1) {
        result += common.repeat('\n', count - 1);
      }
    }
  
    function readPlainScalar(nodeIndent, withinFlowCollection) {
      var preceding,
          following,
          captureStart,
          captureEnd,
          hasPendingContent,
          _line,
          _lineStart,
          _lineIndent,
          _kind = kind,
          _result = result;
  
      if (CHAR_SPACE                === character ||
          CHAR_TAB                  === character ||
          CHAR_LINE_FEED            === character ||
          CHAR_CARRIAGE_RETURN      === character ||
          CHAR_COMMA                === character ||
          CHAR_LEFT_SQUARE_BRACKET  === character ||
          CHAR_RIGHT_SQUARE_BRACKET === character ||
          CHAR_LEFT_CURLY_BRACKET   === character ||
          CHAR_RIGHT_CURLY_BRACKET  === character ||
          CHAR_SHARP                === character ||
          CHAR_AMPERSAND            === character ||
          CHAR_ASTERISK             === character ||
          CHAR_EXCLAMATION          === character ||
          CHAR_VERTICAL_LINE        === character ||
          CHAR_GREATER_THAN         === character ||
          CHAR_SINGLE_QUOTE         === character ||
          CHAR_DOUBLE_QUOTE         === character ||
          CHAR_PERCENT              === character ||
          CHAR_COMMERCIAL_AT        === character ||
          CHAR_GRAVE_ACCENT         === character) {
        return false;
      }
  
      if (CHAR_QUESTION === character ||
          CHAR_MINUS === character) {
        following = input.charCodeAt(position + 1);
  
        if (CHAR_SPACE                 === following ||
            CHAR_TAB                   === following ||
            CHAR_LINE_FEED             === following ||
            CHAR_CARRIAGE_RETURN       === following ||
            withinFlowCollection &&
            (CHAR_COMMA                === following ||
             CHAR_LEFT_SQUARE_BRACKET  === following ||
             CHAR_RIGHT_SQUARE_BRACKET === following ||
             CHAR_LEFT_CURLY_BRACKET   === following ||
             CHAR_RIGHT_CURLY_BRACKET  === following)) {
          return false;
        }
      }
  
      kind = KIND_STRING;
      result = '';
      captureStart = captureEnd = position;
      hasPendingContent = false;
  
      while (position < length) {
        if (CHAR_COLON === character) {
          following = input.charCodeAt(position + 1);
  
          if (CHAR_SPACE                 === following ||
              CHAR_TAB                   === following ||
              CHAR_LINE_FEED             === following ||
              CHAR_CARRIAGE_RETURN       === following ||
              withinFlowCollection &&
              (CHAR_COMMA                === following ||
               CHAR_LEFT_SQUARE_BRACKET  === following ||
               CHAR_RIGHT_SQUARE_BRACKET === following ||
               CHAR_LEFT_CURLY_BRACKET   === following ||
               CHAR_RIGHT_CURLY_BRACKET  === following)) {
            break;
          }
  
        } else if (CHAR_SHARP === character) {
          preceding = input.charCodeAt(position - 1);
  
          if (CHAR_SPACE           === preceding ||
              CHAR_TAB             === preceding ||
              CHAR_LINE_FEED       === preceding ||
              CHAR_CARRIAGE_RETURN === preceding) {
            break;
          }
  
        } else if ((position === lineStart && testDocumentSeparator()) ||
                   withinFlowCollection &&
                   (CHAR_COMMA                === character ||
                    CHAR_LEFT_SQUARE_BRACKET  === character ||
                    CHAR_RIGHT_SQUARE_BRACKET === character ||
                    CHAR_LEFT_CURLY_BRACKET   === character ||
                    CHAR_RIGHT_CURLY_BRACKET  === character)) {
          break;
  
        } else if (CHAR_LINE_FEED === character ||
                   CHAR_CARRIAGE_RETURN === character) {
          _line = line;
          _lineStart = lineStart;
          _lineIndent = lineIndent;
          skipSeparationSpace(false, -1);
  
          if (lineIndent >= nodeIndent) {
            hasPendingContent = true;
            continue;
          } else {
            position = captureEnd;
            line = _line;
            lineStart = _lineStart;
            lineIndent = _lineIndent;
            character = input.charCodeAt(position);
            break;
          }
        }
  
        if (hasPendingContent) {
          captureSegment(captureStart, captureEnd, false);
          writeFoldedLines(line - _line);
          captureStart = captureEnd = position;
          hasPendingContent = false;
        }
  
        if (CHAR_SPACE !== character && CHAR_TAB !== character) {
          captureEnd = position + 1;
        }
  
        character = input.charCodeAt(++position);
      }
  
      captureSegment(captureStart, captureEnd, false);
  
      if (result) {
        return true;
      } else {
        kind = _kind;
        result = _result;
        return false;
      }
    }
  
    function readSingleQuotedScalar(nodeIndent) {
      var captureStart, captureEnd;
  
      if (CHAR_SINGLE_QUOTE !== character) {
        return false;
      }
  
      kind = KIND_STRING;
      result = '';
      character = input.charCodeAt(++position);
      captureStart = captureEnd = position;
  
      while (position < length) {
        if (CHAR_SINGLE_QUOTE === character) {
          captureSegment(captureStart, position, true);
          character = input.charCodeAt(++position);
  
          if (CHAR_SINGLE_QUOTE === character) {
            captureStart = captureEnd = position;
            character = input.charCodeAt(++position);
          } else {
            return true;
          }
  
        } else if (CHAR_LINE_FEED === character ||
                   CHAR_CARRIAGE_RETURN === character) {
          captureSegment(captureStart, captureEnd, true);
          writeFoldedLines(skipSeparationSpace(false, nodeIndent));
          captureStart = captureEnd = position;
          character = input.charCodeAt(position);
  
        } else if (position === lineStart && testDocumentSeparator()) {
          throwError('unexpected end of the document within a single quoted scalar');
  
        } else {
          character = input.charCodeAt(++position);
          captureEnd = position;
        }
      }
  
      throwError('unexpected end of the stream within a single quoted scalar');
    }
  
    function readDoubleQuotedScalar(nodeIndent) {
      var captureStart,
          captureEnd,
          hexLength,
          hexIndex,
          hexOffset,
          hexResult;
  
      if (CHAR_DOUBLE_QUOTE !== character) {
        return false;
      }
  
      kind = KIND_STRING;
      result = '';
      character = input.charCodeAt(++position);
      captureStart = captureEnd = position;
  
      while (position < length) {
        if (CHAR_DOUBLE_QUOTE === character) {
          captureSegment(captureStart, position, true);
          character = input.charCodeAt(++position);
          return true;
  
        } else if (CHAR_BACKSLASH === character) {
          captureSegment(captureStart, position, true);
          character = input.charCodeAt(++position);
  
          if (CHAR_LINE_FEED       === character ||
              CHAR_CARRIAGE_RETURN === character) {
            skipSeparationSpace(false, nodeIndent);
  
          } else if (SIMPLE_ESCAPE_SEQUENCES[character]) {
            result += SIMPLE_ESCAPE_SEQUENCES[character];
            character = input.charCodeAt(++position);
  
          } else if (HEXADECIMAL_ESCAPE_SEQUENCES[character]) {
            hexLength = HEXADECIMAL_ESCAPE_SEQUENCES[character];
            hexResult = 0;
  
            for (hexIndex = 1; hexIndex <= hexLength; hexIndex += 1) {
              hexOffset = (hexLength - hexIndex) * 4;
              character = input.charCodeAt(++position);
  
              if (CHAR_DIGIT_ZERO <= character && character <= CHAR_DIGIT_NINE) {
                hexResult |= (character - CHAR_DIGIT_ZERO) << hexOffset;
  
              } else if (CHAR_CAPITAL_A <= character && character <= CHAR_CAPITAL_F) {
                hexResult |= (character - CHAR_CAPITAL_A + 10) << hexOffset;
  
              } else if (CHAR_SMALL_A <= character && character <= CHAR_SMALL_F) {
                hexResult |= (character - CHAR_SMALL_A + 10) << hexOffset;
  
              } else {
                throwError('expected hexadecimal character');
              }
            }
  
            result += String.fromCharCode(hexResult);
            character = input.charCodeAt(++position);
  
          } else {
            throwError('unknown escape sequence');
          }
  
          captureStart = captureEnd = position;
  
        } else if (CHAR_LINE_FEED === character ||
                   CHAR_CARRIAGE_RETURN === character) {
          captureSegment(captureStart, captureEnd, true);
          writeFoldedLines(skipSeparationSpace(false, nodeIndent));
          captureStart = captureEnd = position;
          character = input.charCodeAt(position);
  
        } else if (position === lineStart && testDocumentSeparator()) {
          throwError('unexpected end of the document within a double quoted scalar');
  
        } else {
          character = input.charCodeAt(++position);
          captureEnd = position;
        }
      }
  
      throwError('unexpected end of the stream within a double quoted scalar');
    }
  
    function readFlowCollection(nodeIndent) {
      var readNext = true,
          _line,
          _tag     = tag,
          _result,
          following,
          terminator,
          isPair,
          isExplicitPair,
          isMapping,
          keyNode,
          keyTag,
          valueNode;
  
      switch (character) {
      case CHAR_LEFT_SQUARE_BRACKET:
        terminator = CHAR_RIGHT_SQUARE_BRACKET;
        isMapping = false;
        _result = [];
        break;
  
      case CHAR_LEFT_CURLY_BRACKET:
        terminator = CHAR_RIGHT_CURLY_BRACKET;
        isMapping = true;
        _result = {};
        break;
  
      default:
        return false;
      }
  
      if (null !== anchor) {
        anchorMap[anchor] = _result;
      }
  
      character = input.charCodeAt(++position);
  
      while (position < length) {
        skipSeparationSpace(true, nodeIndent);
  
        if (character === terminator) {
          character = input.charCodeAt(++position);
          tag = _tag;
          kind = isMapping ? KIND_OBJECT : KIND_ARRAY;
          result = _result;
          return true;
        } else if (!readNext) {
          throwError('missed comma between flow collection entries');
        }
  
        keyTag = keyNode = valueNode = null;
        isPair = isExplicitPair = false;
  
        if (CHAR_QUESTION === character) {
          following = input.charCodeAt(position + 1);
  
          if (CHAR_SPACE === following ||
              CHAR_TAB === following ||
              CHAR_LINE_FEED === following ||
              CHAR_CARRIAGE_RETURN === following) {
            isPair = isExplicitPair = true;
            position += 1;
            character = following;
            skipSeparationSpace(true, nodeIndent);
          }
        }
  
        _line = line;
        composeNode(nodeIndent, CONTEXT_FLOW_IN, false, true);
        keyTag = tag;
        keyNode = result;
  
        if ((isExplicitPair || line === _line) && CHAR_COLON === character) {
          isPair = true;
          character = input.charCodeAt(++position);
          skipSeparationSpace(true, nodeIndent);
          composeNode(nodeIndent, CONTEXT_FLOW_IN, false, true);
          valueNode = result;
        }
  
        if (isMapping) {
          storeMappingPair(_result, keyTag, keyNode, valueNode);
        } else if (isPair) {
          _result.push(storeMappingPair(null, keyTag, keyNode, valueNode));
        } else {
          _result.push(keyNode);
        }
  
        skipSeparationSpace(true, nodeIndent);
  
        if (CHAR_COMMA === character) {
          readNext = true;
          character = input.charCodeAt(++position);
        } else {
          readNext = false;
        }
      }
  
      throwError('unexpected end of the stream within a flow collection');
    }
  
    function readBlockScalar(nodeIndent) {
      var captureStart,
          folding,
          chomping       = CHOMPING_CLIP,
          detectedIndent = false,
          textIndent     = nodeIndent,
          emptyLines     = -1;
  
      switch (character) {
      case CHAR_VERTICAL_LINE:
        folding = false;
        break;
  
      case CHAR_GREATER_THAN:
        folding = true;
        break;
  
      default:
        return false;
      }
  
      kind = KIND_STRING;
      result = '';
  
      while (position < length) {
        character = input.charCodeAt(++position);
  
        if (CHAR_PLUS === character || CHAR_MINUS === character) {
          if (CHOMPING_CLIP === chomping) {
            chomping = (CHAR_PLUS === character) ? CHOMPING_KEEP : CHOMPING_STRIP;
          } else {
            throwError('repeat of a chomping mode identifier');
          }
  
        } else if (CHAR_DIGIT_ZERO <= character && character <= CHAR_DIGIT_NINE) {
          if (CHAR_DIGIT_ZERO === character) {
            throwError('bad explicit indentation width of a block scalar; it cannot be less than one');
          } else if (!detectedIndent) {
            textIndent = nodeIndent + (character - CHAR_DIGIT_ONE);
            detectedIndent = true;
          } else {
            throwError('repeat of an indentation width identifier');
          }
  
        } else {
          break;
        }
      }
  
      if (CHAR_SPACE === character || CHAR_TAB === character) {
        do { character = input.charCodeAt(++position); }
        while (CHAR_SPACE === character || CHAR_TAB === character);
  
        if (CHAR_SHARP === character) {
          do { character = input.charCodeAt(++position); }
          while (position < length &&
                 CHAR_LINE_FEED !== character &&
                 CHAR_CARRIAGE_RETURN !== character);
        }
      }
  
      while (position < length) {
        readLineBreak();
        lineIndent = 0;
  
        while ((!detectedIndent || lineIndent < textIndent) &&
               (CHAR_SPACE === character)) {
          lineIndent += 1;
          character = input.charCodeAt(++position);
        }
  
        if (!detectedIndent && lineIndent > textIndent) {
          textIndent = lineIndent;
        }
  
        if (CHAR_LINE_FEED === character || CHAR_CARRIAGE_RETURN === character) {
          emptyLines += 1;
          continue;
        }
  
        // End of the scalar. Perform the chomping.
        if (lineIndent < textIndent) {
          if (CHOMPING_KEEP === chomping) {
            result += common.repeat('\n', emptyLines + 1);
          } else if (CHOMPING_CLIP === chomping) {
            result += '\n';
          }
          break;
        }
  
        detectedIndent = true;
  
        if (folding) {
          if (CHAR_SPACE === character || CHAR_TAB === character) {
            result += common.repeat('\n', emptyLines + 1);
            emptyLines = 1;
          } else if (0 === emptyLines) {
            result += ' ';
            emptyLines = 0;
          } else {
            result += common.repeat('\n', emptyLines);
            emptyLines = 0;
          }
        } else {
          result += common.repeat('\n', emptyLines + 1);
          emptyLines = 0;
        }
  
        captureStart = position;
  
        do { character = input.charCodeAt(++position); }
        while (position < length &&
               CHAR_LINE_FEED !== character &&
               CHAR_CARRIAGE_RETURN !== character);
  
        captureSegment(captureStart, position, false);
      }
  
      return true;
    }
  
    function readBlockSequence(nodeIndent) {
      var _line,
          _tag      = tag,
          _result   = [],
          following,
          detected  = false;
  
      if (null !== anchor) {
        anchorMap[anchor] = _result;
      }
  
      while (position < length) {
        if (CHAR_MINUS !== character) {
          break;
        }
  
        following = input.charCodeAt(position + 1);
  
        if (CHAR_SPACE           !== following &&
            CHAR_TAB             !== following &&
            CHAR_LINE_FEED       !== following &&
            CHAR_CARRIAGE_RETURN !== following) {
          break;
        }
  
        detected = true;
        position += 1;
        character = following;
  
        if (skipSeparationSpace(true, -1)) {
          if (lineIndent <= nodeIndent) {
            _result.push(null);
            continue;
          }
        }
  
        _line = line;
        composeNode(nodeIndent, CONTEXT_BLOCK_IN, false, true);
        _result.push(result);
        skipSeparationSpace(true, -1);
  
        if ((line === _line || lineIndent > nodeIndent) && position < length) {
          throwError('bad indentation of a sequence entry');
        } else if (lineIndent < nodeIndent) {
          break;
        }
      }
  
      if (detected) {
        tag = _tag;
        kind = KIND_ARRAY;
        result = _result;
        return true;
      } else {
        return false;
      }
    }
  
    function readBlockMapping(nodeIndent) {
      var following,
          allowCompact,
          _line,
          _tag          = tag,
          _result       = {},
          keyTag        = null,
          keyNode       = null,
          valueNode     = null,
          atExplicitKey = false,
          detected      = false;
  
      if (null !== anchor) {
        anchorMap[anchor] = _result;
      }
  
      while (position < length) {
        following = input.charCodeAt(position + 1);
        _line = line; // Save the current line.
  
        if ((CHAR_QUESTION        === character ||
             CHAR_COLON           === character) &&
            (CHAR_SPACE           === following ||
             CHAR_TAB             === following ||
             CHAR_LINE_FEED       === following ||
             CHAR_CARRIAGE_RETURN === following)) {
  
          if (CHAR_QUESTION === character) {
            if (atExplicitKey) {
              storeMappingPair(_result, keyTag, keyNode, null);
              keyTag = keyNode = valueNode = null;
            }
  
            detected = true;
            atExplicitKey = true;
            allowCompact = true;
  
          } else if (atExplicitKey) {
            // i.e. CHAR_COLON === character after the explicit key.
            atExplicitKey = false;
            allowCompact = true;
  
          } else {
            throwError('incomplete explicit mapping pair; a key node is missed');
          }
  
          position += 1;
          character = following;
  
        } else if (composeNode(nodeIndent, CONTEXT_FLOW_OUT, false, true)) {
          if (line === _line) {
            // TODO: Remove this cycle when the flow readers will consume
            // trailing whitespaces like the block readers.
            while (CHAR_SPACE === character ||
                   CHAR_TAB === character) {
              character = input.charCodeAt(++position);
            }
  
            if (CHAR_COLON === character) {
              character = input.charCodeAt(++position);
  
              if (CHAR_SPACE           !== character &&
                  CHAR_TAB             !== character &&
                  CHAR_LINE_FEED       !== character &&
                  CHAR_CARRIAGE_RETURN !== character) {
                throwError('a whitespace character is expected after the key-value separator within a block mapping');
              }
  
              if (atExplicitKey) {
                storeMappingPair(_result, keyTag, keyNode, null);
                keyTag = keyNode = valueNode = null;
              }
  
              detected = true;
              atExplicitKey = false;
              allowCompact = false;
              keyTag = tag;
              keyNode = result;
  
            } else if (detected) {
              throwError('can not read an implicit mapping pair; a colon is missed');
  
            } else {
              tag = _tag;
              return true; // Keep the result of `composeNode`.
            }
  
          } else if (detected) {
            throwError('can not read a block mapping entry; a multiline key may not be an implicit key');
  
          } else {
            tag = _tag;
            return true; // Keep the result of `composeNode`.
          }
  
        } else {
          break;
        }
  
        if (line === _line || lineIndent > nodeIndent) {
          if (composeNode(nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
            if (atExplicitKey) {
              keyNode = result;
            } else {
              valueNode = result;
            }
          }
  
          if (!atExplicitKey) {
            storeMappingPair(_result, keyTag, keyNode, valueNode);
            keyTag = keyNode = valueNode = null;
          }
  
          // TODO: It is needed only for flow node readers. It should be removed
          // when the flow readers will consume trailing whitespaces as well as
          // the block readers.
          skipSeparationSpace(true, -1);
        }
  
        if (lineIndent > nodeIndent && position < length) {
          throwError('bad indentation of a mapping entry');
        } else if (lineIndent < nodeIndent) {
          break;
        }
      }
  
      if (atExplicitKey) {
        storeMappingPair(_result, keyTag, keyNode, null);
      }
  
      if (detected) {
        tag = _tag;
        kind = KIND_OBJECT;
        result = _result;
      }
  
      return detected;
    }
  
    function readTagProperty() {
      var _position,
          isVerbatim = false,
          isNamed    = false,
          tagHandle,
          tagName;
  
      if (CHAR_EXCLAMATION !== character) {
        return false;
      }
  
      if (null !== tag) {
        throwError('duplication of a tag property');
      }
  
      character = input.charCodeAt(++position);
  
      if (CHAR_LESS_THAN === character) {
        isVerbatim = true;
        character = input.charCodeAt(++position);
  
      } else if (CHAR_EXCLAMATION === character) {
        isNamed = true;
        tagHandle = '!!';
        character = input.charCodeAt(++position);
  
      } else {
        tagHandle = '!';
      }
  
      _position = position;
  
      if (isVerbatim) {
        do { character = input.charCodeAt(++position); }
        while (position < length && CHAR_GREATER_THAN !== character);
  
        if (position < length) {
          tagName = input.slice(_position, position);
          character = input.charCodeAt(++position);
        } else {
          throwError('unexpected end of the stream within a verbatim tag');
        }
      } else {
        while (position < length &&
               CHAR_SPACE           !== character &&
               CHAR_TAB             !== character &&
               CHAR_LINE_FEED       !== character &&
               CHAR_CARRIAGE_RETURN !== character) {
  
          if (CHAR_EXCLAMATION === character) {
            if (!isNamed) {
              tagHandle = input.slice(_position - 1, position + 1);
  
              if (validate && !PATTERN_TAG_HANDLE.test(tagHandle)) {
                throwError('named tag handle cannot contain such characters');
              }
  
              isNamed = true;
              _position = position + 1;
            } else {
              throwError('tag suffix cannot contain exclamation marks');
            }
          }
  
          character = input.charCodeAt(++position);
        }
  
        tagName = input.slice(_position, position);
  
        if (validate && PATTERN_FLOW_INDICATORS.test(tagName)) {
          throwError('tag suffix cannot contain flow indicator characters');
        }
      }
  
      if (validate && tagName && !PATTERN_TAG_URI.test(tagName)) {
        throwError('tag name cannot contain such characters: ' + tagName);
      }
  
      if (isVerbatim) {
        tag = tagName;
  
      } else if (_hasOwnProperty.call(tagMap, tagHandle)) {
        tag = tagMap[tagHandle] + tagName;
  
      } else if ('!' === tagHandle) {
        tag = '!' + tagName;
  
      } else if ('!!' === tagHandle) {
        tag = 'tag:yaml.org,2002:' + tagName;
  
      } else {
        throwError('undeclared tag handle "' + tagHandle + '"');
      }
  
      return true;
    }
  
    function readAnchorProperty() {
      var _position;
  
      if (CHAR_AMPERSAND !== character) {
        return false;
      }
  
      if (null !== anchor) {
        throwError('duplication of an anchor property');
      }
  
      character = input.charCodeAt(++position);
      _position = position;
  
      while (position < length &&
             CHAR_SPACE                !== character &&
             CHAR_TAB                  !== character &&
             CHAR_LINE_FEED            !== character &&
             CHAR_CARRIAGE_RETURN      !== character &&
             CHAR_COMMA                !== character &&
             CHAR_LEFT_SQUARE_BRACKET  !== character &&
             CHAR_RIGHT_SQUARE_BRACKET !== character &&
             CHAR_LEFT_CURLY_BRACKET   !== character &&
             CHAR_RIGHT_CURLY_BRACKET  !== character) {
        character = input.charCodeAt(++position);
      }
  
      if (position === _position) {
        throwError('name of an anchor node must contain at least one character');
      }
  
      anchor = input.slice(_position, position);
      return true;
    }
  
    function readAlias() {
      var _position, alias;
  
      if (CHAR_ASTERISK !== character) {
        return false;
      }
  
      character = input.charCodeAt(++position);
      _position = position;
  
      while (position < length &&
             CHAR_SPACE                !== character &&
             CHAR_TAB                  !== character &&
             CHAR_LINE_FEED            !== character &&
             CHAR_CARRIAGE_RETURN      !== character &&
             CHAR_COMMA                !== character &&
             CHAR_LEFT_SQUARE_BRACKET  !== character &&
             CHAR_RIGHT_SQUARE_BRACKET !== character &&
             CHAR_LEFT_CURLY_BRACKET   !== character &&
             CHAR_RIGHT_CURLY_BRACKET  !== character) {
        character = input.charCodeAt(++position);
      }
  
      if (position === _position) {
        throwError('name of an alias node must contain at least one character');
      }
  
      alias = input.slice(_position, position);
  
      if (!anchorMap.hasOwnProperty(alias)) {
        throwError('unidentified alias "' + alias + '"');
      }
  
      result = anchorMap[alias];
      skipSeparationSpace(true, -1);
      return true;
    }
  
    function composeNode(parentIndent, nodeContext, allowToSeek, allowCompact) {
      var allowBlockStyles,
          allowBlockScalars,
          allowBlockCollections,
          atNewLine  = false,
          isIndented = true,
          hasContent = false,
          typeIndex,
          typeQuantity,
          type,
          typeLoader,
          flowIndent,
          blockIndent,
          _result;
  
      tag    = null;
      anchor = null;
      kind   = null;
      result = null;
  
      allowBlockStyles = allowBlockScalars = allowBlockCollections =
        CONTEXT_BLOCK_OUT === nodeContext ||
        CONTEXT_BLOCK_IN  === nodeContext;
  
      if (allowToSeek) {
        if (skipSeparationSpace(true, -1)) {
          atNewLine = true;
  
          if (lineIndent === parentIndent) {
            isIndented = false;
  
          } else if (lineIndent > parentIndent) {
            isIndented = true;
  
          } else {
            return false;
          }
        }
      }
  
      if (isIndented) {
        while (readTagProperty() || readAnchorProperty()) {
          if (skipSeparationSpace(true, -1)) {
            atNewLine = true;
  
            if (lineIndent > parentIndent) {
              isIndented = true;
              allowBlockCollections = allowBlockStyles;
  
            } else if (lineIndent === parentIndent) {
              isIndented = false;
              allowBlockCollections = allowBlockStyles;
  
            } else {
              return true;
            }
          } else {
            allowBlockCollections = false;
          }
        }
      }
  
      if (allowBlockCollections) {
        allowBlockCollections = atNewLine || allowCompact;
      }
  
      if (isIndented || CONTEXT_BLOCK_OUT === nodeContext) {
        if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
          flowIndent = parentIndent;
        } else {
          flowIndent = parentIndent + 1;
        }
  
        blockIndent = position - lineStart;
  
        if (isIndented) {
          if (allowBlockCollections &&
              (readBlockSequence(blockIndent) ||
               readBlockMapping(blockIndent)) ||
              readFlowCollection(flowIndent)) {
            hasContent = true;
          } else {
            if ((allowBlockScalars && readBlockScalar(flowIndent)) ||
                readSingleQuotedScalar(flowIndent) ||
                readDoubleQuotedScalar(flowIndent)) {
              hasContent = true;
  
            } else if (readAlias()) {
              hasContent = true;
  
              if (null !== tag || null !== anchor) {
                throwError('alias node should not have any properties');
              }
  
            } else if (readPlainScalar(flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
              hasContent = true;
  
              if (null === tag) {
                tag = '?';
              }
            }
  
            if (null !== anchor) {
              anchorMap[anchor] = result;
            }
          }
        } else {
          hasContent = allowBlockCollections && readBlockSequence(blockIndent);
        }
      }
  
      if (null !== tag && '!' !== tag) {
        if ('?' === tag) {
          if (resolve) {
            for (typeIndex = 0, typeQuantity = implicitTypes.length;
                 typeIndex < typeQuantity;
                 typeIndex += 1) {
              type = implicitTypes[typeIndex];
  
              // Implicit resolving is not allowed for non-scalar types, and '?'
              // non-specific tag is only assigned to plain scalars. So, it isn't
              // needed to check for 'kind' conformity.
              _result = type.loader.resolver(result, false);
  
              if (NIL !== _result) {
                tag = type.tag;
                result = _result;
                break;
              }
            }
          }
        } else if (_hasOwnProperty.call(typeMap, tag)) {
          typeLoader = typeMap[tag].loader;
  
          if (null !== result && typeLoader.kind !== kind) {
            throwError('unacceptable node kind for !<' + tag + '> tag; it should be "' + typeLoader.kind + '", not "' + kind + '"');
          }
  
          if (typeLoader.resolver) {
            _result = typeLoader.resolver(result, true);
  
            if (NIL !== _result) {
              result = _result;
            } else {
              throwError('cannot resolve a node with !<' + tag + '> explicit tag');
            }
          }
        } else {
          throwWarning('unknown tag !<' + tag + '>');
        }
      }
  
      return null !== tag || null !== anchor || hasContent;
    }
  
    function readDocument() {
      var documentStart = position,
          _position,
          directiveName,
          directiveArgs,
          hasDirectives = false;
  
      version = null;
      checkLineBreaks = legacy;
      tagMap = {};
      anchorMap = {};
  
      while (position < length) {
        skipSeparationSpace(true, -1);
  
        if (lineIndent > 0 || CHAR_PERCENT !== character) {
          break;
        }
  
        hasDirectives = true;
        character = input.charCodeAt(++position);
        _position = position;
  
        while (position < length &&
               CHAR_SPACE           !== character &&
               CHAR_TAB             !== character &&
               CHAR_LINE_FEED       !== character &&
               CHAR_CARRIAGE_RETURN !== character) {
          character = input.charCodeAt(++position);
        }
  
        directiveName = input.slice(_position, position);
        directiveArgs = [];
  
        if (directiveName.length < 1) {
          throwError('directive name must not be less than one character in length');
        }
  
        while (position < length) {
          while (CHAR_SPACE === character || CHAR_TAB === character) {
            character = input.charCodeAt(++position);
          }
  
          if (CHAR_SHARP === character) {
            do { character = input.charCodeAt(++position); }
            while (position < length &&
                   CHAR_LINE_FEED !== character &&
                   CHAR_CARRIAGE_RETURN !== character);
            break;
          }
  
          if (CHAR_LINE_FEED === character || CHAR_CARRIAGE_RETURN === character) {
            break;
          }
  
          _position = position;
  
          while (position < length &&
                 CHAR_SPACE           !== character &&
                 CHAR_TAB             !== character &&
                 CHAR_LINE_FEED       !== character &&
                 CHAR_CARRIAGE_RETURN !== character) {
            character = input.charCodeAt(++position);
          }
  
          directiveArgs.push(input.slice(_position, position));
        }
  
        if (position < length) {
          readLineBreak();
        }
  
        if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
          directiveHandlers[directiveName](directiveName, directiveArgs);
        } else {
          throwWarning('unknown document directive "' + directiveName + '"');
        }
      }
  
      skipSeparationSpace(true, -1);
  
      if (0 === lineIndent &&
          CHAR_MINUS === character &&
          CHAR_MINUS === input.charCodeAt(position + 1) &&
          CHAR_MINUS === input.charCodeAt(position + 2)) {
        position += 3;
        character = input.charCodeAt(position);
        skipSeparationSpace(true, -1);
  
      } else if (hasDirectives) {
        throwError('directives end mark is expected');
      }
  
      composeNode(lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
      skipSeparationSpace(true, -1);
  
      if (validate && checkLineBreaks &&
          PATTERN_NON_ASCII_LINE_BREAKS.test(input.slice(documentStart, position))) {
        throwWarning('non-ASCII line breaks are interpreted as content');
      }
  
      output(result);
  
      if (position === lineStart && testDocumentSeparator()) {
        if (CHAR_DOT === character) {
          position += 3;
          character = input.charCodeAt(position);
          skipSeparationSpace(true, -1);
        }
        return;
      }
  
      if (position < length) {
        throwError('end of the stream or a document separator is expected');
      } else {
        return;
      }
    }
  
    if (validate && PATTERN_NON_PRINTABLE.test(input)) {
      throwError('the stream contains non-printable characters');
    }
  
    while (CHAR_SPACE === character) {
      lineIndent += 1;
      character = input.charCodeAt(++position);
    }
  
    while (position < length) {
      readDocument();
    }
  }
  
  
  function load(input, options) {
    var result = null, received = false;
  
    function callback(data) {
      if (!received) {
        result = data;
        received = true;
      } else {
        throw new YAMLException('expected a single document in the stream, but found more');
      }
    }
  
    loadAll(input, callback, options);
  
    return result;
  }
  
  
  function safeLoadAll(input, output, options) {
    loadAll(input, output, common.extend({ schema: SAFE_SCHEMA }, options));
  }
  
  
  function safeLoad(input, options) {
    return load(input, common.extend({ schema: SAFE_SCHEMA }, options));
  }
  
  
  module.exports.loadAll     = loadAll;
  module.exports.load        = load;
  module.exports.safeLoadAll = safeLoadAll;
  module.exports.safeLoad    = safeLoad;
  
  },{"./common":11,"./exception":9,"./mark":12,"./schema/safe":7,"./schema/default":8}],11:[function(require,module,exports){'use strict';
  
  
  var NIL = {};
  
  
  function isNothing(subject) {
    return (undefined === subject) || (null === subject);
  }
  
  
  function isObject(subject) {
    return ('object' === typeof subject) && (null !== subject);
  }
  
  
  function toArray(sequence) {
    if (Array.isArray(sequence)) {
      return sequence;
    } else if (isNothing(sequence)) {
      return [];
    } else {
      return [ sequence ];
    }
  }
  
  
  function extend(target, source) {
    var index, length, key, sourceKeys;
  
    if (source) {
      sourceKeys = Object.keys(source);
  
      for (index = 0, length = sourceKeys.length; index < length; index += 1) {
        key = sourceKeys[index];
        target[key] = source[key];
      }
    }
  
    return target;
  }
  
  
  function repeat(string, count) {
    var result = '', cycle;
  
    for (cycle = 0; cycle < count; cycle += 1) {
      result += string;
    }
  
    return result;
  }
  
  
  module.exports.NIL        = NIL;
  module.exports.isNothing  = isNothing;
  module.exports.isObject   = isObject;
  module.exports.toArray    = toArray;
  module.exports.repeat     = repeat;
  module.exports.extend     = extend;
  
  },{}],9:[function(require,module,exports){'use strict';
  
  
  function YAMLException(reason, mark) {
    this.name    = 'YAMLException';
    this.reason  = reason;
    this.mark    = mark;
    this.message = this.toString(false);
  }
  
  
  YAMLException.prototype.toString = function toString(compact) {
    var result;
  
    result = 'JS-YAML: ' + (this.reason || '(unknown reason)');
  
    if (!compact && this.mark) {
      result += ' ' + this.mark.toString();
    }
  
    return result;
  };
  
  
  module.exports = YAMLException;
  
  },{}],12:[function(require,module,exports){'use strict';
  
  
  var common = require('./common');
  
  
  function Mark(name, buffer, position, line, column) {
    this.name     = name;
    this.buffer   = buffer;
    this.position = position;
    this.line     = line;
    this.column   = column;
  }
  
  
  Mark.prototype.getSnippet = function getSnippet(indent, maxLength) {
    var head, start, tail, end, snippet;
  
    if (!this.buffer) {
      return null;
    }
  
    indent = indent || 4;
    maxLength = maxLength || 75;
  
    head = '';
    start = this.position;
  
    while (start > 0 && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1))) {
      start -= 1;
      if (this.position - start > (maxLength / 2 - 1)) {
        head = ' ... ';
        start += 5;
        break;
      }
    }
  
    tail = '';
    end = this.position;
  
    while (end < this.buffer.length && -1 === '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end))) {
      end += 1;
      if (end - this.position > (maxLength / 2 - 1)) {
        tail = ' ... ';
        end -= 5;
        break;
      }
    }
  
    snippet = this.buffer.slice(start, end);
  
    return common.repeat(' ', indent) + head + snippet + tail + '\n' +
           common.repeat(' ', indent + this.position - start + head.length) + '^';
  };
  
  
  Mark.prototype.toString = function toString(compact) {
    var snippet, where = '';
  
    if (this.name) {
      where += 'in "' + this.name + '" ';
    }
  
    where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);
  
    if (!compact) {
      snippet = this.getSnippet();
  
      if (snippet) {
        where += ':\n' + snippet;
      }
    }
  
    return where;
  };
  
  
  module.exports = Mark;
  
  },{"./common":11}],7:[function(require,module,exports){'use strict';
  
  
  var Schema = require('../schema');
  
  
  module.exports = new Schema({
    include: [
      require('./minimal')
    ],
    implicit: [
      require('../type/null'),
      require('../type/bool'),
      require('../type/int'),
      require('../type/float'),
      require('../type/timestamp'),
      require('../type/merge')
    ],
    explicit: [
      require('../type/binary'),
      require('../type/omap'),
      require('../type/pairs'),
      require('../type/set')
    ]
  });
  
  },{"../schema":5,"./minimal":6,"../type/null":13,"../type/bool":14,"../type/int":15,"../type/float":16,"../type/timestamp":17,"../type/merge":18,"../type/binary":19,"../type/omap":20,"../type/pairs":21,"../type/set":22}],5:[function(require,module,exports){'use strict';
  
  
  var common        = require('./common');
  var YAMLException = require('./exception');
  var Type          = require('./type');
  
  
  function compileList(schema, name, result) {
    var exclude = [];
  
    schema.include.forEach(function (includedSchema) {
      result = compileList(includedSchema, name, result);
    });
  
    schema[name].forEach(function (currentType) {
      result.forEach(function (previousType, previousIndex) {
        if (previousType.tag === currentType.tag) {
          exclude.push(previousIndex);
        }
      });
  
      result.push(currentType);
    });
  
    return result.filter(function (type, index) {
      return -1 === exclude.indexOf(index);
    });
  }
  
  
  function compileMap(/* lists... */) {
    var result = {}, index, length;
  
    function collectType(type) {
      result[type.tag] = type;
    }
  
    for (index = 0, length = arguments.length; index < length; index += 1) {
      arguments[index].forEach(collectType);
    }
  
    return result;
  }
  
  
  function Schema(definition) {
    this.include  = definition.include  || [];
    this.implicit = definition.implicit || [];
    this.explicit = definition.explicit || [];
  
    this.implicit.forEach(function (type) {
      if (null !== type.loader && 'string' !== type.loader.kind) {
        throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');
      }
    });
  
    this.compiledImplicit = compileList(this, 'implicit', []);
    this.compiledExplicit = compileList(this, 'explicit', []);
    this.compiledTypeMap  = compileMap(this.compiledImplicit, this.compiledExplicit);
  }
  
  
  Schema.DEFAULT = null;
  
  
  Schema.create = function createSchema() {
    var schemas, types;
  
    switch (arguments.length) {
    case 1:
      schemas = Schema.DEFAULT;
      types = arguments[0];
      break;
  
    case 2:
      schemas = arguments[0];
      types = arguments[1];
      break;
  
    default:
      throw new YAMLException('Wrong number of arguments for Schema.create function');
    }
  
    schemas = common.toArray(schemas);
    types = common.toArray(types);
  
    if (!schemas.every(function (schema) { return schema instanceof Schema; })) {
      throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');
    }
  
    if (!types.every(function (type) { return type instanceof Type; })) {
      throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');
    }
  
    return new Schema({
      include: schemas,
      explicit: types
    });
  };
  
  
  module.exports = Schema;
  
  },{"./common":11,"./exception":9,"./type":4}],4:[function(require,module,exports){'use strict';
  
  
  var YAMLException = require('./exception');
  
  
  // TODO: Add tag format check.
  function Type(tag, options) {
    options = options || {};
  
    this.tag    = tag;
    this.loader = options['loader'] || null;
    this.dumper = options['dumper'] || null;
  
    if (null === this.loader && null === this.dumper) {
      throw new YAMLException('Incomplete YAML type definition. "loader" or "dumper" setting must be specified.');
    }
  
    if (null !== this.loader) {
      this.loader = new Type.Loader(this.loader);
    }
  
    if (null !== this.dumper) {
      this.dumper = new Type.Dumper(this.dumper);
    }
  }
  
  
  Type.Loader = function TypeLoader(options) {
    options = options || {};
  
    this.kind     = options['kind']     || null;
    this.resolver = options['resolver'] || null;
  
    if ('string' !== this.kind &&
        'array'  !== this.kind &&
        'object' !== this.kind) {
      throw new YAMLException('Unacceptable "kind" setting of a type loader.');
    }
  };
  
  
  function compileAliases(map) {
    var result = {};
  
    if (null !== map) {
      Object.keys(map).forEach(function (style) {
        map[style].forEach(function (alias) {
          result[String(alias)] = style;
        });
      });
    }
  
    return result;
  }
  
  
  Type.Dumper = function TypeDumper(options) {
    options = options || {};
  
    this.kind         = options['kind']         || null;
    this.defaultStyle = options['defaultStyle'] || null;
    this.instanceOf   = options['instanceOf']   || null;
    this.predicate    = options['predicate']    || null;
    this.representer  = options['representer']  || null;
    this.styleAliases = compileAliases(options['styleAliases'] || null);
  
    if ('undefined' !== this.kind &&
        'null'      !== this.kind &&
        'boolean'   !== this.kind &&
        'integer'   !== this.kind &&
        'float'     !== this.kind &&
        'string'    !== this.kind &&
        'array'     !== this.kind &&
        'object'    !== this.kind &&
        'function'  !== this.kind) {
      throw new YAMLException('Unacceptable "kind" setting of a type dumper.');
    }
  };
  
  
  module.exports = Type;
  
  },{"./exception":9}],6:[function(require,module,exports){'use strict';
  
  
  var Schema = require('../schema');
  
  
  module.exports = new Schema({
    explicit: [
      require('../type/str'),
      require('../type/seq'),
      require('../type/map')
    ]
  });
  
  },{"../schema":5,"../type/str":23,"../type/seq":24,"../type/map":25}],23:[function(require,module,exports){'use strict';
  
  
  var Type = require('../type');
  
  
  module.exports = new Type('tag:yaml.org,2002:str', {
    loader: {
      kind: 'string'
    }
  });
  
  },{"../type":4}],24:[function(require,module,exports){'use strict';
  
  
  var Type = require('../type');
  
  
  module.exports = new Type('tag:yaml.org,2002:seq', {
    loader: {
      kind: 'array'
    }
  });
  
  },{"../type":4}],25:[function(require,module,exports){'use strict';
  
  
  var Type = require('../type');
  
  
  module.exports = new Type('tag:yaml.org,2002:map', {
    loader: {
      kind: 'object'
    }
  });
  
  },{"../type":4}],13:[function(require,module,exports){'use strict';
  
  
  var NIL  = require('../common').NIL;
  var Type = require('../type');
  
  
  var YAML_NULL_MAP = {
    '~'    : true,
    'null' : true,
    'Null' : true,
    'NULL' : true
  };
  
  
  function resolveYamlNull(object /*, explicit*/) {
    return YAML_NULL_MAP[object] ? null : NIL;
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:null', {
    loader: {
      kind: 'string',
      resolver: resolveYamlNull
    },
    dumper: {
      kind: 'null',
      defaultStyle: 'lowercase',
      representer: {
        canonical: function () { return '~';    },
        lowercase: function () { return 'null'; },
        uppercase: function () { return 'NULL'; },
        camelcase: function () { return 'Null'; },
      }
    }
  });
  
  },{"../common":11,"../type":4}],14:[function(require,module,exports){'use strict';
  
  
  var NIL  = require('../common').NIL;
  var Type = require('../type');
  
  
  var YAML_IMPLICIT_BOOLEAN_MAP = {
    'true'  : true,
    'True'  : true,
    'TRUE'  : true,
    'false' : false,
    'False' : false,
    'FALSE' : false
  };
  
  var YAML_EXPLICIT_BOOLEAN_MAP = {
    'true'  : true,
    'True'  : true,
    'TRUE'  : true,
    'false' : false,
    'False' : false,
    'FALSE' : false,
    'y'     : true,
    'Y'     : true,
    'yes'   : true,
    'Yes'   : true,
    'YES'   : true,
    'n'     : false,
    'N'     : false,
    'no'    : false,
    'No'    : false,
    'NO'    : false,
    'on'    : true,
    'On'    : true,
    'ON'    : true,
    'off'   : false,
    'Off'   : false,
    'OFF'   : false
  };
  
  
  function resolveYamlBoolean(object, explicit) {
    if (explicit) {
      if (YAML_EXPLICIT_BOOLEAN_MAP.hasOwnProperty(object)) {
        return YAML_EXPLICIT_BOOLEAN_MAP[object];
      } else {
        return NIL;
      }
    } else {
      if (YAML_IMPLICIT_BOOLEAN_MAP.hasOwnProperty(object)) {
        return YAML_IMPLICIT_BOOLEAN_MAP[object];
      } else {
        return NIL;
      }
    }
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:bool', {
    loader: {
      kind: 'string',
      resolver: resolveYamlBoolean
    },
    dumper: {
      kind: 'boolean',
      defaultStyle: 'lowercase',
      representer: {
        lowercase: function (object) { return object ? 'true' : 'false'; },
        uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },
        camelcase: function (object) { return object ? 'True' : 'False'; }
      }
    }
  });
  
  },{"../common":11,"../type":4}],15:[function(require,module,exports){'use strict';
  
  
  var NIL  = require('../common').NIL;
  var Type = require('../type');
  
  
  var YAML_INTEGER_PATTERN = new RegExp(
    '^(?:[-+]?0b[0-1_]+' +
    '|[-+]?0[0-7_]+' +
    '|[-+]?(?:0|[1-9][0-9_]*)' +
    '|[-+]?0x[0-9a-fA-F_]+' +
    '|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$');
  
  
  function resolveYamlInteger(object /*, explicit*/) {
    var value, sign, base, digits;
  
    if (!YAML_INTEGER_PATTERN.test(object)) {
      return NIL;
    }
  
    value  = object.replace(/_/g, '');
    sign   = '-' === value[0] ? -1 : 1;
    digits = [];
  
    if (0 <= '+-'.indexOf(value[0])) {
      value = value.slice(1);
    }
  
    if ('0' === value) {
      return 0;
  
    } else if (/^0b/.test(value)) {
      return sign * parseInt(value.slice(2), 2);
  
    } else if (/^0x/.test(value)) {
      return sign * parseInt(value, 16);
  
    } else if ('0' === value[0]) {
      return sign * parseInt(value, 8);
  
    } else if (0 <= value.indexOf(':')) {
      value.split(':').forEach(function (v) {
        digits.unshift(parseInt(v, 10));
      });
  
      value = 0;
      base = 1;
  
      digits.forEach(function (d) {
        value += (d * base);
        base *= 60;
      });
  
      return sign * value;
  
    } else {
      return sign * parseInt(value, 10);
    }
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:int', {
    loader: {
      kind: 'string',
      resolver: resolveYamlInteger
    },
    dumper: {
      kind: 'integer',
      defaultStyle: 'decimal',
      representer: {
        binary:      function (object) { return '0b' + object.toString(2); },
        octal:       function (object) { return '0'  + object.toString(8); },
        decimal:     function (object) { return        object.toString(10); },
        hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); }
      },
      styleAliases: {
        binary:      [ 2,  'bin' ],
        octal:       [ 8,  'oct' ],
        decimal:     [ 10, 'dec' ],
        hexadecimal: [ 16, 'hex' ]
      }
    }
  });
  
  },{"../common":11,"../type":4}],16:[function(require,module,exports){'use strict';
  
  
  var NIL  = require('../common').NIL;
  var Type = require('../type');
  
  
  var YAML_FLOAT_PATTERN = new RegExp(
    '^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?' +
    '|\\.[0-9_]+(?:[eE][-+][0-9]+)?' +
    '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' +
    '|[-+]?\\.(?:inf|Inf|INF)' +
    '|\\.(?:nan|NaN|NAN))$');
  
  
  function resolveYamlFloat(object /*, explicit*/) {
    var value, sign, base, digits;
  
    if (!YAML_FLOAT_PATTERN.test(object)) {
      return NIL;
    }
  
    value  = object.replace(/_/g, '').toLowerCase();
    sign   = '-' === value[0] ? -1 : 1;
    digits = [];
  
    if (0 <= '+-'.indexOf(value[0])) {
      value = value.slice(1);
    }
  
    if ('.inf' === value) {
      return (1 === sign) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
  
    } else if ('.nan' === value) {
      return NaN;
  
    } else if (0 <= value.indexOf(':')) {
      value.split(':').forEach(function (v) {
        digits.unshift(parseFloat(v, 10));
      });
  
      value = 0.0;
      base = 1;
  
      digits.forEach(function (d) {
        value += d * base;
        base *= 60;
      });
  
      return sign * value;
  
    } else {
      return sign * parseFloat(value, 10);
    }
  }
  
  
  function representYamlFloat(object, style) {
    if (isNaN(object)) {
      switch (style) {
      case 'lowercase':
        return '.nan';
      case 'uppercase':
        return '.NAN';
      case 'camelcase':
        return '.NaN';
      }
    } else if (Number.POSITIVE_INFINITY === object) {
      switch (style) {
      case 'lowercase':
        return '.inf';
      case 'uppercase':
        return '.INF';
      case 'camelcase':
        return '.Inf';
      }
    } else if (Number.NEGATIVE_INFINITY === object) {
      switch (style) {
      case 'lowercase':
        return '-.inf';
      case 'uppercase':
        return '-.INF';
      case 'camelcase':
        return '-.Inf';
      }
    } else {
      return object.toString(10);
    }
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:float', {
    loader: {
      kind: 'string',
      resolver: resolveYamlFloat
    },
    dumper: {
      kind: 'float',
      defaultStyle: 'lowercase',
      representer: representYamlFloat
    }
  });
  
  },{"../common":11,"../type":4}],17:[function(require,module,exports){'use strict';
  
  
  var NIL  = require('../common').NIL;
  var Type = require('../type');
  
  
  var YAML_TIMESTAMP_REGEXP = new RegExp(
    '^([0-9][0-9][0-9][0-9])'          + // [1] year
    '-([0-9][0-9]?)'                   + // [2] month
    '-([0-9][0-9]?)'                   + // [3] day
    '(?:(?:[Tt]|[ \\t]+)'              + // ...
    '([0-9][0-9]?)'                    + // [4] hour
    ':([0-9][0-9])'                    + // [5] minute
    ':([0-9][0-9])'                    + // [6] second
    '(?:\\.([0-9]*))?'                 + // [7] fraction
    '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour
    '(?::([0-9][0-9]))?))?)?$');         // [11] tz_minute
  
  
  function resolveYamlTimestamp(object /*, explicit*/) {
    var match, year, month, day, hour, minute, second, fraction = 0,
        delta = null, tz_hour, tz_minute, data;
  
    match = YAML_TIMESTAMP_REGEXP.exec(object);
  
    if (null === match) {
      return NIL;
    }
  
    // match: [1] year [2] month [3] day
  
    year = +(match[1]);
    month = +(match[2]) - 1; // JS month starts with 0
    day = +(match[3]);
  
    if (!match[4]) { // no hour
      return new Date(Date.UTC(year, month, day));
    }
  
    // match: [4] hour [5] minute [6] second [7] fraction
  
    hour = +(match[4]);
    minute = +(match[5]);
    second = +(match[6]);
  
    if (match[7]) {
      fraction = match[7].slice(0, 3);
      while (fraction.length < 3) { // milli-seconds
        fraction += '0';
      }
      fraction = +fraction;
    }
  
    // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute
  
    if (match[9]) {
      tz_hour = +(match[10]);
      tz_minute = +(match[11] || 0);
      delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds
      if ('-' === match[9]) {
        delta = -delta;
      }
    }
  
    data = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
  
    if (delta) {
      data.setTime(data.getTime() - delta);
    }
  
    return data;
  }
  
  
  function representYamlTimestamp(object /*, style*/) {
    return object.toISOString();
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:timestamp', {
    loader: {
      kind: 'string',
      resolver: resolveYamlTimestamp
    },
    dumper: {
      kind: 'object',
      instanceOf: Date,
      representer: representYamlTimestamp
    }
  });
  
  },{"../common":11,"../type":4}],18:[function(require,module,exports){'use strict';
  
  
  var NIL  = require('../common').NIL;
  var Type = require('../type');
  
  
  function resolveYamlMerge(object /*, explicit*/) {
    return '<<' === object ? object : NIL;
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:merge', {
    loader: {
      kind: 'string',
      resolver: resolveYamlMerge
    }
  });
  
  },{"../common":11,"../type":4}],19:[function(require,module,exports){// Modified from:
  // https://raw.github.com/kanaka/noVNC/d890e8640f20fba3215ba7be8e0ff145aeb8c17c/include/base64.js
  
  'use strict';
  
  
  var NodeBuffer = require('buffer').Buffer; // A trick for browserified version.
  var common     = require('../common');
  var NIL        = common.NIL;
  var Type       = require('../type');
  
  
  
  var BASE64_PADDING = '=';
  
  var BASE64_BINTABLE = [
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
    -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
    52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1,  0, -1, -1,
    -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
    15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
    -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
    41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
  ];
  
  var BASE64_CHARTABLE =
    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
  
  
  function resolveYamlBinary(object /*, explicit*/) {
    var value, code, idx = 0, result = [], leftbits, leftdata;
  
    leftbits = 0; // number of bits decoded, but yet to be appended
    leftdata = 0; // bits decoded, but yet to be appended
  
    // Convert one by one.
    for (idx = 0; idx < object.length; idx += 1) {
      code = object.charCodeAt(idx);
      value = BASE64_BINTABLE[code & 0x7F];
  
      // Skip LF(NL) || CR
      if (0x0A !== code && 0x0D !== code) {
        // Fail on illegal characters
        if (-1 === value) {
          return NIL;
        }
  
        // Collect data into leftdata, update bitcount
        leftdata = (leftdata << 6) | value;
        leftbits += 6;
  
        // If we have 8 or more bits, append 8 bits to the result
        if (leftbits >= 8) {
          leftbits -= 8;
  
          // Append if not padding.
          if (BASE64_PADDING !== object.charAt(idx)) {
            result.push((leftdata >> leftbits) & 0xFF);
          }
  
          leftdata &= (1 << leftbits) - 1;
        }
      }
    }
  
    // If there are any bits left, the base64 string was corrupted
    if (leftbits) {
      return NIL;
    } else {
      return new NodeBuffer(result);
    }
  }
  
  
  function representYamlBinary(object /*, style*/) {
    var result = '', index, length, rest;
  
    // Convert every three bytes to 4 ASCII characters.
    for (index = 0, length = object.length - 2; index < length; index += 3) {
      result += BASE64_CHARTABLE[object[index + 0] >> 2];
      result += BASE64_CHARTABLE[((object[index + 0] & 0x03) << 4) + (object[index + 1] >> 4)];
      result += BASE64_CHARTABLE[((object[index + 1] & 0x0F) << 2) + (object[index + 2] >> 6)];
      result += BASE64_CHARTABLE[object[index + 2] & 0x3F];
    }
  
    rest = object.length % 3;
  
    // Convert the remaining 1 or 2 bytes, padding out to 4 characters.
    if (0 !== rest) {
      index = object.length - rest;
      result += BASE64_CHARTABLE[object[index + 0] >> 2];
  
      if (2 === rest) {
        result += BASE64_CHARTABLE[((object[index + 0] & 0x03) << 4) + (object[index + 1] >> 4)];
        result += BASE64_CHARTABLE[(object[index + 1] & 0x0F) << 2];
        result += BASE64_PADDING;
      } else {
        result += BASE64_CHARTABLE[(object[index + 0] & 0x03) << 4];
        result += BASE64_PADDING + BASE64_PADDING;
      }
    }
  
    return result;
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:binary', {
    loader: {
      kind: 'string',
      resolver: resolveYamlBinary
    },
    dumper: {
      kind: 'object',
      instanceOf: NodeBuffer,
      representer: representYamlBinary
    }
  });
  
  },{"buffer":26,"../common":11,"../type":4}],26:[function(require,module,exports){function SlowBuffer (size) {
      this.length = size;
  };
  
  var assert = require('assert');
  
  exports.INSPECT_MAX_BYTES = 50;
  
  
  function toHex(n) {
    if (n < 16) return '0' + n.toString(16);
    return n.toString(16);
  }
  
  function utf8ToBytes(str) {
    var byteArray = [];
    for (var i = 0; i < str.length; i++)
      if (str.charCodeAt(i) <= 0x7F)
        byteArray.push(str.charCodeAt(i));
      else {
        var h = encodeURIComponent(str.charAt(i)).substr(1).split('%');
        for (var j = 0; j < h.length; j++)
          byteArray.push(parseInt(h[j], 16));
      }
  
    return byteArray;
  }
  
  function asciiToBytes(str) {
    var byteArray = []
    for (var i = 0; i < str.length; i++ )
      // Node's code seems to be doing this and not & 0x7F..
      byteArray.push( str.charCodeAt(i) & 0xFF );
  
    return byteArray;
  }
  
  function base64ToBytes(str) {
    return require("base64-js").toByteArray(str);
  }
  
  SlowBuffer.byteLength = function (str, encoding) {
    switch (encoding || "utf8") {
      case 'hex':
        return str.length / 2;
  
      case 'utf8':
      case 'utf-8':
        return utf8ToBytes(str).length;
  
      case 'ascii':
        return str.length;
  
      case 'base64':
        return base64ToBytes(str).length;
  
      default:
        throw new Error('Unknown encoding');
    }
  };
  
  function blitBuffer(src, dst, offset, length) {
    var pos, i = 0;
    while (i < length) {
      if ((i+offset >= dst.length) || (i >= src.length))
        break;
  
      dst[i + offset] = src[i];
      i++;
    }
    return i;
  }
  
  SlowBuffer.prototype.utf8Write = function (string, offset, length) {
    var bytes, pos;
    return SlowBuffer._charsWritten =  blitBuffer(utf8ToBytes(string), this, offset, length);
  };
  
  SlowBuffer.prototype.asciiWrite = function (string, offset, length) {
    var bytes, pos;
    return SlowBuffer._charsWritten =  blitBuffer(asciiToBytes(string), this, offset, length);
  };
  
  SlowBuffer.prototype.base64Write = function (string, offset, length) {
    var bytes, pos;
    return SlowBuffer._charsWritten = blitBuffer(base64ToBytes(string), this, offset, length);
  };
  
  SlowBuffer.prototype.base64Slice = function (start, end) {
    var bytes = Array.prototype.slice.apply(this, arguments)
    return require("base64-js").fromByteArray(bytes);
  }
  
  function decodeUtf8Char(str) {
    try {
      return decodeURIComponent(str);
    } catch (err) {
      return String.fromCharCode(0xFFFD); // UTF 8 invalid char
    }
  }
  
  SlowBuffer.prototype.utf8Slice = function () {
    var bytes = Array.prototype.slice.apply(this, arguments);
    var res = "";
    var tmp = "";
    var i = 0;
    while (i < bytes.length) {
      if (bytes[i] <= 0x7F) {
        res += decodeUtf8Char(tmp) + String.fromCharCode(bytes[i]);
        tmp = "";
      } else
        tmp += "%" + bytes[i].toString(16);
  
      i++;
    }
  
    return res + decodeUtf8Char(tmp);
  }
  
  SlowBuffer.prototype.asciiSlice = function () {
    var bytes = Array.prototype.slice.apply(this, arguments);
    var ret = "";
    for (var i = 0; i < bytes.length; i++)
      ret += String.fromCharCode(bytes[i]);
    return ret;
  }
  
  SlowBuffer.prototype.inspect = function() {
    var out = [],
        len = this.length;
    for (var i = 0; i < len; i++) {
      out[i] = toHex(this[i]);
      if (i == exports.INSPECT_MAX_BYTES) {
        out[i + 1] = '...';
        break;
      }
    }
    return '<SlowBuffer ' + out.join(' ') + '>';
  };
  
  
  SlowBuffer.prototype.hexSlice = function(start, end) {
    var len = this.length;
  
    if (!start || start < 0) start = 0;
    if (!end || end < 0 || end > len) end = len;
  
    var out = '';
    for (var i = start; i < end; i++) {
      out += toHex(this[i]);
    }
    return out;
  };
  
  
  SlowBuffer.prototype.toString = function(encoding, start, end) {
    encoding = String(encoding || 'utf8').toLowerCase();
    start = +start || 0;
    if (typeof end == 'undefined') end = this.length;
  
    // Fastpath empty strings
    if (+end == start) {
      return '';
    }
  
    switch (encoding) {
      case 'hex':
        return this.hexSlice(start, end);
  
      case 'utf8':
      case 'utf-8':
        return this.utf8Slice(start, end);
  
      case 'ascii':
        return this.asciiSlice(start, end);
  
      case 'binary':
        return this.binarySlice(start, end);
  
      case 'base64':
        return this.base64Slice(start, end);
  
      case 'ucs2':
      case 'ucs-2':
        return this.ucs2Slice(start, end);
  
      default:
        throw new Error('Unknown encoding');
    }
  };
  
  
  SlowBuffer.prototype.hexWrite = function(string, offset, length) {
    offset = +offset || 0;
    var remaining = this.length - offset;
    if (!length) {
      length = remaining;
    } else {
      length = +length;
      if (length > remaining) {
        length = remaining;
      }
    }
  
    // must be an even number of digits
    var strLen = string.length;
    if (strLen % 2) {
      throw new Error('Invalid hex string');
    }
    if (length > strLen / 2) {
      length = strLen / 2;
    }
    for (var i = 0; i < length; i++) {
      var byte = parseInt(string.substr(i * 2, 2), 16);
      if (isNaN(byte)) throw new Error('Invalid hex string');
      this[offset + i] = byte;
    }
    SlowBuffer._charsWritten = i * 2;
    return i;
  };
  
  
  SlowBuffer.prototype.write = function(string, offset, length, encoding) {
    // Support both (string, offset, length, encoding)
    // and the legacy (string, encoding, offset, length)
    if (isFinite(offset)) {
      if (!isFinite(length)) {
        encoding = length;
        length = undefined;
      }
    } else {  // legacy
      var swap = encoding;
      encoding = offset;
      offset = length;
      length = swap;
    }
  
    offset = +offset || 0;
    var remaining = this.length - offset;
    if (!length) {
      length = remaining;
    } else {
      length = +length;
      if (length > remaining) {
        length = remaining;
      }
    }
    encoding = String(encoding || 'utf8').toLowerCase();
  
    switch (encoding) {
      case 'hex':
        return this.hexWrite(string, offset, length);
  
      case 'utf8':
      case 'utf-8':
        return this.utf8Write(string, offset, length);
  
      case 'ascii':
        return this.asciiWrite(string, offset, length);
  
      case 'binary':
        return this.binaryWrite(string, offset, length);
  
      case 'base64':
        return this.base64Write(string, offset, length);
  
      case 'ucs2':
      case 'ucs-2':
        return this.ucs2Write(string, offset, length);
  
      default:
        throw new Error('Unknown encoding');
    }
  };
  
  
  // slice(start, end)
  SlowBuffer.prototype.slice = function(start, end) {
    if (end === undefined) end = this.length;
  
    if (end > this.length) {
      throw new Error('oob');
    }
    if (start > end) {
      throw new Error('oob');
    }
  
    return new Buffer(this, end - start, +start);
  };
  
  SlowBuffer.prototype.copy = function(target, targetstart, sourcestart, sourceend) {
    var temp = [];
    for (var i=sourcestart; i<sourceend; i++) {
      assert.ok(typeof this[i] !== 'undefined', "copying undefined buffer bytes!");
      temp.push(this[i]);
    }
  
    for (var i=targetstart; i<targetstart+temp.length; i++) {
      target[i] = temp[i-targetstart];
    }
  };
  
  function coerce(length) {
    // Coerce length to a number (possibly NaN), round up
    // in case it's fractional (e.g. 123.456) then do a
    // double negate to coerce a NaN to 0. Easy, right?
    length = ~~Math.ceil(+length);
    return length < 0 ? 0 : length;
  }
  
  
  // Buffer
  
  function Buffer(subject, encoding, offset) {
    if (!(this instanceof Buffer)) {
      return new Buffer(subject, encoding, offset);
    }
  
    var type;
  
    // Are we slicing?
    if (typeof offset === 'number') {
      this.length = coerce(encoding);
      this.parent = subject;
      this.offset = offset;
    } else {
      // Find the length
      switch (type = typeof subject) {
        case 'number':
          this.length = coerce(subject);
          break;
  
        case 'string':
          this.length = Buffer.byteLength(subject, encoding);
          break;
  
        case 'object': // Assume object is an array
          this.length = coerce(subject.length);
          break;
  
        default:
          throw new Error('First argument needs to be a number, ' +
                          'array or string.');
      }
  
      if (this.length > Buffer.poolSize) {
        // Big buffer, just alloc one.
        this.parent = new SlowBuffer(this.length);
        this.offset = 0;
  
      } else {
        // Small buffer.
        if (!pool || pool.length - pool.used < this.length) allocPool();
        this.parent = pool;
        this.offset = pool.used;
        pool.used += this.length;
      }
  
      // Treat array-ish objects as a byte array.
      if (isArrayIsh(subject)) {
        for (var i = 0; i < this.length; i++) {
          this.parent[i + this.offset] = subject[i];
        }
      } else if (type == 'string') {
        // We are a string
        this.length = this.write(subject, 0, encoding);
      }
    }
  
  }
  
  function isArrayIsh(subject) {
    return Array.isArray(subject) || Buffer.isBuffer(subject) ||
           subject && typeof subject === 'object' &&
           typeof subject.length === 'number';
  }
  
  exports.SlowBuffer = SlowBuffer;
  exports.Buffer = Buffer;
  
  Buffer.poolSize = 8 * 1024;
  var pool;
  
  function allocPool() {
    pool = new SlowBuffer(Buffer.poolSize);
    pool.used = 0;
  }
  
  
  // Static methods
  Buffer.isBuffer = function isBuffer(b) {
    return b instanceof Buffer || b instanceof SlowBuffer;
  };
  
  Buffer.concat = function (list, totalLength) {
    if (!Array.isArray(list)) {
      throw new Error("Usage: Buffer.concat(list, [totalLength])\n \
        list should be an Array.");
    }
  
    if (list.length === 0) {
      return new Buffer(0);
    } else if (list.length === 1) {
      return list[0];
    }
  
    if (typeof totalLength !== 'number') {
      totalLength = 0;
      for (var i = 0; i < list.length; i++) {
        var buf = list[i];
        totalLength += buf.length;
      }
    }
  
    var buffer = new Buffer(totalLength);
    var pos = 0;
    for (var i = 0; i < list.length; i++) {
      var buf = list[i];
      buf.copy(buffer, pos);
      pos += buf.length;
    }
    return buffer;
  };
  
  // Inspect
  Buffer.prototype.inspect = function inspect() {
    var out = [],
        len = this.length;
  
    for (var i = 0; i < len; i++) {
      out[i] = toHex(this.parent[i + this.offset]);
      if (i == exports.INSPECT_MAX_BYTES) {
        out[i + 1] = '...';
        break;
      }
    }
  
    return '<Buffer ' + out.join(' ') + '>';
  };
  
  
  Buffer.prototype.get = function get(i) {
    if (i < 0 || i >= this.length) throw new Error('oob');
    return this.parent[this.offset + i];
  };
  
  
  Buffer.prototype.set = function set(i, v) {
    if (i < 0 || i >= this.length) throw new Error('oob');
    return this.parent[this.offset + i] = v;
  };
  
  
  // write(string, offset = 0, length = buffer.length-offset, encoding = 'utf8')
  Buffer.prototype.write = function(string, offset, length, encoding) {
    // Support both (string, offset, length, encoding)
    // and the legacy (string, encoding, offset, length)
    if (isFinite(offset)) {
      if (!isFinite(length)) {
        encoding = length;
        length = undefined;
      }
    } else {  // legacy
      var swap = encoding;
      encoding = offset;
      offset = length;
      length = swap;
    }
  
    offset = +offset || 0;
    var remaining = this.length - offset;
    if (!length) {
      length = remaining;
    } else {
      length = +length;
      if (length > remaining) {
        length = remaining;
      }
    }
    encoding = String(encoding || 'utf8').toLowerCase();
  
    var ret;
    switch (encoding) {
      case 'hex':
        ret = this.parent.hexWrite(string, this.offset + offset, length);
        break;
  
      case 'utf8':
      case 'utf-8':
        ret = this.parent.utf8Write(string, this.offset + offset, length);
        break;
  
      case 'ascii':
        ret = this.parent.asciiWrite(string, this.offset + offset, length);
        break;
  
      case 'binary':
        ret = this.parent.binaryWrite(string, this.offset + offset, length);
        break;
  
      case 'base64':
        // Warning: maxLength not taken into account in base64Write
        ret = this.parent.base64Write(string, this.offset + offset, length);
        break;
  
      case 'ucs2':
      case 'ucs-2':
        ret = this.parent.ucs2Write(string, this.offset + offset, length);
        break;
  
      default:
        throw new Error('Unknown encoding');
    }
  
    Buffer._charsWritten = SlowBuffer._charsWritten;
  
    return ret;
  };
  
  
  // toString(encoding, start=0, end=buffer.length)
  Buffer.prototype.toString = function(encoding, start, end) {
    encoding = String(encoding || 'utf8').toLowerCase();
  
    if (typeof start == 'undefined' || start < 0) {
      start = 0;
    } else if (start > this.length) {
      start = this.length;
    }
  
    if (typeof end == 'undefined' || end > this.length) {
      end = this.length;
    } else if (end < 0) {
      end = 0;
    }
  
    start = start + this.offset;
    end = end + this.offset;
  
    switch (encoding) {
      case 'hex':
        return this.parent.hexSlice(start, end);
  
      case 'utf8':
      case 'utf-8':
        return this.parent.utf8Slice(start, end);
  
      case 'ascii':
        return this.parent.asciiSlice(start, end);
  
      case 'binary':
        return this.parent.binarySlice(start, end);
  
      case 'base64':
        return this.parent.base64Slice(start, end);
  
      case 'ucs2':
      case 'ucs-2':
        return this.parent.ucs2Slice(start, end);
  
      default:
        throw new Error('Unknown encoding');
    }
  };
  
  
  // byteLength
  Buffer.byteLength = SlowBuffer.byteLength;
  
  
  // fill(value, start=0, end=buffer.length)
  Buffer.prototype.fill = function fill(value, start, end) {
    value || (value = 0);
    start || (start = 0);
    end || (end = this.length);
  
    if (typeof value === 'string') {
      value = value.charCodeAt(0);
    }
    if (!(typeof value === 'number') || isNaN(value)) {
      throw new Error('value is not a number');
    }
  
    if (end < start) throw new Error('end < start');
  
    // Fill 0 bytes; we're done
    if (end === start) return 0;
    if (this.length == 0) return 0;
  
    if (start < 0 || start >= this.length) {
      throw new Error('start out of bounds');
    }
  
    if (end < 0 || end > this.length) {
      throw new Error('end out of bounds');
    }
  
    return this.parent.fill(value,
                            start + this.offset,
                            end + this.offset);
  };
  
  
  // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  Buffer.prototype.copy = function(target, target_start, start, end) {
    var source = this;
    start || (start = 0);
    end || (end = this.length);
    target_start || (target_start = 0);
  
    if (end < start) throw new Error('sourceEnd < sourceStart');
  
    // Copy 0 bytes; we're done
    if (end === start) return 0;
    if (target.length == 0 || source.length == 0) return 0;
  
    if (target_start < 0 || target_start >= target.length) {
      throw new Error('targetStart out of bounds');
    }
  
    if (start < 0 || start >= source.length) {
      throw new Error('sourceStart out of bounds');
    }
  
    if (end < 0 || end > source.length) {
      throw new Error('sourceEnd out of bounds');
    }
  
    // Are we oob?
    if (end > this.length) {
      end = this.length;
    }
  
    if (target.length - target_start < end - start) {
      end = target.length - target_start + start;
    }
  
    return this.parent.copy(target.parent,
                            target_start + target.offset,
                            start + this.offset,
                            end + this.offset);
  };
  
  
  // slice(start, end)
  Buffer.prototype.slice = function(start, end) {
    if (end === undefined) end = this.length;
    if (end > this.length) throw new Error('oob');
    if (start > end) throw new Error('oob');
  
    return new Buffer(this.parent, end - start, +start + this.offset);
  };
  
  
  // Legacy methods for backwards compatibility.
  
  Buffer.prototype.utf8Slice = function(start, end) {
    return this.toString('utf8', start, end);
  };
  
  Buffer.prototype.binarySlice = function(start, end) {
    return this.toString('binary', start, end);
  };
  
  Buffer.prototype.asciiSlice = function(start, end) {
    return this.toString('ascii', start, end);
  };
  
  Buffer.prototype.utf8Write = function(string, offset) {
    return this.write(string, offset, 'utf8');
  };
  
  Buffer.prototype.binaryWrite = function(string, offset) {
    return this.write(string, offset, 'binary');
  };
  
  Buffer.prototype.asciiWrite = function(string, offset) {
    return this.write(string, offset, 'ascii');
  };
  
  Buffer.prototype.readUInt8 = function(offset, noAssert) {
    var buffer = this;
  
    if (!noAssert) {
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset < buffer.length,
          'Trying to read beyond buffer length');
    }
  
    return buffer.parent[buffer.offset + offset];
  };
  
  function readUInt16(buffer, offset, isBigEndian, noAssert) {
    var val = 0;
  
  
    if (!noAssert) {
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset + 1 < buffer.length,
          'Trying to read beyond buffer length');
    }
  
    if (isBigEndian) {
      val = buffer.parent[buffer.offset + offset] << 8;
      val |= buffer.parent[buffer.offset + offset + 1];
    } else {
      val = buffer.parent[buffer.offset + offset];
      val |= buffer.parent[buffer.offset + offset + 1] << 8;
    }
  
    return val;
  }
  
  Buffer.prototype.readUInt16LE = function(offset, noAssert) {
    return readUInt16(this, offset, false, noAssert);
  };
  
  Buffer.prototype.readUInt16BE = function(offset, noAssert) {
    return readUInt16(this, offset, true, noAssert);
  };
  
  function readUInt32(buffer, offset, isBigEndian, noAssert) {
    var val = 0;
  
    if (!noAssert) {
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset + 3 < buffer.length,
          'Trying to read beyond buffer length');
    }
  
    if (isBigEndian) {
      val = buffer.parent[buffer.offset + offset + 1] << 16;
      val |= buffer.parent[buffer.offset + offset + 2] << 8;
      val |= buffer.parent[buffer.offset + offset + 3];
      val = val + (buffer.parent[buffer.offset + offset] << 24 >>> 0);
    } else {
      val = buffer.parent[buffer.offset + offset + 2] << 16;
      val |= buffer.parent[buffer.offset + offset + 1] << 8;
      val |= buffer.parent[buffer.offset + offset];
      val = val + (buffer.parent[buffer.offset + offset + 3] << 24 >>> 0);
    }
  
    return val;
  }
  
  Buffer.prototype.readUInt32LE = function(offset, noAssert) {
    return readUInt32(this, offset, false, noAssert);
  };
  
  Buffer.prototype.readUInt32BE = function(offset, noAssert) {
    return readUInt32(this, offset, true, noAssert);
  };
  
  
  /*
   * Signed integer types, yay team! A reminder on how two's complement actually
   * works. The first bit is the signed bit, i.e. tells us whether or not the
   * number should be positive or negative. If the two's complement value is
   * positive, then we're done, as it's equivalent to the unsigned representation.
   *
   * Now if the number is positive, you're pretty much done, you can just leverage
   * the unsigned translations and return those. Unfortunately, negative numbers
   * aren't quite that straightforward.
   *
   * At first glance, one might be inclined to use the traditional formula to
   * translate binary numbers between the positive and negative values in two's
   * complement. (Though it doesn't quite work for the most negative value)
   * Mainly:
   *  - invert all the bits
   *  - add one to the result
   *
   * Of course, this doesn't quite work in Javascript. Take for example the value
   * of -128. This could be represented in 16 bits (big-endian) as 0xff80. But of
   * course, Javascript will do the following:
   *
   * > ~0xff80
   * -65409
   *
   * Whoh there, Javascript, that's not quite right. But wait, according to
   * Javascript that's perfectly correct. When Javascript ends up seeing the
   * constant 0xff80, it has no notion that it is actually a signed number. It
   * assumes that we've input the unsigned value 0xff80. Thus, when it does the
   * binary negation, it casts it into a signed value, (positive 0xff80). Then
   * when you perform binary negation on that, it turns it into a negative number.
   *
   * Instead, we're going to have to use the following general formula, that works
   * in a rather Javascript friendly way. I'm glad we don't support this kind of
   * weird numbering scheme in the kernel.
   *
   * (BIT-MAX - (unsigned)val + 1) * -1
   *
   * The astute observer, may think that this doesn't make sense for 8-bit numbers
   * (really it isn't necessary for them). However, when you get 16-bit numbers,
   * you do. Let's go back to our prior example and see how this will look:
   *
   * (0xffff - 0xff80 + 1) * -1
   * (0x007f + 1) * -1
   * (0x0080) * -1
   */
  Buffer.prototype.readInt8 = function(offset, noAssert) {
    var buffer = this;
    var neg;
  
    if (!noAssert) {
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset < buffer.length,
          'Trying to read beyond buffer length');
    }
  
    neg = buffer.parent[buffer.offset + offset] & 0x80;
    if (!neg) {
      return (buffer.parent[buffer.offset + offset]);
    }
  
    return ((0xff - buffer.parent[buffer.offset + offset] + 1) * -1);
  };
  
  function readInt16(buffer, offset, isBigEndian, noAssert) {
    var neg, val;
  
    if (!noAssert) {
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset + 1 < buffer.length,
          'Trying to read beyond buffer length');
    }
  
    val = readUInt16(buffer, offset, isBigEndian, noAssert);
    neg = val & 0x8000;
    if (!neg) {
      return val;
    }
  
    return (0xffff - val + 1) * -1;
  }
  
  Buffer.prototype.readInt16LE = function(offset, noAssert) {
    return readInt16(this, offset, false, noAssert);
  };
  
  Buffer.prototype.readInt16BE = function(offset, noAssert) {
    return readInt16(this, offset, true, noAssert);
  };
  
  function readInt32(buffer, offset, isBigEndian, noAssert) {
    var neg, val;
  
    if (!noAssert) {
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset + 3 < buffer.length,
          'Trying to read beyond buffer length');
    }
  
    val = readUInt32(buffer, offset, isBigEndian, noAssert);
    neg = val & 0x80000000;
    if (!neg) {
      return (val);
    }
  
    return (0xffffffff - val + 1) * -1;
  }
  
  Buffer.prototype.readInt32LE = function(offset, noAssert) {
    return readInt32(this, offset, false, noAssert);
  };
  
  Buffer.prototype.readInt32BE = function(offset, noAssert) {
    return readInt32(this, offset, true, noAssert);
  };
  
  function readFloat(buffer, offset, isBigEndian, noAssert) {
    if (!noAssert) {
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset + 3 < buffer.length,
          'Trying to read beyond buffer length');
    }
  
    return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian,
        23, 4);
  }
  
  Buffer.prototype.readFloatLE = function(offset, noAssert) {
    return readFloat(this, offset, false, noAssert);
  };
  
  Buffer.prototype.readFloatBE = function(offset, noAssert) {
    return readFloat(this, offset, true, noAssert);
  };
  
  function readDouble(buffer, offset, isBigEndian, noAssert) {
    if (!noAssert) {
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset + 7 < buffer.length,
          'Trying to read beyond buffer length');
    }
  
    return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian,
        52, 8);
  }
  
  Buffer.prototype.readDoubleLE = function(offset, noAssert) {
    return readDouble(this, offset, false, noAssert);
  };
  
  Buffer.prototype.readDoubleBE = function(offset, noAssert) {
    return readDouble(this, offset, true, noAssert);
  };
  
  
  /*
   * We have to make sure that the value is a valid integer. This means that it is
   * non-negative. It has no fractional component and that it does not exceed the
   * maximum allowed value.
   *
   *      value           The number to check for validity
   *
   *      max             The maximum value
   */
  function verifuint(value, max) {
    assert.ok(typeof (value) == 'number',
        'cannot write a non-number as a number');
  
    assert.ok(value >= 0,
        'specified a negative value for writing an unsigned value');
  
    assert.ok(value <= max, 'value is larger than maximum value for type');
  
    assert.ok(Math.floor(value) === value, 'value has a fractional component');
  }
  
  Buffer.prototype.writeUInt8 = function(value, offset, noAssert) {
    var buffer = this;
  
    if (!noAssert) {
      assert.ok(value !== undefined && value !== null,
          'missing value');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset < buffer.length,
          'trying to write beyond buffer length');
  
      verifuint(value, 0xff);
    }
  
    buffer.parent[buffer.offset + offset] = value;
  };
  
  function writeUInt16(buffer, value, offset, isBigEndian, noAssert) {
    if (!noAssert) {
      assert.ok(value !== undefined && value !== null,
          'missing value');
  
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset + 1 < buffer.length,
          'trying to write beyond buffer length');
  
      verifuint(value, 0xffff);
    }
  
    if (isBigEndian) {
      buffer.parent[buffer.offset + offset] = (value & 0xff00) >>> 8;
      buffer.parent[buffer.offset + offset + 1] = value & 0x00ff;
    } else {
      buffer.parent[buffer.offset + offset + 1] = (value & 0xff00) >>> 8;
      buffer.parent[buffer.offset + offset] = value & 0x00ff;
    }
  }
  
  Buffer.prototype.writeUInt16LE = function(value, offset, noAssert) {
    writeUInt16(this, value, offset, false, noAssert);
  };
  
  Buffer.prototype.writeUInt16BE = function(value, offset, noAssert) {
    writeUInt16(this, value, offset, true, noAssert);
  };
  
  function writeUInt32(buffer, value, offset, isBigEndian, noAssert) {
    if (!noAssert) {
      assert.ok(value !== undefined && value !== null,
          'missing value');
  
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset + 3 < buffer.length,
          'trying to write beyond buffer length');
  
      verifuint(value, 0xffffffff);
    }
  
    if (isBigEndian) {
      buffer.parent[buffer.offset + offset] = (value >>> 24) & 0xff;
      buffer.parent[buffer.offset + offset + 1] = (value >>> 16) & 0xff;
      buffer.parent[buffer.offset + offset + 2] = (value >>> 8) & 0xff;
      buffer.parent[buffer.offset + offset + 3] = value & 0xff;
    } else {
      buffer.parent[buffer.offset + offset + 3] = (value >>> 24) & 0xff;
      buffer.parent[buffer.offset + offset + 2] = (value >>> 16) & 0xff;
      buffer.parent[buffer.offset + offset + 1] = (value >>> 8) & 0xff;
      buffer.parent[buffer.offset + offset] = value & 0xff;
    }
  }
  
  Buffer.prototype.writeUInt32LE = function(value, offset, noAssert) {
    writeUInt32(this, value, offset, false, noAssert);
  };
  
  Buffer.prototype.writeUInt32BE = function(value, offset, noAssert) {
    writeUInt32(this, value, offset, true, noAssert);
  };
  
  
  /*
   * We now move onto our friends in the signed number category. Unlike unsigned
   * numbers, we're going to have to worry a bit more about how we put values into
   * arrays. Since we are only worrying about signed 32-bit values, we're in
   * slightly better shape. Unfortunately, we really can't do our favorite binary
   * & in this system. It really seems to do the wrong thing. For example:
   *
   * > -32 & 0xff
   * 224
   *
   * What's happening above is really: 0xe0 & 0xff = 0xe0. However, the results of
   * this aren't treated as a signed number. Ultimately a bad thing.
   *
   * What we're going to want to do is basically create the unsigned equivalent of
   * our representation and pass that off to the wuint* functions. To do that
   * we're going to do the following:
   *
   *  - if the value is positive
   *      we can pass it directly off to the equivalent wuint
   *  - if the value is negative
   *      we do the following computation:
   *         mb + val + 1, where
   *         mb   is the maximum unsigned value in that byte size
   *         val  is the Javascript negative integer
   *
   *
   * As a concrete value, take -128. In signed 16 bits this would be 0xff80. If
   * you do out the computations:
   *
   * 0xffff - 128 + 1
   * 0xffff - 127
   * 0xff80
   *
   * You can then encode this value as the signed version. This is really rather
   * hacky, but it should work and get the job done which is our goal here.
   */
  
  /*
   * A series of checks to make sure we actually have a signed 32-bit number
   */
  function verifsint(value, max, min) {
    assert.ok(typeof (value) == 'number',
        'cannot write a non-number as a number');
  
    assert.ok(value <= max, 'value larger than maximum allowed value');
  
    assert.ok(value >= min, 'value smaller than minimum allowed value');
  
    assert.ok(Math.floor(value) === value, 'value has a fractional component');
  }
  
  function verifIEEE754(value, max, min) {
    assert.ok(typeof (value) == 'number',
        'cannot write a non-number as a number');
  
    assert.ok(value <= max, 'value larger than maximum allowed value');
  
    assert.ok(value >= min, 'value smaller than minimum allowed value');
  }
  
  Buffer.prototype.writeInt8 = function(value, offset, noAssert) {
    var buffer = this;
  
    if (!noAssert) {
      assert.ok(value !== undefined && value !== null,
          'missing value');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset < buffer.length,
          'Trying to write beyond buffer length');
  
      verifsint(value, 0x7f, -0x80);
    }
  
    if (value >= 0) {
      buffer.writeUInt8(value, offset, noAssert);
    } else {
      buffer.writeUInt8(0xff + value + 1, offset, noAssert);
    }
  };
  
  function writeInt16(buffer, value, offset, isBigEndian, noAssert) {
    if (!noAssert) {
      assert.ok(value !== undefined && value !== null,
          'missing value');
  
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset + 1 < buffer.length,
          'Trying to write beyond buffer length');
  
      verifsint(value, 0x7fff, -0x8000);
    }
  
    if (value >= 0) {
      writeUInt16(buffer, value, offset, isBigEndian, noAssert);
    } else {
      writeUInt16(buffer, 0xffff + value + 1, offset, isBigEndian, noAssert);
    }
  }
  
  Buffer.prototype.writeInt16LE = function(value, offset, noAssert) {
    writeInt16(this, value, offset, false, noAssert);
  };
  
  Buffer.prototype.writeInt16BE = function(value, offset, noAssert) {
    writeInt16(this, value, offset, true, noAssert);
  };
  
  function writeInt32(buffer, value, offset, isBigEndian, noAssert) {
    if (!noAssert) {
      assert.ok(value !== undefined && value !== null,
          'missing value');
  
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset + 3 < buffer.length,
          'Trying to write beyond buffer length');
  
      verifsint(value, 0x7fffffff, -0x80000000);
    }
  
    if (value >= 0) {
      writeUInt32(buffer, value, offset, isBigEndian, noAssert);
    } else {
      writeUInt32(buffer, 0xffffffff + value + 1, offset, isBigEndian, noAssert);
    }
  }
  
  Buffer.prototype.writeInt32LE = function(value, offset, noAssert) {
    writeInt32(this, value, offset, false, noAssert);
  };
  
  Buffer.prototype.writeInt32BE = function(value, offset, noAssert) {
    writeInt32(this, value, offset, true, noAssert);
  };
  
  function writeFloat(buffer, value, offset, isBigEndian, noAssert) {
    if (!noAssert) {
      assert.ok(value !== undefined && value !== null,
          'missing value');
  
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset + 3 < buffer.length,
          'Trying to write beyond buffer length');
  
      verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38);
    }
  
    require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian,
        23, 4);
  }
  
  Buffer.prototype.writeFloatLE = function(value, offset, noAssert) {
    writeFloat(this, value, offset, false, noAssert);
  };
  
  Buffer.prototype.writeFloatBE = function(value, offset, noAssert) {
    writeFloat(this, value, offset, true, noAssert);
  };
  
  function writeDouble(buffer, value, offset, isBigEndian, noAssert) {
    if (!noAssert) {
      assert.ok(value !== undefined && value !== null,
          'missing value');
  
      assert.ok(typeof (isBigEndian) === 'boolean',
          'missing or invalid endian');
  
      assert.ok(offset !== undefined && offset !== null,
          'missing offset');
  
      assert.ok(offset + 7 < buffer.length,
          'Trying to write beyond buffer length');
  
      verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308);
    }
  
    require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian,
        52, 8);
  }
  
  Buffer.prototype.writeDoubleLE = function(value, offset, noAssert) {
    writeDouble(this, value, offset, false, noAssert);
  };
  
  Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) {
    writeDouble(this, value, offset, true, noAssert);
  };
  
  SlowBuffer.prototype.readUInt8 = Buffer.prototype.readUInt8;
  SlowBuffer.prototype.readUInt16LE = Buffer.prototype.readUInt16LE;
  SlowBuffer.prototype.readUInt16BE = Buffer.prototype.readUInt16BE;
  SlowBuffer.prototype.readUInt32LE = Buffer.prototype.readUInt32LE;
  SlowBuffer.prototype.readUInt32BE = Buffer.prototype.readUInt32BE;
  SlowBuffer.prototype.readInt8 = Buffer.prototype.readInt8;
  SlowBuffer.prototype.readInt16LE = Buffer.prototype.readInt16LE;
  SlowBuffer.prototype.readInt16BE = Buffer.prototype.readInt16BE;
  SlowBuffer.prototype.readInt32LE = Buffer.prototype.readInt32LE;
  SlowBuffer.prototype.readInt32BE = Buffer.prototype.readInt32BE;
  SlowBuffer.prototype.readFloatLE = Buffer.prototype.readFloatLE;
  SlowBuffer.prototype.readFloatBE = Buffer.prototype.readFloatBE;
  SlowBuffer.prototype.readDoubleLE = Buffer.prototype.readDoubleLE;
  SlowBuffer.prototype.readDoubleBE = Buffer.prototype.readDoubleBE;
  SlowBuffer.prototype.writeUInt8 = Buffer.prototype.writeUInt8;
  SlowBuffer.prototype.writeUInt16LE = Buffer.prototype.writeUInt16LE;
  SlowBuffer.prototype.writeUInt16BE = Buffer.prototype.writeUInt16BE;
  SlowBuffer.prototype.writeUInt32LE = Buffer.prototype.writeUInt32LE;
  SlowBuffer.prototype.writeUInt32BE = Buffer.prototype.writeUInt32BE;
  SlowBuffer.prototype.writeInt8 = Buffer.prototype.writeInt8;
  SlowBuffer.prototype.writeInt16LE = Buffer.prototype.writeInt16LE;
  SlowBuffer.prototype.writeInt16BE = Buffer.prototype.writeInt16BE;
  SlowBuffer.prototype.writeInt32LE = Buffer.prototype.writeInt32LE;
  SlowBuffer.prototype.writeInt32BE = Buffer.prototype.writeInt32BE;
  SlowBuffer.prototype.writeFloatLE = Buffer.prototype.writeFloatLE;
  SlowBuffer.prototype.writeFloatBE = Buffer.prototype.writeFloatBE;
  SlowBuffer.prototype.writeDoubleLE = Buffer.prototype.writeDoubleLE;
  SlowBuffer.prototype.writeDoubleBE = Buffer.prototype.writeDoubleBE;
  
  },{"assert":27,"base64-js":28,"./buffer_ieee754":29}],27:[function(require,module,exports){// UTILITY
  var util = require('util');
  var Buffer = require("buffer").Buffer;
  var pSlice = Array.prototype.slice;
  
  function objectKeys(object) {
    if (Object.keys) return Object.keys(object);
    var result = [];
    for (var name in object) {
      if (Object.prototype.hasOwnProperty.call(object, name)) {
        result.push(name);
      }
    }
    return result;
  }
  
  // 1. The assert module provides functions that throw
  // AssertionError's when particular conditions are not met. The
  // assert module must conform to the following interface.
  
  var assert = module.exports = ok;
  
  // 2. The AssertionError is defined in assert.
  // new assert.AssertionError({ message: message,
  //                             actual: actual,
  //                             expected: expected })
  
  assert.AssertionError = function AssertionError(options) {
    this.name = 'AssertionError';
    this.message = options.message;
    this.actual = options.actual;
    this.expected = options.expected;
    this.operator = options.operator;
    var stackStartFunction = options.stackStartFunction || fail;
  
    if (Error.captureStackTrace) {
      Error.captureStackTrace(this, stackStartFunction);
    }
  };
  util.inherits(assert.AssertionError, Error);
  
  function replacer(key, value) {
    if (value === undefined) {
      return '' + value;
    }
    if (typeof value === 'number' && (isNaN(value) || !isFinite(value))) {
      return value.toString();
    }
    if (typeof value === 'function' || value instanceof RegExp) {
      return value.toString();
    }
    return value;
  }
  
  function truncate(s, n) {
    if (typeof s == 'string') {
      return s.length < n ? s : s.slice(0, n);
    } else {
      return s;
    }
  }
  
  assert.AssertionError.prototype.toString = function() {
    if (this.message) {
      return [this.name + ':', this.message].join(' ');
    } else {
      return [
        this.name + ':',
        truncate(JSON.stringify(this.actual, replacer), 128),
        this.operator,
        truncate(JSON.stringify(this.expected, replacer), 128)
      ].join(' ');
    }
  };
  
  // assert.AssertionError instanceof Error
  
  assert.AssertionError.__proto__ = Error.prototype;
  
  // At present only the three keys mentioned above are used and
  // understood by the spec. Implementations or sub modules can pass
  // other keys to the AssertionError's constructor - they will be
  // ignored.
  
  // 3. All of the following functions must throw an AssertionError
  // when a corresponding condition is not met, with a message that
  // may be undefined if not provided.  All assertion methods provide
  // both the actual and expected values to the assertion error for
  // display purposes.
  
  function fail(actual, expected, message, operator, stackStartFunction) {
    throw new assert.AssertionError({
      message: message,
      actual: actual,
      expected: expected,
      operator: operator,
      stackStartFunction: stackStartFunction
    });
  }
  
  // EXTENSION! allows for well behaved errors defined elsewhere.
  assert.fail = fail;
  
  // 4. Pure assertion tests whether a value is truthy, as determined
  // by !!guard.
  // assert.ok(guard, message_opt);
  // This statement is equivalent to assert.equal(true, guard,
  // message_opt);. To test strictly for the value true, use
  // assert.strictEqual(true, guard, message_opt);.
  
  function ok(value, message) {
    if (!!!value) fail(value, true, message, '==', assert.ok);
  }
  assert.ok = ok;
  
  // 5. The equality assertion tests shallow, coercive equality with
  // ==.
  // assert.equal(actual, expected, message_opt);
  
  assert.equal = function equal(actual, expected, message) {
    if (actual != expected) fail(actual, expected, message, '==', assert.equal);
  };
  
  // 6. The non-equality assertion tests for whether two objects are not equal
  // with != assert.notEqual(actual, expected, message_opt);
  
  assert.notEqual = function notEqual(actual, expected, message) {
    if (actual == expected) {
      fail(actual, expected, message, '!=', assert.notEqual);
    }
  };
  
  // 7. The equivalence assertion tests a deep equality relation.
  // assert.deepEqual(actual, expected, message_opt);
  
  assert.deepEqual = function deepEqual(actual, expected, message) {
    if (!_deepEqual(actual, expected)) {
      fail(actual, expected, message, 'deepEqual', assert.deepEqual);
    }
  };
  
  function _deepEqual(actual, expected) {
    // 7.1. All identical values are equivalent, as determined by ===.
    if (actual === expected) {
      return true;
  
    } else if (Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) {
      if (actual.length != expected.length) return false;
  
      for (var i = 0; i < actual.length; i++) {
        if (actual[i] !== expected[i]) return false;
      }
  
      return true;
  
    // 7.2. If the expected value is a Date object, the actual value is
    // equivalent if it is also a Date object that refers to the same time.
    } else if (actual instanceof Date && expected instanceof Date) {
      return actual.getTime() === expected.getTime();
  
    // 7.3. Other pairs that do not both pass typeof value == 'object',
    // equivalence is determined by ==.
    } else if (typeof actual != 'object' && typeof expected != 'object') {
      return actual == expected;
  
    // 7.4. For all other Object pairs, including Array objects, equivalence is
    // determined by having the same number of owned properties (as verified
    // with Object.prototype.hasOwnProperty.call), the same set of keys
    // (although not necessarily the same order), equivalent values for every
    // corresponding key, and an identical 'prototype' property. Note: this
    // accounts for both named and indexed properties on Arrays.
    } else {
      return objEquiv(actual, expected);
    }
  }
  
  function isUndefinedOrNull(value) {
    return value === null || value === undefined;
  }
  
  function isArguments(object) {
    return Object.prototype.toString.call(object) == '[object Arguments]';
  }
  
  function objEquiv(a, b) {
    if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
      return false;
    // an identical 'prototype' property.
    if (a.prototype !== b.prototype) return false;
    //~~~I've managed to break Object.keys through screwy arguments passing.
    //   Converting to array solves the problem.
    if (isArguments(a)) {
      if (!isArguments(b)) {
        return false;
      }
      a = pSlice.call(a);
      b = pSlice.call(b);
      return _deepEqual(a, b);
    }
    try {
      var ka = objectKeys(a),
          kb = objectKeys(b),
          key, i;
    } catch (e) {//happens when one is a string literal and the other isn't
      return false;
    }
    // having the same number of owned properties (keys incorporates
    // hasOwnProperty)
    if (ka.length != kb.length)
      return false;
    //the same set of keys (although not necessarily the same order),
    ka.sort();
    kb.sort();
    //~~~cheap key test
    for (i = ka.length - 1; i >= 0; i--) {
      if (ka[i] != kb[i])
        return false;
    }
    //equivalent values for every corresponding key, and
    //~~~possibly expensive deep test
    for (i = ka.length - 1; i >= 0; i--) {
      key = ka[i];
      if (!_deepEqual(a[key], b[key])) return false;
    }
    return true;
  }
  
  // 8. The non-equivalence assertion tests for any deep inequality.
  // assert.notDeepEqual(actual, expected, message_opt);
  
  assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
    if (_deepEqual(actual, expected)) {
      fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
    }
  };
  
  // 9. The strict equality assertion tests strict equality, as determined by ===.
  // assert.strictEqual(actual, expected, message_opt);
  
  assert.strictEqual = function strictEqual(actual, expected, message) {
    if (actual !== expected) {
      fail(actual, expected, message, '===', assert.strictEqual);
    }
  };
  
  // 10. The strict non-equality assertion tests for strict inequality, as
  // determined by !==.  assert.notStrictEqual(actual, expected, message_opt);
  
  assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
    if (actual === expected) {
      fail(actual, expected, message, '!==', assert.notStrictEqual);
    }
  };
  
  function expectedException(actual, expected) {
    if (!actual || !expected) {
      return false;
    }
  
    if (expected instanceof RegExp) {
      return expected.test(actual);
    } else if (actual instanceof expected) {
      return true;
    } else if (expected.call({}, actual) === true) {
      return true;
    }
  
    return false;
  }
  
  function _throws(shouldThrow, block, expected, message) {
    var actual;
  
    if (typeof expected === 'string') {
      message = expected;
      expected = null;
    }
  
    try {
      block();
    } catch (e) {
      actual = e;
    }
  
    message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
              (message ? ' ' + message : '.');
  
    if (shouldThrow && !actual) {
      fail('Missing expected exception' + message);
    }
  
    if (!shouldThrow && expectedException(actual, expected)) {
      fail('Got unwanted exception' + message);
    }
  
    if ((shouldThrow && actual && expected &&
        !expectedException(actual, expected)) || (!shouldThrow && actual)) {
      throw actual;
    }
  }
  
  // 11. Expected to throw an error:
  // assert.throws(block, Error_opt, message_opt);
  
  assert.throws = function(block, /*optional*/error, /*optional*/message) {
    _throws.apply(this, [true].concat(pSlice.call(arguments)));
  };
  
  // EXTENSION! This is annoying to write outside this module.
  assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
    _throws.apply(this, [false].concat(pSlice.call(arguments)));
  };
  
  assert.ifError = function(err) { if (err) {throw err;}};
  
  },{"util":30,"buffer":26}],30:[function(require,module,exports){var events = require('events');
  
  exports.isArray = isArray;
  exports.isDate = function(obj){return Object.prototype.toString.call(obj) === '[object Date]'};
  exports.isRegExp = function(obj){return Object.prototype.toString.call(obj) === '[object RegExp]'};
  
  
  exports.print = function () {};
  exports.puts = function () {};
  exports.debug = function() {};
  
  exports.inspect = function(obj, showHidden, depth, colors) {
    var seen = [];
  
    var stylize = function(str, styleType) {
      // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
      var styles =
          { 'bold' : [1, 22],
            'italic' : [3, 23],
            'underline' : [4, 24],
            'inverse' : [7, 27],
            'white' : [37, 39],
            'grey' : [90, 39],
            'black' : [30, 39],
            'blue' : [34, 39],
            'cyan' : [36, 39],
            'green' : [32, 39],
            'magenta' : [35, 39],
            'red' : [31, 39],
            'yellow' : [33, 39] };
  
      var style =
          { 'special': 'cyan',
            'number': 'blue',
            'boolean': 'yellow',
            'undefined': 'grey',
            'null': 'bold',
            'string': 'green',
            'date': 'magenta',
            // "name": intentionally not styling
            'regexp': 'red' }[styleType];
  
      if (style) {
        return '\033[' + styles[style][0] + 'm' + str +
               '\033[' + styles[style][1] + 'm';
      } else {
        return str;
      }
    };
    if (! colors) {
      stylize = function(str, styleType) { return str; };
    }
  
    function format(value, recurseTimes) {
      // Provide a hook for user-specified inspect functions.
      // Check that value is an object with an inspect function on it
      if (value && typeof value.inspect === 'function' &&
          // Filter out the util module, it's inspect function is special
          value !== exports &&
          // Also filter out any prototype objects using the circular check.
          !(value.constructor && value.constructor.prototype === value)) {
        return value.inspect(recurseTimes);
      }
  
      // Primitive types cannot have properties
      switch (typeof value) {
        case 'undefined':
          return stylize('undefined', 'undefined');
  
        case 'string':
          var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
                                                   .replace(/'/g, "\\'")
                                                   .replace(/\\"/g, '"') + '\'';
          return stylize(simple, 'string');
  
        case 'number':
          return stylize('' + value, 'number');
  
        case 'boolean':
          return stylize('' + value, 'boolean');
      }
      // For some reason typeof null is "object", so special case here.
      if (value === null) {
        return stylize('null', 'null');
      }
  
      // Look up the keys of the object.
      var visible_keys = Object_keys(value);
      var keys = showHidden ? Object_getOwnPropertyNames(value) : visible_keys;
  
      // Functions without properties can be shortcutted.
      if (typeof value === 'function' && keys.length === 0) {
        if (isRegExp(value)) {
          return stylize('' + value, 'regexp');
        } else {
          var name = value.name ? ': ' + value.name : '';
          return stylize('[Function' + name + ']', 'special');
        }
      }
  
      // Dates without properties can be shortcutted
      if (isDate(value) && keys.length === 0) {
        return stylize(value.toUTCString(), 'date');
      }
  
      var base, type, braces;
      // Determine the object type
      if (isArray(value)) {
        type = 'Array';
        braces = ['[', ']'];
      } else {
        type = 'Object';
        braces = ['{', '}'];
      }
  
      // Make functions say that they are functions
      if (typeof value === 'function') {
        var n = value.name ? ': ' + value.name : '';
        base = (isRegExp(value)) ? ' ' + value : ' [Function' + n + ']';
      } else {
        base = '';
      }
  
      // Make dates with properties first say the date
      if (isDate(value)) {
        base = ' ' + value.toUTCString();
      }
  
      if (keys.length === 0) {
        return braces[0] + base + braces[1];
      }
  
      if (recurseTimes < 0) {
        if (isRegExp(value)) {
          return stylize('' + value, 'regexp');
        } else {
          return stylize('[Object]', 'special');
        }
      }
  
      seen.push(value);
  
      var output = keys.map(function(key) {
        var name, str;
        if (value.__lookupGetter__) {
          if (value.__lookupGetter__(key)) {
            if (value.__lookupSetter__(key)) {
              str = stylize('[Getter/Setter]', 'special');
            } else {
              str = stylize('[Getter]', 'special');
            }
          } else {
            if (value.__lookupSetter__(key)) {
              str = stylize('[Setter]', 'special');
            }
          }
        }
        if (visible_keys.indexOf(key) < 0) {
          name = '[' + key + ']';
        }
        if (!str) {
          if (seen.indexOf(value[key]) < 0) {
            if (recurseTimes === null) {
              str = format(value[key]);
            } else {
              str = format(value[key], recurseTimes - 1);
            }
            if (str.indexOf('\n') > -1) {
              if (isArray(value)) {
                str = str.split('\n').map(function(line) {
                  return '  ' + line;
                }).join('\n').substr(2);
              } else {
                str = '\n' + str.split('\n').map(function(line) {
                  return '   ' + line;
                }).join('\n');
              }
            }
          } else {
            str = stylize('[Circular]', 'special');
          }
        }
        if (typeof name === 'undefined') {
          if (type === 'Array' && key.match(/^\d+$/)) {
            return str;
          }
          name = JSON.stringify('' + key);
          if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
            name = name.substr(1, name.length - 2);
            name = stylize(name, 'name');
          } else {
            name = name.replace(/'/g, "\\'")
                       .replace(/\\"/g, '"')
                       .replace(/(^"|"$)/g, "'");
            name = stylize(name, 'string');
          }
        }
  
        return name + ': ' + str;
      });
  
      seen.pop();
  
      var numLinesEst = 0;
      var length = output.reduce(function(prev, cur) {
        numLinesEst++;
        if (cur.indexOf('\n') >= 0) numLinesEst++;
        return prev + cur.length + 1;
      }, 0);
  
      if (length > 50) {
        output = braces[0] +
                 (base === '' ? '' : base + '\n ') +
                 ' ' +
                 output.join(',\n  ') +
                 ' ' +
                 braces[1];
  
      } else {
        output = braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
      }
  
      return output;
    }
    return format(obj, (typeof depth === 'undefined' ? 2 : depth));
  };
  
  
  function isArray(ar) {
    return ar instanceof Array ||
           Array.isArray(ar) ||
           (ar && ar !== Object.prototype && isArray(ar.__proto__));
  }
  
  
  function isRegExp(re) {
    return re instanceof RegExp ||
      (typeof re === 'object' && Object.prototype.toString.call(re) === '[object RegExp]');
  }
  
  
  function isDate(d) {
    if (d instanceof Date) return true;
    if (typeof d !== 'object') return false;
    var properties = Date.prototype && Object_getOwnPropertyNames(Date.prototype);
    var proto = d.__proto__ && Object_getOwnPropertyNames(d.__proto__);
    return JSON.stringify(proto) === JSON.stringify(properties);
  }
  
  function pad(n) {
    return n < 10 ? '0' + n.toString(10) : n.toString(10);
  }
  
  var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
                'Oct', 'Nov', 'Dec'];
  
  // 26 Feb 16:19:34
  function timestamp() {
    var d = new Date();
    var time = [pad(d.getHours()),
                pad(d.getMinutes()),
                pad(d.getSeconds())].join(':');
    return [d.getDate(), months[d.getMonth()], time].join(' ');
  }
  
  exports.log = function (msg) {};
  
  exports.pump = null;
  
  var Object_keys = Object.keys || function (obj) {
      var res = [];
      for (var key in obj) res.push(key);
      return res;
  };
  
  var Object_getOwnPropertyNames = Object.getOwnPropertyNames || function (obj) {
      var res = [];
      for (var key in obj) {
          if (Object.hasOwnProperty.call(obj, key)) res.push(key);
      }
      return res;
  };
  
  var Object_create = Object.create || function (prototype, properties) {
      // from es5-shim
      var object;
      if (prototype === null) {
          object = { '__proto__' : null };
      }
      else {
          if (typeof prototype !== 'object') {
              throw new TypeError(
                  'typeof prototype[' + (typeof prototype) + '] != \'object\''
              );
          }
          var Type = function () {};
          Type.prototype = prototype;
          object = new Type();
          object.__proto__ = prototype;
      }
      if (typeof properties !== 'undefined' && Object.defineProperties) {
          Object.defineProperties(object, properties);
      }
      return object;
  };
  
  exports.inherits = function(ctor, superCtor) {
    ctor.super_ = superCtor;
    ctor.prototype = Object_create(superCtor.prototype, {
      constructor: {
        value: ctor,
        enumerable: false,
        writable: true,
        configurable: true
      }
    });
  };
  
  var formatRegExp = /%[sdj%]/g;
  exports.format = function(f) {
    if (typeof f !== 'string') {
      var objects = [];
      for (var i = 0; i < arguments.length; i++) {
        objects.push(exports.inspect(arguments[i]));
      }
      return objects.join(' ');
    }
  
    var i = 1;
    var args = arguments;
    var len = args.length;
    var str = String(f).replace(formatRegExp, function(x) {
      if (x === '%%') return '%';
      if (i >= len) return x;
      switch (x) {
        case '%s': return String(args[i++]);
        case '%d': return Number(args[i++]);
        case '%j': return JSON.stringify(args[i++]);
        default:
          return x;
      }
    });
    for(var x = args[i]; i < len; x = args[++i]){
      if (x === null || typeof x !== 'object') {
        str += ' ' + x;
      } else {
        str += ' ' + exports.inspect(x);
      }
    }
    return str;
  };
  
  },{"events":31}],31:[function(require,module,exports){(function(process){if (!process.EventEmitter) process.EventEmitter = function () {};
  
  var EventEmitter = exports.EventEmitter = process.EventEmitter;
  var isArray = typeof Array.isArray === 'function'
      ? Array.isArray
      : function (xs) {
          return Object.prototype.toString.call(xs) === '[object Array]'
      }
  ;
  function indexOf (xs, x) {
      if (xs.indexOf) return xs.indexOf(x);
      for (var i = 0; i < xs.length; i++) {
          if (x === xs[i]) return i;
      }
      return -1;
  }
  
  // By default EventEmitters will print a warning if more than
  // 10 listeners are added to it. This is a useful default which
  // helps finding memory leaks.
  //
  // Obviously not all Emitters should be limited to 10. This function allows
  // that to be increased. Set to zero for unlimited.
  var defaultMaxListeners = 10;
  EventEmitter.prototype.setMaxListeners = function(n) {
    if (!this._events) this._events = {};
    this._events.maxListeners = n;
  };
  
  
  EventEmitter.prototype.emit = function(type) {
    // If there is no 'error' event listener then throw.
    if (type === 'error') {
      if (!this._events || !this._events.error ||
          (isArray(this._events.error) && !this._events.error.length))
      {
        if (arguments[1] instanceof Error) {
          throw arguments[1]; // Unhandled 'error' event
        } else {
          throw new Error("Uncaught, unspecified 'error' event.");
        }
        return false;
      }
    }
  
    if (!this._events) return false;
    var handler = this._events[type];
    if (!handler) return false;
  
    if (typeof handler == 'function') {
      switch (arguments.length) {
        // fast cases
        case 1:
          handler.call(this);
          break;
        case 2:
          handler.call(this, arguments[1]);
          break;
        case 3:
          handler.call(this, arguments[1], arguments[2]);
          break;
        // slower
        default:
          var args = Array.prototype.slice.call(arguments, 1);
          handler.apply(this, args);
      }
      return true;
  
    } else if (isArray(handler)) {
      var args = Array.prototype.slice.call(arguments, 1);
  
      var listeners = handler.slice();
      for (var i = 0, l = listeners.length; i < l; i++) {
        listeners[i].apply(this, args);
      }
      return true;
  
    } else {
      return false;
    }
  };
  
  // EventEmitter is defined in src/node_events.cc
  // EventEmitter.prototype.emit() is also defined there.
  EventEmitter.prototype.addListener = function(type, listener) {
    if ('function' !== typeof listener) {
      throw new Error('addListener only takes instances of Function');
    }
  
    if (!this._events) this._events = {};
  
    // To avoid recursion in the case that type == "newListeners"! Before
    // adding it to the listeners, first emit "newListeners".
    this.emit('newListener', type, listener);
  
    if (!this._events[type]) {
      // Optimize the case of one listener. Don't need the extra array object.
      this._events[type] = listener;
    } else if (isArray(this._events[type])) {
  
      // Check for listener leak
      if (!this._events[type].warned) {
        var m;
        if (this._events.maxListeners !== undefined) {
          m = this._events.maxListeners;
        } else {
          m = defaultMaxListeners;
        }
  
        if (m && m > 0 && this._events[type].length > m) {
          this._events[type].warned = true;
          console.error('(node) warning: possible EventEmitter memory ' +
                        'leak detected. %d listeners added. ' +
                        'Use emitter.setMaxListeners() to increase limit.',
                        this._events[type].length);
          console.trace();
        }
      }
  
      // If we've already got an array, just append.
      this._events[type].push(listener);
    } else {
      // Adding the second element, need to change to array.
      this._events[type] = [this._events[type], listener];
    }
  
    return this;
  };
  
  EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  
  EventEmitter.prototype.once = function(type, listener) {
    var self = this;
    self.on(type, function g() {
      self.removeListener(type, g);
      listener.apply(this, arguments);
    });
  
    return this;
  };
  
  EventEmitter.prototype.removeListener = function(type, listener) {
    if ('function' !== typeof listener) {
      throw new Error('removeListener only takes instances of Function');
    }
  
    // does not use listeners(), so no side effect of creating _events[type]
    if (!this._events || !this._events[type]) return this;
  
    var list = this._events[type];
  
    if (isArray(list)) {
      var i = indexOf(list, listener);
      if (i < 0) return this;
      list.splice(i, 1);
      if (list.length == 0)
        delete this._events[type];
    } else if (this._events[type] === listener) {
      delete this._events[type];
    }
  
    return this;
  };
  
  EventEmitter.prototype.removeAllListeners = function(type) {
    if (arguments.length === 0) {
      this._events = {};
      return this;
    }
  
    // does not use listeners(), so no side effect of creating _events[type]
    if (type && this._events && this._events[type]) this._events[type] = null;
    return this;
  };
  
  EventEmitter.prototype.listeners = function(type) {
    if (!this._events) this._events = {};
    if (!this._events[type]) this._events[type] = [];
    if (!isArray(this._events[type])) {
      this._events[type] = [this._events[type]];
    }
    return this._events[type];
  };
  
  })(require("__browserify_process"))
  },{"__browserify_process":32}],32:[function(require,module,exports){// shim for using process in browser
  
  var process = module.exports = {};
  
  process.nextTick = (function () {
      var canSetImmediate = typeof window !== 'undefined'
      && window.setImmediate;
      var canPost = typeof window !== 'undefined'
      && window.postMessage && window.addEventListener
      ;
  
      if (canSetImmediate) {
          return function (f) { return window.setImmediate(f) };
      }
  
      if (canPost) {
          var queue = [];
          window.addEventListener('message', function (ev) {
              if (ev.source === window && ev.data === 'process-tick') {
                  ev.stopPropagation();
                  if (queue.length > 0) {
                      var fn = queue.shift();
                      fn();
                  }
              }
          }, true);
  
          return function nextTick(fn) {
              queue.push(fn);
              window.postMessage('process-tick', '*');
          };
      }
  
      return function nextTick(fn) {
          setTimeout(fn, 0);
      };
  })();
  
  process.title = 'browser';
  process.browser = true;
  process.env = {};
  process.argv = [];
  
  process.binding = function (name) {
      throw new Error('process.binding is not supported');
  }
  
  // TODO(shtylman)
  process.cwd = function () { return '/' };
  process.chdir = function (dir) {
      throw new Error('process.chdir is not supported');
  };
  
  },{}],28:[function(require,module,exports){(function (exports) {
  	'use strict';
  
  	var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  
  	function b64ToByteArray(b64) {
  		var i, j, l, tmp, placeHolders, arr;
  	
  		if (b64.length % 4 > 0) {
  			throw 'Invalid string. Length must be a multiple of 4';
  		}
  
  		// the number of equal signs (place holders)
  		// if there are two placeholders, than the two characters before it
  		// represent one byte
  		// if there is only one, then the three characters before it represent 2 bytes
  		// this is just a cheap hack to not do indexOf twice
  		placeHolders = b64.indexOf('=');
  		placeHolders = placeHolders > 0 ? b64.length - placeHolders : 0;
  
  		// base64 is 4/3 + up to two characters of the original data
  		arr = [];//new Uint8Array(b64.length * 3 / 4 - placeHolders);
  
  		// if there are placeholders, only get up to the last complete 4 chars
  		l = placeHolders > 0 ? b64.length - 4 : b64.length;
  
  		for (i = 0, j = 0; i < l; i += 4, j += 3) {
  			tmp = (lookup.indexOf(b64[i]) << 18) | (lookup.indexOf(b64[i + 1]) << 12) | (lookup.indexOf(b64[i + 2]) << 6) | lookup.indexOf(b64[i + 3]);
  			arr.push((tmp & 0xFF0000) >> 16);
  			arr.push((tmp & 0xFF00) >> 8);
  			arr.push(tmp & 0xFF);
  		}
  
  		if (placeHolders === 2) {
  			tmp = (lookup.indexOf(b64[i]) << 2) | (lookup.indexOf(b64[i + 1]) >> 4);
  			arr.push(tmp & 0xFF);
  		} else if (placeHolders === 1) {
  			tmp = (lookup.indexOf(b64[i]) << 10) | (lookup.indexOf(b64[i + 1]) << 4) | (lookup.indexOf(b64[i + 2]) >> 2);
  			arr.push((tmp >> 8) & 0xFF);
  			arr.push(tmp & 0xFF);
  		}
  
  		return arr;
  	}
  
  	function uint8ToBase64(uint8) {
  		var i,
  			extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes
  			output = "",
  			temp, length;
  
  		function tripletToBase64 (num) {
  			return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];
  		};
  
  		// go through the array every three bytes, we'll deal with trailing stuff later
  		for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {
  			temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);
  			output += tripletToBase64(temp);
  		}
  
  		// pad the end with zeros, but make sure to not forget the extra bytes
  		switch (extraBytes) {
  			case 1:
  				temp = uint8[uint8.length - 1];
  				output += lookup[temp >> 2];
  				output += lookup[(temp << 4) & 0x3F];
  				output += '==';
  				break;
  			case 2:
  				temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]);
  				output += lookup[temp >> 10];
  				output += lookup[(temp >> 4) & 0x3F];
  				output += lookup[(temp << 2) & 0x3F];
  				output += '=';
  				break;
  		}
  
  		return output;
  	}
  
  	module.exports.toByteArray = b64ToByteArray;
  	module.exports.fromByteArray = uint8ToBase64;
  }());
  
  },{}],29:[function(require,module,exports){exports.readIEEE754 = function(buffer, offset, isBE, mLen, nBytes) {
    var e, m,
        eLen = nBytes * 8 - mLen - 1,
        eMax = (1 << eLen) - 1,
        eBias = eMax >> 1,
        nBits = -7,
        i = isBE ? 0 : (nBytes - 1),
        d = isBE ? 1 : -1,
        s = buffer[offset + i];
  
    i += d;
  
    e = s & ((1 << (-nBits)) - 1);
    s >>= (-nBits);
    nBits += eLen;
    for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8);
  
    m = e & ((1 << (-nBits)) - 1);
    e >>= (-nBits);
    nBits += mLen;
    for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8);
  
    if (e === 0) {
      e = 1 - eBias;
    } else if (e === eMax) {
      return m ? NaN : ((s ? -1 : 1) * Infinity);
    } else {
      m = m + Math.pow(2, mLen);
      e = e - eBias;
    }
    return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
  };
  
  exports.writeIEEE754 = function(buffer, value, offset, isBE, mLen, nBytes) {
    var e, m, c,
        eLen = nBytes * 8 - mLen - 1,
        eMax = (1 << eLen) - 1,
        eBias = eMax >> 1,
        rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0),
        i = isBE ? (nBytes - 1) : 0,
        d = isBE ? -1 : 1,
        s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
  
    value = Math.abs(value);
  
    if (isNaN(value) || value === Infinity) {
      m = isNaN(value) ? 1 : 0;
      e = eMax;
    } else {
      e = Math.floor(Math.log(value) / Math.LN2);
      if (value * (c = Math.pow(2, -e)) < 1) {
        e--;
        c *= 2;
      }
      if (e + eBias >= 1) {
        value += rt / c;
      } else {
        value += rt * Math.pow(2, 1 - eBias);
      }
      if (value * c >= 2) {
        e++;
        c /= 2;
      }
  
      if (e + eBias >= eMax) {
        m = 0;
        e = eMax;
      } else if (e + eBias >= 1) {
        m = (value * c - 1) * Math.pow(2, mLen);
        e = e + eBias;
      } else {
        m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
        e = 0;
      }
    }
  
    for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8);
  
    e = (e << mLen) | m;
    eLen += mLen;
    for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8);
  
    buffer[offset + i - d] |= s * 128;
  };
  
  },{}],20:[function(require,module,exports){'use strict';
  
  
  var NIL  = require('../common').NIL;
  var Type = require('../type');
  
  
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
  var _toString       = Object.prototype.toString;
  
  
  function resolveYamlOmap(object /*, explicit*/) {
    var objectKeys = [], index, length, pair, pairKey, pairHasKey;
  
    for (index = 0, length = object.length; index < length; index += 1) {
      pair = object[index];
      pairHasKey = false;
  
      if ('[object Object]' !== _toString.call(pair)) {
        return NIL;
      }
  
      for (pairKey in pair) {
        if (_hasOwnProperty.call(pair, pairKey)) {
          if (!pairHasKey) {
            pairHasKey = true;
          } else {
            return NIL;
          }
        }
      }
  
      if (!pairHasKey) {
        return NIL;
      }
  
      if (-1 === objectKeys.indexOf(pairKey)) {
        objectKeys.push(pairKey);
      } else {
        return NIL;
      }
    }
  
    return object;
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:omap', {
    loader: {
      kind: 'array',
      resolver: resolveYamlOmap
    }
  });
  
  },{"../common":11,"../type":4}],21:[function(require,module,exports){'use strict';
  
  
  var NIL  = require('../common').NIL;
  var Type = require('../type');
  
  
  var _toString = Object.prototype.toString;
  
  
  function resolveYamlPairs(object /*, explicit*/) {
    var index, length, pair, keys, result;
  
    result = new Array(object.length);
  
    for (index = 0, length = object.length; index < length; index += 1) {
      pair = object[index];
  
      if ('[object Object]' !== _toString.call(pair)) {
        return NIL;
      }
  
      keys = Object.keys(pair);
  
      if (1 !== keys.length) {
        return NIL;
      }
  
      result[index] = [ keys[0], pair[keys[0]] ];
    }
  
    return result;
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:pairs', {
    loader: {
      kind: 'array',
      resolver: resolveYamlPairs
    }
  });
  
  },{"../common":11,"../type":4}],22:[function(require,module,exports){'use strict';
  
  
  var NIL  = require('../common').NIL;
  var Type = require('../type');
  
  
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
  
  
  function resolveYamlSet(object /*, explicit*/) {
    var key;
  
    for (key in object) {
      if (_hasOwnProperty.call(object, key)) {
        if (null !== object[key]) {
          return NIL;
        }
      }
    }
  
    return object;
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:set', {
    loader: {
      kind: 'object',
      resolver: resolveYamlSet
    }
  });
  
  },{"../common":11,"../type":4}],8:[function(require,module,exports){'use strict';
  
  
  var Schema = require('../schema');
  
  
  module.exports = Schema.DEFAULT = new Schema({
    include: [
      require('./safe')
    ],
    explicit: [
      require('../type/js/undefined'),
      require('../type/js/regexp'),
      require('../type/js/function')
    ]
  });
  
  },{"../schema":5,"./safe":7,"../type/js/undefined":33,"../type/js/regexp":34,"../type/js/function":35}],33:[function(require,module,exports){'use strict';
  
  
  var Type = require('../../type');
  
  
  function resolveJavascriptUndefined(/*object, explicit*/) {
    var undef;
  
    return undef;
  }
  
  
  function representJavascriptUndefined(/*object, explicit*/) {
    return '';
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:js/undefined', {
    loader: {
      kind: 'string',
      resolver: resolveJavascriptUndefined
    },
    dumper: {
      kind: 'undefined',
      representer: representJavascriptUndefined
    }
  });
  
  },{"../../type":4}],34:[function(require,module,exports){(function(){'use strict';
  
  
  var NIL  = require('../../common').NIL;
  var Type = require('../../type');
  
  
  function resolveJavascriptRegExp(object /*, explicit*/) {
    var regexp = object,
        tail   = /\/([gim]*)$/.exec(object),
        modifiers;
  
    // `/foo/gim` - tail can be maximum 4 chars
    if ('/' === regexp[0] && tail && 4 >= tail[0].length) {
      regexp = regexp.slice(1, regexp.length - tail[0].length);
      modifiers = tail[1];
    }
  
    try {
      return new RegExp(regexp, modifiers);
    } catch (error) {
      return NIL;
    }
  }
  
  
  function representJavascriptRegExp(object /*, style*/) {
    var result = '/' + object.source + '/';
  
    if (object.global) {
      result += 'g';
    }
  
    if (object.multiline) {
      result += 'm';
    }
  
    if (object.ignoreCase) {
      result += 'i';
    }
  
    return result;
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:js/regexp', {
    loader: {
      kind: 'string',
      resolver: resolveJavascriptRegExp
    },
    dumper: {
      kind: 'object',
      instanceOf: RegExp,
      representer: representJavascriptRegExp
    }
  });
  
  })()
  },{"../../common":11,"../../type":4}],35:[function(require,module,exports){'use strict';
  
  
  var NIL  = require('../../common').NIL;
  var Type = require('../../type');
  
  
  function resolveJavascriptFunction(object /*, explicit*/) {
    /*jslint evil:true*/
    var func;
  
    try {
      func = new Function('return ' + object);
      return func();
    } catch (error) {
      return NIL;
    }
  }
  
  
  function representJavascriptFunction(object /*, style*/) {
    return object.toString();
  }
  
  
  module.exports = new Type('tag:yaml.org,2002:js/function', {
    loader: {
      kind: 'string',
      resolver: resolveJavascriptFunction
    },
    dumper: {
      kind: 'function',
      representer: representJavascriptFunction,
    }
  });
  
  },{"../../common":11,"../../type":4}],3:[function(require,module,exports){'use strict';
  
  
  var common         = require('./common');
  var NIL            = common.NIL;
  var YAMLException  = require('./exception');
  var DEFAULT_SCHEMA = require('./schema/default');
  var SAFE_SCHEMA    = require('./schema/safe');
  
  
  var _hasOwnProperty = Object.prototype.hasOwnProperty;
  
  
  var CHAR_TAB                  = 0x09; /* Tab */
  var CHAR_LINE_FEED            = 0x0A; /* LF */
  var CHAR_CARRIAGE_RETURN      = 0x0D; /* CR */
  var CHAR_SPACE                = 0x20; /* Space */
  var CHAR_EXCLAMATION          = 0x21; /* ! */
  var CHAR_DOUBLE_QUOTE         = 0x22; /* " */
  var CHAR_SHARP                = 0x23; /* # */
  var CHAR_PERCENT              = 0x25; /* % */
  var CHAR_AMPERSAND            = 0x26; /* & */
  var CHAR_SINGLE_QUOTE         = 0x27; /* ' */
  var CHAR_ASTERISK             = 0x2A; /* * */
  var CHAR_COMMA                = 0x2C; /* , */
  var CHAR_MINUS                = 0x2D; /* - */
  var CHAR_COLON                = 0x3A; /* : */
  var CHAR_GREATER_THAN         = 0x3E; /* > */
  var CHAR_QUESTION             = 0x3F; /* ? */
  var CHAR_COMMERCIAL_AT        = 0x40; /* @ */
  var CHAR_LEFT_SQUARE_BRACKET  = 0x5B; /* [ */
  var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */
  var CHAR_GRAVE_ACCENT         = 0x60; /* ` */
  var CHAR_LEFT_CURLY_BRACKET   = 0x7B; /* { */
  var CHAR_VERTICAL_LINE        = 0x7C; /* | */
  var CHAR_RIGHT_CURLY_BRACKET  = 0x7D; /* } */
  
  
  var ESCAPE_SEQUENCES = {};
  
  ESCAPE_SEQUENCES[0x00]   = '\\0';
  ESCAPE_SEQUENCES[0x07]   = '\\a';
  ESCAPE_SEQUENCES[0x08]   = '\\b';
  ESCAPE_SEQUENCES[0x09]   = '\\t';
  ESCAPE_SEQUENCES[0x0A]   = '\\n';
  ESCAPE_SEQUENCES[0x0B]   = '\\v';
  ESCAPE_SEQUENCES[0x0C]   = '\\f';
  ESCAPE_SEQUENCES[0x0D]   = '\\r';
  ESCAPE_SEQUENCES[0x1B]   = '\\e';
  ESCAPE_SEQUENCES[0x22]   = '\\"';
  ESCAPE_SEQUENCES[0x5C]   = '\\\\';
  ESCAPE_SEQUENCES[0x85]   = '\\N';
  ESCAPE_SEQUENCES[0xA0]   = '\\_';
  ESCAPE_SEQUENCES[0x2028] = '\\L';
  ESCAPE_SEQUENCES[0x2029] = '\\P';
  
  
  function kindOf(object) {
    var kind = typeof object;
  
    if (null === object) {
      return 'null';
    } else if ('number' === kind) {
      return 0 === object % 1 ? 'integer' : 'float';
    } else if ('object' === kind && Array.isArray(object)) {
      return 'array';
    } else {
      return kind;
    }
  }
  
  
  function compileStyleMap(schema, map) {
    var result, keys, index, length, tag, style, type;
  
    if (null === map) {
      return {};
    }
  
    result = {};
    keys = Object.keys(map);
  
    for (index = 0, length = keys.length; index < length; index += 1) {
      tag = keys[index];
      style = String(map[tag]);
  
      if ('!!' === tag.slice(0, 2)) {
        tag = 'tag:yaml.org,2002:' + tag.slice(2);
      }
  
      type = schema.compiledTypeMap[tag];
  
      if (type && type.dumper) {
        if (_hasOwnProperty.call(type.dumper.styleAliases, style)) {
          style = type.dumper.styleAliases[style];
        }
      }
  
      result[tag] = style;
    }
  
    return result;
  }
  
  
  function encodeHex(character) {
    var string, handle, length;
  
    string = character.toString(16).toUpperCase();
  
    if (character <= 0xFF) {
      handle = 'x';
      length = 2;
    } else if (character <= 0xFFFF) {
      handle = 'u';
      length = 4;
    } else if (character <= 0xFFFFFFFF) {
      handle = 'U';
      length = 8;
    } else {
      throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');
    }
  
    return '\\' + handle + common.repeat('0', length - string.length) + string;
  }
  
  
  function dump(input, options) {
    options = options || {};
  
    var schema    = options['schema'] || DEFAULT_SCHEMA,
        indent    = Math.max(1, (options['indent'] || 2)),
        flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']),
        styleMap  = compileStyleMap(schema, options['styles'] || null),
  
        implicitTypes = schema.compiledImplicit,
        explicitTypes = schema.compiledExplicit,
  
        kind,
        tag,
        result;
  
    function generateNextLine(level) {
      return '\n' + common.repeat(' ', indent * level);
    }
  
    function testImplicitResolving(object) {
      var index, length, type;
  
      for (index = 0, length = implicitTypes.length; index < length; index += 1) {
        type = implicitTypes[index];
  
        if (null !== type.loader &&
            NIL !== type.loader.resolver(object, false)) {
          return true;
        }
      }
  
      return false;
    }
  
    function writeScalar(object) {
      var isQuoted, checkpoint, position, length, character;
  
      result = '';
      isQuoted = false;
      checkpoint = 0;
  
      if (0          === object.length ||
          CHAR_SPACE === object.charCodeAt(0) ||
          CHAR_SPACE === object.charCodeAt(object.length - 1)) {
        isQuoted = true;
      }
  
      for (position = 0, length = object.length; position < length; position += 1) {
        character = object.charCodeAt(position);
  
        if (!isQuoted) {
          if (CHAR_TAB                  === character ||
              CHAR_LINE_FEED            === character ||
              CHAR_CARRIAGE_RETURN      === character ||
              CHAR_COMMA                === character ||
              CHAR_LEFT_SQUARE_BRACKET  === character ||
              CHAR_RIGHT_SQUARE_BRACKET === character ||
              CHAR_LEFT_CURLY_BRACKET   === character ||
              CHAR_RIGHT_CURLY_BRACKET  === character ||
              CHAR_SHARP                === character ||
              CHAR_AMPERSAND            === character ||
              CHAR_ASTERISK             === character ||
              CHAR_EXCLAMATION          === character ||
              CHAR_VERTICAL_LINE        === character ||
              CHAR_GREATER_THAN         === character ||
              CHAR_SINGLE_QUOTE         === character ||
              CHAR_DOUBLE_QUOTE         === character ||
              CHAR_PERCENT              === character ||
              CHAR_COMMERCIAL_AT        === character ||
              CHAR_GRAVE_ACCENT         === character ||
              CHAR_QUESTION             === character ||
              CHAR_COLON                === character ||
              CHAR_MINUS                === character) {
            isQuoted = true;
          }
        }
  
        if (ESCAPE_SEQUENCES[character] ||
            !((0x00020 <= character && character <= 0x00007E) ||
              (0x00085 === character)                         ||
              (0x000A0 <= character && character <= 0x00D7FF) ||
              (0x0E000 <= character && character <= 0x00FFFD) ||
              (0x10000 <= character && character <= 0x10FFFF))) {
          result += object.slice(checkpoint, position);
          result += ESCAPE_SEQUENCES[character] || encodeHex(character);
          checkpoint = position + 1;
          isQuoted = true;
        }
      }
  
      if (checkpoint < position) {
        result += object.slice(checkpoint, position);
      }
  
      if (!isQuoted && testImplicitResolving(result)) {
        isQuoted = true;
      }
  
      if (isQuoted) {
        result = '"' + result + '"';
      }
    }
  
    function writeFlowSequence(level, object) {
      var _result = '',
          _tag    = tag,
          index,
          length;
  
      for (index = 0, length = object.length; index < length; index += 1) {
        if (0 !== index) {
          _result += ', ';
        }
  
        writeNode(level, object[index], false, false);
        _result += result;
      }
  
      tag = _tag;
      result = '[' + _result + ']';
    }
  
    function writeBlockSequence(level, object, compact) {
      var _result = '',
          _tag    = tag,
          index,
          length;
  
      for (index = 0, length = object.length; index < length; index += 1) {
        if (!compact || 0 !== index) {
          _result += generateNextLine(level);
        }
  
        writeNode(level + 1, object[index], true, true);
        _result += '- ' + result;
      }
  
      tag = _tag;
      result = _result;
    }
  
    function writeFlowMapping(level, object) {
      var _result       = '',
          _tag          = tag,
          objectKeyList = Object.keys(object),
          index,
          length,
          objectKey,
          objectValue;
  
      for (index = 0, length = objectKeyList.length; index < length; index += 1) {
        if (0 !== index) {
          _result += ', ';
        }
  
        objectKey = objectKeyList[index];
        objectValue = object[objectKey];
  
        writeNode(level, objectKey, false, false);
  
        if (result.length > 1024) {
          _result += '? ';
        }
  
        _result += result + ': ';
        writeNode(level, objectValue, false, false);
        _result += result;
      }
  
      tag = _tag;
      result = '{' + _result + '}';
    }
  
    function writeBlockMapping(level, object, compact) {
      var _result       = '',
          _tag          = tag,
          objectKeyList = Object.keys(object),
          index,
          length,
          objectKey,
          objectValue,
          explicitPair;
  
      for (index = 0, length = objectKeyList.length; index < length; index += 1) {
        if (!compact || 0 !== index) {
          _result += generateNextLine(level);
        }
  
        objectKey = objectKeyList[index];
        objectValue = object[objectKey];
  
        writeNode(level + 1, objectKey, true, true);
        explicitPair = (null !== tag && '?' !== tag && result.length <= 1024);
  
        if (explicitPair) {
          _result += '? ';
        }
  
        _result += result;
  
        if (explicitPair) {
          _result += generateNextLine(level);
        }
  
        writeNode(level + 1, objectValue, true, explicitPair);
        _result += ': ' + result;
      }
  
      tag = _tag;
      result = _result;
    }
  
    function detectType(object, explicit) {
      var _result, typeList, index, length, type, style;
  
      typeList = explicit ? explicitTypes : implicitTypes;
      kind = kindOf(object);
  
      for (index = 0, length = typeList.length; index < length; index += 1) {
        type = typeList[index];
  
        if ((null !== type.dumper) &&
            (null === type.dumper.kind       || kind === type.dumper.kind) &&
            (null === type.dumper.instanceOf || object instanceof type.dumper.instanceOf) &&
            (null === type.dumper.predicate  || type.dumper.predicate(object))) {
          tag = explicit ? type.tag : '?';
  
          if (null !== type.dumper.representer) {
            style = styleMap[type.tag] || type.dumper.defaultStyle;
  
            if ('function' === typeof type.dumper.representer) {
              _result = type.dumper.representer(object, style);
            } else if (_hasOwnProperty.call(type.dumper.representer, style)) {
              _result = type.dumper.representer[style](object, style);
            } else {
              throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');
            }
  
            if (NIL !== _result) {
              kind = kindOf(_result);
              result = _result;
            } else {
              if (explicit) {
                throw new YAMLException('cannot represent an object of !<' + type.tag + '> type');
              } else {
                continue;
              }
            }
          }
  
          return true;
        }
      }
  
      return false;
    }
  
    function writeNode(level, object, block, compact) {
      tag = null;
      result = object;
  
      if (!detectType(object, false)) {
        detectType(object, true);
      }
  
      if (block) {
        block = (0 > flowLevel || flowLevel > level);
      }
  
      if ((null !== tag && '?' !== tag) || (2 !== indent && level > 0)) {
        compact = false;
      }
  
      if ('object' === kind) {
        if (block && (0 !== Object.keys(result).length)) {
          writeBlockMapping(level, result, compact);
        } else {
          writeFlowMapping(level, result);
        }
      } else if ('array' === kind) {
        if (block && (0 !== result.length)) {
          writeBlockSequence(level, result, compact);
        } else {
          writeFlowSequence(level, result);
        }
      } else if ('string' === kind) {
        if ('?' !== tag) {
          writeScalar(result);
        }
      } else {
        throw new YAMLException('unacceptabe kind of an object to dump (' + kind + ')');
      }
  
      if (null !== tag && '?' !== tag) {
        result = '!<' + tag + '> ' + result;
      }
    }
  
    writeNode(0, input, true, true);
    return result + '\n';
  }
  
  
  function safeDump(input, options) {
    return dump(input, common.extend({ schema: SAFE_SCHEMA }, options));
  }
  
  
  module.exports.dump     = dump;
  module.exports.safeDump = safeDump;
  
  },{"./common":11,"./exception":9,"./schema/default":8,"./schema/safe":7}],10:[function(require,module,exports){'use strict';
  
  
  var fs     = require('fs');
  var loader = require('./loader');
  
  
  function yamlRequireHandler(module, filename) {
    var content = fs.readFileSync(filename, 'utf8');
  
    // fill in documents
    module.exports = loader.load(content, { filename: filename });
  }
  
  // register require extensions only if we're on node.js
  // hack for browserify
  if (undefined !== require.extensions) {
    require.extensions['.yml']  = yamlRequireHandler;
    require.extensions['.yaml'] = yamlRequireHandler;
  }
  
  
  module.exports = require;
  
  },{"fs":36,"./loader":2}],36:[function(require,module,exports){// nothing to see here... no file methods for the browser
  
  },{}]},{},[]);return require('./index'); }());
  