Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yamljs

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yamljs - npm Package Compare versions

Comparing version 0.2.8 to 0.2.9

lib/Exception/ParseMore.js

2

bower.json
{
"name": "yaml.js",
"main": "dist/yaml.js",
"version": "0.2.3",
"version": "0.2.9",
"homepage": "https://github.com/jeremyfa/yaml.js",

@@ -6,0 +6,0 @@ "authors": [

@@ -56,3 +56,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

},{"./Inline":5,"./Utils":9}],2:[function(require,module,exports){
},{"./Inline":6,"./Utils":10}],2:[function(require,module,exports){
var Escaper, Pattern;

@@ -115,3 +115,3 @@

},{"./Pattern":7}],3:[function(require,module,exports){
},{"./Pattern":8}],3:[function(require,module,exports){
var DumpException,

@@ -175,3 +175,32 @@ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },

},{}],5:[function(require,module,exports){
var DumpException, Escaper, Inline, ParseException, Pattern, Unescaper, Utils,
var ParseMore,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
ParseMore = (function(superClass) {
extend(ParseMore, superClass);
function ParseMore(message, parsedLine, snippet) {
this.message = message;
this.parsedLine = parsedLine;
this.snippet = snippet;
}
ParseMore.prototype.toString = function() {
if ((this.parsedLine != null) && (this.snippet != null)) {
return '<ParseMore> ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')';
} else {
return '<ParseMore> ' + this.message;
}
};
return ParseMore;
})(Error);
module.exports = ParseMore;
},{}],6:[function(require,module,exports){
var DumpException, Escaper, Inline, ParseException, ParseMore, Pattern, Unescaper, Utils,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

@@ -189,2 +218,4 @@

ParseMore = require('./Exception/ParseMore');
DumpException = require('./Exception/DumpException');

@@ -398,3 +429,3 @@

if (!(match = this.PATTERN_QUOTED_SCALAR.exec(scalar.slice(i)))) {
throw new ParseException('Malformed inline YAML string (' + scalar.slice(i) + ').');
throw new ParseMore('Malformed inline YAML string (' + scalar.slice(i) + ').');
}

@@ -451,3 +482,3 @@ output = match[0].substr(1, match[0].length - 2);

}
throw new ParseException('Malformed inline YAML string ' + sequence);
throw new ParseMore('Malformed inline YAML string ' + sequence);
};

@@ -520,3 +551,3 @@

}
throw new ParseException('Malformed inline YAML string ' + mapping);
throw new ParseMore('Malformed inline YAML string ' + mapping);
};

@@ -664,4 +695,4 @@

},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Pattern":7,"./Unescaper":8,"./Utils":9}],6:[function(require,module,exports){
var Inline, ParseException, Parser, Pattern, Utils;
},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Pattern":8,"./Unescaper":9,"./Utils":10}],7:[function(require,module,exports){
var Inline, ParseException, ParseMore, Parser, Pattern, Utils;

@@ -676,2 +707,4 @@ Inline = require('./Inline');

ParseMore = require('./Exception/ParseMore');
Parser = (function() {

@@ -696,9 +729,9 @@ Parser.prototype.PATTERN_FOLDED_SCALAR_ALL = new Pattern('^(?:(?<type>![^\\|>]*)\\s+)?(?<separator>\\||>)(?<modifiers>\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?<comments> +#.*)?$');

Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n');
Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n', 'm');
Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+');
Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+', 'm');
Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n');
Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n', 'm');
Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$');
Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$', 'm');

@@ -992,5 +1025,4 @@ Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION = {};

}
if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) {
this.moveToPreviousLine();
break;
if (removeComments && this.isCurrentLineComment()) {
continue;
}

@@ -1001,6 +1033,5 @@ if (this.isCurrentLineBlank()) {

}
if (removeComments && this.isCurrentLineComment()) {
if (indent === newIndent) {
continue;
}
if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) {
this.moveToPreviousLine();
break;
}

@@ -1034,3 +1065,3 @@ if (indent >= newIndent) {

Parser.prototype.parseValue = function(value, exceptionOnInvalidType, objectDecoder) {
var e, error, error1, foldedIndent, matches, modifiers, pos, ref, ref1, val;
var e, error, foldedIndent, matches, modifiers, pos, ref, ref1, val;
if (0 === value.indexOf('*')) {

@@ -1062,21 +1093,22 @@ pos = value.indexOf('#');

}
try {
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
} catch (error) {
e = error;
if (((ref1 = value.charAt(0)) === '[' || ref1 === '{') && e instanceof ParseException && this.isNextLineIndented()) {
value += "\n" + this.getNextEmbedBlock();
if ((ref1 = value.charAt(0)) === '[' || ref1 === '{' || ref1 === '"' || ref1 === "'") {
while (true) {
try {
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
} catch (error1) {
e = error1;
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
} catch (error) {
e = error;
if (e instanceof ParseMore && this.moveToNextLine()) {
value += "\n" + Utils.trim(this.currentLine, ' ');
} else {
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
}
}
} else {
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
}
} else {
if (this.isNextLineIndented()) {
value += "\n" + this.getNextEmbedBlock();
}
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
}

@@ -1275,3 +1307,3 @@ };

},{"./Exception/ParseException":4,"./Inline":5,"./Pattern":7,"./Utils":9}],7:[function(require,module,exports){
},{"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Inline":6,"./Pattern":8,"./Utils":10}],8:[function(require,module,exports){
var Pattern;

@@ -1384,3 +1416,3 @@

this.regex.lastIndex = 0;
str = str.replace(this.regex, '');
str = str.replace(this.regex, replacement);
count++;

@@ -1398,3 +1430,3 @@ }

},{}],8:[function(require,module,exports){
},{}],9:[function(require,module,exports){
var Pattern, Unescaper, Utils;

@@ -1484,4 +1516,5 @@

},{"./Pattern":7,"./Utils":9}],9:[function(require,module,exports){
var Pattern, Utils;
},{"./Pattern":8,"./Utils":10}],10:[function(require,module,exports){
var Pattern, Utils,
hasProp = {}.hasOwnProperty;

@@ -1555,5 +1588,18 @@ Pattern = require('./Pattern');

Utils.isEmpty = function(value) {
return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0);
return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0) || this.isEmptyObject(value);
};
Utils.isEmptyObject = function(value) {
var k;
return value instanceof Object && ((function() {
var results;
results = [];
for (k in value) {
if (!hasProp.call(value, k)) continue;
results.push(k);
}
return results;
})()).length === 0;
};
Utils.subStrCount = function(string, subString, start, length) {

@@ -1688,3 +1734,3 @@ var c, i, j, len, ref, sublen;

if (tz_offset) {
date.setTime(date.getTime() + tz_offset);
date.setTime(date.getTime() - tz_offset);
}

@@ -1773,3 +1819,3 @@ return date;

},{"./Pattern":7}],10:[function(require,module,exports){
},{"./Pattern":8}],11:[function(require,module,exports){
var Dumper, Parser, Utils, Yaml;

@@ -1880,2 +1926,2 @@

},{"./Dumper":1,"./Parser":6,"./Utils":9}]},{},[10]);
},{"./Dumper":1,"./Parser":7,"./Utils":10}]},{},[11]);

@@ -1,1 +0,1 @@

(function e(e,t,n){function i(r,o){if(!t[r]){if(!e[r]){var u=typeof require=="function"&&require;if(!o&&u)return u(r,!0);if(s)return s(r,!0);var a=new Error("Cannot find module '"+r+"'");throw a.code="MODULE_NOT_FOUND",a}var l=t[r]={exports:{}};e[r][0].call(l.exports,function(t){var n=e[r][1][t];return i(n?n:t)},l,l.exports,e,e,t,n)}return t[r].exports}var s=typeof require=="function"&&require;for(var r=0;r<n.length;r++)i(n[r]);return i})({1:[function(n,r,s){var i,t,e;e=n("./Utils");t=n("./Inline");i=function(){function n(){}n.indentation=4;n.prototype.dump=function(n,s,a,l,u){var f,h,p,o,c,r,i;if(s==null){s=0}if(a==null){a=0}if(l==null){l=false}if(u==null){u=null}o="";c=a?e.strRepeat(" ",a):"";if(s<=0||typeof n!=="object"||n instanceof Date||e.isEmpty(n)){o+=c+t.dump(n,l,u)}else{if(n instanceof Array){for(f=0,p=n.length;f<p;f++){r=n[f];i=s-1<=0||typeof r!=="object"||e.isEmpty(r);o+=c+"-"+(i?" ":"\n")+this.dump(r,s-1,i?0:a+this.indentation,l,u)+(i?"\n":"")}}else{for(h in n){r=n[h];i=s-1<=0||typeof r!=="object"||e.isEmpty(r);o+=c+t.dump(h,l,u)+":"+(i?" ":"\n")+this.dump(r,s-1,i?0:a+this.indentation,l,u)+(i?"\n":"")}}}return o};return n}();r.exports=i},{"./Inline":5,"./Utils":9}],2:[function(n,i,r){var t,e;e=n("./Pattern");t=function(){var n;function t(){}t.LIST_ESCAPEES=["\\","\\\\",'\\"','"',"\x00","","","","","","","","\b"," ","\n","\x0B","\f","\r","","","","","","","","","","","","","","","","","","",(n=String.fromCharCode)(133),n(160),n(8232),n(8233)];t.LIST_ESCAPED=["\\\\",'\\"','\\"','\\"',"\\0","\\x01","\\x02","\\x03","\\x04","\\x05","\\x06","\\a","\\b","\\t","\\n","\\v","\\f","\\r","\\x0e","\\x0f","\\x10","\\x11","\\x12","\\x13","\\x14","\\x15","\\x16","\\x17","\\x18","\\x19","\\x1a","\\e","\\x1c","\\x1d","\\x1e","\\x1f","\\N","\\_","\\L","\\P"];t.MAPPING_ESCAPEES_TO_ESCAPED=function(){var i,e,r,n;r={};for(i=e=0,n=t.LIST_ESCAPEES.length;0<=n?e<n:e>n;i=0<=n?++e:--e){r[t.LIST_ESCAPEES[i]]=t.LIST_ESCAPED[i]}return r}();t.PATTERN_CHARACTERS_TO_ESCAPE=new e("[\\x00-\\x1f]|…| |
|
");t.PATTERN_MAPPING_ESCAPEES=new e(t.LIST_ESCAPEES.join("|").split("\\").join("\\\\"));t.PATTERN_SINGLE_QUOTING=new e("[\\s'\":{}[\\],&*#?]|^[-?|<>=!%@`]");t.requiresDoubleQuoting=function(e){return this.PATTERN_CHARACTERS_TO_ESCAPE.test(e)};t.escapeWithDoubleQuotes=function(t){var e;e=this.PATTERN_MAPPING_ESCAPEES.replace(t,function(e){return function(t){return e.MAPPING_ESCAPEES_TO_ESCAPED[t]}}(this));return'"'+e+'"'};t.requiresSingleQuoting=function(e){return this.PATTERN_SINGLE_QUOTING.test(e)};t.escapeWithSingleQuotes=function(e){return"'"+e.replace(/'/g,"''")+"'"};return t}();i.exports=t},{"./Pattern":7}],3:[function(r,t,s){var e,n=function(e,t){for(var n in t){if(i.call(t,n))e[n]=t[n]}function r(){this.constructor=e}r.prototype=t.prototype;e.prototype=new r;e.__super__=t.prototype;return e},i={}.hasOwnProperty;e=function(t){n(e,t);function e(e,t,n){this.message=e;this.parsedLine=t;this.snippet=n}e.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return"<DumpException> "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return"<DumpException> "+this.message}};return e}(Error);t.exports=e},{}],4:[function(r,t,s){var e,n=function(e,t){for(var n in t){if(i.call(t,n))e[n]=t[n]}function r(){this.constructor=e}r.prototype=t.prototype;e.prototype=new r;e.__super__=t.prototype;return e},i={}.hasOwnProperty;e=function(t){n(e,t);function e(e,t,n){this.message=e;this.parsedLine=t;this.snippet=n}e.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return"<ParseException> "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return"<ParseException> "+this.message}};return e}(Error);t.exports=e},{}],5:[function(n,a,f){var o,i,u,t,r,s,e,l=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++){if(e in this&&this[e]===t)return e}return-1};r=n("./Pattern");s=n("./Unescaper");i=n("./Escaper");e=n("./Utils");t=n("./Exception/ParseException");o=n("./Exception/DumpException");u=function(){function n(){}n.REGEX_QUOTED_STRING="(?:\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|'(?:[^']*(?:''[^']*)*)')";n.PATTERN_TRAILING_COMMENTS=new r("^\\s*#.*$");n.PATTERN_QUOTED_SCALAR=new r("^"+n.REGEX_QUOTED_STRING);n.PATTERN_THOUSAND_NUMERIC_SCALAR=new r("^(-|\\+)?[0-9,]+(\\.[0-9]+)?$");n.PATTERN_SCALAR_BY_DELIMITERS={};n.settings={};n.configure=function(e,t){if(e==null){e=null}if(t==null){t=null}this.settings.exceptionOnInvalidType=e;this.settings.objectDecoder=t};n.parse=function(n,r,s){var i,l;if(r==null){r=false}if(s==null){s=null}this.settings.exceptionOnInvalidType=r;this.settings.objectDecoder=s;if(n==null){return""}n=e.trim(n);if(0===n.length){return""}i={exceptionOnInvalidType:r,objectDecoder:s,i:0};switch(n.charAt(0)){case"[":l=this.parseSequence(n,i);++i.i;break;case"{":l=this.parseMapping(n,i);++i.i;break;default:l=this.parseScalar(n,null,['"',"'"],i)}if(this.PATTERN_TRAILING_COMMENTS.replace(n.slice(i.i),"")!==""){throw new t('Unexpected characters near "'+n.slice(i.i)+'".')}return l};n.dump=function(t,u,r){var s,l,n;if(u==null){u=false}if(r==null){r=null}if(t==null){return"null"}n=typeof t;if(n==="object"){if(t instanceof Date){return t.toISOString()}else if(r!=null){l=r(t);if(typeof l==="string"||l!=null){return l}}return this.dumpObject(t)}if(n==="boolean"){return t?"true":"false"}if(e.isDigits(t)){return n==="string"?"'"+t+"'":String(parseInt(t))}if(e.isNumeric(t)){return n==="string"?"'"+t+"'":String(parseFloat(t))}if(n==="number"){return t===Infinity?".Inf":t===-Infinity?"-.Inf":isNaN(t)?".NaN":t}if(i.requiresDoubleQuoting(t)){return i.escapeWithDoubleQuotes(t)}if(i.requiresSingleQuoting(t)){return i.escapeWithSingleQuotes(t)}if(""===t){return'""'}if(e.PATTERN_DATE.test(t)){return"'"+t+"'"}if((s=t.toLowerCase())==="null"||s==="~"||s==="true"||s==="false"){return"'"+t+"'"}return t};n.dumpObject=function(t,u,s){var n,r,l,e,i;if(s==null){s=null}if(t instanceof Array){e=[];for(n=0,l=t.length;n<l;n++){i=t[n];e.push(this.dump(i))}return"["+e.join(", ")+"]"}else{e=[];for(r in t){i=t[r];e.push(this.dump(r)+": "+this.dump(i))}return"{"+e.join(", ")+"}"}};n.parseScalar=function(u,a,c,s,h){var i,f,_,n,o,E,T,p,A;if(a==null){a=null}if(c==null){c=['"',"'"]}if(s==null){s=null}if(h==null){h=true}if(s==null){s={exceptionOnInvalidType:this.settings.exceptionOnInvalidType,objectDecoder:this.settings.objectDecoder,i:0}}i=s.i;if(E=u.charAt(i),l.call(c,E)>=0){n=this.parseQuotedScalar(u,s);i=s.i;if(a!=null){A=e.ltrim(u.slice(i)," ");if(!(T=A.charAt(0),l.call(a,T)>=0)){throw new t("Unexpected characters ("+u.slice(i)+").")}}}else{if(!a){n=u.slice(i);i+=n.length;p=n.indexOf(" #");if(p!==-1){n=e.rtrim(n.slice(0,p))}}else{f=a.join("|");o=this.PATTERN_SCALAR_BY_DELIMITERS[f];if(o==null){o=new r("^(.+?)("+f+")");this.PATTERN_SCALAR_BY_DELIMITERS[f]=o}if(_=o.exec(u.slice(i))){n=_[1];i+=n.length}else{throw new t("Malformed inline YAML string ("+u+").")}}if(h){n=this.evaluateScalar(n,s)}}s.i=i;return n};n.parseQuotedScalar=function(r,l){var e,i,n;e=l.i;if(!(i=this.PATTERN_QUOTED_SCALAR.exec(r.slice(e)))){throw new t("Malformed inline YAML string ("+r.slice(e)+").")}n=i[0].substr(1,i[0].length-2);if('"'===r.charAt(e)){n=s.unescapeDoubleQuotedString(n)}else{n=s.unescapeSingleQuotedString(n)}e+=i[0].length;l.i=e;return n};n.parseSequence=function(i,n){var o,f,e,l,u,s,a,r;s=[];u=i.length;e=n.i;e+=1;while(e<u){n.i=e;switch(i.charAt(e)){case"[":s.push(this.parseSequence(i,n));e=n.i;break;case"{":s.push(this.parseMapping(i,n));e=n.i;break;case"]":return s;case",":case" ":case"\n":break;default:l=(a=i.charAt(e))==='"'||a==="'";r=this.parseScalar(i,[",","]"],['"',"'"],n);e=n.i;if(!l&&typeof r==="string"&&(r.indexOf(": ")!==-1||r.indexOf(":\n")!==-1)){try{r=this.parseMapping("{"+r+"}")}catch(f){o=f}}s.push(r);--e}++e}throw new t("Malformed inline YAML string "+i)};n.parseMapping=function(i,n){var u,e,s,o,r,a,l;r={};o=i.length;e=n.i;e+=1;a=false;while(e<o){n.i=e;switch(i.charAt(e)){case" ":case",":case"\n":++e;n.i=e;a=true;break;case"}":return r}if(a){a=false;continue}s=this.parseScalar(i,[":"," ","\n"],['"',"'"],n,false);e=n.i;u=false;while(e<o){n.i=e;switch(i.charAt(e)){case"[":l=this.parseSequence(i,n);e=n.i;if(r[s]===void 0){r[s]=l}u=true;break;case"{":l=this.parseMapping(i,n);e=n.i;if(r[s]===void 0){r[s]=l}u=true;break;case":":case" ":case"\n":break;default:l=this.parseScalar(i,[",","}"],['"',"'"],n);e=n.i;if(r[s]===void 0){r[s]=l}u=true;--e}++e;if(u){break}}}throw new t("Malformed inline YAML string "+i)};n.evaluateScalar=function(n,a){var s,h,p,E,i,c,o,r,l,f,u;n=e.trim(n);l=n.toLowerCase();switch(l){case"null":case"":case"~":return null;case"true":return true;case"false":return false;case".inf":return Infinity;case".nan":return NaN;case"-.inf":return Infinity;default:E=l.charAt(0);switch(E){case"!":i=n.indexOf(" ");if(i===-1){c=l}else{c=l.slice(0,i)}switch(c){case"!":if(i!==-1){return parseInt(this.parseScalar(n.slice(2)))}return null;case"!str":return e.ltrim(n.slice(4));case"!!str":return e.ltrim(n.slice(5));case"!!int":return parseInt(this.parseScalar(n.slice(5)));case"!!bool":return e.parseBoolean(this.parseScalar(n.slice(6)),false);case"!!float":return parseFloat(this.parseScalar(n.slice(7)));case"!!timestamp":return e.stringToDate(e.ltrim(n.slice(11)));default:if(a==null){a={exceptionOnInvalidType:this.settings.exceptionOnInvalidType,objectDecoder:this.settings.objectDecoder,i:0}}o=a.objectDecoder,p=a.exceptionOnInvalidType;if(o){u=e.rtrim(n);i=u.indexOf(" ");if(i===-1){return o(u,null)}else{f=e.ltrim(u.slice(i+1));if(!(f.length>0)){f=null}return o(u.slice(0,i),f)}}if(p){throw new t("Custom object support when parsing a YAML file has been disabled.")}return null}break;case"0":if("0x"===n.slice(0,2)){return e.hexDec(n)}else if(e.isDigits(n)){return e.octDec(n)}else if(e.isNumeric(n)){return parseFloat(n)}else{return n}break;case"+":if(e.isDigits(n)){r=n;s=parseInt(r);if(r===String(s)){return s}else{return r}}else if(e.isNumeric(n)){return parseFloat(n)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(n)){return parseFloat(n.replace(",",""))}return n;case"-":if(e.isDigits(n.slice(1))){if("0"===n.charAt(1)){return-e.octDec(n.slice(1))}else{r=n.slice(1);s=parseInt(r);if(r===String(s)){return-s}else{return-r}}}else if(e.isNumeric(n)){return parseFloat(n)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(n)){return parseFloat(n.replace(",",""))}return n;default:if(h=e.stringToDate(n)){return h}else if(e.isNumeric(n)){return parseFloat(n)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(n)){return parseFloat(n.replace(",",""))}return n}}};return n}();a.exports=u},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Pattern":7,"./Unescaper":8,"./Utils":9}],6:[function(r,l,u){var i,n,s,t,e;i=r("./Inline");t=r("./Pattern");e=r("./Utils");n=r("./Exception/ParseException");s=function(){r.prototype.PATTERN_FOLDED_SCALAR_ALL=new t("^(?:(?<type>![^\\|>]*)\\s+)?(?<separator>\\||>)(?<modifiers>\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?<comments> +#.*)?$");r.prototype.PATTERN_FOLDED_SCALAR_END=new t("(?<separator>\\||>)(?<modifiers>\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?<comments> +#.*)?$");r.prototype.PATTERN_SEQUENCE_ITEM=new t("^\\-((?<leadspaces>\\s+)(?<value>.+?))?\\s*$");r.prototype.PATTERN_ANCHOR_VALUE=new t("^&(?<ref>[^ ]+) *(?<value>.*)");r.prototype.PATTERN_COMPACT_NOTATION=new t("^(?<key>"+i.REGEX_QUOTED_STRING+"|[^ '\"\\{\\[].*?) *\\:(\\s+(?<value>.+?))?\\s*$");r.prototype.PATTERN_MAPPING_ITEM=new t("^(?<key>"+i.REGEX_QUOTED_STRING+"|[^ '\"\\[\\{].*?) *\\:(\\s+(?<value>.+?))?\\s*$");r.prototype.PATTERN_DECIMAL=new t("\\d+");r.prototype.PATTERN_INDENT_SPACES=new t("^ +");r.prototype.PATTERN_TRAILING_LINES=new t("(\n*)$");r.prototype.PATTERN_YAML_HEADER=new t("^\\%YAML[: ][\\d\\.]+.*\n");r.prototype.PATTERN_LEADING_COMMENTS=new t("^(\\#.*?\n)+");r.prototype.PATTERN_DOCUMENT_MARKER_START=new t("^\\-\\-\\-.*?\n");r.prototype.PATTERN_DOCUMENT_MARKER_END=new t("^\\.\\.\\.\\s*$");r.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION={};r.prototype.CONTEXT_NONE=0;r.prototype.CONTEXT_SEQUENCE=1;r.prototype.CONTEXT_MAPPING=2;function r(e){this.offset=e!=null?e:0;this.lines=[];this.currentLineNb=-1;this.currentLine="";this.refs={}}r.prototype.parse=function(l,f,c){var U,N,v,p,d,t,o,Q,B,Y,g,E,G,L,S,b,u,R,y,j,X,D,O,P,m,_,w,x,M,A,h,a,F,k,H,I,T,C,s;if(f==null){f=false}if(c==null){c=null}this.currentLineNb=-1;this.currentLine="";this.lines=this.cleanup(l).split("\n");t=null;d=this.CONTEXT_NONE;N=false;while(this.moveToNextLine()){if(this.isCurrentLineEmpty()){continue}if(" "===this.currentLine[0]){throw new n("A YAML file cannot contain tabs as indentation.",this.getRealCurrentLineNb()+1,this.currentLine)}L=w=false;if(s=this.PATTERN_SEQUENCE_ITEM.exec(this.currentLine)){if(this.CONTEXT_MAPPING===d){throw new n("You cannot define a sequence item when in a mapping")}d=this.CONTEXT_SEQUENCE;if(t==null){t=[]}if(s.value!=null&&(_=this.PATTERN_ANCHOR_VALUE.exec(s.value))){L=_.ref;s.value=_.value}if(!(s.value!=null)||""===e.trim(s.value," ")||e.ltrim(s.value," ").indexOf("#")===0){if(this.currentLineNb<this.lines.length-1&&!this.isNextLineUnIndentedCollection()){p=this.getRealCurrentLineNb()+1;a=new r(p);a.refs=this.refs;t.push(a.parse(this.getNextEmbedBlock(null,true),f,c))}else{t.push(null)}}else{if(((F=s.leadspaces)!=null?F.length:void 0)&&(_=this.PATTERN_COMPACT_NOTATION.exec(s.value))){p=this.getRealCurrentLineNb();a=new r(p);a.refs=this.refs;v=s.value;G=this.getCurrentLineIndentation();if(this.isNextLineIndented(false)){v+="\n"+this.getNextEmbedBlock(G+s.leadspaces.length+1,true)}t.push(a.parse(v,f,c))}else{t.push(this.parseValue(s.value,f,c))}}}else if((s=this.PATTERN_MAPPING_ITEM.exec(this.currentLine))&&s.key.indexOf(" #")===-1){if(this.CONTEXT_SEQUENCE===d){throw new n("You cannot define a mapping item when in a sequence")}d=this.CONTEXT_MAPPING;if(t==null){t={}}i.configure(f,c);try{u=i.parseScalar(s.key)}catch(Q){o=Q;o.parsedLine=this.getRealCurrentLineNb()+1;o.snippet=this.currentLine;throw o}if("<<"===u){w=true;N=true;if(((k=s.value)!=null?k.indexOf("*"):void 0)===0){I=s.value.slice(1);if(this.refs[I]==null){throw new n('Reference "'+I+'" does not exist.',this.getRealCurrentLineNb()+1,this.currentLine)}T=this.refs[I];if(typeof T!=="object"){throw new n("YAML merge keys used with a scalar value instead of an object.",this.getRealCurrentLineNb()+1,this.currentLine)}if(T instanceof Array){for(E=S=0,j=T.length;S<j;E=++S){l=T[E];if(t[M=String(E)]==null){t[M]=l}}}else{for(u in T){l=T[u];if(t[u]==null){t[u]=l}}}}else{if(s.value!=null&&s.value!==""){l=s.value}else{l=this.getNextEmbedBlock()}p=this.getRealCurrentLineNb()+1;a=new r(p);a.refs=this.refs;A=a.parse(l,f);if(typeof A!=="object"){throw new n("YAML merge keys used with a scalar value instead of an object.",this.getRealCurrentLineNb()+1,this.currentLine)}if(A instanceof Array){for(R=0,X=A.length;R<X;R++){h=A[R];if(typeof h!=="object"){throw new n("Merge items must be objects.",this.getRealCurrentLineNb()+1,h)}if(h instanceof Array){for(E=m=0,D=h.length;m<D;E=++m){l=h[E];b=String(E);if(!t.hasOwnProperty(b)){t[b]=l}}}else{for(u in h){l=h[u];if(!t.hasOwnProperty(u)){t[u]=l}}}}}else{for(u in A){l=A[u];if(!t.hasOwnProperty(u)){t[u]=l}}}}}else if(s.value!=null&&(_=this.PATTERN_ANCHOR_VALUE.exec(s.value))){L=_.ref;s.value=_.value}if(w){}else if(!(s.value!=null)||""===e.trim(s.value," ")||e.ltrim(s.value," ").indexOf("#")===0){if(!this.isNextLineIndented()&&!this.isNextLineUnIndentedCollection()){if(N||t[u]===void 0){t[u]=null}}else{p=this.getRealCurrentLineNb()+1;a=new r(p);a.refs=this.refs;C=a.parse(this.getNextEmbedBlock(),f,c);if(N||t[u]===void 0){t[u]=C}}}else{C=this.parseValue(s.value,f,c);if(N||t[u]===void 0){t[u]=C}}}else{P=this.lines.length;if(1===P||2===P&&e.isEmpty(this.lines[1])){try{l=i.parse(this.lines[0],f,c)}catch(B){o=B;o.parsedLine=this.getRealCurrentLineNb()+1;o.snippet=this.currentLine;throw o}if(typeof l==="object"){if(l instanceof Array){g=l[0]}else{for(u in l){g=l[u];break}}if(typeof g==="string"&&g.indexOf("*")===0){t=[];for(x=0,O=l.length;x<O;x++){U=l[x];t.push(this.refs[U.slice(1)])}l=t}}return l}else if((H=e.ltrim(l).charAt(0))==="["||H==="{"){try{return i.parse(l,f,c)}catch(Y){o=Y;o.parsedLine=this.getRealCurrentLineNb()+1;o.snippet=this.currentLine;throw o}}throw new n("Unable to parse.",this.getRealCurrentLineNb()+1,this.currentLine)}if(L){if(t instanceof Array){this.refs[L]=t[t.length-1]}else{y=null;for(u in t){y=u}this.refs[L]=t[y]}}}if(e.isEmpty(t)){return null}else{return t}};r.prototype.getRealCurrentLineNb=function(){return this.currentLineNb+this.offset};r.prototype.getCurrentLineIndentation=function(){return this.currentLine.length-e.ltrim(this.currentLine," ").length};r.prototype.getNextEmbedBlock=function(r,l){var s,i,o,t,u,a,f;if(r==null){r=null}if(l==null){l=false}this.moveToNextLine();if(r==null){t=this.getCurrentLineIndentation();f=this.isStringUnIndentedCollectionItem(this.currentLine);if(!this.isCurrentLineEmpty()&&0===t&&!f){throw new n("Indentation problem.",this.getRealCurrentLineNb()+1,this.currentLine)}}else{t=r}s=[this.currentLine.slice(t)];if(!l){o=this.isStringUnIndentedCollectionItem(this.currentLine)}a=this.PATTERN_FOLDED_SCALAR_END;u=!a.test(this.currentLine);while(this.moveToNextLine()){i=this.getCurrentLineIndentation();if(i===t){u=!a.test(this.currentLine)}if(o&&!this.isStringUnIndentedCollectionItem(this.currentLine)&&i===t){this.moveToPreviousLine();break}if(this.isCurrentLineBlank()){s.push(this.currentLine.slice(t));continue}if(u&&this.isCurrentLineComment()){if(i===t){continue}}if(i>=t){s.push(this.currentLine.slice(t))}else if(e.ltrim(this.currentLine).charAt(0)==="#"){}else if(0===i){this.moveToPreviousLine();break}else{throw new n("Indentation problem.",this.getRealCurrentLineNb()+1,this.currentLine)}}return s.join("\n")};r.prototype.moveToNextLine=function(){if(this.currentLineNb>=this.lines.length-1){return false}this.currentLine=this.lines[++this.currentLineNb];return true};r.prototype.moveToPreviousLine=function(){this.currentLine=this.lines[--this.currentLineNb]};r.prototype.parseValue=function(e,l,u){var t,p,E,s,r,a,o,c,h,f;if(0===e.indexOf("*")){o=e.indexOf("#");if(o!==-1){e=e.substr(1,o-2)}else{e=e.slice(1)}if(this.refs[e]===void 0){throw new n('Reference "'+e+'" does not exist.',this.currentLine)}return this.refs[e]}if(r=this.PATTERN_FOLDED_SCALAR_ALL.exec(e)){a=(c=r.modifiers)!=null?c:"";s=Math.abs(parseInt(a));if(isNaN(s)){s=0}f=this.parseFoldedScalar(r.separator,this.PATTERN_DECIMAL.replace(a,""),s);if(r.type!=null){i.configure(l,u);return i.parseScalar(r.type+" "+f)}else{return f}}try{return i.parse(e,l,u)}catch(p){t=p;if(((h=e.charAt(0))==="["||h==="{")&&t instanceof n&&this.isNextLineIndented()){e+="\n"+this.getNextEmbedBlock();try{return i.parse(e,l,u)}catch(E){t=E;t.parsedLine=this.getRealCurrentLineNb()+1;t.snippet=this.currentLine;throw t}}else{t.parsedLine=this.getRealCurrentLineNb()+1;t.snippet=this.currentLine;throw t}}};r.prototype.parseFoldedScalar=function(T,o,i){var l,h,E,a,c,f,s,u,p,n;if(o==null){o=""}if(i==null){i=0}s=this.moveToNextLine();if(!s){return""}l=this.isCurrentLineBlank();n="";while(s&&l){if(s=this.moveToNextLine()){n+="\n";l=this.isCurrentLineBlank()}}if(0===i){if(c=this.PATTERN_INDENT_SPACES.exec(this.currentLine)){i=c[0].length}}if(i>0){u=this.PATTERN_FOLDED_SCALAR_BY_INDENTATION[i];if(u==null){u=new t("^ {"+i+"}(.*)$");r.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION[i]=u}while(s&&(l||(c=u.exec(this.currentLine)))){if(l){n+=this.currentLine.slice(i)}else{n+=c[1]}if(s=this.moveToNextLine()){n+="\n";l=this.isCurrentLineBlank()}}}else if(s){n+="\n"}if(s){this.moveToPreviousLine()}if(">"===T){f="";p=n.split("\n");for(h=0,E=p.length;h<E;h++){a=p[h];if(a.length===0||a.charAt(0)===" "){f=e.rtrim(f," ")+a+"\n"}else{f+=a+" "}}n=f}if("+"!==o){n=e.rtrim(n)}if(""===o){n=this.PATTERN_TRAILING_LINES.replace(n,"\n")}else if("-"===o){n=this.PATTERN_TRAILING_LINES.replace(n,"")}return n};r.prototype.isNextLineIndented=function(t){var e,i,n;if(t==null){t=true}i=this.getCurrentLineIndentation();e=!this.moveToNextLine();if(t){while(!e&&this.isCurrentLineEmpty()){e=!this.moveToNextLine()}}else{while(!e&&this.isCurrentLineBlank()){e=!this.moveToNextLine()}}if(e){return false}n=false;if(this.getCurrentLineIndentation()>i){n=true}this.moveToPreviousLine();return n};r.prototype.isCurrentLineEmpty=function(){var t;t=e.trim(this.currentLine," ");return t.length===0||t.charAt(0)==="#"};r.prototype.isCurrentLineBlank=function(){return""===e.trim(this.currentLine," ")};r.prototype.isCurrentLineComment=function(){var t;t=e.ltrim(this.currentLine," ");return t.charAt(0)==="#"};r.prototype.cleanup=function(t){var i,a,f,u,o,E,T,s,n,c,h,p,l,r;if(t.indexOf("\r")!==-1){t=t.split("\r\n").join("\n").split("\r").join("\n")}i=0;c=this.PATTERN_YAML_HEADER.replaceAll(t,""),t=c[0],i=c[1];this.offset+=i;h=this.PATTERN_LEADING_COMMENTS.replaceAll(t,"",1),r=h[0],i=h[1];if(i===1){this.offset+=e.subStrCount(t,"\n")-e.subStrCount(r,"\n");t=r}p=this.PATTERN_DOCUMENT_MARKER_START.replaceAll(t,"",1),r=p[0],i=p[1];if(i===1){this.offset+=e.subStrCount(t,"\n")-e.subStrCount(r,"\n");t=r;t=this.PATTERN_DOCUMENT_MARKER_END.replace(t,"")}n=t.split("\n");l=-1;for(u=0,E=n.length;u<E;u++){s=n[u];if(e.trim(s," ").length===0){continue}f=s.length-e.ltrim(s).length;if(l===-1||f<l){l=f}}if(l>0){for(a=o=0,T=n.length;o<T;a=++o){s=n[a];n[a]=s.slice(l)}t=n.join("\n")}return t};r.prototype.isNextLineUnIndentedCollection=function(e){var t,n;if(e==null){e=null}if(e==null){e=this.getCurrentLineIndentation()}t=this.moveToNextLine();while(t&&this.isCurrentLineEmpty()){t=this.moveToNextLine()}if(false===t){return false}n=false;if(this.getCurrentLineIndentation()===e&&this.isStringUnIndentedCollectionItem(this.currentLine)){n=true}this.moveToPreviousLine();return n};r.prototype.isStringUnIndentedCollectionItem=function(){return this.currentLine==="-"||this.currentLine.slice(0,2)==="- "};return r}();l.exports=s},{"./Exception/ParseException":4,"./Inline":5,"./Pattern":7,"./Utils":9}],7:[function(n,t,i){var e;e=function(){e.prototype.regex=null;e.prototype.rawRegex=null;e.prototype.cleanedRegex=null;e.prototype.mapping=null;function e(i,o){var n,s,t,e,l,r,u,a,f;if(o==null){o=""}t="";l=i.length;r=null;s=0;e=0;while(e<l){n=i.charAt(e);if(n==="\\"){t+=i.slice(e,+(e+1)+1||9e9);e++}else if(n==="("){if(e<l-2){a=i.slice(e,+(e+2)+1||9e9);if(a==="(?:"){e+=2;t+=a}else if(a==="(?<"){s++;e+=2;u="";while(e+1<l){f=i.charAt(e+1);if(f===">"){t+="(";e++;if(u.length>0){if(r==null){r={}}r[u]=s}break}else{u+=f}e++}}else{t+=n;s++}}else{t+=n}}else{t+=n}e++}this.rawRegex=i;this.cleanedRegex=t;this.regex=new RegExp(this.cleanedRegex,"g"+o.replace("g",""));this.mapping=r}e.prototype.exec=function(r){var i,e,t,n;this.regex.lastIndex=0;e=this.regex.exec(r);if(e==null){return null}if(this.mapping!=null){n=this.mapping;for(t in n){i=n[t];e[t]=e[i]}}return e};e.prototype.test=function(e){this.regex.lastIndex=0;return this.regex.test(e)};e.prototype.replace=function(e,t){this.regex.lastIndex=0;return e.replace(this.regex,t)};e.prototype.replaceAll=function(e,i,t){var n;if(t==null){t=0}this.regex.lastIndex=0;n=0;while(this.regex.test(e)&&(t===0||n<t)){this.regex.lastIndex=0;e=e.replace(this.regex,"");n++}return[e,n]};return e}();t.exports=e},{}],8:[function(t,r,s){var n,i,e;e=t("./Utils");n=t("./Pattern");i=function(){function t(){}t.PATTERN_ESCAPED_CHARACTER=new n('\\\\([0abt nvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})');t.unescapeSingleQuotedString=function(e){return e.replace(/\'\'/g,"'")};t.unescapeDoubleQuotedString=function(e){if(this._unescapeCallback==null){this._unescapeCallback=function(e){return function(t){return e.unescapeCharacter(t)}}(this)}return this.PATTERN_ESCAPED_CHARACTER.replace(e,this._unescapeCallback)};t.unescapeCharacter=function(n){var t;t=String.fromCharCode;switch(n.charAt(1)){case"0":return t(0);case"a":return t(7);case"b":return t(8);case"t":return" ";case" ":return" ";case"n":return"\n";case"v":return t(11);case"f":return t(12);case"r":return t(13);case"e":return t(27);case" ":return" ";case'"':return'"';case"/":return"/";case"\\":return"\\";case"N":return t(133);case"_":return t(160);case"L":return t(8232);case"P":return t(8233);case"x":return e.utf8chr(e.hexDec(n.substr(2,2)));case"u":return e.utf8chr(e.hexDec(n.substr(2,4)));case"U":return e.utf8chr(e.hexDec(n.substr(2,8)));default:return""}};return t}();r.exports=i},{"./Pattern":7,"./Utils":9}],9:[function(e,i,r){var t,n;t=e("./Pattern");n=function(){function n(){}n.REGEX_LEFT_TRIM_BY_CHAR={};n.REGEX_RIGHT_TRIM_BY_CHAR={};n.REGEX_SPACES=/\s+/g;n.REGEX_DIGITS=/^\d+$/;n.REGEX_OCTAL=/[^0-7]/gi;n.REGEX_HEXADECIMAL=/[^a-f0-9]/gi;n.PATTERN_DATE=new t("^"+"(?<year>[0-9][0-9][0-9][0-9])"+"-(?<month>[0-9][0-9]?)"+"-(?<day>[0-9][0-9]?)"+"(?:(?:[Tt]|[ ]+)"+"(?<hour>[0-9][0-9]?)"+":(?<minute>[0-9][0-9])"+":(?<second>[0-9][0-9])"+"(?:.(?<fraction>[0-9]*))?"+"(?:[ ]*(?<tz>Z|(?<tz_sign>[-+])(?<tz_hour>[0-9][0-9]?)"+"(?::(?<tz_minute>[0-9][0-9]))?))?)?"+"$","i");n.LOCAL_TIMEZONE_OFFSET=(new Date).getTimezoneOffset()*60*1e3;n.trim=function(i,e){var t,n;if(e==null){e="\\s"}return i.trim();t=this.REGEX_LEFT_TRIM_BY_CHAR[e];if(t==null){this.REGEX_LEFT_TRIM_BY_CHAR[e]=t=new RegExp("^"+e+""+e+"*")}t.lastIndex=0;n=this.REGEX_RIGHT_TRIM_BY_CHAR[e];if(n==null){this.REGEX_RIGHT_TRIM_BY_CHAR[e]=n=new RegExp(e+""+e+"*$")}n.lastIndex=0;return i.replace(t,"").replace(n,"")};n.ltrim=function(n,e){var t;if(e==null){e="\\s"}t=this.REGEX_LEFT_TRIM_BY_CHAR[e];if(t==null){this.REGEX_LEFT_TRIM_BY_CHAR[e]=t=new RegExp("^"+e+""+e+"*")}t.lastIndex=0;return n.replace(t,"")};n.rtrim=function(n,e){var t;if(e==null){e="\\s"}t=this.REGEX_RIGHT_TRIM_BY_CHAR[e];if(t==null){this.REGEX_RIGHT_TRIM_BY_CHAR[e]=t=new RegExp(e+""+e+"*$")}t.lastIndex=0;return n.replace(t,"")};n.isEmpty=function(e){return!e||e===""||e==="0"||e instanceof Array&&e.length===0};n.subStrCount=function(e,i,u,a){var s,r,t,o,n,l;s=0;e=""+e;i=""+i;if(u!=null){e=e.slice(u)}if(a!=null){e=e.slice(0,a)}o=e.length;l=i.length;for(r=t=0,n=o;0<=n?t<n:t>n;r=0<=n?++t:--t){if(i===e.slice(r,l)){s++;r+=l-1}}return s};n.isDigits=function(e){this.REGEX_DIGITS.lastIndex=0;return this.REGEX_DIGITS.test(e)};n.octDec=function(e){this.REGEX_OCTAL.lastIndex=0;return parseInt((e+"").replace(this.REGEX_OCTAL,""),8)};n.hexDec=function(e){this.REGEX_HEXADECIMAL.lastIndex=0;e=this.trim(e);if((e+"").slice(0,2)==="0x"){e=(e+"").slice(2)}return parseInt((e+"").replace(this.REGEX_HEXADECIMAL,""),16)};n.utf8chr=function(e){var t;t=String.fromCharCode;if(128>(e%=2097152)){return t(e)}if(2048>e){return t(192|e>>6)+t(128|e&63)}if(65536>e){return t(224|e>>12)+t(128|e>>6&63)+t(128|e&63)}return t(240|e>>18)+t(128|e>>12&63)+t(128|e>>6&63)+t(128|e&63)};n.parseBoolean=function(t,n){var e;if(n==null){n=true}if(typeof t==="string"){e=t.toLowerCase();if(!n){if(e==="no"){return false}}if(e==="0"){return false}if(e==="false"){return false}if(e===""){return false}return true}return!!t};n.isNumeric=function(e){this.REGEX_SPACES.lastIndex=0;return typeof e==="number"||typeof e==="string"&&!isNaN(e)&&e.replace(this.REGEX_SPACES,"")!==""};n.stringToDate=function(r){var n,l,t,c,e,h,u,f,o,a,i,s;if(!(r!=null?r.length:void 0)){return null}e=this.PATTERN_DATE.exec(r);if(!e){return null}s=parseInt(e.year,10);u=parseInt(e.month,10)-1;l=parseInt(e.day,10);if(e.hour==null){n=new Date(Date.UTC(s,u,l));return n}c=parseInt(e.hour,10);h=parseInt(e.minute,10);f=parseInt(e.second,10);if(e.fraction!=null){t=e.fraction.slice(0,3);while(t.length<3){t+="0"}t=parseInt(t,10)}else{t=0}if(e.tz!=null){o=parseInt(e.tz_hour,10);if(e.tz_minute!=null){a=parseInt(e.tz_minute,10)}else{a=0}i=(o*60+a)*6e4;if("-"===e.tz_sign){i*=-1}}n=new Date(Date.UTC(s,u,l,c,h,f,t));if(i){n.setTime(n.getTime()+i)}return n};n.strRepeat=function(n,i){var e,t;t="";e=0;while(e<i){t+=n;e++}return t};n.getStringFromFile=function(i,n){var s,l,r,a,f,u,o,t;if(n==null){n=null}t=null;if(typeof window!=="undefined"&&window!==null){if(window.XMLHttpRequest){t=new XMLHttpRequest}else if(window.ActiveXObject){u=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(r=0,a=u.length;r<a;r++){f=u[r];try{t=new ActiveXObject(f)}catch(c){}}}}if(t!=null){if(n!=null){t.onreadystatechange=function(){if(t.readyState===4){if(t.status===200||t.status===0){return n(t.responseText)}else{return n(null)}}};t.open("GET",i,true);return t.send(null)}else{t.open("GET",i,false);t.send(null);if(t.status===200||t.status===0){return t.responseText}return null}}else{o=e;l=o("fs");if(n!=null){return l.readFile(i,function(e,t){if(e){return n(null)}else{return n(String(t))}})}else{s=l.readFileSync(i);if(s!=null){return String(s)}return null}}};return n}();i.exports=n},{"./Pattern":7}],10:[function(e,s,l){var i,r,n,t;r=e("./Parser");i=e("./Dumper");n=e("./Utils");t=function(){function t(){}t.parse=function(n,e,t){if(e==null){e=false}if(t==null){t=null}return(new r).parse(n,e,t)};t.parseFile=function(s,e,t,i){var r;if(e==null){e=null}if(t==null){t=false}if(i==null){i=null}if(e!=null){return n.getStringFromFile(s,function(n){return function(s){var r;r=null;if(s!=null){r=n.parse(s,t,i)}e(r)}}(this))}else{r=n.getStringFromFile(s);if(r!=null){return this.parse(r,t,i)}return null}};t.dump=function(l,e,t,n,r){var s;if(e==null){e=2}if(t==null){t=4}if(n==null){n=false}if(r==null){r=null}s=new i;s.indentation=t;return s.dump(l,e,0,n,r)};t.register=function(){var t;t=function(e,t){return e.exports=YAML.parseFile(t)};if((typeof e!=="undefined"&&e!==null?e.extensions:void 0)!=null){e.extensions[".yml"]=t;return e.extensions[".yaml"]=t}};t.stringify=function(e,t,n,i,r){return this.dump(e,t,n,i,r)};t.load=function(e,t,n,i){return this.parseFile(e,t,n,i)};return t}();if(typeof window!=="undefined"&&window!==null){window.YAML=t}if(typeof window==="undefined"||window===null){this.YAML=t}s.exports=t},{"./Dumper":1,"./Parser":6,"./Utils":9}]},{},[10]);
(function e(t,n,i){function r(l,u){if(!n[l]){if(!t[l]){var a=typeof require=="function"&&require;if(!u&&a)return a(l,!0);if(s)return s(l,!0);var o=new Error("Cannot find module '"+l+"'");throw o.code="MODULE_NOT_FOUND",o}var f=n[l]={exports:{}};t[l][0].call(f.exports,function(e){var n=t[l][1][e];return r(n?n:e)},f,f.exports,e,t,n,i)}return n[l].exports}var s=typeof require=="function"&&require;for(var l=0;l<i.length;l++)r(i[l]);return r})({1:[function(e,t,n){var i,r,s;s=e("./Utils");r=e("./Inline");i=function(){function e(){}e.indentation=4;e.prototype.dump=function(e,t,n,i,l){var u,a,o,f,c,p,h;if(t==null){t=0}if(n==null){n=0}if(i==null){i=false}if(l==null){l=null}f="";c=n?s.strRepeat(" ",n):"";if(t<=0||typeof e!=="object"||e instanceof Date||s.isEmpty(e)){f+=c+r.dump(e,i,l)}else{if(e instanceof Array){for(u=0,o=e.length;u<o;u++){p=e[u];h=t-1<=0||typeof p!=="object"||s.isEmpty(p);f+=c+"-"+(h?" ":"\n")+this.dump(p,t-1,h?0:n+this.indentation,i,l)+(h?"\n":"")}}else{for(a in e){p=e[a];h=t-1<=0||typeof p!=="object"||s.isEmpty(p);f+=c+r.dump(a,i,l)+":"+(h?" ":"\n")+this.dump(p,t-1,h?0:n+this.indentation,i,l)+(h?"\n":"")}}}return f};return e}();t.exports=i},{"./Inline":6,"./Utils":10}],2:[function(e,t,n){var i,r;r=e("./Pattern");i=function(){var e;function t(){}t.LIST_ESCAPEES=["\\","\\\\",'\\"','"',"\0","","","","","","","","\b","\t","\n","\v","\f","\r","","","","","","","","","","","","","","","","","","",(e=String.fromCharCode)(133),e(160),e(8232),e(8233)];t.LIST_ESCAPED=["\\\\",'\\"','\\"','\\"',"\\0","\\x01","\\x02","\\x03","\\x04","\\x05","\\x06","\\a","\\b","\\t","\\n","\\v","\\f","\\r","\\x0e","\\x0f","\\x10","\\x11","\\x12","\\x13","\\x14","\\x15","\\x16","\\x17","\\x18","\\x19","\\x1a","\\e","\\x1c","\\x1d","\\x1e","\\x1f","\\N","\\_","\\L","\\P"];t.MAPPING_ESCAPEES_TO_ESCAPED=function(){var e,n,i,r;i={};for(e=n=0,r=t.LIST_ESCAPEES.length;0<=r?n<r:n>r;e=0<=r?++n:--n){i[t.LIST_ESCAPEES[e]]=t.LIST_ESCAPED[e]}return i}();t.PATTERN_CHARACTERS_TO_ESCAPE=new r("[\\x00-\\x1f]|…| |
|
");t.PATTERN_MAPPING_ESCAPEES=new r(t.LIST_ESCAPEES.join("|").split("\\").join("\\\\"));t.PATTERN_SINGLE_QUOTING=new r("[\\s'\":{}[\\],&*#?]|^[-?|<>=!%@`]");t.requiresDoubleQuoting=function(e){return this.PATTERN_CHARACTERS_TO_ESCAPE.test(e)};t.escapeWithDoubleQuotes=function(e){var t;t=this.PATTERN_MAPPING_ESCAPEES.replace(e,function(e){return function(t){return e.MAPPING_ESCAPEES_TO_ESCAPED[t]}}(this));return'"'+t+'"'};t.requiresSingleQuoting=function(e){return this.PATTERN_SINGLE_QUOTING.test(e)};t.escapeWithSingleQuotes=function(e){return"'"+e.replace(/'/g,"''")+"'"};return t}();t.exports=i},{"./Pattern":8}],3:[function(e,t,n){var i,r=function(e,t){for(var n in t){if(s.call(t,n))e[n]=t[n]}function i(){this.constructor=e}i.prototype=t.prototype;e.prototype=new i;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=function(e){r(t,e);function t(e,t,n){this.message=e;this.parsedLine=t;this.snippet=n}t.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return"<DumpException> "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return"<DumpException> "+this.message}};return t}(Error);t.exports=i},{}],4:[function(e,t,n){var i,r=function(e,t){for(var n in t){if(s.call(t,n))e[n]=t[n]}function i(){this.constructor=e}i.prototype=t.prototype;e.prototype=new i;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=function(e){r(t,e);function t(e,t,n){this.message=e;this.parsedLine=t;this.snippet=n}t.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return"<ParseException> "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return"<ParseException> "+this.message}};return t}(Error);t.exports=i},{}],5:[function(e,t,n){var i,r=function(e,t){for(var n in t){if(s.call(t,n))e[n]=t[n]}function i(){this.constructor=e}i.prototype=t.prototype;e.prototype=new i;e.__super__=t.prototype;return e},s={}.hasOwnProperty;i=function(e){r(t,e);function t(e,t,n){this.message=e;this.parsedLine=t;this.snippet=n}t.prototype.toString=function(){if(this.parsedLine!=null&&this.snippet!=null){return"<ParseMore> "+this.message+" (line "+this.parsedLine+": '"+this.snippet+"')"}else{return"<ParseMore> "+this.message}};return t}(Error);t.exports=i},{}],6:[function(e,t,n){var i,r,s,l,u,a,o,f,c=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++){if(t in this&&this[t]===e)return t}return-1};a=e("./Pattern");o=e("./Unescaper");r=e("./Escaper");f=e("./Utils");l=e("./Exception/ParseException");u=e("./Exception/ParseMore");i=e("./Exception/DumpException");s=function(){function e(){}e.REGEX_QUOTED_STRING="(?:\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"|'(?:[^']*(?:''[^']*)*)')";e.PATTERN_TRAILING_COMMENTS=new a("^\\s*#.*$");e.PATTERN_QUOTED_SCALAR=new a("^"+e.REGEX_QUOTED_STRING);e.PATTERN_THOUSAND_NUMERIC_SCALAR=new a("^(-|\\+)?[0-9,]+(\\.[0-9]+)?$");e.PATTERN_SCALAR_BY_DELIMITERS={};e.settings={};e.configure=function(e,t){if(e==null){e=null}if(t==null){t=null}this.settings.exceptionOnInvalidType=e;this.settings.objectDecoder=t};e.parse=function(e,t,n){var i,r;if(t==null){t=false}if(n==null){n=null}this.settings.exceptionOnInvalidType=t;this.settings.objectDecoder=n;if(e==null){return""}e=f.trim(e);if(0===e.length){return""}i={exceptionOnInvalidType:t,objectDecoder:n,i:0};switch(e.charAt(0)){case"[":r=this.parseSequence(e,i);++i.i;break;case"{":r=this.parseMapping(e,i);++i.i;break;default:r=this.parseScalar(e,null,['"',"'"],i)}if(this.PATTERN_TRAILING_COMMENTS.replace(e.slice(i.i),"")!==""){throw new l('Unexpected characters near "'+e.slice(i.i)+'".')}return r};e.dump=function(e,t,n){var i,s,l;if(t==null){t=false}if(n==null){n=null}if(e==null){return"null"}l=typeof e;if(l==="object"){if(e instanceof Date){return e.toISOString()}else if(n!=null){s=n(e);if(typeof s==="string"||s!=null){return s}}return this.dumpObject(e)}if(l==="boolean"){return e?"true":"false"}if(f.isDigits(e)){return l==="string"?"'"+e+"'":String(parseInt(e))}if(f.isNumeric(e)){return l==="string"?"'"+e+"'":String(parseFloat(e))}if(l==="number"){return e===Infinity?".Inf":e===-Infinity?"-.Inf":isNaN(e)?".NaN":e}if(r.requiresDoubleQuoting(e)){return r.escapeWithDoubleQuotes(e)}if(r.requiresSingleQuoting(e)){return r.escapeWithSingleQuotes(e)}if(""===e){return'""'}if(f.PATTERN_DATE.test(e)){return"'"+e+"'"}if((i=e.toLowerCase())==="null"||i==="~"||i==="true"||i==="false"){return"'"+e+"'"}return e};e.dumpObject=function(e,t,n){var i,r,s,l,u;if(n==null){n=null}if(e instanceof Array){l=[];for(i=0,s=e.length;i<s;i++){u=e[i];l.push(this.dump(u))}return"["+l.join(", ")+"]"}else{l=[];for(r in e){u=e[r];l.push(this.dump(r)+": "+this.dump(u))}return"{"+l.join(", ")+"}"}};e.parseScalar=function(e,t,n,i,r){var s,u,o,p,h,E,T,A,_;if(t==null){t=null}if(n==null){n=['"',"'"]}if(i==null){i=null}if(r==null){r=true}if(i==null){i={exceptionOnInvalidType:this.settings.exceptionOnInvalidType,objectDecoder:this.settings.objectDecoder,i:0}}s=i.i;if(E=e.charAt(s),c.call(n,E)>=0){p=this.parseQuotedScalar(e,i);s=i.i;if(t!=null){_=f.ltrim(e.slice(s)," ");if(!(T=_.charAt(0),c.call(t,T)>=0)){throw new l("Unexpected characters ("+e.slice(s)+").")}}}else{if(!t){p=e.slice(s);s+=p.length;A=p.indexOf(" #");if(A!==-1){p=f.rtrim(p.slice(0,A))}}else{u=t.join("|");h=this.PATTERN_SCALAR_BY_DELIMITERS[u];if(h==null){h=new a("^(.+?)("+u+")");this.PATTERN_SCALAR_BY_DELIMITERS[u]=h}if(o=h.exec(e.slice(s))){p=o[1];s+=p.length}else{throw new l("Malformed inline YAML string ("+e+").")}}if(r){p=this.evaluateScalar(p,i)}}i.i=s;return p};e.parseQuotedScalar=function(e,t){var n,i,r;n=t.i;if(!(i=this.PATTERN_QUOTED_SCALAR.exec(e.slice(n)))){throw new u("Malformed inline YAML string ("+e.slice(n)+").")}r=i[0].substr(1,i[0].length-2);if('"'===e.charAt(n)){r=o.unescapeDoubleQuotedString(r)}else{r=o.unescapeSingleQuotedString(r)}n+=i[0].length;t.i=n;return r};e.parseSequence=function(e,t){var n,i,r,s,l,a,o,f;a=[];l=e.length;r=t.i;r+=1;while(r<l){t.i=r;switch(e.charAt(r)){case"[":a.push(this.parseSequence(e,t));r=t.i;break;case"{":a.push(this.parseMapping(e,t));r=t.i;break;case"]":return a;case",":case" ":case"\n":break;default:s=(o=e.charAt(r))==='"'||o==="'";f=this.parseScalar(e,[",","]"],['"',"'"],t);r=t.i;if(!s&&typeof f==="string"&&(f.indexOf(": ")!==-1||f.indexOf(":\n")!==-1)){try{f=this.parseMapping("{"+f+"}")}catch(i){n=i}}a.push(f);--r}++r}throw new u("Malformed inline YAML string "+e)};e.parseMapping=function(e,t){var n,i,r,s,l,a,o;l={};s=e.length;i=t.i;i+=1;a=false;while(i<s){t.i=i;switch(e.charAt(i)){case" ":case",":case"\n":++i;t.i=i;a=true;break;case"}":return l}if(a){a=false;continue}r=this.parseScalar(e,[":"," ","\n"],['"',"'"],t,false);i=t.i;n=false;while(i<s){t.i=i;switch(e.charAt(i)){case"[":o=this.parseSequence(e,t);i=t.i;if(l[r]===void 0){l[r]=o}n=true;break;case"{":o=this.parseMapping(e,t);i=t.i;if(l[r]===void 0){l[r]=o}n=true;break;case":":case" ":case"\n":break;default:o=this.parseScalar(e,[",","}"],['"',"'"],t);i=t.i;if(l[r]===void 0){l[r]=o}n=true;--i}++i;if(n){break}}}throw new u("Malformed inline YAML string "+e)};e.evaluateScalar=function(e,t){var n,i,r,s,u,a,o,c,p,h,E;e=f.trim(e);p=e.toLowerCase();switch(p){case"null":case"":case"~":return null;case"true":return true;case"false":return false;case".inf":return Infinity;case".nan":return NaN;case"-.inf":return Infinity;default:s=p.charAt(0);switch(s){case"!":u=e.indexOf(" ");if(u===-1){a=p}else{a=p.slice(0,u)}switch(a){case"!":if(u!==-1){return parseInt(this.parseScalar(e.slice(2)))}return null;case"!str":return f.ltrim(e.slice(4));case"!!str":return f.ltrim(e.slice(5));case"!!int":return parseInt(this.parseScalar(e.slice(5)));case"!!bool":return f.parseBoolean(this.parseScalar(e.slice(6)),false);case"!!float":return parseFloat(this.parseScalar(e.slice(7)));case"!!timestamp":return f.stringToDate(f.ltrim(e.slice(11)));default:if(t==null){t={exceptionOnInvalidType:this.settings.exceptionOnInvalidType,objectDecoder:this.settings.objectDecoder,i:0}}o=t.objectDecoder,r=t.exceptionOnInvalidType;if(o){E=f.rtrim(e);u=E.indexOf(" ");if(u===-1){return o(E,null)}else{h=f.ltrim(E.slice(u+1));if(!(h.length>0)){h=null}return o(E.slice(0,u),h)}}if(r){throw new l("Custom object support when parsing a YAML file has been disabled.")}return null}break;case"0":if("0x"===e.slice(0,2)){return f.hexDec(e)}else if(f.isDigits(e)){return f.octDec(e)}else if(f.isNumeric(e)){return parseFloat(e)}else{return e}break;case"+":if(f.isDigits(e)){c=e;n=parseInt(c);if(c===String(n)){return n}else{return c}}else if(f.isNumeric(e)){return parseFloat(e)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(e)){return parseFloat(e.replace(",",""))}return e;case"-":if(f.isDigits(e.slice(1))){if("0"===e.charAt(1)){return-f.octDec(e.slice(1))}else{c=e.slice(1);n=parseInt(c);if(c===String(n)){return-n}else{return-c}}}else if(f.isNumeric(e)){return parseFloat(e)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(e)){return parseFloat(e.replace(",",""))}return e;default:if(i=f.stringToDate(e)){return i}else if(f.isNumeric(e)){return parseFloat(e)}else if(this.PATTERN_THOUSAND_NUMERIC_SCALAR.test(e)){return parseFloat(e.replace(",",""))}return e}}};return e}();t.exports=s},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Pattern":8,"./Unescaper":9,"./Utils":10}],7:[function(e,t,n){var i,r,s,l,u,a;i=e("./Inline");u=e("./Pattern");a=e("./Utils");r=e("./Exception/ParseException");s=e("./Exception/ParseMore");l=function(){e.prototype.PATTERN_FOLDED_SCALAR_ALL=new u("^(?:(?<type>![^\\|>]*)\\s+)?(?<separator>\\||>)(?<modifiers>\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?<comments> +#.*)?$");e.prototype.PATTERN_FOLDED_SCALAR_END=new u("(?<separator>\\||>)(?<modifiers>\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?<comments> +#.*)?$");e.prototype.PATTERN_SEQUENCE_ITEM=new u("^\\-((?<leadspaces>\\s+)(?<value>.+?))?\\s*$");e.prototype.PATTERN_ANCHOR_VALUE=new u("^&(?<ref>[^ ]+) *(?<value>.*)");e.prototype.PATTERN_COMPACT_NOTATION=new u("^(?<key>"+i.REGEX_QUOTED_STRING+"|[^ '\"\\{\\[].*?) *\\:(\\s+(?<value>.+?))?\\s*$");e.prototype.PATTERN_MAPPING_ITEM=new u("^(?<key>"+i.REGEX_QUOTED_STRING+"|[^ '\"\\[\\{].*?) *\\:(\\s+(?<value>.+?))?\\s*$");e.prototype.PATTERN_DECIMAL=new u("\\d+");e.prototype.PATTERN_INDENT_SPACES=new u("^ +");e.prototype.PATTERN_TRAILING_LINES=new u("(\n*)$");e.prototype.PATTERN_YAML_HEADER=new u("^\\%YAML[: ][\\d\\.]+.*\n","m");e.prototype.PATTERN_LEADING_COMMENTS=new u("^(\\#.*?\n)+","m");e.prototype.PATTERN_DOCUMENT_MARKER_START=new u("^\\-\\-\\-.*?\n","m");e.prototype.PATTERN_DOCUMENT_MARKER_END=new u("^\\.\\.\\.\\s*$","m");e.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION={};e.prototype.CONTEXT_NONE=0;e.prototype.CONTEXT_SEQUENCE=1;e.prototype.CONTEXT_MAPPING=2;function e(e){this.offset=e!=null?e:0;this.lines=[];this.currentLineNb=-1;this.currentLine="";this.refs={}}e.prototype.parse=function(t,n,s){var l,u,o,f,c,p,h,E,T,A,_,L,d,N,g,R,x,m,C,I,S,w,v,y,P,b,D,O,M,G,U,X,F,k,H,j,Y,B,Q;if(n==null){n=false}if(s==null){s=null}this.currentLineNb=-1;this.currentLine="";this.lines=this.cleanup(t).split("\n");p=null;c=this.CONTEXT_NONE;u=false;while(this.moveToNextLine()){if(this.isCurrentLineEmpty()){continue}if("\t"===this.currentLine[0]){throw new r("A YAML file cannot contain tabs as indentation.",this.getRealCurrentLineNb()+1,this.currentLine)}N=D=false;if(Q=this.PATTERN_SEQUENCE_ITEM.exec(this.currentLine)){if(this.CONTEXT_MAPPING===c){throw new r("You cannot define a sequence item when in a mapping")}c=this.CONTEXT_SEQUENCE;if(p==null){p=[]}if(Q.value!=null&&(b=this.PATTERN_ANCHOR_VALUE.exec(Q.value))){N=b.ref;Q.value=b.value}if(!(Q.value!=null)||""===a.trim(Q.value," ")||a.ltrim(Q.value," ").indexOf("#")===0){if(this.currentLineNb<this.lines.length-1&&!this.isNextLineUnIndentedCollection()){f=this.getRealCurrentLineNb()+1;X=new e(f);X.refs=this.refs;p.push(X.parse(this.getNextEmbedBlock(null,true),n,s))}else{p.push(null)}}else{if(((F=Q.leadspaces)!=null?F.length:void 0)&&(b=this.PATTERN_COMPACT_NOTATION.exec(Q.value))){f=this.getRealCurrentLineNb();X=new e(f);X.refs=this.refs;o=Q.value;d=this.getCurrentLineIndentation();if(this.isNextLineIndented(false)){o+="\n"+this.getNextEmbedBlock(d+Q.leadspaces.length+1,true)}p.push(X.parse(o,n,s))}else{p.push(this.parseValue(Q.value,n,s))}}}else if((Q=this.PATTERN_MAPPING_ITEM.exec(this.currentLine))&&Q.key.indexOf(" #")===-1){if(this.CONTEXT_SEQUENCE===c){throw new r("You cannot define a mapping item when in a sequence")}c=this.CONTEXT_MAPPING;if(p==null){p={}}i.configure(n,s);try{x=i.parseScalar(Q.key)}catch(E){h=E;h.parsedLine=this.getRealCurrentLineNb()+1;h.snippet=this.currentLine;throw h}if("<<"===x){D=true;u=true;if(((k=Q.value)!=null?k.indexOf("*"):void 0)===0){j=Q.value.slice(1);if(this.refs[j]==null){throw new r('Reference "'+j+'" does not exist.',this.getRealCurrentLineNb()+1,this.currentLine)}Y=this.refs[j];if(typeof Y!=="object"){throw new r("YAML merge keys used with a scalar value instead of an object.",this.getRealCurrentLineNb()+1,this.currentLine)}if(Y instanceof Array){for(L=g=0,I=Y.length;g<I;L=++g){t=Y[L];if(p[M=String(L)]==null){p[M]=t}}}else{for(x in Y){t=Y[x];if(p[x]==null){p[x]=t}}}}else{if(Q.value!=null&&Q.value!==""){t=Q.value}else{t=this.getNextEmbedBlock()}f=this.getRealCurrentLineNb()+1;X=new e(f);X.refs=this.refs;G=X.parse(t,n);if(typeof G!=="object"){throw new r("YAML merge keys used with a scalar value instead of an object.",this.getRealCurrentLineNb()+1,this.currentLine)}if(G instanceof Array){for(m=0,S=G.length;m<S;m++){U=G[m];if(typeof U!=="object"){throw new r("Merge items must be objects.",this.getRealCurrentLineNb()+1,U)}if(U instanceof Array){for(L=P=0,w=U.length;P<w;L=++P){t=U[L];R=String(L);if(!p.hasOwnProperty(R)){p[R]=t}}}else{for(x in U){t=U[x];if(!p.hasOwnProperty(x)){p[x]=t}}}}}else{for(x in G){t=G[x];if(!p.hasOwnProperty(x)){p[x]=t}}}}}else if(Q.value!=null&&(b=this.PATTERN_ANCHOR_VALUE.exec(Q.value))){N=b.ref;Q.value=b.value}if(D){}else if(!(Q.value!=null)||""===a.trim(Q.value," ")||a.ltrim(Q.value," ").indexOf("#")===0){if(!this.isNextLineIndented()&&!this.isNextLineUnIndentedCollection()){if(u||p[x]===void 0){p[x]=null}}else{f=this.getRealCurrentLineNb()+1;X=new e(f);X.refs=this.refs;B=X.parse(this.getNextEmbedBlock(),n,s);if(u||p[x]===void 0){p[x]=B}}}else{B=this.parseValue(Q.value,n,s);if(u||p[x]===void 0){p[x]=B}}}else{y=this.lines.length;if(1===y||2===y&&a.isEmpty(this.lines[1])){try{t=i.parse(this.lines[0],n,s)}catch(T){h=T;h.parsedLine=this.getRealCurrentLineNb()+1;h.snippet=this.currentLine;throw h}if(typeof t==="object"){if(t instanceof Array){_=t[0]}else{for(x in t){_=t[x];break}}if(typeof _==="string"&&_.indexOf("*")===0){p=[];for(O=0,v=t.length;O<v;O++){l=t[O];p.push(this.refs[l.slice(1)])}t=p}}return t}else if((H=a.ltrim(t).charAt(0))==="["||H==="{"){try{return i.parse(t,n,s)}catch(A){h=A;h.parsedLine=this.getRealCurrentLineNb()+1;h.snippet=this.currentLine;throw h}}throw new r("Unable to parse.",this.getRealCurrentLineNb()+1,this.currentLine)}if(N){if(p instanceof Array){this.refs[N]=p[p.length-1]}else{C=null;for(x in p){C=x}this.refs[N]=p[C]}}}if(a.isEmpty(p)){return null}else{return p}};e.prototype.getRealCurrentLineNb=function(){return this.currentLineNb+this.offset};e.prototype.getCurrentLineIndentation=function(){return this.currentLine.length-a.ltrim(this.currentLine," ").length};e.prototype.getNextEmbedBlock=function(e,t){var n,i,s,l,u,o,f;if(e==null){e=null}if(t==null){t=false}this.moveToNextLine();if(e==null){l=this.getCurrentLineIndentation();f=this.isStringUnIndentedCollectionItem(this.currentLine);if(!this.isCurrentLineEmpty()&&0===l&&!f){throw new r("Indentation problem.",this.getRealCurrentLineNb()+1,this.currentLine)}}else{l=e}n=[this.currentLine.slice(l)];if(!t){s=this.isStringUnIndentedCollectionItem(this.currentLine)}o=this.PATTERN_FOLDED_SCALAR_END;u=!o.test(this.currentLine);while(this.moveToNextLine()){i=this.getCurrentLineIndentation();if(i===l){u=!o.test(this.currentLine)}if(u&&this.isCurrentLineComment()){continue}if(this.isCurrentLineBlank()){n.push(this.currentLine.slice(l));continue}if(s&&!this.isStringUnIndentedCollectionItem(this.currentLine)&&i===l){this.moveToPreviousLine();break}if(i>=l){n.push(this.currentLine.slice(l))}else if(a.ltrim(this.currentLine).charAt(0)==="#"){}else if(0===i){this.moveToPreviousLine();break}else{throw new r("Indentation problem.",this.getRealCurrentLineNb()+1,this.currentLine)}}return n.join("\n")};e.prototype.moveToNextLine=function(){if(this.currentLineNb>=this.lines.length-1){return false}this.currentLine=this.lines[++this.currentLineNb];return true};e.prototype.moveToPreviousLine=function(){this.currentLine=this.lines[--this.currentLineNb]};e.prototype.parseValue=function(e,t,n){var l,u,o,f,c,p,h,E,T;if(0===e.indexOf("*")){p=e.indexOf("#");if(p!==-1){e=e.substr(1,p-2)}else{e=e.slice(1)}if(this.refs[e]===void 0){throw new r('Reference "'+e+'" does not exist.',this.currentLine)}return this.refs[e]}if(f=this.PATTERN_FOLDED_SCALAR_ALL.exec(e)){c=(h=f.modifiers)!=null?h:"";o=Math.abs(parseInt(c));if(isNaN(o)){o=0}T=this.parseFoldedScalar(f.separator,this.PATTERN_DECIMAL.replace(c,""),o);if(f.type!=null){i.configure(t,n);return i.parseScalar(f.type+" "+T)}else{return T}}if((E=e.charAt(0))==="["||E==="{"||E==='"'||E==="'"){while(true){try{return i.parse(e,t,n)}catch(u){l=u;if(l instanceof s&&this.moveToNextLine()){e+="\n"+a.trim(this.currentLine," ")}else{l.parsedLine=this.getRealCurrentLineNb()+1;l.snippet=this.currentLine;throw l}}}}else{if(this.isNextLineIndented()){e+="\n"+this.getNextEmbedBlock()}return i.parse(e,t,n)}};e.prototype.parseFoldedScalar=function(t,n,i){var r,s,l,o,f,c,p,h,E,T;if(n==null){n=""}if(i==null){i=0}p=this.moveToNextLine();if(!p){return""}r=this.isCurrentLineBlank();T="";while(p&&r){if(p=this.moveToNextLine()){T+="\n";r=this.isCurrentLineBlank()}}if(0===i){if(f=this.PATTERN_INDENT_SPACES.exec(this.currentLine)){i=f[0].length}}if(i>0){h=this.PATTERN_FOLDED_SCALAR_BY_INDENTATION[i];if(h==null){h=new u("^ {"+i+"}(.*)$");e.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION[i]=h}while(p&&(r||(f=h.exec(this.currentLine)))){if(r){T+=this.currentLine.slice(i)}else{T+=f[1]}if(p=this.moveToNextLine()){T+="\n";r=this.isCurrentLineBlank()}}}else if(p){T+="\n"}if(p){this.moveToPreviousLine()}if(">"===t){c="";E=T.split("\n");for(s=0,l=E.length;s<l;s++){o=E[s];if(o.length===0||o.charAt(0)===" "){c=a.rtrim(c," ")+o+"\n"}else{c+=o+" "}}T=c}if("+"!==n){T=a.rtrim(T)}if(""===n){T=this.PATTERN_TRAILING_LINES.replace(T,"\n")}else if("-"===n){T=this.PATTERN_TRAILING_LINES.replace(T,"")}return T};e.prototype.isNextLineIndented=function(e){var t,n,i;if(e==null){e=true}n=this.getCurrentLineIndentation();t=!this.moveToNextLine();if(e){while(!t&&this.isCurrentLineEmpty()){t=!this.moveToNextLine()}}else{while(!t&&this.isCurrentLineBlank()){t=!this.moveToNextLine()}}if(t){return false}i=false;if(this.getCurrentLineIndentation()>n){i=true}this.moveToPreviousLine();return i};e.prototype.isCurrentLineEmpty=function(){var e;e=a.trim(this.currentLine," ");return e.length===0||e.charAt(0)==="#"};e.prototype.isCurrentLineBlank=function(){return""===a.trim(this.currentLine," ")};e.prototype.isCurrentLineComment=function(){var e;e=a.ltrim(this.currentLine," ");return e.charAt(0)==="#"};e.prototype.cleanup=function(e){var t,n,i,r,s,l,u,o,f,c,p,h,E,T;if(e.indexOf("\r")!==-1){e=e.split("\r\n").join("\n").split("\r").join("\n")}t=0;c=this.PATTERN_YAML_HEADER.replaceAll(e,""),e=c[0],t=c[1];this.offset+=t;p=this.PATTERN_LEADING_COMMENTS.replaceAll(e,"",1),T=p[0],t=p[1];if(t===1){this.offset+=a.subStrCount(e,"\n")-a.subStrCount(T,"\n");e=T}h=this.PATTERN_DOCUMENT_MARKER_START.replaceAll(e,"",1),T=h[0],t=h[1];if(t===1){this.offset+=a.subStrCount(e,"\n")-a.subStrCount(T,"\n");e=T;e=this.PATTERN_DOCUMENT_MARKER_END.replace(e,"")}f=e.split("\n");E=-1;for(r=0,l=f.length;r<l;r++){o=f[r];if(a.trim(o," ").length===0){continue}i=o.length-a.ltrim(o).length;if(E===-1||i<E){E=i}}if(E>0){for(n=s=0,u=f.length;s<u;n=++s){o=f[n];f[n]=o.slice(E)}e=f.join("\n")}return e};e.prototype.isNextLineUnIndentedCollection=function(e){var t,n;if(e==null){e=null}if(e==null){e=this.getCurrentLineIndentation()}t=this.moveToNextLine();while(t&&this.isCurrentLineEmpty()){t=this.moveToNextLine()}if(false===t){return false}n=false;if(this.getCurrentLineIndentation()===e&&this.isStringUnIndentedCollectionItem(this.currentLine)){n=true}this.moveToPreviousLine();return n};e.prototype.isStringUnIndentedCollectionItem=function(){return this.currentLine==="-"||this.currentLine.slice(0,2)==="- "};return e}();t.exports=l},{"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Inline":6,"./Pattern":8,"./Utils":10}],8:[function(e,t,n){var i;i=function(){e.prototype.regex=null;e.prototype.rawRegex=null;e.prototype.cleanedRegex=null;e.prototype.mapping=null;function e(e,t){var n,i,r,s,l,u,a,o,f;if(t==null){t=""}r="";l=e.length;u=null;i=0;s=0;while(s<l){n=e.charAt(s);if(n==="\\"){r+=e.slice(s,+(s+1)+1||9e9);s++}else if(n==="("){if(s<l-2){o=e.slice(s,+(s+2)+1||9e9);if(o==="(?:"){s+=2;r+=o}else if(o==="(?<"){i++;s+=2;a="";while(s+1<l){f=e.charAt(s+1);if(f===">"){r+="(";s++;if(a.length>0){if(u==null){u={}}u[a]=i}break}else{a+=f}s++}}else{r+=n;i++}}else{r+=n}}else{r+=n}s++}this.rawRegex=e;this.cleanedRegex=r;this.regex=new RegExp(this.cleanedRegex,"g"+t.replace("g",""));this.mapping=u}e.prototype.exec=function(e){var t,n,i,r;this.regex.lastIndex=0;n=this.regex.exec(e);if(n==null){return null}if(this.mapping!=null){r=this.mapping;for(i in r){t=r[i];n[i]=n[t]}}return n};e.prototype.test=function(e){this.regex.lastIndex=0;return this.regex.test(e)};e.prototype.replace=function(e,t){this.regex.lastIndex=0;return e.replace(this.regex,t)};e.prototype.replaceAll=function(e,t,n){var i;if(n==null){n=0}this.regex.lastIndex=0;i=0;while(this.regex.test(e)&&(n===0||i<n)){this.regex.lastIndex=0;e=e.replace(this.regex,t);i++}return[e,i]};return e}();t.exports=i},{}],9:[function(e,t,n){var i,r,s;s=e("./Utils");i=e("./Pattern");r=function(){function e(){}e.PATTERN_ESCAPED_CHARACTER=new i('\\\\([0abt\tnvfre "\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})');e.unescapeSingleQuotedString=function(e){return e.replace(/\'\'/g,"'")};e.unescapeDoubleQuotedString=function(e){if(this._unescapeCallback==null){this._unescapeCallback=function(e){return function(t){return e.unescapeCharacter(t)}}(this)}return this.PATTERN_ESCAPED_CHARACTER.replace(e,this._unescapeCallback)};e.unescapeCharacter=function(e){var t;t=String.fromCharCode;switch(e.charAt(1)){case"0":return t(0);case"a":return t(7);case"b":return t(8);case"t":return"\t";case"\t":return"\t";case"n":return"\n";case"v":return t(11);case"f":return t(12);case"r":return t(13);case"e":return t(27);case" ":return" ";case'"':return'"';case"/":return"/";case"\\":return"\\";case"N":return t(133);case"_":return t(160);case"L":return t(8232);case"P":return t(8233);case"x":return s.utf8chr(s.hexDec(e.substr(2,2)));case"u":return s.utf8chr(s.hexDec(e.substr(2,4)));case"U":return s.utf8chr(s.hexDec(e.substr(2,8)));default:return""}};return e}();t.exports=r},{"./Pattern":8,"./Utils":10}],10:[function(e,t,n){var i,r,s={}.hasOwnProperty;i=e("./Pattern");r=function(){function t(){}t.REGEX_LEFT_TRIM_BY_CHAR={};t.REGEX_RIGHT_TRIM_BY_CHAR={};t.REGEX_SPACES=/\s+/g;t.REGEX_DIGITS=/^\d+$/;t.REGEX_OCTAL=/[^0-7]/gi;t.REGEX_HEXADECIMAL=/[^a-f0-9]/gi;t.PATTERN_DATE=new i("^"+"(?<year>[0-9][0-9][0-9][0-9])"+"-(?<month>[0-9][0-9]?)"+"-(?<day>[0-9][0-9]?)"+"(?:(?:[Tt]|[ \t]+)"+"(?<hour>[0-9][0-9]?)"+":(?<minute>[0-9][0-9])"+":(?<second>[0-9][0-9])"+"(?:.(?<fraction>[0-9]*))?"+"(?:[ \t]*(?<tz>Z|(?<tz_sign>[-+])(?<tz_hour>[0-9][0-9]?)"+"(?::(?<tz_minute>[0-9][0-9]))?))?)?"+"$","i");t.LOCAL_TIMEZONE_OFFSET=(new Date).getTimezoneOffset()*60*1e3;t.trim=function(e,t){var n,i;if(t==null){t="\\s"}return e.trim();n=this.REGEX_LEFT_TRIM_BY_CHAR[t];if(n==null){this.REGEX_LEFT_TRIM_BY_CHAR[t]=n=new RegExp("^"+t+""+t+"*")}n.lastIndex=0;i=this.REGEX_RIGHT_TRIM_BY_CHAR[t];if(i==null){this.REGEX_RIGHT_TRIM_BY_CHAR[t]=i=new RegExp(t+""+t+"*$")}i.lastIndex=0;return e.replace(n,"").replace(i,"")};t.ltrim=function(e,t){var n;if(t==null){t="\\s"}n=this.REGEX_LEFT_TRIM_BY_CHAR[t];if(n==null){this.REGEX_LEFT_TRIM_BY_CHAR[t]=n=new RegExp("^"+t+""+t+"*")}n.lastIndex=0;return e.replace(n,"")};t.rtrim=function(e,t){var n;if(t==null){t="\\s"}n=this.REGEX_RIGHT_TRIM_BY_CHAR[t];if(n==null){this.REGEX_RIGHT_TRIM_BY_CHAR[t]=n=new RegExp(t+""+t+"*$")}n.lastIndex=0;return e.replace(n,"")};t.isEmpty=function(e){return!e||e===""||e==="0"||e instanceof Array&&e.length===0||this.isEmptyObject(e)};t.isEmptyObject=function(e){var t;return e instanceof Object&&function(){var n;n=[];for(t in e){if(!s.call(e,t))continue;n.push(t)}return n}().length===0};t.subStrCount=function(e,t,n,i){var r,s,l,u,a,o;r=0;e=""+e;t=""+t;if(n!=null){e=e.slice(n)}if(i!=null){e=e.slice(0,i)}u=e.length;o=t.length;for(s=l=0,a=u;0<=a?l<a:l>a;s=0<=a?++l:--l){if(t===e.slice(s,o)){r++;s+=o-1}}return r};t.isDigits=function(e){this.REGEX_DIGITS.lastIndex=0;return this.REGEX_DIGITS.test(e)};t.octDec=function(e){this.REGEX_OCTAL.lastIndex=0;return parseInt((e+"").replace(this.REGEX_OCTAL,""),8)};t.hexDec=function(e){this.REGEX_HEXADECIMAL.lastIndex=0;e=this.trim(e);if((e+"").slice(0,2)==="0x"){e=(e+"").slice(2)}return parseInt((e+"").replace(this.REGEX_HEXADECIMAL,""),16)};t.utf8chr=function(e){var t;t=String.fromCharCode;if(128>(e%=2097152)){return t(e)}if(2048>e){return t(192|e>>6)+t(128|e&63)}if(65536>e){return t(224|e>>12)+t(128|e>>6&63)+t(128|e&63)}return t(240|e>>18)+t(128|e>>12&63)+t(128|e>>6&63)+t(128|e&63)};t.parseBoolean=function(e,t){var n;if(t==null){t=true}if(typeof e==="string"){n=e.toLowerCase();if(!t){if(n==="no"){return false}}if(n==="0"){return false}if(n==="false"){return false}if(n===""){return false}return true}return!!e};t.isNumeric=function(e){this.REGEX_SPACES.lastIndex=0;return typeof e==="number"||typeof e==="string"&&!isNaN(e)&&e.replace(this.REGEX_SPACES,"")!==""};t.stringToDate=function(e){var t,n,i,r,s,l,u,a,o,f,c,p;if(!(e!=null?e.length:void 0)){return null}s=this.PATTERN_DATE.exec(e);if(!s){return null}p=parseInt(s.year,10);u=parseInt(s.month,10)-1;n=parseInt(s.day,10);if(s.hour==null){t=new Date(Date.UTC(p,u,n));return t}r=parseInt(s.hour,10);l=parseInt(s.minute,10);a=parseInt(s.second,10);if(s.fraction!=null){i=s.fraction.slice(0,3);while(i.length<3){i+="0"}i=parseInt(i,10)}else{i=0}if(s.tz!=null){o=parseInt(s.tz_hour,10);if(s.tz_minute!=null){f=parseInt(s.tz_minute,10)}else{f=0}c=(o*60+f)*6e4;if("-"===s.tz_sign){c*=-1}}t=new Date(Date.UTC(p,u,n,r,l,a,i));if(c){t.setTime(t.getTime()-c)}return t};t.strRepeat=function(e,t){var n,i;i="";n=0;while(n<t){i+=e;n++}return i};t.getStringFromFile=function(t,n){var i,r,s,l,u,a,o,f;if(n==null){n=null}f=null;if(typeof window!=="undefined"&&window!==null){if(window.XMLHttpRequest){f=new XMLHttpRequest}else if(window.ActiveXObject){a=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"];for(s=0,l=a.length;s<l;s++){u=a[s];try{f=new ActiveXObject(u)}catch(e){}}}}if(f!=null){if(n!=null){f.onreadystatechange=function(){if(f.readyState===4){if(f.status===200||f.status===0){return n(f.responseText)}else{return n(null)}}};f.open("GET",t,true);return f.send(null)}else{f.open("GET",t,false);f.send(null);if(f.status===200||f.status===0){return f.responseText}return null}}else{o=e;r=o("fs");if(n!=null){return r.readFile(t,function(e,t){if(e){return n(null)}else{return n(String(t))}})}else{i=r.readFileSync(t);if(i!=null){return String(i)}return null}}};return t}();t.exports=r},{"./Pattern":8}],11:[function(e,t,n){var i,r,s,l;r=e("./Parser");i=e("./Dumper");s=e("./Utils");l=function(){function t(){}t.parse=function(e,t,n){if(t==null){t=false}if(n==null){n=null}return(new r).parse(e,t,n)};t.parseFile=function(e,t,n,i){var r;if(t==null){t=null}if(n==null){n=false}if(i==null){i=null}if(t!=null){return s.getStringFromFile(e,function(e){return function(r){var s;s=null;if(r!=null){s=e.parse(r,n,i)}t(s)}}(this))}else{r=s.getStringFromFile(e);if(r!=null){return this.parse(r,n,i)}return null}};t.dump=function(e,t,n,r,s){var l;if(t==null){t=2}if(n==null){n=4}if(r==null){r=false}if(s==null){s=null}l=new i;l.indentation=n;return l.dump(e,t,0,r,s)};t.register=function(){var t;t=function(e,t){return e.exports=YAML.parseFile(t)};if((typeof e!=="undefined"&&e!==null?e.extensions:void 0)!=null){e.extensions[".yml"]=t;return e.extensions[".yaml"]=t}};t.stringify=function(e,t,n,i,r){return this.dump(e,t,n,i,r)};t.load=function(e,t,n,i){return this.parseFile(e,t,n,i)};return t}();if(typeof window!=="undefined"&&window!==null){window.YAML=l}if(typeof window==="undefined"||window===null){this.YAML=l}t.exports=l},{"./Dumper":1,"./Parser":7,"./Utils":10}]},{},[11]);

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var Dumper, Inline, Utils;

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var Escaper, Pattern;

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var DumpException,

@@ -3,0 +3,0 @@ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var ParseException,

@@ -3,0 +3,0 @@ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },

@@ -1,3 +0,3 @@

// Generated by CoffeeScript 1.10.0
var DumpException, Escaper, Inline, ParseException, Pattern, Unescaper, Utils,
// Generated by CoffeeScript 1.12.4
var DumpException, Escaper, Inline, ParseException, ParseMore, Pattern, Unescaper, Utils,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

@@ -15,2 +15,4 @@

ParseMore = require('./Exception/ParseMore');
DumpException = require('./Exception/DumpException');

@@ -117,3 +119,3 @@

if (type === 'number') {
return (value === Infinity ? '.Inf' : (value === -Infinity ? '-.Inf' : (isNaN(value) ? '.NaN' : value)));
return (value === 2e308 ? '.Inf' : (value === -2e308 ? '-.Inf' : (isNaN(value) ? '.NaN' : value)));
}

@@ -225,3 +227,3 @@ if (Escaper.requiresDoubleQuoting(value)) {

if (!(match = this.PATTERN_QUOTED_SCALAR.exec(scalar.slice(i)))) {
throw new ParseException('Malformed inline YAML string (' + scalar.slice(i) + ').');
throw new ParseMore('Malformed inline YAML string (' + scalar.slice(i) + ').');
}

@@ -240,3 +242,3 @@ output = match[0].substr(1, match[0].length - 2);

Inline.parseSequence = function(sequence, context) {
var e, error, i, isQuoted, len, output, ref, value;
var e, i, isQuoted, len, output, ref, value;
output = [];

@@ -279,3 +281,3 @@ len = sequence.length;

}
throw new ParseException('Malformed inline YAML string ' + sequence);
throw new ParseMore('Malformed inline YAML string ' + sequence);
};

@@ -348,3 +350,3 @@

}
throw new ParseException('Malformed inline YAML string ' + mapping);
throw new ParseMore('Malformed inline YAML string ' + mapping);
};

@@ -366,7 +368,7 @@

case '.inf':
return Infinity;
return 2e308;
case '.nan':
return NaN;
return 0/0;
case '-.inf':
return Infinity;
return 2e308;
default:

@@ -373,0 +375,0 @@ firstChar = scalarLower.charAt(0);

@@ -1,3 +0,3 @@

// Generated by CoffeeScript 1.10.0
var Inline, ParseException, Parser, Pattern, Utils;
// Generated by CoffeeScript 1.12.4
var Inline, ParseException, ParseMore, Parser, Pattern, Utils;

@@ -12,2 +12,4 @@ Inline = require('./Inline');

ParseMore = require('./Exception/ParseMore');
Parser = (function() {

@@ -32,9 +34,9 @@ Parser.prototype.PATTERN_FOLDED_SCALAR_ALL = new Pattern('^(?:(?<type>![^\\|>]*)\\s+)?(?<separator>\\||>)(?<modifiers>\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?<comments> +#.*)?$');

Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n');
Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n', 'm');
Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+');
Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+', 'm');
Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n');
Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n', 'm');
Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$');
Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$', 'm');

@@ -58,3 +60,3 @@ Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION = {};

Parser.prototype.parse = function(value, exceptionOnInvalidType, objectDecoder) {
var alias, allowOverwrite, block, c, context, data, e, error, error1, error2, first, i, indent, isRef, j, k, key, l, lastKey, len, len1, len2, len3, lineCount, m, matches, mergeNode, n, name, parsed, parsedItem, parser, ref, ref1, ref2, refName, refValue, val, values;
var alias, allowOverwrite, block, c, context, data, e, first, i, indent, isRef, j, k, key, l, lastKey, len, len1, len2, len3, lineCount, m, matches, mergeNode, n, name, parsed, parsedItem, parser, ref, ref1, ref2, refName, refValue, val, values;
if (exceptionOnInvalidType == null) {

@@ -236,4 +238,4 @@ exceptionOnInvalidType = false;

value = Inline.parse(this.lines[0], exceptionOnInvalidType, objectDecoder);
} catch (error1) {
e = error1;
} catch (error) {
e = error;
e.parsedLine = this.getRealCurrentLineNb() + 1;

@@ -265,4 +267,4 @@ e.snippet = this.currentLine;

return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
} catch (error2) {
e = error2;
} catch (error) {
e = error;
e.parsedLine = this.getRealCurrentLineNb() + 1;

@@ -331,5 +333,4 @@ e.snippet = this.currentLine;

}
if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) {
this.moveToPreviousLine();
break;
if (removeComments && this.isCurrentLineComment()) {
continue;
}

@@ -340,6 +341,5 @@ if (this.isCurrentLineBlank()) {

}
if (removeComments && this.isCurrentLineComment()) {
if (indent === newIndent) {
continue;
}
if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) {
this.moveToPreviousLine();
break;
}

@@ -373,3 +373,3 @@ if (indent >= newIndent) {

Parser.prototype.parseValue = function(value, exceptionOnInvalidType, objectDecoder) {
var e, error, error1, foldedIndent, matches, modifiers, pos, ref, ref1, val;
var e, foldedIndent, matches, modifiers, pos, ref, ref1, val;
if (0 === value.indexOf('*')) {

@@ -401,21 +401,22 @@ pos = value.indexOf('#');

}
try {
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
} catch (error) {
e = error;
if (((ref1 = value.charAt(0)) === '[' || ref1 === '{') && e instanceof ParseException && this.isNextLineIndented()) {
value += "\n" + this.getNextEmbedBlock();
if ((ref1 = value.charAt(0)) === '[' || ref1 === '{' || ref1 === '"' || ref1 === "'") {
while (true) {
try {
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
} catch (error1) {
e = error1;
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
} catch (error) {
e = error;
if (e instanceof ParseMore && this.moveToNextLine()) {
value += "\n" + Utils.trim(this.currentLine, ' ');
} else {
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
}
}
} else {
e.parsedLine = this.getRealCurrentLineNb() + 1;
e.snippet = this.currentLine;
throw e;
}
} else {
if (this.isNextLineIndented()) {
value += "\n" + this.getNextEmbedBlock();
}
return Inline.parse(value, exceptionOnInvalidType, objectDecoder);
}

@@ -422,0 +423,0 @@ };

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var Pattern;

@@ -109,3 +109,3 @@

this.regex.lastIndex = 0;
str = str.replace(this.regex, '');
str = str.replace(this.regex, replacement);
count++;

@@ -112,0 +112,0 @@ }

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var Pattern, Unescaper, Utils;

@@ -3,0 +3,0 @@

@@ -1,3 +0,4 @@

// Generated by CoffeeScript 1.10.0
var Pattern, Utils;
// Generated by CoffeeScript 1.12.4
var Pattern, Utils,
hasProp = {}.hasOwnProperty;

@@ -71,5 +72,18 @@ Pattern = require('./Pattern');

Utils.isEmpty = function(value) {
return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0);
return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0) || this.isEmptyObject(value);
};
Utils.isEmptyObject = function(value) {
var k;
return value instanceof Object && ((function() {
var results;
results = [];
for (k in value) {
if (!hasProp.call(value, k)) continue;
results.push(k);
}
return results;
})()).length === 0;
};
Utils.subStrCount = function(string, subString, start, length) {

@@ -204,3 +218,3 @@ var c, i, j, len, ref, sublen;

if (tz_offset) {
date.setTime(date.getTime() + tz_offset);
date.setTime(date.getTime() - tz_offset);
}

@@ -236,3 +250,3 @@ return date;

xhr = new ActiveXObject(name);
} catch (undefined) {}
} catch (error) {}
}

@@ -239,0 +253,0 @@ }

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var Dumper, Parser, Utils, Yaml;

@@ -3,0 +3,0 @@

{
"name": "yamljs",
"version": "0.2.8",
"version": "0.2.9",
"description": "Standalone JavaScript YAML 1.2 Parser & Encoder. Works under node.js and all major browsers. Also brings command line YAML/JSON conversion tools.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -132,3 +132,3 @@ yaml.js

# Store output inside a JSON file
yaml2json myfile.yml > ouput.json
yaml2json myfile.yml > output.json

@@ -145,3 +145,3 @@ # Output "pretty" (indented) JSON

# Convert JSON to YAML and store output inside a JSON file
json2yaml myfile.json > ouput.yml
json2yaml myfile.json > output.yml

@@ -148,0 +148,0 @@ # Output YAML that will be inlined only after 8 levels of indentation

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.12.4
var YAML, examplePath, ref, url;

@@ -228,3 +228,3 @@

spaceSeparatedDate = new Date(Date.UTC(2001, 12 - 1, 14, 21, 59, 43, 10));
spaceSeparatedDate.setTime(spaceSeparatedDate.getTime() - 5 * 3600 * 1000);
spaceSeparatedDate.setTime(spaceSeparatedDate.getTime() + 5 * 3600 * 1000);
withDatesToTime = function(input) {

@@ -235,9 +235,9 @@ var key, res, val;

val = input[key];
res[key] = Math.round(val.getTime() / 1000) * 1000;
res[key] = val.getTime();
}
return res;
};
return expect(withDatesToTime(YAML.parse("iso8601: 2001-12-14t21:59:43.10-05:00\nspace seperated: 2001-12-14 21:59:43.10 -05:00"))).toEqual(withDatesToTime({
return expect(withDatesToTime(YAML.parse("iso8601: 2001-12-14t21:59:43.010+05:00\nspace separated: 2001-12-14 21:59:43.010 -05:00"))).toEqual(withDatesToTime({
'iso8601': iso8601Date,
'space seperated': spaceSeparatedDate
'space separated': spaceSeparatedDate
}));

@@ -254,3 +254,3 @@ });

val = input[key];
res[key] = Math.round(val.getTime() / 1000) * 1000;
res[key] = val.getTime();
}

@@ -487,3 +487,3 @@ return res;

});
return it('can be dumped empty sequences in mappings', function() {
it('can be dumped empty sequences in mappings', function() {
return expect(YAML.parse(YAML.dump({

@@ -495,2 +495,9 @@ key: []

});
return it('can be dumpted empty inline collections', function() {
return expect(YAML.parse(YAML.dump({
key: {}
}))).toEqual({
key: {}
});
});
});

@@ -600,3 +607,3 @@

iso8601Date = new Date(Date.UTC(2001, 12 - 1, 14, 21, 59, 43, 10));
iso8601Date.setTime(iso8601Date.getTime() - 5 * 3600 * 1000);
iso8601Date.setTime(iso8601Date.getTime() + 5 * 3600 * 1000);
spaceSeparatedDate = new Date(Date.UTC(2001, 12 - 1, 14, 21, 59, 43, 10));

@@ -609,9 +616,9 @@ spaceSeparatedDate.setTime(spaceSeparatedDate.getTime() - 5 * 3600 * 1000);

val = input[key];
res[key] = Math.round(val.getTime() / 1000) * 1000;
res[key] = val.getTime();
}
return res;
};
return expect(withDatesToTime(YAML.parse("iso8601: 2001-12-14t21:59:43.10-05:00\nspace seperated: 2001-12-14 21:59:43.10 -05:00"))).toEqual(YAML.parse(YAML.dump(withDatesToTime({
return expect(withDatesToTime(YAML.parse("iso8601: 2001-12-14t21:59:43.010-05:00\nspace separated: 2001-12-14 21:59:43.010 +05:00"))).toEqual(YAML.parse(YAML.dump(withDatesToTime({
'iso8601': iso8601Date,
'space seperated': spaceSeparatedDate
'space separated': spaceSeparatedDate
}))));

@@ -628,3 +635,3 @@ });

val = input[key];
res[key] = Math.round(val.getTime() / 1000) * 1000;
res[key] = val.getTime();
}

@@ -631,0 +638,0 @@ return res;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc