diff --git a/dist/indian-ocean.browser.es6.js b/dist/indian-ocean.browser.es6.js index b91c2df..491a25c 100644 --- a/dist/indian-ocean.browser.es6.js +++ b/dist/indian-ocean.browser.es6.js @@ -1,4 +1,4 @@ -// https://github.com/mhkeller/indian-ocean Version 3.0.2. Copyright 2017 Michael Keller. +// https://github.com/mhkeller/indian-ocean Version 3.0.2. Copyright 2018 Michael Keller. var EOL = {}; var EOF = {}; var QUOTE = 34; diff --git a/dist/indian-ocean.js b/dist/indian-ocean.js index 03d2c60..aa826e8 100644 --- a/dist/indian-ocean.js +++ b/dist/indian-ocean.js @@ -1,4 +1,4 @@ -// https://github.com/mhkeller/indian-ocean Version 3.0.2. Copyright 2017 Michael Keller. +// https://github.com/mhkeller/indian-ocean Version 3.0.2. Copyright 2018 Michael Keller. (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : diff --git a/dist/indian-ocean.min.js b/dist/indian-ocean.min.js index 97b9e84..b414780 100644 --- a/dist/indian-ocean.min.js +++ b/dist/indian-ocean.min.js @@ -1,4 +1,4 @@ -// https://github.com/mhkeller/indian-ocean Version 3.0.2. Copyright 2017 Michael Keller. +// https://github.com/mhkeller/indian-ocean Version 3.0.2. Copyright 2018 Michael Keller. !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.io={})}(this,function(t){"use strict";function n(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function e(t,e){var r=n(t);return function(n,i){return e(r(n),i,t)}}function r(t){var n=Object.create(null),e=[];return t.forEach(function(t){for(var r in t)r in n||e.push(n[r]=r)}),e}function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function u(t){if(dr===setTimeout)return setTimeout(t,0);if((dr===i||!dr)&&setTimeout)return dr=setTimeout,setTimeout(t,0);try{return dr(t,0)}catch(n){try{return dr.call(null,t,0)}catch(n){return dr.call(this,t,0)}}}function a(t){if(gr===clearTimeout)return clearTimeout(t);if((gr===o||!gr)&&clearTimeout)return gr=clearTimeout,clearTimeout(t);try{return gr(t)}catch(n){try{return gr.call(null,t)}catch(n){return gr.call(this,t)}}}function c(){mr&&yr&&(mr=!1,yr.length?vr=yr.concat(vr):wr=-1,vr.length&&s())}function s(){if(!mr){var t=u(c);mr=!0;for(var n=vr.length;n;){for(yr=vr,vr=[];++wr1)for(var e=1;e1)for(var r=1;r=0&&(n=n.slice(1)),".inf"===n?1===e?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===n?NaN:n.indexOf(":")>=0?(n.split(":").forEach(function(t){i.unshift(parseFloat(t,10))}),n=0,r=1,i.forEach(function(t){n+=t*r,r*=60}),e*n):e*parseFloat(n,10)}function Q(t,n){var e;if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(to.isNegativeZero(t))return"-0.0";return e=t.toString(10),ro.test(e)?e.replace("e",".e"):e}function X(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||to.isNegativeZero(t))}function tt(t){return null!==t&&(null!==lo.exec(t)||null!==fo.exec(t))}function nt(t){var n,e,r,i,o,u,a,c,s,l,f=0,p=null;if(n=lo.exec(t),null===n&&(n=fo.exec(t)),null===n)throw new Error("Date resolve error");if(e=+n[1],r=+n[2]-1,i=+n[3],!n[4])return new Date(Date.UTC(e,r,i));if(o=+n[4],u=+n[5],a=+n[6],n[7]){for(f=n[7].slice(0,3);f.length<3;)f+="0";f=+f}return n[9]&&(c=+n[10],s=+(n[11]||0),p=6e4*(60*c+s),"-"===n[9]&&(p=-p)),l=new Date(Date.UTC(e,r,i,o,u,a,f)),p&&l.setTime(l.getTime()-p),l}function et(t){return t.toISOString()}function rt(t){return"<<"===t||null===t}function it(t){if(null===t)return!1;var n,e,r=0,i=t.length,o=mo;for(e=0;e64)){if(n<0)return!1;r+=6}return r%8==0}function ot(t){var n,e,r=t.replace(/[\r\n=]/g,""),i=r.length,o=mo,u=0,a=[];for(n=0;n>16&255),a.push(u>>8&255),a.push(255&u)),u=u<<6|o.indexOf(r.charAt(n));return e=i%4*6,0===e?(a.push(u>>16&255),a.push(u>>8&255),a.push(255&u)):18===e?(a.push(u>>10&255),a.push(u>>2&255)):12===e&&a.push(u>>4&255),Li?Li.from?Li.from(a):new Li(a):a}function ut(t){var n,e,r="",i=0,o=t.length,u=mo;for(n=0;n>18&63],r+=u[i>>12&63],r+=u[i>>6&63],r+=u[63&i]),i=(i<<8)+t[n];return e=o%3,0===e?(r+=u[i>>18&63],r+=u[i>>12&63],r+=u[i>>6&63],r+=u[63&i]):2===e?(r+=u[i>>10&63],r+=u[i>>4&63],r+=u[i<<2&63],r+=u[64]):1===e&&(r+=u[i>>2&63],r+=u[i<<4&63],r+=u[64],r+=u[64]),r}function at(t){return Li&&Li.isBuffer(t)}function ct(t){if(null===t)return!0;var n,e,r,i,o,u=[],a=t;for(n=0,e=a.length;n3)return!1;if("/"!==n[n.length-r.length-1])return!1}return!0}function wt(t){var n=t,e=/\/([gim]*)$/.exec(t),r="";return"/"===n[0]&&(e&&(r=e[1]),n=n.slice(1,n.length-r.length-1)),new RegExp(n,r)}function bt(t){var n="/"+t.source+"/";return t.global&&(n+="g"),t.multiline&&(n+="m"),t.ignoreCase&&(n+="i"),n}function At(t){return"[object RegExp]"===Object.prototype.toString.call(t)}function xt(t){if(null===t)return!1;try{var n="("+t+")",e=yo.parse(n,{range:!0});return"Program"===e.type&&1===e.body.length&&"ExpressionStatement"===e.body[0].type&&"FunctionExpression"===e.body[0].expression.type}catch(t){return!1}}function Et(t){var n,e="("+t+")",r=yo.parse(e,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(t){i.push(t.name)}),n=r.body[0].expression.body.range,new Function(i,e.slice(n[0]+1,n[1]-1))}function kt(t){return t.toString()}function Ct(t){return"[object Function]"===Object.prototype.toString.call(t)}function _t(t){return 10===t||13===t}function Ot(t){return 9===t||32===t}function St(t){return 9===t||32===t||10===t||13===t}function Tt(t){return 44===t||91===t||93===t||123===t||125===t}function jt(t){var n;return 48<=t&&t<=57?t-48:(n=32|t,97<=n&&n<=102?n-97+10:-1)}function It(t){return 120===t?2:117===t?4:85===t?8:0}function Rt(t){return 48<=t&&t<=57?t-48:-1}function Ft(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t?"\t":9===t?"\t":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function Mt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function Pt(t,n){this.input=t,this.filename=n.filename||null,this.schema=n.schema||$o,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Nt(t,n){return new Yo(n,new qo(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Lt(t,n){throw Nt(t,n)}function Ut(t,n){t.onWarning&&t.onWarning.call(null,Nt(t,n))}function Bt(t,n,e,r){var i,o,u,a;if(n1&&(t.result+=Do.repeat("\n",n-1))}function Wt(t,n,e){var r,i,o,u,a,c,s,l,f,p=t.kind,h=t.result;if(f=t.input.charCodeAt(t.position),St(f)||Tt(f)||35===f||38===f||42===f||33===f||124===f||62===f||39===f||34===f||37===f||64===f||96===f)return!1;if((63===f||45===f)&&(i=t.input.charCodeAt(t.position+1),St(i)||e&&Tt(i)))return!1;for(t.kind="scalar",t.result="",o=u=t.position,a=!1;0!==f;){if(58===f){if(i=t.input.charCodeAt(t.position+1),St(i)||e&&Tt(i))break}else if(35===f){if(r=t.input.charCodeAt(t.position-1),St(r))break}else{if(t.position===t.lineStart&&$t(t)||e&&Tt(f))break;if(_t(f)){if(c=t.line,s=t.lineStart,l=t.lineIndent,zt(t,!1,-1),t.lineIndent>=n){a=!0,f=t.input.charCodeAt(t.position);continue}t.position=u,t.line=c,t.lineStart=s,t.lineIndent=l;break}}a&&(Bt(t,o,u,!1),Kt(t,t.line-c),o=u=t.position,a=!1),Ot(f)||(u=t.position+1),f=t.input.charCodeAt(++t.position)}return Bt(t,o,u,!1),!!t.result||(t.kind=p,t.result=h,!1)}function Vt(t,n){var e,r,i;if(39!==(e=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(e=t.input.charCodeAt(t.position));)if(39===e){if(Bt(t,r,t.position,!0),39!==(e=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,i=t.position}else _t(e)?(Bt(t,r,i,!0),Kt(t,zt(t,!1,n)),r=i=t.position):t.position===t.lineStart&&$t(t)?Lt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Lt(t,"unexpected end of the stream within a single quoted scalar")}function Gt(t,n){var e,r,i,o,u,a;if(34!==(a=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,e=r=t.position;0!==(a=t.input.charCodeAt(t.position));){if(34===a)return Bt(t,e,t.position,!0),t.position++,!0;if(92===a){if(Bt(t,e,t.position,!0),a=t.input.charCodeAt(++t.position),_t(a))zt(t,!1,n);else if(a<256&&iu[a])t.result+=ou[a],t.position++;else if((u=It(a))>0){for(i=u,o=0;i>0;i--)a=t.input.charCodeAt(++t.position),(u=jt(a))>=0?o=(o<<4)+u:Lt(t,"expected hexadecimal character");t.result+=Mt(o),t.position++}else Lt(t,"unknown escape sequence");e=r=t.position}else _t(a)?(Bt(t,e,r,!0),Kt(t,zt(t,!1,n)),e=r=t.position):t.position===t.lineStart&&$t(t)?Lt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}Lt(t,"unexpected end of the stream within a double quoted scalar")}function Ht(t,n){var e,r,i,o,u,a,c,s,l,f,p,h=!0,d=t.tag,g=t.anchor,y={};if(91===(p=t.input.charCodeAt(t.position)))o=93,c=!1,r=[];else{if(123!==p)return!1;o=125,c=!0,r={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=r),p=t.input.charCodeAt(++t.position);0!==p;){if(zt(t,!0,n),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=d,t.anchor=g,t.kind=c?"mapping":"sequence",t.result=r,!0;h||Lt(t,"missed comma between flow collection entries"),l=s=f=null,u=a=!1,63===p&&(i=t.input.charCodeAt(t.position+1),St(i)&&(u=a=!0,t.position++,zt(t,!0,n))),e=t.line,en(t,n,Wo,!1,!0),l=t.tag,s=t.result,zt(t,!0,n),p=t.input.charCodeAt(t.position),!a&&t.line!==e||58!==p||(u=!0,p=t.input.charCodeAt(++t.position),zt(t,!0,n),en(t,n,Wo,!1,!0),f=t.result),c?Yt(t,r,y,l,s,f):u?r.push(Yt(t,null,y,l,s,f)):r.push(s),zt(t,!0,n),p=t.input.charCodeAt(t.position),44===p?(h=!0,p=t.input.charCodeAt(++t.position)):h=!1}Lt(t,"unexpected end of the stream within a flow collection")}function Jt(t,n){var e,r,i,o,u=Jo,a=!1,c=!1,s=n,l=0,f=!1;if(124===(o=t.input.charCodeAt(t.position)))r=!1;else{if(62!==o)return!1;r=!0}for(t.kind="scalar",t.result="";0!==o;)if(43===(o=t.input.charCodeAt(++t.position))||45===o)Jo===u?u=43===o?Qo:Zo:Lt(t,"repeat of a chomping mode identifier");else{if(!((i=Rt(o))>=0))break;0===i?Lt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Lt(t,"repeat of an indentation width identifier"):(s=n+i-1,c=!0)}if(Ot(o)){do{o=t.input.charCodeAt(++t.position)}while(Ot(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!_t(o)&&0!==o)}for(;0!==o;){for(qt(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!c||t.lineIndents&&(s=t.lineIndent),_t(o))l++;else{if(t.lineIndentn)&&0!==i)Lt(t,"bad indentation of a sequence entry");else if(t.lineIndentn)&&(en(t,n,Ho,!0,i)&&(g?h=t.result:d=t.result),g||(Yt(t,l,f,p,h,d,o,u),p=h=d=null),zt(t,!0,-1),a=t.input.charCodeAt(t.position)),t.lineIndent>n&&0!==a)Lt(t,"bad indentation of a mapping entry");else if(t.lineIndentn?h=1:t.lineIndent===n?h=0:t.lineIndentn?h=1:t.lineIndent===n?h=0:t.lineIndent tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result)?(t.result=l.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Lt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):Lt(t,"unknown tag !<"+t.tag+">");return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function rn(t){var n,e,r,i,o=t.position,u=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(i=t.input.charCodeAt(t.position))&&(zt(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(u=!0,i=t.input.charCodeAt(++t.position),n=t.position;0!==i&&!St(i);)i=t.input.charCodeAt(++t.position);for(e=t.input.slice(n,t.position),r=[],e.length<1&&Lt(t,"directive name must not be less than one character in length");0!==i;){for(;Ot(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!_t(i));break}if(_t(i))break;for(n=t.position;0!==i&&!St(i);)i=t.input.charCodeAt(++t.position);r.push(t.input.slice(n,t.position))}0!==i&&qt(t),Ko.call(au,e)?au[e](t,e,r):Ut(t,'unknown document directive "'+e+'"')}if(zt(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,zt(t,!0,-1)):u&&Lt(t,"directives end mark is expected"),en(t,t.lineIndent-1,Ho,!1,!0),zt(t,!0,-1),t.checkLineBreaks&&tu.test(t.input.slice(o,t.position))&&Ut(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&$t(t))return void(46===t.input.charCodeAt(t.position)&&(t.position+=3,zt(t,!0,-1)));t.positionr&&" "!==t[l+1],l=o);else if(!vn(u))return Vu;f=f&&mn(u)}c=c||s&&o-l-1>r&&" "!==t[l+1]}return a||c?" "===t[0]&&e>9?Vu:c?Wu:Ku:f&&!i(t)?zu:$u}function An(t,n,e,r){t.dump=function(){function i(n){return gn(t,n)}if(0===n.length)return"''";if(!t.noCompatMode&&-1!==qu.indexOf(n))return"'"+n+"'";var o=t.indent*Math.max(1,e),u=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),a=r||t.flowLevel>-1&&e>=t.flowLevel;switch(bn(n,a,t.indent,u,i)){case zu:return n;case $u:return"'"+n.replace(/'/g,"''")+"'";case Ku:return"|"+xn(n,t.indent)+En(hn(n,o));case Wu:return">"+xn(n,t.indent)+En(hn(kn(n,u),o));case Vu:return'"'+_n(n)+'"';default:throw new du("impossible error: invalid scalar style")}}()}function xn(t,n){var e=" "===t[0]?String(n):"",r="\n"===t[t.length-1];return e+(!r||"\n"!==t[t.length-2]&&"\n"!==t?r?"":"-":"+")+"\n"}function En(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function kn(t,n){for(var e,r,i=/(\n+)([^\n]*)/g,o=function(){var e=t.indexOf("\n");return e=-1!==e?e:t.length,i.lastIndex=e,Cn(t.slice(0,e),n)}(),u="\n"===t[0]||" "===t[0];r=i.exec(t);){var a=r[1],c=r[2];e=" "===c[0],o+=a+(u||e||""===c?"":"\n")+Cn(c,n),u=e}return o}function Cn(t,n){if(""===t||" "===t[0])return t;for(var e,r,i=/ [^ ]/g,o=0,u=0,a=0,c="";e=i.exec(t);)a=e.index,a-o>n&&(r=u>o?u:a,c+="\n"+t.slice(o,r),o=r+1),u=a;return c+="\n",t.length-o>n&&u>o?c+=t.slice(o,u)+"\n"+t.slice(u+1):c+=t.slice(o),c.slice(1)}function _n(t){for(var n,e,r,i="",o=0;o=55296&&n<=56319&&(e=t.charCodeAt(o+1))>=56320&&e<=57343?(i+=fn(1024*(n-55296)+e-56320+65536),o++):(r=Yu[n],i+=!r&&vn(n)?t[o]:r||fn(n));return i}function On(t,n,e){var r,i,o="",u=t.tag;for(r=0,i=e.length;r1024&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Rn(t,n,u,!1,!1)&&(a+=t.dump,c+=a));t.tag=s,t.dump="{"+c+"}"}function jn(t,n,e,r){var i,o,u,a,c,s,l="",f=t.tag,p=Object.keys(e);if(!0===t.sortKeys)p.sort();else if("function"==typeof t.sortKeys)p.sort(t.sortKeys);else if(t.sortKeys)throw new du("sortKeys must be a boolean or a function");for(i=0,o=p.length;i1024,c&&(t.dump&&bu===t.dump.charCodeAt(0)?s+="?":s+="? "),s+=t.dump,c&&(s+=dn(t,n)),Rn(t,n+1,a,!0,c)&&(t.dump&&bu===t.dump.charCodeAt(0)?s+=":":s+=": ",s+=t.dump,l+=s));t.tag=f,t.dump=l||"{}"}function In(t,n,e){var r,i,o,u,a,c;for(i=e?t.explicitTypes:t.implicitTypes,o=0,u=i.length;o tag resolver accepts not "'+c+'" style');r=a.represent[c](n,c)}t.dump=r}return!0}return!1}function Rn(t,n,e,r,i,o){t.tag=null,t.dump=e,In(t,e,!1)||In(t,e,!0);var u=vu.call(t.dump);r&&(r=t.flowLevel<0||t.flowLevel>n);var a,c,s="[object Object]"===u||"[object Array]"===u;if(s&&(a=t.duplicates.indexOf(e),c=-1!==a),(null!==t.tag&&"?"!==t.tag||c||2!==t.indent&&n>0)&&(i=!1), c&&t.usedDuplicates[a])t.dump="*ref_"+a;else{if(s&&c&&!t.usedDuplicates[a]&&(t.usedDuplicates[a]=!0),"[object Object]"===u)r&&0!==Object.keys(t.dump).length?(jn(t,n,t.dump,i),c&&(t.dump="&ref_"+a+t.dump)):(Tn(t,n,t.dump),c&&(t.dump="&ref_"+a+" "+t.dump));else if("[object Array]"===u)r&&0!==t.dump.length?(Sn(t,n,t.dump,i),c&&(t.dump="&ref_"+a+t.dump)):(On(t,n,t.dump),c&&(t.dump="&ref_"+a+" "+t.dump));else{if("[object String]"!==u){if(t.skipInvalid)return!1;throw new du("unacceptable kind of an object to dump "+u)}"?"!==t.tag&&An(t,t.dump,n,o)}null!==t.tag&&"?"!==t.tag&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function Fn(t,n){var e,r,i=[],o=[];for(Mn(t,i,o),e=0,r=o.length;e0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[a-2]?2:"="===t[a-1]?1:0,u=new _a(3*a/4-o),r=o>0?a-4:a;var c=0;for(n=0,e=0;n>16&255,u[c++]=i>>8&255,u[c++]=255&i;return 2===o?(i=Ca[t.charCodeAt(n)]<<2|Ca[t.charCodeAt(n+1)]>>4,u[c++]=255&i):1===o&&(i=Ca[t.charCodeAt(n)]<<10|Ca[t.charCodeAt(n+1)]<<4|Ca[t.charCodeAt(n+2)]>>2,u[c++]=i>>8&255,u[c++]=255&i),u}function Yn(t){return ka[t>>18&63]+ka[t>>12&63]+ka[t>>6&63]+ka[63&t]}function qn(t,n,e){for(var r,i=[],o=n;oa?a:u+16383));return 1===r?(n=t[e-1],i+=ka[n>>2],i+=ka[n<<4&63],i+="=="):2===r&&(n=(t[e-2]<<8)+t[e-1],i+=ka[n>>10],i+=ka[n>>4&63],i+=ka[n<<2&63],i+="="),o.push(i),o.join("")}function $n(t,n,e,r,i){var o,u,a=8*i-r-1,c=(1<>1,l=-7,f=e?i-1:0,p=e?-1:1,h=t[n+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=a;l>0;o=256*o+t[n+f],f+=p,l-=8);for(u=o&(1<<-l)-1,o>>=-l,l+=r;l>0;u=256*u+t[n+f],f+=p,l-=8);if(0===o)o=1-s;else{if(o===c)return u?NaN:1/0*(h?-1:1);u+=Math.pow(2,r),o-=s}return(h?-1:1)*u*Math.pow(2,o-r)}function Kn(t,n,e,r,i,o){var u,a,c,s=8*o-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,g=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(a=isNaN(n)?1:0,u=l):(u=Math.floor(Math.log(n)/Math.LN2),n*(c=Math.pow(2,-u))<1&&(u--,c*=2),n+=u+f>=1?p/c:p*Math.pow(2,1-f),n*c>=2&&(u++,c/=2),u+f>=l?(a=0,u=l):u+f>=1?(a=(n*c-1)*Math.pow(2,i),u+=f):(a=n*Math.pow(2,f-1)*Math.pow(2,i),u=0));i>=8;t[e+h]=255&a,h+=d,a/=256,i-=8);for(u=u<0;t[e+h]=255&u,h+=d,u/=256,s-=8);t[e+h-d]|=128*g}function Wn(){return Gn.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Vn(t,n){if(Wn()=Wn())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Wn().toString(16)+" bytes");return 0|t}function ie(t){return!(null==t||!t._isBuffer)}function oe(t,n){if(ie(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return Fe(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return Ne(t).length;default:if(r)return Fe(t).length;n=(""+n).toLowerCase(),r=!0}}function ue(t,n,e){var r=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if(e>>>=0,n>>>=0,e<=n)return"";for(t||(t="utf8");;)switch(t){case"hex":return Ae(this,n,e);case"utf8":case"utf-8":return ve(this,n,e);case"ascii":return we(this,n,e);case"latin1":case"binary":return be(this,n,e);case"base64":return ye(this,n,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xe(this,n,e);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function ae(t,n,e){var r=t[n];t[n]=t[e],t[e]=r}function ce(t,n,e,r,i){if(0===t.length)return-1;if("string"==typeof e?(r=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof n&&(n=Gn.from(n,r)),ie(n))return 0===n.length?-1:se(t,n,e,r,i);if("number"==typeof n)return n&=255,Gn.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,n,e):Uint8Array.prototype.lastIndexOf.call(t,n,e):se(t,[n],e,r,i);throw new TypeError("val must be string, number or Buffer")}function se(t,n,e,r,i){function o(t,n){return 1===u?t[n]:t.readUInt16BE(n*u)}var u=1,a=t.length,c=n.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||n.length<2)return-1;u=2,a/=2,c/=2,e/=2}var s;if(i){var l=-1;for(s=e;sa&&(e=a-c),s=e;s>=0;s--){for(var f=!0,p=0;pi&&(r=i):r=i;var o=n.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var u=0;u239?4:o>223?3:o>191?2:1;if(i+a<=e){var c,s,l,f;switch(a){case 1:o<128&&(u=o);break;case 2:c=t[i+1],128==(192&c)&&(f=(31&o)<<6|63&c)>127&&(u=f);break;case 3:c=t[i+1],s=t[i+2],128==(192&c)&&128==(192&s)&&(f=(15&o)<<12|(63&c)<<6|63&s)>2047&&(f<55296||f>57343)&&(u=f);break;case 4:c=t[i+1],s=t[i+2],l=t[i+3],128==(192&c)&&128==(192&s)&&128==(192&l)&&(f=(15&o)<<18|(63&c)<<12|(63&s)<<6|63&l)>65535&&f<1114112&&(u=f)}}null===u?(u=65533,a=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=a}return me(r)}function me(t){var n=t.length;if(n<=ja)return String.fromCharCode.apply(String,t);for(var e="",r=0;rr)&&(e=r);for(var i="",o=n;oe)throw new RangeError("Trying to access beyond buffer length")}function ke(t,n,e,r,i,o){if(!ie(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>i||nt.length)throw new RangeError("Index out of range")}function Ce(t,n,e,r){n<0&&(n=65535+n+1);for(var i=0,o=Math.min(t.length-e,2);i>>8*(r?i:1-i)}function _e(t,n,e,r){n<0&&(n=4294967295+n+1);for(var i=0,o=Math.min(t.length-e,4);i>>8*(r?i:3-i)&255}function Oe(t,n,e,r,i,o){if(e+r>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Se(t,n,e,r,i){return i||Oe(t,n,e,4,3.4028234663852886e38,-3.4028234663852886e38),Kn(t,n,e,r,23,4),e+4}function Te(t,n,e,r,i){return i||Oe(t,n,e,8,1.7976931348623157e308,-1.7976931348623157e308),Kn(t,n,e,r,52,8),e+8}function je(t){if(t=Ie(t).replace(Ia,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function Ie(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Re(t){return t<16?"0"+t.toString(16):t.toString(16)}function Fe(t,n){n=n||1/0;for(var e,r=t.length,i=null,o=[],u=0;u55295&&e<57344){if(!i){if(e>56319){(n-=3)>-1&&o.push(239,191,189);continue}if(u+1===r){(n-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(n-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(n-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((n-=1)<0)break;o.push(e)}else if(e<2048){if((n-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((n-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function Me(t){for(var n=[],e=0;e>8,i=e%256,o.push(i),o.push(r);return o}function Ne(t){return Dn(je(t))}function Le(t,n,e,r){for(var i=0;i=n.length||i>=t.length);++i)n[i+e]=t[i];return i}function Ue(t){return t!==t}function Be(t){return null!=t&&(!!t._isBuffer||De(t)||Ye(t))}function De(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function Ye(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&De(t.slice(0,0))}function qe(t){function n(t){ze(e,t)}var e={};return t.forEach(n),$e(e)}function ze(t,n){for(var e in n){var r=void 0!==n[e]&&null!==n[e];(void 0===t[e]||r)&&(t[e]=n[e])}return t}function $e(t){var n={},e=[];for(var r in t)n[r]=null===t[r]?"null":typeof t[r];for(var i in n){var o=Ua[n[i]];o&&e.push({name:i,type:o,size:La[o]})}return e}function Ke(t){return t.reduce(function(t,n){return t+n.size},1)}function We(){var t,n,e,r,i,o,u=arguments[0]||{},a=1,c=arguments.length,s=!1;for("boolean"==typeof u&&(s=u,u=arguments[a]||{},a++),"object"!==(void 0===u?"undefined":Qa(u))&&"function"!=typeof u&&(u={}),a===c&&(u=this,a--);a=o?c=!0:(e=t.charCodeAt(u++))===ar?s=!0:e===cr&&(s=!0,t.charCodeAt(u)===ar&&++u),t.slice(r+1,n-1).replace(/""/g,'"')}for(;u<]/g},Yr=Dr(),qr=function(t){return"string"==typeof t?t.replace(Yr,""):t},zr=Dr,$r=new RegExp(zr().source),Kr=$r.test.bind($r),Wr=Pr.argv,Vr=Wr.indexOf("--"),Gr=function(t){t="--"+t;var n=Wr.indexOf(t);return-1!==n&&(-1===Vr||n0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>n/2-1){e=" ... ",r+=5;break}for(i="",o=this.position;on/2-1){i=" ... ",o-=5;break}return u=this.buffer.slice(r,o),Si.repeat(" ",t)+e+u+i+"\n"+Si.repeat(" ",t+this.position-r+e.length)+"^"},R.prototype.toString=function(t){var n,e="";return this.name&&(e+='in "'+this.name+'" '),e+="at line "+(this.line+1)+", column "+(this.column+1),t||(n=this.getSnippet())&&(e+=":\n"+n),e};var Ti=R,ji=Oi,Ii=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Ri=["scalar","sequence","mapping"],Fi=M,Mi=_i,Pi=Oi,Ni=Fi;L.DEFAULT=null,L.create=function(){var t,n;switch(arguments.length){case 1:t=L.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new Pi("Wrong number of arguments for Schema.create function")}if(t=Mi.toArray(t),n=Mi.toArray(n),!t.every(function(t){return t instanceof L}))throw new Pi("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!n.every(function(t){return t instanceof Ni}))throw new Pi("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new L({include:t,explicit:n})};var Li,Ui=L,Bi=Fi,Di=new Bi("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}}),Yi=Fi,qi=new Yi("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}}),zi=Fi,$i=new zi("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}}),Ki=Ui,Wi=new Ki({explicit:[Di,qi,$i]}),Vi=Fi,Gi=new Vi("tag:yaml.org,2002:null",{kind:"scalar",resolve:U,construct:B,predicate:D,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"}),Hi=Fi,Ji=new Hi("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Y,construct:q,predicate:z,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"}),Zi=_i,Qi=Fi,Xi=new Qi("tag:yaml.org,2002:int",{kind:"scalar",resolve:V,construct:G,predicate:H,represent:{binary:function(t){return"0b"+t.toString(2)},octal:function(t){return"0"+t.toString(8)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return"0x"+t.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),to=_i,no=Fi,eo=new RegExp("^(?:[-+]?(?:0|[1-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))$"),ro=/^[-+]?[0-9]+e/,io=new no("tag:yaml.org,2002:float",{kind:"scalar",resolve:J,construct:Z,predicate:X,represent:Q,defaultStyle:"lowercase"}),oo=Ui,uo=new oo({include:[Wi],implicit:[Gi,Ji,Xi,io]}),ao=Ui,co=new ao({include:[uo]}),so=Fi,lo=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),fo=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),po=new so("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:tt,construct:nt,instanceOf:Date,represent:et}),ho=Fi,go=new ho("tag:yaml.org,2002:merge",{kind:"scalar",resolve:rt});try{Li=w("buffer").Buffer}catch(t){}var yo,vo=Fi,mo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",wo=new vo("tag:yaml.org,2002:binary",{kind:"scalar",resolve:it,construct:ot,predicate:at,represent:ut}),bo=Fi,Ao=Object.prototype.hasOwnProperty,xo=Object.prototype.toString,Eo=new bo("tag:yaml.org,2002:omap",{kind:"sequence",resolve:ct,construct:st}),ko=Fi,Co=Object.prototype.toString,_o=new ko("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:lt,construct:ft}),Oo=Fi,So=Object.prototype.hasOwnProperty,To=new Oo("tag:yaml.org,2002:set",{kind:"mapping",resolve:pt,construct:ht}),jo=Ui,Io=new jo({include:[co],implicit:[po,go],explicit:[wo,Eo,_o,To]}),Ro=Fi,Fo=new Ro("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:dt,construct:gt,predicate:vt,represent:yt}),Mo=Fi,Po=new Mo("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:mt,construct:wt,predicate:At,represent:bt});try{yo=w("esprima")}catch(t){"undefined"!=typeof window&&(yo=window.esprima)}for(var No=Fi,Lo=new No("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:xt,construct:Et,predicate:Ct,represent:kt}),Uo=Ui,Bo=Uo.DEFAULT=new Uo({include:[Io],explicit:[Fo,Po,Lo]}),Do=_i,Yo=Oi,qo=Ti,zo=Io,$o=Bo,Ko=Object.prototype.hasOwnProperty,Wo=1,Vo=2,Go=3,Ho=4,Jo=1,Zo=2,Qo=3,Xo=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tu=/[\x85\u2028\u2029]/,nu=/[,\[\]\{\}]/,eu=/^(?:!|!!|![a-z\-]+!)$/i,ru=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,iu=new Array(256),ou=new Array(256),uu=0;uu<256;uu++)iu[uu]=Ft(uu)?1:0,ou[uu]=Ft(uu);var au={YAML:function(t,n,e){var r,i,o;null!==t.version&&Lt(t,"duplication of %YAML directive"),1!==e.length&&Lt(t,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(e[0]),null===r&&Lt(t,"ill-formed argument of the YAML directive"),i=parseInt(r[1],10),o=parseInt(r[2],10),1!==i&&Lt(t,"unacceptable YAML version of the document"),t.version=e[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&Ut(t,"unsupported YAML version of the document")},TAG:function(t,n,e){var r,i;2!==e.length&&Lt(t,"TAG directive accepts exactly two arguments"),r=e[0],i=e[1],eu.test(r)||Lt(t,"ill-formed tag handle (first argument) of the TAG directive"),Ko.call(t.tagMap,r)&&Lt(t,'there is a previously declared suffix for "'+r+'" tag handle'),ru.test(i)||Lt(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[r]=i}},cu=un,su=an,lu=cn,fu=sn,pu={loadAll:cu,load:su,safeLoadAll:lu,safeLoad:fu},hu=_i,du=Oi,gu=Bo,yu=Io,vu=Object.prototype.toString,mu=Object.prototype.hasOwnProperty,wu=9,bu=10,Au=32,xu=33,Eu=34,ku=35,Cu=37,_u=38,Ou=39,Su=42,Tu=44,ju=45,Iu=58,Ru=62,Fu=63,Mu=64,Pu=91,Nu=93,Lu=96,Uu=123,Bu=124,Du=125,Yu={};Yu[0]="\\0",Yu[7]="\\a",Yu[8]="\\b",Yu[9]="\\t",Yu[10]="\\n",Yu[11]="\\v",Yu[12]="\\f",Yu[13]="\\r",Yu[27]="\\e",Yu[34]='\\"',Yu[92]="\\\\",Yu[133]="\\N",Yu[160]="\\_",Yu[8232]="\\L",Yu[8233]="\\P";var qu=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],zu=1,$u=2,Ku=3,Wu=4,Vu=5,Gu=Pn,Hu=Nn,Ju={dump:Gu,safeDump:Hu},Zu=pu,Qu=Ju,Xu=Fi,ta=Ui,na=Wi,ea=uo,ra=co,ia=Io,oa=Bo,ua=Zu.load,aa=Zu.loadAll,ca=Zu.safeLoad,sa=Zu.safeLoadAll,la=Qu.dump,fa=Qu.safeDump,pa=Oi,ha=Wi,da=Io,ga=Bo,ya=Ln("scan"),va=Ln("parse"),ma=Ln("compose"),wa=Ln("addConstructor"),ba={Type:Xu,Schema:ta,FAILSAFE_SCHEMA:na,JSON_SCHEMA:ea,CORE_SCHEMA:ra,DEFAULT_SAFE_SCHEMA:ia,DEFAULT_FULL_SCHEMA:oa,load:ua,loadAll:aa,safeLoad:ca,safeLoadAll:sa,dump:la,safeDump:fa,YAMLException:pa,MINIMAL_SCHEMA:ha,SAFE_SCHEMA:da,DEFAULT_SCHEMA:ga,scan:ya,parse:va,compose:ma,addConstructor:wa},Aa=ba,xa=Aa,Ea=function(t,n){n=n||{};var e=n.writeMethod||"safeDump";return xa[e](t,Un(n,["writeMethod"]))},ka=[],Ca=[],_a="undefined"!=typeof Uint8Array?Uint8Array:Array,Oa=!1,Sa={}.toString,Ta=Array.isArray||function(t){return"[object Array]"==Sa.call(t)};Gn.TYPED_ARRAY_SUPPORT=void 0===hr.TYPED_ARRAY_SUPPORT||hr.TYPED_ARRAY_SUPPORT;Wn();Gn.poolSize=8192,Gn._augment=function(t){return t.__proto__=Gn.prototype,t},Gn.from=function(t,n,e){return Hn(null,t,n,e)},Gn.TYPED_ARRAY_SUPPORT&&(Gn.prototype.__proto__=Uint8Array.prototype,Gn.__proto__=Uint8Array),Gn.alloc=function(t,n,e){return Zn(null,t,n,e)},Gn.allocUnsafe=function(t){return Qn(null,t)},Gn.allocUnsafeSlow=function(t){return Qn(null,t)},Gn.isBuffer=Be,Gn.compare=function(t,n){if(!ie(t)||!ie(n))throw new TypeError("Arguments must be Buffers");if(t===n)return 0;for(var e=t.length,r=n.length,i=0,o=Math.min(e,r);i0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),""},Gn.prototype.compare=function(t,n,e,r,i){if(!ie(t))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===e&&(e=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),n<0||e>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&n>=e)return 0;if(r>=i)return-1;if(n>=e)return 1;if(n>>>=0,e>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,u=e-n,a=Math.min(o,u),c=this.slice(r,i),s=t.slice(n,e),l=0;li)&&(e=i),t.length>0&&(e<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return le(this,t,n,e);case"utf8":case"utf-8":return fe(this,t,n,e);case"ascii":return pe(this,t,n,e);case"latin1":case"binary":return he(this,t,n,e);case"base64":return de(this,t,n,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,t,n,e);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},Gn.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ja=4096;Gn.prototype.slice=function(t,n){var e=this.length;t=~~t,n=void 0===n?e:~~n,t<0?(t+=e)<0&&(t=0):t>e&&(t=e),n<0?(n+=e)<0&&(n=0):n>e&&(n=e),n0&&(i*=256);)r+=this[t+--n]*i;return r},Gn.prototype.readUInt8=function(t,n){return n||Ee(t,1,this.length),this[t]}, Gn.prototype.readUInt16LE=function(t,n){return n||Ee(t,2,this.length),this[t]|this[t+1]<<8},Gn.prototype.readUInt16BE=function(t,n){return n||Ee(t,2,this.length),this[t]<<8|this[t+1]},Gn.prototype.readUInt32LE=function(t,n){return n||Ee(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Gn.prototype.readUInt32BE=function(t,n){return n||Ee(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Gn.prototype.readIntLE=function(t,n,e){t|=0,n|=0,e||Ee(t,n,this.length);for(var r=this[t],i=1,o=0;++o=i&&(r-=Math.pow(2,8*n)),r},Gn.prototype.readIntBE=function(t,n,e){t|=0,n|=0,e||Ee(t,n,this.length);for(var r=n,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*n)),o},Gn.prototype.readInt8=function(t,n){return n||Ee(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Gn.prototype.readInt16LE=function(t,n){n||Ee(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},Gn.prototype.readInt16BE=function(t,n){n||Ee(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},Gn.prototype.readInt32LE=function(t,n){return n||Ee(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Gn.prototype.readInt32BE=function(t,n){return n||Ee(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Gn.prototype.readFloatLE=function(t,n){return n||Ee(t,4,this.length),$n(this,t,!0,23,4)},Gn.prototype.readFloatBE=function(t,n){return n||Ee(t,4,this.length),$n(this,t,!1,23,4)},Gn.prototype.readDoubleLE=function(t,n){return n||Ee(t,8,this.length),$n(this,t,!0,52,8)},Gn.prototype.readDoubleBE=function(t,n){return n||Ee(t,8,this.length),$n(this,t,!1,52,8)},Gn.prototype.writeUIntLE=function(t,n,e,r){if(t=+t,n|=0,e|=0,!r){ke(this,t,n,e,Math.pow(2,8*e)-1,0)}var i=1,o=0;for(this[n]=255&t;++o=0&&(o*=256);)this[n+i]=t/o&255;return n+e},Gn.prototype.writeUInt8=function(t,n,e){return t=+t,n|=0,e||ke(this,t,n,1,255,0),Gn.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[n]=255&t,n+1},Gn.prototype.writeUInt16LE=function(t,n,e){return t=+t,n|=0,e||ke(this,t,n,2,65535,0),Gn.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):Ce(this,t,n,!0),n+2},Gn.prototype.writeUInt16BE=function(t,n,e){return t=+t,n|=0,e||ke(this,t,n,2,65535,0),Gn.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):Ce(this,t,n,!1),n+2},Gn.prototype.writeUInt32LE=function(t,n,e){return t=+t,n|=0,e||ke(this,t,n,4,4294967295,0),Gn.TYPED_ARRAY_SUPPORT?(this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=255&t):_e(this,t,n,!0),n+4},Gn.prototype.writeUInt32BE=function(t,n,e){return t=+t,n|=0,e||ke(this,t,n,4,4294967295,0),Gn.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):_e(this,t,n,!1),n+4},Gn.prototype.writeIntLE=function(t,n,e,r){if(t=+t,n|=0,!r){var i=Math.pow(2,8*e-1);ke(this,t,n,e,i-1,-i)}var o=0,u=1,a=0;for(this[n]=255&t;++o>0)-a&255;return n+e},Gn.prototype.writeIntBE=function(t,n,e,r){if(t=+t,n|=0,!r){var i=Math.pow(2,8*e-1);ke(this,t,n,e,i-1,-i)}var o=e-1,u=1,a=0;for(this[n+o]=255&t;--o>=0&&(u*=256);)t<0&&0===a&&0!==this[n+o+1]&&(a=1),this[n+o]=(t/u>>0)-a&255;return n+e},Gn.prototype.writeInt8=function(t,n,e){return t=+t,n|=0,e||ke(this,t,n,1,127,-128),Gn.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[n]=255&t,n+1},Gn.prototype.writeInt16LE=function(t,n,e){return t=+t,n|=0,e||ke(this,t,n,2,32767,-32768),Gn.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8):Ce(this,t,n,!0),n+2},Gn.prototype.writeInt16BE=function(t,n,e){return t=+t,n|=0,e||ke(this,t,n,2,32767,-32768),Gn.TYPED_ARRAY_SUPPORT?(this[n]=t>>>8,this[n+1]=255&t):Ce(this,t,n,!1),n+2},Gn.prototype.writeInt32LE=function(t,n,e){return t=+t,n|=0,e||ke(this,t,n,4,2147483647,-2147483648),Gn.TYPED_ARRAY_SUPPORT?(this[n]=255&t,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24):_e(this,t,n,!0),n+4},Gn.prototype.writeInt32BE=function(t,n,e){return t=+t,n|=0,e||ke(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Gn.TYPED_ARRAY_SUPPORT?(this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=255&t):_e(this,t,n,!1),n+4},Gn.prototype.writeFloatLE=function(t,n,e){return Se(this,t,n,!0,e)},Gn.prototype.writeFloatBE=function(t,n,e){return Se(this,t,n,!1,e)},Gn.prototype.writeDoubleLE=function(t,n,e){return Te(this,t,n,!0,e)},Gn.prototype.writeDoubleBE=function(t,n,e){return Te(this,t,n,!1,e)},Gn.prototype.copy=function(t,n,e,r){if(e||(e=0),r||0===r||(r=this.length),n>=t.length&&(n=t.length),n||(n=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-n=0;--i)t[i+n]=this[i+e];else if(o<1e3||!Gn.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0);var o;if("number"==typeof t)for(o=n;o=0&&o0?0:a-1;return arguments.length<3&&(i=e[u?u[c]:c],c+=t),n(e,r,i,u,c,a)}}function r(t){return function(n,e,r){e=x(e,r);for(var i=O(n),o=t>0?0:i-1;o>=0&&o0?u=o>=0?o:Math.max(o+a,u):a=o>=0?Math.min(o+1,a):o+a+1;else if(e&&o&&a)return o=e(r,i),r[o]===i?o:-1;if(i!==i)return o=n(p.call(r,u,a),b.isNaN),o>=0?o+u:-1;for(o=t>0?u:a-1;o>=0&&o=0&&n<=_};b.each=b.forEach=function(t,n,e){n=A(n,e);var r,i;if(S(t))for(r=0,i=t.length;r=0},b.invoke=function(t,n){var e=p.call(arguments,2),r=b.isFunction(n);return b.map(t,function(t){var i=r?n:t[n];return null==i?i:i.apply(t,e)})},b.pluck=function(t,n){return b.map(t,b.property(n))},b.where=function(t,n){return b.filter(t,b.matcher(n))},b.findWhere=function(t,n){return b.find(t,b.matcher(n))},b.max=function(t,n,e){var r,i,o=-1/0,u=-1/0;if(null==n&&null!=t){t=S(t)?t:b.values(t);for(var a=0,c=t.length;ao&&(o=r)}else n=x(n,e),b.each(t,function(t,e,r){((i=n(t,e,r))>u||i===-1/0&&o===-1/0)&&(o=t,u=i)});return o},b.min=function(t,n,e){var r,i,o=1/0,u=1/0;if(null==n&&null!=t){t=S(t)?t:b.values(t);for(var a=0,c=t.length;ar||void 0===e)return 1;if(en?(u&&(clearTimeout(u),u=null),a=s,o=t.apply(r,i),u||(r=i=null)):u||!1===e.trailing||(u=setTimeout(c,l)),o}},b.debounce=function(t,n,e){var r,i,o,u,a,c=function(){var s=b.now()-u;s=0?r=setTimeout(c,n-s):(r=null,e||(a=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,u=b.now();var s=e&&!r;return r||(r=setTimeout(c,n)),s&&(a=t.apply(o,i),o=i=null),a}},b.wrap=function(t,n){return b.partial(n,t)},b.negate=function(t){return function(){return!t.apply(this,arguments)}},b.compose=function(){var t=arguments,n=t.length-1;return function(){for(var e=n,r=t[n].apply(this,arguments);e--;)r=t[e].call(this,r);return r}},b.after=function(t,n){return function(){if(--t<1)return n.apply(this,arguments)}},b.before=function(t,n){var e;return function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=null),e}},b.once=b.partial(b.before,2);var R=!{toString:null}.propertyIsEnumerable("toString"),F=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];b.keys=function(t){if(!b.isObject(t))return[];if(y)return y(t);var n=[];for(var e in t)b.has(t,e)&&n.push(e);return R&&o(t,n),n},b.allKeys=function(t){if(!b.isObject(t))return[];var n=[];for(var e in t)n.push(e);return R&&o(t,n),n},b.values=function(t){for(var n=b.keys(t),e=n.length,r=Array(e),i=0;i":">",'"':""","'":"'","`":"`"},N=b.invert(P),L=function(t){var n=function(n){return t[n]},e="(?:"+b.keys(t).join("|")+")",r=RegExp(e),i=RegExp(e,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,n):t}};b.escape=L(P),b.unescape=L(N),b.result=function(t,n,e){var r=null==t?void 0:t[n];return void 0===r&&(r=e),b.isFunction(r)?r.call(t):r};var U=0;b.uniqueId=function(t){var n=++U+"";return t?t+n:n},b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/(.)^/,D={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Y=/\\|'|\r|\n|\u2028|\u2029/g,q=function(t){return"\\"+D[t]};b.template=function(t,n,e){!n&&e&&(n=e),n=b.defaults({},n,b.templateSettings);var r=RegExp([(n.escape||B).source,(n.interpolate||B).source,(n.evaluate||B).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(n,e,r,u,a){return o+=t.slice(i,a).replace(Y,q),i=a+n.length,e?o+="'+\n((__t=("+e+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":u&&(o+="';\n"+u+"\n__p+='"),n}),o+="';\n",n.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var u=new Function(n.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return u.call(this,t,b)};return a.source="function("+(n.variable||"obj")+"){\n"+o+"}",a},b.chain=function(t){var n=b(t);return n._chain=!0,n};var z=function(t,n){return t._chain?b(n).chain():n};b.mixin=function(t){b.each(b.functions(t),function(n){var e=b[n]=t[n];b.prototype[n]=function(){var t=[this._wrapped];return f.apply(t,arguments),z(this,e.apply(b,t))}})},b.mixin(b),b.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var n=c[t];b.prototype[t]=function(){var e=this._wrapped;return n.apply(e,arguments),"shift"!==t&&"splice"!==t||0!==e.length||delete e[0],z(this,e)}}),b.each(["concat","join","slice"],function(t){var n=c[t];b.prototype[t]=function(){return z(this,n.apply(this._wrapped,arguments))}}),b.prototype.value=function(){return this._wrapped},b.prototype.valueOf=b.prototype.toJSON=b.prototype.value,b.prototype.toString=function(){return""+this._wrapped}}).call(Ur)}),ec=function(t){return t},rc=function(t,n){return n=n||{},(n.map?"["===t.trim().charAt(0)?nc.map:nc.mapObject:ec)((0,JSON.parse)(t,n.reviver,n.filename),n.map)},ic=function(t,n){return n=n||{},sr("|").parse(t,n.map)},oc=function(t,n){return n=n||{},yi(t,n.map)},uc=function(t,n){return n&&"function"==typeof n.map?n.map(t):t},ac=function(t,n){n=n||{};var e=n.map||ec,r=n.loadMethod||"safeLoad";return e(xa[r](t,Un(n,["map","loadMethod"]))||{},e)},cc=b(function(t,n){(function(){function e(t,n){function e(n){y&&y.flags.indexOf("+")>-1&&n.match(/[^\n\r\s]/)?y.array.push({type:"text",value:n.replace(/(^\s*)|(\s*$)/g,"")}):w+=t.substring(0,n.length)}function r(t){if(y&&y.array){if(y.arrayType=y.arrayType||"complex","simple"===y.arrayType)return;null!==y.arrayFirstKey&&y.arrayFirstKey!==t||y.array.push(d={}),y.flags.indexOf("+")>-1?d.type=t:y.arrayFirstKey=y.arrayFirstKey||t}}function i(t,e){return n.comments&&(t=t.replace(/(?:^\\)?\[[^\[\]\n\r]*\](?!\])/gm,""),t=t.replace(/\[\[([^\[\]\n\r]*)\]\]/g,"[$1]")),"append"==e&&(t=t.replace(new RegExp("^(\\s*)\\\\","gm"),"$1")),t}function o(){var t=w+"";return w="",m=null,t}function u(t,n){n=n||{};var e=m,r=o();if(n.replace?(r=i(r,"replace").replace(new RegExp("^\\s*"),""),w=new RegExp("\\s*$").exec(r)[0],m=e):r=i(r,"append"),"object"==typeof t)n.replace&&(t[t.length-1]=""),t[t.length-1]+=r.replace(new RegExp("\\s*$"),"");else{var u=t.split(".");v=d;for(var a=0;a-1?(r(e),u=!0,y&&(a=d)):(d=h,g=[]),y&&y.flags.indexOf("+")>-1)var c=e;else{for(var s=e.split("."),l=0;l-1&&n.indexOf(".")>-1&&("["===t?c="value":"{"===t&&(d=d.value={}));var f={array:null,arrayType:null,arrayFirstKey:null,flags:n,scope:d};"["==t?(f.array=a[c]=[],n.indexOf("+")>-1&&(f.arrayType="freeform"),u?g.push(f):g=[f],y=g[g.length-1]):"{"==t&&(u?g.push(f):(d=a[c]="object"==typeof a[c]?a[c]:{},g=[f]),y=g[g.length-1])}}(A[1],A[2],A[3])):c.exec(t)?(A=c.exec(t),e(A[0])):(e(t),t=""):(A=s.exec(t),function(t,n){o(),r(t),y&&y.flags.indexOf("+")>-1&&(t="value"),m=t,w=n,u(t,{replace:!0})}(A[1],A[2]||"")),A&&(t=t.substring(A[0].length))}return o(),h}var r={load:e};t.exports&&(n=t.exports=r),n.archieml=r}).call(Ur)}),sc=function(t,n){return n=n||{},(n.map||ec)(cc.load(t,Un(n,["map"])))},lc={csv:tc,json:rc,psv:ic,tsv:oc,txt:uc,yaml:ac,aml:sc};Ja.forEach(function(t){t.equivalents.forEach(function(n){lc[n]=lc[t.name]})}),t.formatters=Za,t.deepExtend=Ve,t.discernFileFormatter=Ze,t.discernFormat=Je,t.discernParser=Qe,t.extend=We,t.extMatchesStr=Xe,t.getParser=tr,t.matches=rr,t.matchesRegExp=nr,t.parsers=lc,Object.defineProperty(t,"__esModule",{value:!0})}); \ No newline at end of file diff --git a/dist/indian-ocean.node.js b/dist/indian-ocean.node.js index 39725ef..a1c6748 100644 --- a/dist/indian-ocean.node.js +++ b/dist/indian-ocean.node.js @@ -6594,11 +6594,6 @@ index$1.hasColor = hasColor; index$1.stripColor = stripColor; index$1.supportsColor = supportsColor_1; -/* istanbul ignore next */ -var warn = function (msg) { - console.log(index$1.gray('[indian-ocean]') + ' ' + index$1.yellow('Warning:', msg)); -}; - /* istanbul ignore next */ var notListError = function (format) { throw new Error(index$1.red('[indian-ocean] You passed in an object but converting to ' + index$1.bold(format) + ' requires a list of objects.') + index$1.cyan('\nIf you would like to write a one-row csv, put your object in a list like so: `' + index$1.bold('[data]') + '`\n')); @@ -7058,7 +7053,7 @@ mkdirP.sync = function sync(p, opts, made) { /* istanbul ignore next */ /** - * Asynchronously create directories along a given file path. Delegates to [mkdirp](http://npmjs.org/package/mkdirp) module + * Asynchronously create directories along a given file path. Delegates to [mkdirp](http://npmjs.org/package/mkdirp) module. If the last element in your file path is also a folder, it must end in `/` or else it will be interpreted as a file and not created. * * @function makeDirectories * @param {String} outPath The path to a file @@ -7069,6 +7064,11 @@ mkdirP.sync = function sync(p, opts, made) { * console.log(err) // null * }) * + * // Must end in `/` for the last item to be interpreted as a folder as well. + * io.makeDirectories('path/to/create/to/another-folder/', function (err) { + * console.log(err) // null + * }) + * */ function makeDirectories(outPath, cb) { index$15(dirname(outPath), function (err) { @@ -7076,6 +7076,26 @@ function makeDirectories(outPath, cb) { }); } +/* istanbul ignore next */ +var warn = function (msg) { + console.log(index$1.gray('[indian-ocean]') + ' ' + index$1.yellow('Warning:', msg)); +}; + +function warnIfEmpty(data, outPath, verbose) { + if (verbose !== false) { + if (!data || underscore.isEmpty(data)) { + var msg = 'You didn\'t pass any data to write for file: `' + outPath + '`. Writing out an empty '; + if (!data) { + msg += 'file'; + } else if (underscore.isEmpty(data)) { + msg += Array.isArray(data) === true ? 'array' : 'object'; + } + msg += '...'; + warn(msg); + } + } +} + /* istanbul ignore next */ /* istanbul ignore next */ /** @@ -7096,6 +7116,7 @@ function makeDirectories(outPath, cb) { * @param {Object} [options] Optional options object, see below * @param {Boolean} [options.makeDirectories=false] If `true`, create intermediate directories to your data file. Can also be `makeDirs` for short. * @param {Function|Array} [options.replacer] Used for JSON formats. Function to filter your objects before writing or an array of whitelisted keys to keep. Examples below. See JSON.stringify docs for more info https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify + * @param {Boolean} [options.verbose=true] Verbose logging output, mostly just warns if you write an empty file. Set to `false` if don't want any output. * @param {Number} [options.indent] Used for JSON and YAML formats. Specifies indent level. Default for YAML is `2`, `0` for JSON. * @param {String} [options.writeMethod='safeDump'] Used for YAML formats. Can also be `"dump"` to allow writing of RegExes and functions. The `options` object will also pass anything onto `js-yaml`. See its docs for other options. Example shown below with `sortKeys`. https://github.com/nodeca/js-yaml#safedump-object---options- * @param {Array} [options.columns] Used for tabular formats. Optionally specify a list of column names to use. Otherwise they are detected from the data. See `d3-dsv` for more detail: https://github.com/d3/d3-dsv/blob/master/README.md#dsv_format @@ -7143,9 +7164,7 @@ function writeData(outPath, data, opts_, cb) { cb = opts_; opts_ = undefined; } - if (underscore.isEmpty(data)) { - warn('You didn\'t pass any data to write for file: `' + outPath + '`. Writing out an empty file...'); - } + warnIfEmpty(data, outPath, opts_.verbose); if ((typeof opts_ === 'undefined' ? 'undefined' : _typeof(opts_)) === 'object' && (opts_.makeDirectories === true || opts_.makeDirs === true)) { makeDirectories(outPath, proceed); @@ -7496,13 +7515,17 @@ function extMatchesStr(filePath, extension) { /* istanbul ignore next */ /** - * Synchronous version of {link #makeDirectories}. Delegates to [mkdirp](http://npmjs.org/package/mkdirp) module + * Synchronous version of {@link makeDirectories}. Delegates to [mkdirp](http://npmjs.org/package/mkdirp) module. * * @function makeDirectoriesSync * @param {String} outPath The path to a file * * @example - * io.makeDirectories('path/to/create/to/data.tsv') + * io.makeDirectoriesSync('path/to/create/to/data.tsv') + * + * @example + * // Must end in `/` for the last item to be interpreted as a folder as well. + * io.makeDirectoriesSync('path/to/create/to/another-folder/') * */ function makeDirectoriesSync(outPath) { @@ -8562,6 +8585,7 @@ function appendData(outPath, data, opts_, cb) { * @param {Object} [options] Optional options object, see below * @param {Boolean} [options.makeDirectories=false] If `true`, create intermediate directories to your data file. Can also be `makeDirs` for short. * @param {Function|Array} [options.replacer] Used for JSON formats. Function to filter your objects before writing or an array of whitelisted keys to keep. Examples below. See JSON.stringify docs for more info https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify + * @param {Boolean} [options.verbose=true] Verbose logging output, mostly just warns if you write an empty file. Set to `false` if don't want any output. * @param {Number} [options.indent] Used for JSON and YAML formats. Specifies indent level. Default for YAML is `2`, `0` for JSON. * @param {String} [options.writeMethod='safeDump'] Used for YAML formats. Can also be `"dump"` to allow writing of RegExes and functions. The `options` object will also pass anything onto `js-yaml`. See its docs for other options. Example shown below with `sortKeys`. https://github.com/nodeca/js-yaml#safedump-object---options- * @param {Array} [options.columns] Used for tabular formats. Optionally specify a list of column names to use. Otherwise they are detected from the data. See `d3-dsv` for more detail: https://github.com/d3/d3-dsv/blob/master/README.md#dsv_format @@ -8593,9 +8617,7 @@ function appendData(outPath, data, opts_, cb) { * }) */ function writeDataSync(outPath, data, opts_) { - if (underscore.isEmpty(data)) { - warn('You didn\'t pass any data to write for file: `' + outPath + '`. Writing out an empty file...'); - } + warnIfEmpty(data, outPath, opts_.verbose); var writeOptions; if ((typeof opts_ === 'undefined' ? 'undefined' : _typeof(opts_)) === 'object') { if (opts_.makeDirectories === true || opts_.makeDirs === true) { diff --git a/dist/indian-ocean.node.js.map b/dist/indian-ocean.node.js.map index 21bf29d..8990d93 100644 --- a/dist/indian-ocean.node.js.map +++ b/dist/indian-ocean.node.js.map @@ -1 +1 @@ -{"version":3,"file":"indian-ocean.node.js","sources":["../node_modules/underscore/underscore.js","../node_modules/d3-dsv/src/dsv.js","../src/utils/path.js","../src/helpers/discernFormat.js","../node_modules/d3-dsv/src/csv.js","../src/parsers/csv.js","../src/utils/identity.js","../src/parsers/json.js","../src/parsers/psv.js","../node_modules/d3-dsv/src/tsv.js","../src/parsers/tsv.js","../src/parsers/txt.js","../node_modules/js-yaml/lib/js-yaml/common.js","../node_modules/js-yaml/lib/js-yaml/exception.js","../node_modules/js-yaml/lib/js-yaml/mark.js","../node_modules/js-yaml/lib/js-yaml/type.js","../node_modules/js-yaml/lib/js-yaml/schema.js","../node_modules/js-yaml/lib/js-yaml/type/str.js","../node_modules/js-yaml/lib/js-yaml/type/seq.js","../node_modules/js-yaml/lib/js-yaml/type/map.js","../node_modules/js-yaml/lib/js-yaml/schema/failsafe.js","../node_modules/js-yaml/lib/js-yaml/type/null.js","../node_modules/js-yaml/lib/js-yaml/type/bool.js","../node_modules/js-yaml/lib/js-yaml/type/int.js","../node_modules/js-yaml/lib/js-yaml/type/float.js","../node_modules/js-yaml/lib/js-yaml/schema/json.js","../node_modules/js-yaml/lib/js-yaml/schema/core.js","../node_modules/js-yaml/lib/js-yaml/type/timestamp.js","../node_modules/js-yaml/lib/js-yaml/type/merge.js","../node_modules/js-yaml/lib/js-yaml/type/binary.js","../node_modules/js-yaml/lib/js-yaml/type/omap.js","../node_modules/js-yaml/lib/js-yaml/type/pairs.js","../node_modules/js-yaml/lib/js-yaml/type/set.js","../node_modules/js-yaml/lib/js-yaml/schema/default_safe.js","../node_modules/js-yaml/lib/js-yaml/type/js/undefined.js","../node_modules/js-yaml/lib/js-yaml/type/js/regexp.js","../node_modules/js-yaml/lib/js-yaml/type/js/function.js","../node_modules/js-yaml/lib/js-yaml/schema/default_full.js","../node_modules/js-yaml/lib/js-yaml/loader.js","../node_modules/js-yaml/lib/js-yaml/dumper.js","../node_modules/js-yaml/lib/js-yaml.js","../node_modules/js-yaml/index.js","../src/utils/omit.js","../src/parsers/yaml.js","../node_modules/archieml/archieml.js","../src/parsers/aml.js","../src/config/equivalentFormats.js","../src/parsers/index.js","../src/helpers/discernParser.js","../src/helpers/getParser.js","../src/loaders/file.js","../src/loaders/fileSync.js","../src/loaders/dbf.js","../src/loaders/index.js","../src/helpers/discernLoader.js","../src/readers/readData.js","../node_modules/escape-string-regexp/index.js","../node_modules/ansi-styles/index.js","../node_modules/ansi-regex/index.js","../node_modules/strip-ansi/index.js","../node_modules/has-ansi/index.js","../node_modules/supports-color/index.js","../node_modules/chalk/index.js","../src/reporters/warn.js","../src/reporters/notListError.js","../src/utils/formattingPreflight.js","../src/reporters/parseError.js","../src/formatters/csv.js","../src/formatters/json.js","../src/formatters/psv.js","../src/formatters/tsv.js","../src/formatters/txt.js","../src/formatters/yaml.js","../node_modules/dbf/src/fieldsize.js","../node_modules/dbf/src/lib.js","../node_modules/dbf/src/fields.js","../node_modules/dbf/src/structure.js","../node_modules/dbf/index.js","../src/formatters/dbf.js","../src/formatters/index.js","../src/helpers/discernFileFormatter.js","../node_modules/mkdirp/index.js","../src/helpers/makeDirectories.js","../src/writers/writeData.js","../src/converters/convertData.js","../src/directReaders/readDbf.js","../src/converters/convertDbfToData.js","../src/helpers/extend.js","../src/helpers/deepExtend.js","../src/helpers/exists.js","../src/helpers/existsSync.js","../src/helpers/extMatchesStr.js","../src/helpers/makeDirectoriesSync.js","../src/helpers/matchesRegExp.js","../src/utils/isRegExp.js","../src/helpers/matches.js","../src/readers/readDataSync.js","../node_modules/d3-queue/src/array.js","../node_modules/d3-queue/src/queue.js","../src/readers/readdir.js","../src/readers/readdirFilter.js","../src/readers/readdirFilterSync.js","../src/directReaders/readAml.js","../src/directReaders/readAmlSync.js","../src/directReaders/readCsv.js","../src/directReaders/readCsvSync.js","../src/directReaders/readJson.js","../src/directReaders/readJsonSync.js","../src/directReaders/readPsv.js","../src/directReaders/readPsvSync.js","../src/directReaders/readTsv.js","../src/directReaders/readTsvSync.js","../src/directReaders/readTxt.js","../src/directReaders/readTxtSync.js","../src/directReaders/readYaml.js","../src/directReaders/readYamlSync.js","../src/writers/appendData.js","../src/writers/writeDataSync.js","../src/writers/appendDataSync.js","../index.node.js"],"sourcesContent":["// Underscore.js 1.8.3\n// http://underscorejs.org\n// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` in the browser, or `exports` on the server.\n var root = this;\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var\n push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for the old `require()` API. If we're in\n // the browser, add `_` as a global object.\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.8.3';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n case 2: return function(value, other) {\n return func.call(context, value, other);\n };\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n // A mostly-internal function to generate callbacks that can be applied\n // to each element in a collection, returning the desired result — either\n // identity, an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value)) return _.matcher(value);\n return _.property(value);\n };\n _.iteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, undefinedOnly) {\n return function(obj) {\n var length = arguments.length;\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var property = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = property('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n function createReduce(dir) {\n // Optimized iterator function as using arguments.length\n // in the main function will deoptimize the, see #1991.\n function iterator(obj, iteratee, memo, keys, index, length) {\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n }\n\n return function(obj, iteratee, memo, context) {\n iteratee = optimizeCb(iteratee, context, 4);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n // Determine the initial value if none is provided.\n if (arguments.length < 3) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n return iterator(obj, iteratee, memo, keys, index, length);\n };\n }\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var key;\n if (isArrayLike(obj)) {\n key = _.findIndex(obj, predicate, context);\n } else {\n key = _.findKey(obj, predicate, context);\n }\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = function(obj, method) {\n var args = slice.call(arguments, 2);\n var isFunc = _.isFunction(method);\n return _.map(obj, function(value) {\n var func = isFunc ? method : value[method];\n return func == null ? func : func.apply(value, args);\n });\n };\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection, using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n _.shuffle = function(obj) {\n var set = isArrayLike(obj) ? obj : _.values(obj);\n var length = set.length;\n var shuffled = Array(length);\n for (var index = 0, rand; index < length; index++) {\n rand = _.random(0, index);\n if (rand !== index) shuffled[index] = shuffled[rand];\n shuffled[rand] = set[index];\n }\n return shuffled;\n };\n\n // Sample **n** random values from a collection.\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n return _.shuffle(obj).slice(0, Math.max(0, n));\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, index, list) {\n return {\n value: value,\n index: index,\n criteria: iteratee(value, index, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior) {\n return function(obj, iteratee, context) {\n var result = {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key]++; else result[key] = 1;\n });\n\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var pass = [], fail = [];\n _.each(obj, function(value, key, obj) {\n (predicate(value, key, obj) ? pass : fail).push(value);\n });\n return [pass, fail];\n };\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, _.identity);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, startIndex) {\n var output = [], idx = 0;\n for (var i = startIndex || 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n //flatten current level of array or arguments object\n if (!shallow) value = flatten(value, shallow, strict);\n var j = 0, len = value.length;\n output.length += len;\n while (j < len) {\n output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = function(array) {\n return _.difference(array, slice.call(arguments, 1));\n };\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = function() {\n return _.uniq(flatten(arguments, true, true));\n };\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n for (var j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = function(array) {\n var rest = flatten(arguments, true, true, 1);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = function() {\n return _.unzip(arguments);\n };\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions\n function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n }\n\n // Returns the first index on an array-like that passes a predicate test\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions\n function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n }\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n step = step || 1;\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = function(func, context) {\n if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var args = slice.call(arguments, 2);\n var bound = function() {\n return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));\n };\n return bound;\n };\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder, allowing any combination of arguments to be pre-filled.\n _.partial = function(func) {\n var boundArgs = slice.call(arguments, 1);\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n };\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = function(obj) {\n var i, length = arguments.length, key;\n if (length <= 1) throw new Error('bindAll must be passed function names');\n for (i = 1; i < length; i++) {\n key = arguments[i];\n obj[key] = _.bind(obj[key], obj);\n }\n return obj;\n };\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){\n return func.apply(null, args);\n }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n\n var later = function() {\n var last = _.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function() {\n context = this;\n args = arguments;\n timestamp = _.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n function collectNonEnumProps(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n }\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object\n // In contrast to _.map it returns an object\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {},\n currentKey;\n for (var index = 0; index < length; index++) {\n currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s)\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = function(object, oiteratee, context) {\n var result = {}, obj = object, iteratee, keys;\n if (obj == null) return result;\n if (_.isFunction(oiteratee)) {\n keys = _.allKeys(obj);\n iteratee = optimizeCb(oiteratee, context);\n } else {\n keys = flatten(arguments, false, false, 1);\n iteratee = function(value, key, obj) { return key in obj; };\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n };\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = function(obj, iteratee, context) {\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n } else {\n var keys = _.map(flatten(arguments, false, false, 1), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n };\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return _.has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), and in Safari 8 (#1929).\n if (typeof /./ != 'function' && typeof Int8Array != 'object') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n _.isNaN = function(obj) {\n return _.isNumber(obj) && obj !== +obj;\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n _.property = property;\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n return obj == null ? function(){} : function(key) {\n return obj[key];\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // If the value of the named `property` is a function then invoke it with the\n // `object` as context; otherwise, return it.\n _.result = function(object, property, fallback) {\n var value = object == null ? void 0 : object[property];\n if (value === void 0) {\n value = fallback;\n }\n return _.isFunction(value) ? value.call(object) : value;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escaper = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escaper, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offest.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n try {\n var render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var result = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return result(this, func.apply(_, args));\n };\n });\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return result(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return result(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return '' + this._wrapped;\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (typeof define === 'function' && define.amd) {\n define('underscore', [], function() {\n return _;\n });\n }\n}.call(this));\n","var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"]\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function(row, i) {\n return f(object(row), i, columns);\n };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n\n rows.forEach(function(row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n\n return columns;\n}\n\nexport default function(delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert, columns, rows = parseRows(text, function(row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns;\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // current line number\n t, // current token\n eof = N <= 0, // current token followed by EOF?\n eol = false; // current token followed by EOL?\n\n // Strip the trailing newline.\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL;\n\n // Unescape quotes.\n var i, j = I, c;\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n if ((i = I) >= N) eof = true;\n else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n }\n\n // Find next delimiter or newline.\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n }\n\n // Return last token before EOF.\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n while (t !== EOL && t !== EOF) row.push(t), t = token();\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(rows.map(function(row) {\n return columns.map(function(column) {\n return formatValue(row[column]);\n }).join(delimiter);\n })).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(text) {\n return text == null ? \"\"\n : reFormat.test(text += \"\") ? \"\\\"\" + text.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n : text;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatRows: formatRows\n };\n}\n","/* --------------------------------------------\n * Browser-implementations of NodeJS path module, adapted from Rich Harris, https://github.com/rollup/rollup/blob/master/browser/path.js\n */\n\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^/]+?|)(\\.[^./]*|))(?:[/]*)$/\n\nfunction posixSplitPath (filename) {\n const out = splitPathRe.exec(filename)\n out.shift()\n return out\n}\n\nexport function extname (filename) {\n return posixSplitPath(filename)[3]\n}\n\nexport function dirname (path) {\n const match = /(\\/|\\\\)[^/\\\\]*$/.exec(path)\n if (!match) return '.'\n\n const dir = path.slice(0, -match[0].length)\n\n // If `dir` is the empty string, we're at root.\n return dir || '/'\n}\n\nexport function joinPath () {\n var args = Array.prototype.slice.call(arguments)\n return args.join('/') // TODO, windows\n}\n","import {extname} from '../utils/path'\n\n/**\n * Given a `filePath` return the file's extension. Used internally by {@link discernParser} and {@link discernFileFormatter}. Returns `false` for files without an extension, including dotfiles\n *\n * @function discernFormat\n * @param {String} filePath Input file path\n * @returns {String} The file's extension\n *\n * @example\n * var format = io.discernFormat('path/to/data.csv')\n * console.log(format) // 'csv'\n *\n * @example\n * var format = io.discernFormat('path/to/.dotfile')\n * console.log(format) // false\n */\nexport default function discernFormat (filePath) {\n var ext = extname(filePath)\n if (ext === '') return false\n\n // Chop '.' off extension returned by extname\n var formatName = ext.slice(1)\n return formatName\n}\n","import dsv from \"./dsv\";\n\nvar csv = dsv(\",\");\n\nexport var csvParse = csv.parse;\nexport var csvParseRows = csv.parseRows;\nexport var csvFormat = csv.format;\nexport var csvFormatRows = csv.formatRows;\n","/* istanbul ignore next */\nimport {csvParse} from 'd3-dsv/src/csv'\n\nexport default function (str, parserOptions) {\n parserOptions = parserOptions || {}\n return csvParse(str, parserOptions.map)\n}\n","export default (d => d)\n","/* istanbul ignore next */\nimport _ from 'underscore'\nimport identity from '../utils/identity'\n\nexport default function (str, parserOptions) {\n parserOptions = parserOptions || {}\n // Do a naive test whether this is a string or an object\n var mapFn = parserOptions.map ? str.trim().charAt(0) === '[' ? _.map : _.mapObject : identity\n var jsonParser = JSON.parse\n return mapFn(jsonParser(str, parserOptions.reviver, parserOptions.filename), parserOptions.map)\n}\n","/* istanbul ignore next */\nimport dsvFormat from 'd3-dsv/src/dsv'\n\nexport default function (str, parserOptions) {\n parserOptions = parserOptions || {}\n return dsvFormat('|').parse(str, parserOptions.map)\n}\n","import dsv from \"./dsv\";\n\nvar tsv = dsv(\"\\t\");\n\nexport var tsvParse = tsv.parse;\nexport var tsvParseRows = tsv.parseRows;\nexport var tsvFormat = tsv.format;\nexport var tsvFormatRows = tsv.formatRows;\n","/* istanbul ignore next */\nimport {tsvParse} from 'd3-dsv/src/tsv'\n\nexport default function (str, parserOptions) {\n parserOptions = parserOptions || {}\n return tsvParse(str, parserOptions.map)\n}\n","export default function (str, parserOptions) {\n return (parserOptions && typeof parserOptions.map === 'function') ? parserOptions.map(str) : str\n}\n","'use strict';\n\n\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nmodule.exports.isNothing = isNothing;\nmodule.exports.isObject = isObject;\nmodule.exports.toArray = toArray;\nmodule.exports.repeat = repeat;\nmodule.exports.isNegativeZero = isNegativeZero;\nmodule.exports.extend = extend;\n","// YAML error class. http://stackoverflow.com/questions/8458984\n//\n'use strict';\n\nfunction YAMLException(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : '');\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException.prototype = Object.create(Error.prototype);\nYAMLException.prototype.constructor = YAMLException;\n\n\nYAMLException.prototype.toString = function toString(compact) {\n var result = this.name + ': ';\n\n result += this.reason || '(unknown reason)';\n\n if (!compact && this.mark) {\n result += ' ' + this.mark.toString();\n }\n\n return result;\n};\n\n\nmodule.exports = YAMLException;\n","'use strict';\n\n\nvar common = require('./common');\n\n\nfunction Mark(name, buffer, position, line, column) {\n this.name = name;\n this.buffer = buffer;\n this.position = position;\n this.line = line;\n this.column = column;\n}\n\n\nMark.prototype.getSnippet = function getSnippet(indent, maxLength) {\n var head, start, tail, end, snippet;\n\n if (!this.buffer) return null;\n\n indent = indent || 4;\n maxLength = maxLength || 75;\n\n head = '';\n start = this.position;\n\n while (start > 0 && '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) {\n start -= 1;\n if (this.position - start > (maxLength / 2 - 1)) {\n head = ' ... ';\n start += 5;\n break;\n }\n }\n\n tail = '';\n end = this.position;\n\n while (end < this.buffer.length && '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(end)) === -1) {\n end += 1;\n if (end - this.position > (maxLength / 2 - 1)) {\n tail = ' ... ';\n end -= 5;\n break;\n }\n }\n\n snippet = this.buffer.slice(start, end);\n\n return common.repeat(' ', indent) + head + snippet + tail + '\\n' +\n common.repeat(' ', indent + this.position - start + head.length) + '^';\n};\n\n\nMark.prototype.toString = function toString(compact) {\n var snippet, where = '';\n\n if (this.name) {\n where += 'in \"' + this.name + '\" ';\n }\n\n where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);\n\n if (!compact) {\n snippet = this.getSnippet();\n\n if (snippet) {\n where += ':\\n' + snippet;\n }\n }\n\n return where;\n};\n\n\nmodule.exports = Mark;\n","'use strict';\n\nvar YAMLException = require('./exception');\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new YAMLException('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new YAMLException('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nmodule.exports = Type;\n","'use strict';\n\n/*eslint-disable max-len*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar Type = require('./type');\n\n\nfunction compileList(schema, name, result) {\n var exclude = [];\n\n schema.include.forEach(function (includedSchema) {\n result = compileList(includedSchema, name, result);\n });\n\n schema[name].forEach(function (currentType) {\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {\n exclude.push(previousIndex);\n }\n });\n\n result.push(currentType);\n });\n\n return result.filter(function (type, index) {\n return exclude.indexOf(index) === -1;\n });\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {}\n }, index, length;\n\n function collectType(type) {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema(definition) {\n this.include = definition.include || [];\n this.implicit = definition.implicit || [];\n this.explicit = definition.explicit || [];\n\n this.implicit.forEach(function (type) {\n if (type.loadKind && type.loadKind !== 'scalar') {\n throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n });\n\n this.compiledImplicit = compileList(this, 'implicit', []);\n this.compiledExplicit = compileList(this, 'explicit', []);\n this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);\n}\n\n\nSchema.DEFAULT = null;\n\n\nSchema.create = function createSchema() {\n var schemas, types;\n\n switch (arguments.length) {\n case 1:\n schemas = Schema.DEFAULT;\n types = arguments[0];\n break;\n\n case 2:\n schemas = arguments[0];\n types = arguments[1];\n break;\n\n default:\n throw new YAMLException('Wrong number of arguments for Schema.create function');\n }\n\n schemas = common.toArray(schemas);\n types = common.toArray(types);\n\n if (!schemas.every(function (schema) { return schema instanceof Schema; })) {\n throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');\n }\n\n if (!types.every(function (type) { return type instanceof Type; })) {\n throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n return new Schema({\n include: schemas,\n explicit: types\n });\n};\n\n\nmodule.exports = Schema;\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n","// Standard YAML's Failsafe schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2802346\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n explicit: [\n require('../type/str'),\n require('../type/seq'),\n require('../type/map')\n ]\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n // base 8\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n // base 10 (except 0) or base 60\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch === ':') break;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n // if !base60 - done;\n if (ch !== ':') return true;\n\n // base60 almost not used, no needs to optimize\n return /^(:[0-5]?[0-9])+$/.test(data.slice(index));\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch, base, digits = [];\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value, 16);\n return sign * parseInt(value, 8);\n }\n\n if (value.indexOf(':') !== -1) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseInt(v, 10));\n });\n\n value = 0;\n base = 1;\n\n digits.forEach(function (d) {\n value += (d * base);\n base *= 60;\n });\n\n return sign * value;\n\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (object) { return '0b' + object.toString(2); },\n octal: function (object) { return '0' + object.toString(8); },\n decimal: function (object) { return object.toString(10); },\n hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // 20:59\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign, base, digits;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n digits = [];\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n\n } else if (value.indexOf(':') >= 0) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseFloat(v, 10));\n });\n\n value = 0.0;\n base = 1;\n\n digits.forEach(function (d) {\n value += d * base;\n base *= 60;\n });\n\n return sign * value;\n\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n","// Standard YAML's JSON schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2803231\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, this schema is not such strict as defined in the YAML specification.\n// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./failsafe')\n ],\n implicit: [\n require('../type/null'),\n require('../type/bool'),\n require('../type/int'),\n require('../type/float')\n ]\n});\n","// Standard YAML's Core schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2804923\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, Core schema has no distinctions from JSON schema is JS-YAML.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./json')\n ]\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n","'use strict';\n\n/*eslint-disable no-bitwise*/\n\nvar NodeBuffer;\n\ntry {\n // A trick for browserified version, to not include `Buffer` shim\n var _require = require;\n NodeBuffer = _require('buffer').Buffer;\n} catch (__) {}\n\nvar Type = require('../type');\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n // Wrap into Buffer for NodeJS and leave Array for browser\n if (NodeBuffer) {\n // Support node 6.+ Buffer API when available\n return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result);\n }\n\n return result;\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(object) {\n return NodeBuffer && NodeBuffer.isBuffer(object);\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n","// JS-YAML's default schema for `safeLoad` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on standard YAML's Core schema and includes most of\n// extra types described at YAML tag repository. (http://yaml.org/type/)\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./core')\n ],\n implicit: [\n require('../type/timestamp'),\n require('../type/merge')\n ],\n explicit: [\n require('../type/binary'),\n require('../type/omap'),\n require('../type/pairs'),\n require('../type/set')\n ]\n});\n","'use strict';\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptUndefined() {\n return true;\n}\n\nfunction constructJavascriptUndefined() {\n /*eslint-disable no-undefined*/\n return undefined;\n}\n\nfunction representJavascriptUndefined() {\n return '';\n}\n\nfunction isUndefined(object) {\n return typeof object === 'undefined';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/undefined', {\n kind: 'scalar',\n resolve: resolveJavascriptUndefined,\n construct: constructJavascriptUndefined,\n predicate: isUndefined,\n represent: representJavascriptUndefined\n});\n","'use strict';\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptRegExp(data) {\n if (data === null) return false;\n if (data.length === 0) return false;\n\n var regexp = data,\n tail = /\\/([gim]*)$/.exec(data),\n modifiers = '';\n\n // if regexp starts with '/' it can have modifiers and must be properly closed\n // `/foo/gim` - modifiers tail can be maximum 3 chars\n if (regexp[0] === '/') {\n if (tail) modifiers = tail[1];\n\n if (modifiers.length > 3) return false;\n // if expression starts with /, is should be properly terminated\n if (regexp[regexp.length - modifiers.length - 1] !== '/') return false;\n }\n\n return true;\n}\n\nfunction constructJavascriptRegExp(data) {\n var regexp = data,\n tail = /\\/([gim]*)$/.exec(data),\n modifiers = '';\n\n // `/foo/gim` - tail can be maximum 4 chars\n if (regexp[0] === '/') {\n if (tail) modifiers = tail[1];\n regexp = regexp.slice(1, regexp.length - modifiers.length - 1);\n }\n\n return new RegExp(regexp, modifiers);\n}\n\nfunction representJavascriptRegExp(object /*, style*/) {\n var result = '/' + object.source + '/';\n\n if (object.global) result += 'g';\n if (object.multiline) result += 'm';\n if (object.ignoreCase) result += 'i';\n\n return result;\n}\n\nfunction isRegExp(object) {\n return Object.prototype.toString.call(object) === '[object RegExp]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/regexp', {\n kind: 'scalar',\n resolve: resolveJavascriptRegExp,\n construct: constructJavascriptRegExp,\n predicate: isRegExp,\n represent: representJavascriptRegExp\n});\n","'use strict';\n\nvar esprima;\n\n// Browserified version does not have esprima\n//\n// 1. For node.js just require module as deps\n// 2. For browser try to require mudule via external AMD system.\n// If not found - try to fallback to window.esprima. If not\n// found too - then fail to parse.\n//\ntry {\n // workaround to exclude package from browserify list.\n var _require = require;\n esprima = _require('esprima');\n} catch (_) {\n /*global window */\n if (typeof window !== 'undefined') esprima = window.esprima;\n}\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptFunction(data) {\n if (data === null) return false;\n\n try {\n var source = '(' + data + ')',\n ast = esprima.parse(source, { range: true });\n\n if (ast.type !== 'Program' ||\n ast.body.length !== 1 ||\n ast.body[0].type !== 'ExpressionStatement' ||\n ast.body[0].expression.type !== 'FunctionExpression') {\n return false;\n }\n\n return true;\n } catch (err) {\n return false;\n }\n}\n\nfunction constructJavascriptFunction(data) {\n /*jslint evil:true*/\n\n var source = '(' + data + ')',\n ast = esprima.parse(source, { range: true }),\n params = [],\n body;\n\n if (ast.type !== 'Program' ||\n ast.body.length !== 1 ||\n ast.body[0].type !== 'ExpressionStatement' ||\n ast.body[0].expression.type !== 'FunctionExpression') {\n throw new Error('Failed to resolve function');\n }\n\n ast.body[0].expression.params.forEach(function (param) {\n params.push(param.name);\n });\n\n body = ast.body[0].expression.body.range;\n\n // Esprima's ranges include the first '{' and the last '}' characters on\n // function expressions. So cut them out.\n /*eslint-disable no-new-func*/\n return new Function(params, source.slice(body[0] + 1, body[1] - 1));\n}\n\nfunction representJavascriptFunction(object /*, style*/) {\n return object.toString();\n}\n\nfunction isFunction(object) {\n return Object.prototype.toString.call(object) === '[object Function]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/function', {\n kind: 'scalar',\n resolve: resolveJavascriptFunction,\n construct: constructJavascriptFunction,\n predicate: isFunction,\n represent: representJavascriptFunction\n});\n","// JS-YAML's default schema for `load` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on JS-YAML's default safe schema and includes\n// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function.\n//\n// Also this schema is used as default base schema at `Schema.create` function.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = Schema.DEFAULT = new Schema({\n include: [\n require('./default_safe')\n ],\n explicit: [\n require('../type/js/undefined'),\n require('../type/js/regexp'),\n require('../type/js/function')\n ]\n});\n","'use strict';\n\n/*eslint-disable max-len,no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar Mark = require('./mark');\nvar DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\nvar DEFAULT_FULL_SCHEMA = require('./schema/default_full');\n\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.onWarning = options['onWarning'] || null;\n this.legacy = options['legacy'] || false;\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n return new YAMLException(\n message,\n new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)));\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {\n var index, quantity;\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty.call(overridableKeys, keyNode) &&\n _hasOwnProperty.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n _result[keyNode] = valueNode;\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = {},\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _pos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = {},\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n _pos = state.position;\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else {\n break; // Reading is done. Go to the epilogue.\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if (state.lineIndent > nodeIndent && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!state.anchorMap.hasOwnProperty(alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag !== null && state.tag !== '!') {\n if (state.tag === '?') {\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only assigned to plain scalars. So, it isn't\n // needed to check for 'kind' conformity.\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = {};\n state.anchorMap = {};\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State(input, options);\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll(input, iterator, options) {\n var documents = loadDocuments(input, options), index, length;\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new YAMLException('expected a single document in the stream, but found more');\n}\n\n\nfunction safeLoadAll(input, output, options) {\n if (typeof output === 'function') {\n loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n } else {\n return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n }\n}\n\n\nfunction safeLoad(input, options) {\n return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\n\nmodule.exports.loadAll = loadAll;\nmodule.exports.load = load;\nmodule.exports.safeLoadAll = safeLoadAll;\nmodule.exports.safeLoad = safeLoad;\n","'use strict';\n\n/*eslint-disable no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar DEFAULT_FULL_SCHEMA = require('./schema/default_full');\nvar DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\nfunction State(options) {\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// Simplified test for values allowed after the first character in plain style.\nfunction isPlainSafe(c) {\n // Uses a subset of nb-char - c-flow-indicator - \":\" - \"#\"\n // where nb-char ::= c-printable - b-char - c-byte-order-mark.\n return isPrintable(c) && c !== 0xFEFF\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // - \":\" - \"#\"\n && c !== CHAR_COLON\n && c !== CHAR_SHARP;\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) {\n var i;\n var char;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(string.charCodeAt(0))\n && !isWhitespace(string.charCodeAt(string.length - 1));\n\n if (singleLineOnly) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char);\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char);\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n return plain && !testAmbiguousType(string)\n ? STYLE_PLAIN : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (string[0] === ' ' && indentPerLevel > 9) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// • No ending newline => unaffected; already using strip \"-\" chomping.\n// • Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey) {\n state.dump = (function () {\n if (string.length === 0) {\n return \"''\";\n }\n if (!state.noCompatMode &&\n DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) {\n return \"'\" + string + \"'\";\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) {\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string, lineWidth) + '\"';\n default:\n throw new YAMLException('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = (string[0] === ' ') ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char, nextChar;\n var escapeSeq;\n\n for (var i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n // Check for surrogate pairs (reference Unicode 3.0 section \"3.7 Surrogates\").\n if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) {\n nextChar = string.charCodeAt(i + 1);\n if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) {\n // Combine the surrogate pair and store it escaped.\n result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000);\n // Advance index one extra since we already used that char here.\n i++; continue;\n }\n }\n escapeSeq = ESCAPE_SEQUENCES[char];\n result += !escapeSeq && isPrintable(char)\n ? string[i]\n : escapeSeq || encodeHex(char);\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n // Write only valid elements.\n if (writeNode(state, level, object[index], false, false)) {\n if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n // Write only valid elements.\n if (writeNode(state, level + 1, object[index], true, true)) {\n if (!compact || index !== 0) {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = state.condenseFlow ? '\"' : '';\n\n if (index !== 0) pairBuffer += ', ';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new YAMLException('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || index !== 0) {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n state.tag = explicit ? type.tag : '?';\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new YAMLException('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n writeBlockSequence(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey);\n }\n } else {\n if (state.skipInvalid) return false;\n throw new YAMLException('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n state.dump = '!<' + state.tag + '> ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n if (writeNode(state, 0, input, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nfunction safeDump(input, options) {\n return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\nmodule.exports.dump = dump;\nmodule.exports.safeDump = safeDump;\n","'use strict';\n\n\nvar loader = require('./js-yaml/loader');\nvar dumper = require('./js-yaml/dumper');\n\n\nfunction deprecated(name) {\n return function () {\n throw new Error('Function ' + name + ' is deprecated and cannot be used.');\n };\n}\n\n\nmodule.exports.Type = require('./js-yaml/type');\nmodule.exports.Schema = require('./js-yaml/schema');\nmodule.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe');\nmodule.exports.JSON_SCHEMA = require('./js-yaml/schema/json');\nmodule.exports.CORE_SCHEMA = require('./js-yaml/schema/core');\nmodule.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe');\nmodule.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full');\nmodule.exports.load = loader.load;\nmodule.exports.loadAll = loader.loadAll;\nmodule.exports.safeLoad = loader.safeLoad;\nmodule.exports.safeLoadAll = loader.safeLoadAll;\nmodule.exports.dump = dumper.dump;\nmodule.exports.safeDump = dumper.safeDump;\nmodule.exports.YAMLException = require('./js-yaml/exception');\n\n// Deprecated schema names from JS-YAML 2.0.x\nmodule.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe');\nmodule.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe');\nmodule.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full');\n\n// Deprecated functions from JS-YAML 1.x.x\nmodule.exports.scan = deprecated('scan');\nmodule.exports.parse = deprecated('parse');\nmodule.exports.compose = deprecated('compose');\nmodule.exports.addConstructor = deprecated('addConstructor');\n","'use strict';\n\n\nvar yaml = require('./lib/js-yaml.js');\n\n\nmodule.exports = yaml;\n","// Return a copy of the object, filtered to omit the blacklisted array of keys.\nexport default function omit (obj, blackList) {\n var newObj = {}\n Object.keys(obj || {}).forEach(key => {\n if (blackList.indexOf(key) === -1) {\n newObj[key] = obj[key]\n }\n })\n return newObj\n}\n","/* istanbul ignore next */\nimport yamlParser from 'js-yaml'\nimport identity from '../utils/identity'\nimport omit from '../utils/omit'\n\nexport default function (str, parserOptions) {\n parserOptions = parserOptions || {}\n var map = parserOptions.map || identity\n var loadMethod = parserOptions.loadMethod || 'safeLoad'\n var data = yamlParser[loadMethod](str, omit(parserOptions, ['map', 'loadMethod'])) || {}\n return map(data, map)\n}\n","\n\n// Structure inspired by John Resig's HTML parser\n// http://ejohn.org/blog/pure-javascript-html-parser/\n\n(function() {\n 'use strict';\n\n// The load function takes a string of text as its only argument.\n// It then proceeds to match the text to one of several regular expressions\n// which match patterns for different types of commands in AML.\nfunction load(input, options) {\n var whitespacePattern = '\\\\u0000\\\\u0009\\\\u000A\\\\u000B\\\\u000C\\\\u000D\\\\u0020\\\\u00A0\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u200B\\\\u2028\\\\u2029\\\\u202F\\\\u205F\\\\u3000\\\\uFEFF';\n var slugBlacklist = whitespacePattern + '\\\\u005B\\\\u005C\\\\u005D\\\\u007B\\\\u007D\\\\u003A';\n\n var nextLine = new RegExp('.*((\\r|\\n)+)');\n var startKey = new RegExp('^\\\\s*([^' + slugBlacklist + ']+)[ \\t\\r]*:[ \\t\\r]*(.*(?:\\n|\\r|$))');\n var commandKey = new RegExp('^\\\\s*:[ \\t\\r]*(endskip|ignore|skip|end).*?(\\n|\\r|$)', 'i');\n var arrayElement = new RegExp('^\\\\s*\\\\*[ \\t\\r]*(.*(?:\\n|\\r|$))');\n var scopePattern = new RegExp('^\\\\s*(\\\\[|\\\\{)[ \\t\\r]*([\\+\\.]*)[ \\t\\r]*([^' + slugBlacklist + ']*)[ \\t\\r]*(?:\\\\]|\\\\}).*?(\\n|\\r|$)');\n\n var data = {},\n scope = data,\n\n stack = [],\n stackScope = undefined,\n\n bufferScope = null,\n bufferKey = null,\n bufferString = '',\n\n isSkipping = false;\n\n var options = options || {};\n if (options.comments !== true) options.comments = false;\n\n while (input) {\n // Inside the input stream loop, the `input` string is trimmed down as matches\n // are found, and fires a call to the matching parse*() function.\n var match;\n\n if (commandKey.exec(input)) {\n match = commandKey.exec(input);\n\n parseCommandKey(match[1].toLowerCase());\n\n } else if (!isSkipping && startKey.exec(input) &&\n (!stackScope || stackScope.arrayType !== 'simple')) {\n match = startKey.exec(input);\n\n parseStartKey(match[1], match[2] || '');\n\n } else if (!isSkipping && arrayElement.exec(input) && stackScope && stackScope.array &&\n (stackScope.arrayType !== 'complex' && stackScope.arrayType !== 'freeform') &&\n stackScope.flags.indexOf('+') < 0) {\n match = arrayElement.exec(input);\n\n parseArrayElement(match[1]);\n\n } else if (!isSkipping && scopePattern.exec(input)) {\n match = scopePattern.exec(input);\n\n parseScope(match[1], match[2], match[3]);\n\n } else if (nextLine.exec(input)) {\n match = nextLine.exec(input);\n\n parseText(match[0]);\n\n } else {\n // End of document reached\n parseText(input);\n input = '';\n }\n\n if (match) input = input.substring(match[0].length);\n }\n\n // The following parse functions add to the global `data` object and update\n // scoping variables to keep track of what we're parsing.\n\n function parseStartKey(key, restOfLine) {\n // When a new key is encountered, the rest of the line is immediately added as\n // its value, by calling `flushBuffer`.\n flushBuffer();\n\n incrementArrayElement(key);\n\n if (stackScope && stackScope.flags.indexOf('+') > -1) key = 'value';\n\n bufferKey = key;\n bufferString = restOfLine;\n\n flushBufferInto(key, {replace: true});\n }\n\n function parseArrayElement(value) {\n flushBuffer();\n\n stackScope.arrayType = stackScope.arrayType || 'simple';\n\n stackScope.array.push('');\n bufferKey = stackScope.array;\n bufferString = value;\n flushBufferInto(stackScope.array, {replace: true});\n }\n\n function parseCommandKey(command) {\n // if isSkipping, don't parse any command unless :endskip\n\n if (isSkipping && !(command === \"endskip\" || command === \"ignore\")) return flushBuffer();\n\n switch (command) {\n case \"end\":\n // When we get to an end key, save whatever was in the buffer to the last\n // active key.\n if (bufferKey) flushBufferInto(bufferKey, {replace: false});\n return;\n\n case \"ignore\":\n // When \":ignore\" is reached, stop parsing immediately\n input = '';\n break;\n\n case \"skip\":\n isSkipping = true;\n break;\n\n case \"endskip\":\n isSkipping = false;\n break;\n }\n\n flushBuffer();\n }\n\n function parseScope(scopeType, flags, scopeKey) {\n // Throughout the parsing, `scope` refers to one of the following:\n // * `data`\n // * an object - one level within `data` - when we're within a {scope} block\n // * an object at the end of an array - which is one level within `data` -\n // when we're within an [array] block.\n //\n // `scope` changes whenever a scope key is encountered. It also changes\n // within parseStartKey when we start a new object within an array.\n flushBuffer();\n\n if (scopeKey == '') {\n\n // Move up a level\n var lastStackItem = stack.pop();\n scope = (lastStackItem ? lastStackItem.scope : data) || data\n stackScope = stack[stack.length - 1];\n\n } else if (scopeType === '[' || scopeType === '{') {\n var nesting = false;\n var keyScope = data;\n\n // If the flags include \".\", drill down into the appropriate scope.\n if (flags.indexOf('.') > -1) {\n incrementArrayElement(scopeKey, flags);\n nesting = true;\n if (stackScope) keyScope = scope;\n\n // Otherwise, make sure we reset to the global scope\n } else {\n scope = data;\n stack = [];\n }\n\n // Within freeforms, the `type` of nested objects and arrays is taken\n // verbatim from the `keyScope`.\n if (stackScope && stackScope.flags.indexOf('+') > -1) {\n var parsedScopeKey = scopeKey;\n\n // Outside of freeforms, dot-notation interpreted as nested data.\n } else {\n var keyBits = scopeKey.split('.');\n for (var i=0; i -1 && flags.indexOf('.') > -1) {\n if (scopeType === '[') parsedScopeKey = 'value';\n else if (scopeType === '{') scope = scope.value = {};\n }\n\n var stackScopeItem = {\n array: null,\n arrayType: null,\n arrayFirstKey: null,\n flags: flags,\n scope: scope\n };\n if (scopeType == '[') {\n stackScopeItem.array = keyScope[parsedScopeKey] = [];\n if (flags.indexOf('+') > -1) stackScopeItem.arrayType = 'freeform';\n if (nesting) {\n stack.push(stackScopeItem);\n } else {\n stack = [stackScopeItem];\n }\n stackScope = stack[stack.length - 1];\n\n } else if (scopeType == '{') {\n if (nesting) {\n stack.push(stackScopeItem);\n } else {\n scope = keyScope[parsedScopeKey] = (typeof keyScope[parsedScopeKey] === 'object') ? keyScope[parsedScopeKey] : {};\n stack = [stackScopeItem];\n }\n stackScope = stack[stack.length - 1];\n }\n }\n }\n\n function parseText(text) {\n if (stackScope && stackScope.flags.indexOf('+') > -1 && text.match(/[^\\n\\r\\s]/)) {\n stackScope.array.push({\"type\": \"text\", \"value\": text.replace(/(^\\s*)|(\\s*$)/g, '')});\n } else {\n bufferString += input.substring(0, text.length);\n }\n }\n\n function incrementArrayElement(key) {\n // Special handling for arrays. If this is the start of the array, remember\n // which key was encountered first. If this is a duplicate encounter of\n // that key, start a new object.\n\n if (stackScope && stackScope.array) {\n // If we're within a simple array, ignore\n stackScope.arrayType = stackScope.arrayType || 'complex';\n if (stackScope.arrayType === 'simple') return;\n\n // arrayFirstKey may be either another key, or null\n if (stackScope.arrayFirstKey === null || stackScope.arrayFirstKey === key) stackScope.array.push(scope = {});\n if (stackScope.flags.indexOf('+') > -1) {\n scope.type = key\n } else {\n stackScope.arrayFirstKey = stackScope.arrayFirstKey || key;\n }\n }\n }\n\n function formatValue(value, type) {\n if (options.comments) {\n value = value.replace(/(?:^\\\\)?\\[[^\\[\\]\\n\\r]*\\](?!\\])/mg, \"\"); // remove comments\n value = value.replace(/\\[\\[([^\\[\\]\\n\\r]*)\\]\\]/g, \"[$1]\"); // [[]] => []\n }\n\n if (type == 'append') {\n // If we're appending to a multi-line string, escape special punctuation\n // by using a backslash at the beginning of any line.\n // Note we do not do this processing for the first line of any value.\n value = value.replace(new RegExp('^(\\\\s*)\\\\\\\\', 'gm'), \"$1\");\n }\n\n return value;\n }\n\n function flushBuffer() {\n var result = bufferString + '';\n bufferString = '';\n bufferKey = null;\n return result;\n }\n\n function flushBufferInto(key, options) {\n options = options || {};\n var existingBufferKey = bufferKey;\n var value = flushBuffer();\n\n if (options.replace) {\n value = formatValue(value, 'replace').replace(new RegExp('^\\\\s*'), '');\n bufferString = (new RegExp('\\\\s*$')).exec(value)[0];\n bufferKey = existingBufferKey\n } else {\n value = formatValue(value, 'append');\n }\n\n if (typeof key === 'object') {\n // key is an array\n if (options.replace) key[key.length - 1] = '';\n\n key[key.length - 1] += value.replace(new RegExp('\\\\s*$'), '');\n\n } else {\n var keyBits = key.split('.');\n bufferScope = scope;\n\n for (var i=0; i {\n return {name: key, equivalents: formatsIndex[key]}\n})\n","import csv from './csv'\nimport json from './json'\nimport psv from './psv'\nimport tsv from './tsv'\nimport txt from './txt'\nimport yaml from './yaml'\nimport aml from './aml'\nimport {formatsList} from '../config/equivalentFormats'\n\nlet parsers = {\n csv,\n json,\n psv,\n tsv,\n txt,\n yaml,\n aml\n}\n\nformatsList.forEach(format => {\n format.equivalents.forEach(equivalent => {\n parsers[equivalent] = parsers[format.name]\n })\n})\n\nexport default parsers\n","/* istanbul ignore next */\nimport dsvFormat from 'd3-dsv/src/dsv'\nimport discernFormat from './discernFormat'\nimport parsers from '../parsers/index'\n\n/**\n * Given a `filePath` return a parser that can read that file as json. Parses as text if format not supported by a built-in parser. If given a delimiter string as the second argument, return a parser for that delimiter regardless of `filePath`. Used internally by {@link readData} and {@link readDataSync}.\n *\n * @function discernParser\n * @param {String} [filePath] Input file path\n * @param {Object} [options] Optional options object, see below\n * @param {Object} [options.delimiter] If `{delimiter: true}`, it will treat the string given as `filePath` as a delimiter and delegate to `dsv.dsvFormat`.\n * @returns {Function} A parser that can parse a file string into json\n *\n * @example\n * var parser = io.discernParser('path/to/data.csv')\n * var json = parser('name,price\\nApple,120\\nPear,300')\n\n * var parser = io.discernParser('_', {delimiter: true})\n * var json = parser('name_price\\nApple_120\\nPear_300')\n */\nexport default function discernParser (filePath, opts_) {\n if (opts_ && opts_.delimiter === true) {\n return dsvFormat(filePath).parse\n }\n var format = discernFormat(filePath)\n var parser = parsers[format]\n // If we don't have a parser for this format, return as text\n if (typeof parser === 'undefined') {\n parser = parsers['txt']\n }\n return parser\n}\n","import discernParser from './discernParser'\n\n// Our `readData` fns can take either a delimiter to parse a file, or a full blown parser\n// Determine what they passed in with this handy function\nexport default function getParser (delimiterOrParser) {\n var parser\n if (typeof delimiterOrParser === 'string') {\n parser = discernParser(delimiterOrParser, {delimiter: true})\n } else if (typeof delimiterOrParser === 'function' || typeof delimiterOrParser === 'object') {\n parser = delimiterOrParser\n }\n return parser\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\nimport discernFormat from '../helpers/discernFormat'\nimport {formatsIndex} from '../config/equivalentFormats'\n\nexport default function file (filePath, parser, parserOptions, cb) {\n fs.readFile(filePath, 'utf8', function (err, data) {\n var fileFormat = discernFormat(filePath)\n if ((fileFormat === 'json' || formatsIndex.json.indexOf(fileFormat) > -1) && data === '') {\n data = '[]'\n }\n if (err) {\n cb(err)\n return false\n }\n var parsed\n try {\n if (typeof parser === 'function') {\n parsed = parser(data, parserOptions)\n } else if (typeof parser === 'object' && typeof parser.parse === 'function') {\n parsed = parser.parse(data, parserOptions)\n } else {\n parsed = 'Your specified parser is not properly formatted. It must either be a function or have a `parse` method.'\n }\n } catch (err) {\n cb(err)\n return\n }\n cb(null, parsed)\n })\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\nimport discernFormat from '../helpers/discernFormat'\nimport {formatsIndex} from '../config/equivalentFormats'\n\nexport default function file (filePath, parser, parserOptions, cb) {\n var data = fs.readFileSync(filePath, 'utf8')\n var fileFormat = discernFormat(filePath)\n if ((fileFormat === 'json' || formatsIndex.json.indexOf(fileFormat) > -1) && data === '') {\n data = '[]'\n }\n\n var parsed\n if (typeof parser === 'function') {\n parsed = parser(data, parserOptions)\n } else if (typeof parser === 'object' && typeof parser.parse === 'function') {\n parsed = parser.parse(data, parserOptions)\n } else {\n return new Error('Your specified parser is not properly formatted. It must either be a function or have a `parse` method.')\n }\n\n // if (opts_ && opts_.flatten) {\n // parsed = _.map(parsed, flatten)\n // }\n return parsed\n}\n","/* istanbul ignore next */\nvar shapefile = require('shapefile')\nimport identity from '../utils/identity'\n\nexport default function dbf (filePath, parser, parserOptions, cb) {\n var values = []\n parserOptions = parserOptions || {}\n var map = parserOptions.map || identity\n var i = 0\n shapefile.openDbf(filePath)\n .then(source => source.read()\n .then(function log (result) {\n i++\n if (result.done) return cb(null, values)\n values.push(map(result.value, i))\n return source.read().then(log)\n }))\n .catch(error => cb(error.stack))\n}\n","import file from './file'\nimport fileSync from './fileSync'\nimport dbf from './dbf'\nimport {formatsList} from '../config/equivalentFormats'\n\nlet loaders = {\n async: {\n aml: file,\n csv: file,\n psv: file,\n tsv: file,\n txt: file,\n json: file,\n yaml: file,\n dbf\n },\n sync: {\n aml: fileSync,\n csv: fileSync,\n psv: fileSync,\n tsv: fileSync,\n txt: fileSync,\n json: fileSync,\n yaml: fileSync\n }\n}\n\nformatsList.forEach(format => {\n format.equivalents.forEach(equivalent => {\n Object.keys(loaders).forEach(key => {\n loaders[key][equivalent] = loaders[key][format.name]\n })\n })\n})\n\nexport default loaders\n","import discernFormat from './discernFormat'\nimport loaders from '../loaders/index'\n\nexport default function discernLoader (filePath, opts_ = {}) {\n var which = opts_.sync === true ? 'sync' : 'async'\n var format = discernFormat(filePath)\n var loader = loaders[which][format]\n // If we don't have a loader for this format, read in as a normal file\n if (typeof loader === 'undefined') {\n loader = loaders[which]['txt']\n }\n return loader\n}\n","/* istanbul ignore next */\nimport _ from 'underscore'\nimport getParser from '../helpers/getParser'\nimport discernLoader from '../helpers/discernLoader'\nimport discernParser from '../helpers/discernParser'\nimport omit from '../utils/omit'\n\n/**\n * Asynchronously read data given a path ending in the file format.\n *\n * Supported formats / extensions:\n *\n * * `.json` Array of objects or object\n * * `.csv` Comma-separated\n * * `.tsv` Tab-separated\n * * `.psv` Pipe-separated\n * * `.yaml` or `.yml` Yaml file\n * * `.aml` ArchieML\n * * `.txt` Text file (a string)\n * * `.dbf` Database format used for shapefiles\n * * other All others are read as a text file\n *\n * @function readData\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {String|Function|Object} [parserOptions.parser] This can be a string that is the file's delimiter, a function that returns JSON, or, for convenience, can also be a dsv object such as `dsv.dsv('_')` or any object that has a `parse` method that's a function. See `parsers` in library source for examples.\n * @param {Function} [parserOptions.map] Transformation function. See {@link directReaders} for format-specific function signature. In brief, tabular formats get passed a `(row, i, columns)` and must return the modified row. Text or AML formats are passed the full document and must return the modified document. JSON arrays are mapped like tabular documents with `(row, i)` and return the modified row. JSON objects are mapped with Underscore's `_.mapObject` with `(value, key)` and return the modified value.\n * @param {Function} [parserOptions.reviver] Used for JSON files, otherwise ignored. See {@link readJson} for details.\n * @param {Function} [parserOptions.filename] Used for JSON files, otherwise ignored. See {@link readJson} for details.\n * @param {String} [parserOptions.loadMethod=\"safeLoad\"] Used for for YAML files, otherwise ignored. See {@link readYaml} for details.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readData('path/to/data.tsv', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Parser specified as a string\n * io.readData('path/to/data.usv', {parser: '_'}, function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Parser specified as a function\n * var myParser = dsv.dsv('_').parse\n * // var myParser = dsv.dsv('_') // This also works\n * io.readData('path/to/data.usv', {parser: myParser}, function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Parser specified as a function\n * var naiveJsonLines = function (dataAsString) {\n * return dataAsString.split('\\n').map(function (row) { return JSON.parse(row) })\n * }\n * io.readData('path/to/data.jsonlines', {parser: naiveJsonLines}, function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Shorthand for specifying a map function\n * io.readData('path/to/data.csv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }, function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Explicitly specify a map function and a filename for a json file. See `readJson` for more details\n * io.readData('path/to/data.json', {\n * map: function (k, v) {\n * if (typeof v === 'number') {\n * return v * 2\n * }\n * return v\n * },\n * filename: 'awesome-data.json'\n * }, function (err, data) {\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n * })\n */\nexport default function readData (filePath, opts_, cb_) {\n var cb = arguments[arguments.length - 1]\n var parser\n var parserOptions\n if (arguments.length === 3) {\n if (opts_.parser) {\n parser = getParser(opts_.parser)\n opts_ = omit(opts_, ['parser'])\n if (_.isEmpty(opts_)) {\n opts_ = undefined\n }\n } else {\n parser = discernParser(filePath)\n }\n\n if (opts_ && opts_.parserOptions) {\n if (typeof opts_.parserOptions === 'function') {\n parserOptions = {map: opts_.parserOptions}\n } else {\n parserOptions = opts_.parserOptions\n }\n } else if (opts_) {\n if (typeof opts_ === 'function') {\n parserOptions = {map: opts_}\n } else {\n parserOptions = opts_\n }\n }\n } else {\n parser = discernParser(filePath)\n }\n var loader = discernLoader(filePath)\n loader(filePath, parser, parserOptions, cb)\n}\n","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n","'use strict';\n\nfunction assembleStyles () {\n\tvar styles = {\n\t\tmodifiers: {\n\t\t\treset: [0, 0],\n\t\t\tbold: [1, 22], // 21 isn't widely supported and 22 does the same thing\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolors: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\t\t\tgray: [90, 39]\n\t\t},\n\t\tbgColors: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49]\n\t\t}\n\t};\n\n\t// fix humans\n\tstyles.colors.grey = styles.colors.gray;\n\n\tObject.keys(styles).forEach(function (groupName) {\n\t\tvar group = styles[groupName];\n\n\t\tObject.keys(group).forEach(function (styleName) {\n\t\t\tvar style = group[styleName];\n\n\t\t\tstyles[styleName] = group[styleName] = {\n\t\t\t\topen: '\\u001b[' + style[0] + 'm',\n\t\t\t\tclose: '\\u001b[' + style[1] + 'm'\n\t\t\t};\n\t\t});\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t});\n\n\treturn styles;\n}\n\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\nmodule.exports = function () {\n\treturn /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;\n};\n","'use strict';\nvar ansiRegex = require('ansi-regex')();\n\nmodule.exports = function (str) {\n\treturn typeof str === 'string' ? str.replace(ansiRegex, '') : str;\n};\n","'use strict';\nvar ansiRegex = require('ansi-regex');\nvar re = new RegExp(ansiRegex().source); // remove the `g` flag\nmodule.exports = re.test.bind(re);\n","'use strict';\nvar argv = process.argv;\n\nvar terminator = argv.indexOf('--');\nvar hasFlag = function (flag) {\n\tflag = '--' + flag;\n\tvar pos = argv.indexOf(flag);\n\treturn pos !== -1 && (terminator !== -1 ? pos < terminator : true);\n};\n\nmodule.exports = (function () {\n\tif ('FORCE_COLOR' in process.env) {\n\t\treturn true;\n\t}\n\n\tif (hasFlag('no-color') ||\n\t\thasFlag('no-colors') ||\n\t\thasFlag('color=false')) {\n\t\treturn false;\n\t}\n\n\tif (hasFlag('color') ||\n\t\thasFlag('colors') ||\n\t\thasFlag('color=true') ||\n\t\thasFlag('color=always')) {\n\t\treturn true;\n\t}\n\n\tif (process.stdout && !process.stdout.isTTY) {\n\t\treturn false;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn true;\n\t}\n\n\tif ('COLORTERM' in process.env) {\n\t\treturn true;\n\t}\n\n\tif (process.env.TERM === 'dumb') {\n\t\treturn false;\n\t}\n\n\tif (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {\n\t\treturn true;\n\t}\n\n\treturn false;\n})();\n","'use strict';\nvar escapeStringRegexp = require('escape-string-regexp');\nvar ansiStyles = require('ansi-styles');\nvar stripAnsi = require('strip-ansi');\nvar hasAnsi = require('has-ansi');\nvar supportsColor = require('supports-color');\nvar defineProps = Object.defineProperties;\nvar isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM);\n\nfunction Chalk(options) {\n\t// detect mode if not set manually\n\tthis.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;\n}\n\n// use bright blue on Windows as the normal blue color is illegible\nif (isSimpleWindowsTerm) {\n\tansiStyles.blue.open = '\\u001b[94m';\n}\n\nvar styles = (function () {\n\tvar ret = {};\n\n\tObject.keys(ansiStyles).forEach(function (key) {\n\t\tansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n\n\t\tret[key] = {\n\t\t\tget: function () {\n\t\t\t\treturn build.call(this, this._styles.concat(key));\n\t\t\t}\n\t\t};\n\t});\n\n\treturn ret;\n})();\n\nvar proto = defineProps(function chalk() {}, styles);\n\nfunction build(_styles) {\n\tvar builder = function () {\n\t\treturn applyStyle.apply(builder, arguments);\n\t};\n\n\tbuilder._styles = _styles;\n\tbuilder.enabled = this.enabled;\n\t// __proto__ is used because we must return a function, but there is\n\t// no way to create a function with a different prototype.\n\t/* eslint-disable no-proto */\n\tbuilder.__proto__ = proto;\n\n\treturn builder;\n}\n\nfunction applyStyle() {\n\t// support varags, but simply cast to string in case there's only one arg\n\tvar args = arguments;\n\tvar argsLen = args.length;\n\tvar str = argsLen !== 0 && String(arguments[0]);\n\n\tif (argsLen > 1) {\n\t\t// don't slice `arguments`, it prevents v8 optimizations\n\t\tfor (var a = 1; a < argsLen; a++) {\n\t\t\tstr += ' ' + args[a];\n\t\t}\n\t}\n\n\tif (!this.enabled || !str) {\n\t\treturn str;\n\t}\n\n\tvar nestedStyles = this._styles;\n\tvar i = nestedStyles.length;\n\n\t// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,\n\t// see https://github.com/chalk/chalk/issues/58\n\t// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.\n\tvar originalDim = ansiStyles.dim.open;\n\tif (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {\n\t\tansiStyles.dim.open = '';\n\t}\n\n\twhile (i--) {\n\t\tvar code = ansiStyles[nestedStyles[i]];\n\n\t\t// Replace any instances already present with a re-opening code\n\t\t// otherwise only the part of the string until said closing code\n\t\t// will be colored, and the rest will simply be 'plain'.\n\t\tstr = code.open + str.replace(code.closeRe, code.open) + code.close;\n\t}\n\n\t// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.\n\tansiStyles.dim.open = originalDim;\n\n\treturn str;\n}\n\nfunction init() {\n\tvar ret = {};\n\n\tObject.keys(styles).forEach(function (name) {\n\t\tret[name] = {\n\t\t\tget: function () {\n\t\t\t\treturn build.call(this, [name]);\n\t\t\t}\n\t\t};\n\t});\n\n\treturn ret;\n}\n\ndefineProps(Chalk.prototype, init());\n\nmodule.exports = new Chalk();\nmodule.exports.styles = ansiStyles;\nmodule.exports.hasColor = hasAnsi;\nmodule.exports.stripColor = stripAnsi;\nmodule.exports.supportsColor = supportsColor;\n","/* istanbul ignore next */\nimport chalk from 'chalk'\n\nexport default function (msg) {\n console.log(chalk.gray('[indian-ocean]') + ' ' + chalk.yellow('Warning:', msg))\n}\n","/* istanbul ignore next */\nimport chalk from 'chalk'\n\nexport default function (format) {\n throw new Error(chalk.red('[indian-ocean] You passed in an object but converting to ' + chalk.bold(format) + ' requires a list of objects.') + chalk.cyan('\\nIf you would like to write a one-row csv, put your object in a list like so: `' + chalk.bold('[data]') + '`\\n'))\n}\n","import notListError from '../reporters/notListError'\n\n// Some shared data integrity checks for formatters\nexport default function formattingPreflight (file, format) {\n if (file === '') {\n return []\n } else if (!Array.isArray(file)) {\n notListError(format)\n }\n return file\n}\n","/* istanbul ignore next */\nimport chalk from 'chalk'\n\nexport default function (format) {\n throw new Error(chalk.red('[indian-ocean] Error converting your data to ' + chalk.bold(format) + '.') + '\\n\\n' + chalk.cyan('Your data most likely contains objects or lists. Object values can only be strings for this format. Please convert before writing to file.\\n'))\n}\n","/* istanbul ignore next */\nimport {csvFormat} from 'd3-dsv/src/csv'\nimport formattingPreflight from '../utils/formattingPreflight'\nimport parseError from '../reporters/parseError'\n\nexport default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n file = formattingPreflight(file, 'csv')\n try {\n return csvFormat(file, writeOptions.columns)\n } catch (err) {\n parseError('csv')\n }\n}\n","export default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n return JSON.stringify(file, writeOptions.replacer, writeOptions.indent)\n}\n","/* istanbul ignore next */\nimport dsvFormat from 'd3-dsv/src/dsv'\nimport formattingPreflight from '../utils/formattingPreflight'\nimport parseError from '../reporters/parseError'\n\nexport default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n file = formattingPreflight(file, 'psv')\n try {\n return dsvFormat('|').format(file, writeOptions.columns)\n } catch (err) {\n parseError('psv')\n }\n}\n","/* istanbul ignore next */\nimport {tsvFormat} from 'd3-dsv/src/tsv'\nimport formattingPreflight from '../utils/formattingPreflight'\nimport parseError from '../reporters/parseError'\n\nexport default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n file = formattingPreflight(file, 'tsv')\n try {\n return tsvFormat(file, writeOptions.columns)\n } catch (err) {\n parseError('tsv')\n }\n}\n","export default function (file) {\n return file\n}\n","/* istanbul ignore next */\nimport yamlParser from 'js-yaml'\nimport omit from '../utils/omit'\n// import formattingPreflight from '../utils/formattingPreflight'\n// import parseError from '../reporters/parseError'\n\nexport default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n var writeMethod = writeOptions.writeMethod || 'safeDump'\n return yamlParser[writeMethod](file, omit(writeOptions, ['writeMethod']))\n}\n","module.exports = {\n // string\n C: 254,\n // boolean\n L: 1,\n // date\n D: 8,\n // number\n N: 18,\n // number\n M: 18,\n // number, float\n F: 18,\n // number\n B: 8,\n};\n","/**\n * @param {string} str\n * @param {number} len\n * @param {string} char\n * @returns {string}\n */\nmodule.exports.lpad = function lpad(str, len, char) {\n while (str.length < len) { str = char + str; } return str;\n};\n\n/**\n * @param {string} str\n * @param {number} len\n * @param {string} char\n * @returns {string}\n */\nmodule.exports.rpad = function rpad(str, len, char) {\n while (str.length < len) { str = str + char; } return str;\n};\n\n/**\n * @param {object} view\n * @param {number} fieldLength\n * @param {string} str\n * @param {number} offset\n * @returns {number}\n */\nmodule.exports.writeField = function writeField(view, fieldLength, str, offset) {\n for (var i = 0; i < fieldLength; i++) {\n view.setUint8(offset, str.charCodeAt(i)); offset++;\n }\n return offset;\n};\n","var fieldSize = require('./fieldsize');\n\nvar types = {\n string: 'C',\n number: 'N',\n boolean: 'L',\n // type to use if all values of a field are null\n null: 'C'\n};\n\nmodule.exports.multi = multi;\nmodule.exports.bytesPer = bytesPer;\nmodule.exports.obj = obj;\n\nfunction multi(features) {\n var fields = {};\n features.forEach(collect);\n function collect(f) { inherit(fields, f); }\n return obj(fields);\n}\n\n/**\n * @param {Object} a\n * @param {Object} b\n * @returns {Object}\n */\nfunction inherit(a, b) {\n for (var i in b) {\n var isDef = typeof b[i] !== 'undefined' && b[i] !== null;\n if (typeof a[i] === 'undefined' || isDef) {\n a[i] = b[i];\n }\n }\n return a;\n}\n\nfunction obj(_) {\n var fields = {}, o = [];\n for (var p in _) fields[p] = _[p] === null ? 'null' : typeof _[p];\n for (var n in fields) {\n var t = types[fields[n]];\n if(t){\n o.push({\n name: n,\n type: t,\n size: fieldSize[t]\n });\n }\n }\n return o;\n}\n\n/**\n * @param {Array} fields\n * @returns {Array}\n */\nfunction bytesPer(fields) {\n // deleted flag\n return fields.reduce(function(memo, f) { return memo + f.size; }, 1);\n}\n","var fieldSize = require('./fieldsize'),\n lib = require('./lib'),\n fields = require('./fields');\n\n/**\n * @param {Array} data\n * @param {Array} meta\n * @returns {Object} view\n */\nmodule.exports = function structure(data, meta) {\n\n var field_meta = meta || fields.multi(data),\n fieldDescLength = (32 * field_meta.length) + 1,\n bytesPerRecord = fields.bytesPer(field_meta), // deleted flag\n buffer = new ArrayBuffer(\n // field header\n fieldDescLength +\n // header\n 32 +\n // contents\n (bytesPerRecord * data.length) +\n // EOF marker\n 1\n ),\n now = new Date(),\n view = new DataView(buffer);\n\n // version number - dBase III\n view.setUint8(0, 0x03);\n // date of last update\n view.setUint8(1, now.getFullYear() - 1900);\n view.setUint8(2, now.getMonth() + 1);\n view.setUint8(3, now.getDate());\n // number of records\n view.setUint32(4, data.length, true);\n\n // length of header\n var headerLength = fieldDescLength + 32;\n view.setUint16(8, headerLength, true);\n // length of each record\n view.setUint16(10, bytesPerRecord, true);\n\n // Terminator\n view.setInt8(32 + fieldDescLength - 1, 0x0D);\n\n field_meta.forEach(function(f, i) {\n // field name\n f.name.split('').slice(0, 10).forEach(function(c, x) {\n view.setInt8(32 + i * 32 + x, c.charCodeAt(0));\n });\n // field type\n view.setInt8(32 + i * 32 + 11, f.type.charCodeAt(0));\n // field length\n view.setInt8(32 + i * 32 + 16, f.size);\n if (f.type == 'N') view.setInt8(32 + i * 32 + 17, 3);\n });\n\n var offset = fieldDescLength + 32;\n\n data.forEach(function(row, num) {\n // delete flag: this is not deleted\n view.setUint8(offset, 32);\n offset++;\n field_meta.forEach(function(f) {\n var val = row[f.name];\n if (val === null || typeof val === 'undefined') val = '';\n\n switch (f.type) {\n // boolean\n case 'L':\n view.setUint8(offset, val ? 84 : 70);\n offset++;\n break;\n\n // date\n case 'D':\n offset = lib.writeField(view, 8,\n lib.lpad(val.toString(), 8, ' '), offset);\n break;\n\n // number\n case 'N':\n offset = lib.writeField(view, f.size,\n lib.lpad(val.toString(), f.size, ' ').substr(0, 18),\n offset);\n break;\n\n // string\n case 'C':\n offset = lib.writeField(view, f.size,\n lib.rpad(val.toString(), f.size, ' '), offset);\n break;\n\n default:\n throw new Error('Unknown field type');\n }\n });\n });\n\n // EOF flag\n view.setUint8(offset, 0x1A);\n\n return view;\n};\n","module.exports.structure = require('./src/structure');\n","/* istanbul ignore next */\nimport dbf from 'dbf'\n\nexport default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n function toBuffer (ab) {\n var buffer = new Buffer(ab.byteLength)\n var view = new Uint8Array(ab)\n for (var i = 0; i < buffer.length; ++i) {\n buffer[i] = view[i]\n }\n return buffer\n }\n var buf = dbf.structure(file)\n return toBuffer(buf.buffer)\n}\n","import csv from './csv'\nimport json from './json'\nimport psv from './psv'\nimport tsv from './tsv'\nimport txt from './txt'\nimport yaml from './yaml'\nimport dbf from './dbf'\nimport {formatsList} from '../config/equivalentFormats'\n\nlet formatters = {\n csv,\n json,\n psv,\n tsv,\n txt,\n yaml,\n dbf\n}\n\nformatsList.forEach(format => {\n format.equivalents.forEach(equivalent => {\n formatters[equivalent] = formatters[format.name]\n })\n})\n\nexport default formatters\n","import discernFormat from './discernFormat'\nimport formatters from '../formatters/index'\n\n/**\n * Returns a formatter that will format json data to file type specified by the extension in `filePath`. Used internally by {@link writeData} and {@link writeDataSync}.\n *\n * @function discernFileFormatter\n * @param {String} filePath Input file path\n * @returns {Function} A formatter function that will write the extension format\n *\n * @example\n * var formatter = io.discernFileFormatter('path/to/data.tsv')\n * var csv = formatter(json)\n */\nexport default function discernFileFormatter (filePath) {\n var format = discernFormat(filePath)\n var formatter = formatters[format]\n // If we don't have a parser for this format, return as text\n if (typeof formatter === 'undefined') {\n formatter = formatters['txt']\n }\n return formatter\n}\n","var path = require('path');\nvar fs = require('fs');\nvar _0777 = parseInt('0777', 8);\n\nmodule.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;\n\nfunction mkdirP (p, opts, f, made) {\n if (typeof opts === 'function') {\n f = opts;\n opts = {};\n }\n else if (!opts || typeof opts !== 'object') {\n opts = { mode: opts };\n }\n \n var mode = opts.mode;\n var xfs = opts.fs || fs;\n \n if (mode === undefined) {\n mode = _0777 & (~process.umask());\n }\n if (!made) made = null;\n \n var cb = f || function () {};\n p = path.resolve(p);\n \n xfs.mkdir(p, mode, function (er) {\n if (!er) {\n made = made || p;\n return cb(null, made);\n }\n switch (er.code) {\n case 'ENOENT':\n mkdirP(path.dirname(p), opts, function (er, made) {\n if (er) cb(er, made);\n else mkdirP(p, opts, cb, made);\n });\n break;\n\n // In the case of any other error, just see if there's a dir\n // there already. If so, then hooray! If not, then something\n // is borked.\n default:\n xfs.stat(p, function (er2, stat) {\n // if the stat fails, then that's super weird.\n // let the original error be the failure reason.\n if (er2 || !stat.isDirectory()) cb(er, made)\n else cb(null, made);\n });\n break;\n }\n });\n}\n\nmkdirP.sync = function sync (p, opts, made) {\n if (!opts || typeof opts !== 'object') {\n opts = { mode: opts };\n }\n \n var mode = opts.mode;\n var xfs = opts.fs || fs;\n \n if (mode === undefined) {\n mode = _0777 & (~process.umask());\n }\n if (!made) made = null;\n\n p = path.resolve(p);\n\n try {\n xfs.mkdirSync(p, mode);\n made = made || p;\n }\n catch (err0) {\n switch (err0.code) {\n case 'ENOENT' :\n made = sync(path.dirname(p), opts, made);\n sync(p, opts, made);\n break;\n\n // In the case of any other error, just see if there's a dir\n // there already. If so, then hooray! If not, then something\n // is borked.\n default:\n var stat;\n try {\n stat = xfs.statSync(p);\n }\n catch (err1) {\n throw err0;\n }\n if (!stat.isDirectory()) throw err0;\n break;\n }\n }\n\n return made;\n};\n","/* istanbul ignore next */\nimport mkdirp from 'mkdirp'\nimport {dirname} from '../utils/path'\n\n/**\n * Asynchronously create directories along a given file path. Delegates to [mkdirp](http://npmjs.org/package/mkdirp) module\n *\n * @function makeDirectories\n * @param {String} outPath The path to a file\n * @param {Function} callback The function to do once this is done. Has signature of `(err)`\n *\n * @example\n * io.makeDirectories('path/to/create/to/data.tsv', function (err) {\n * console.log(err) // null\n * })\n *\n */\nexport default function makeDirectories (outPath, cb) {\n mkdirp(dirname(outPath), function (err) {\n cb(err)\n })\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n/* istanbul ignore next */\nimport _ from 'underscore'\nimport warn from '../reporters/warn'\nimport discernFileFormatter from '../helpers/discernFileFormatter'\nimport makeDirectories from '../helpers/makeDirectories'\nimport omit from '../utils/omit'\n\n/**\n * Write the data object, inferring the file format from the file ending specified in `fileName`.\n *\n * Supported formats:\n *\n * * `.json` Array of objects, also supports `.geojson` and `.topojson`\n * * `.csv` Comma-separated\n * * `.tsv` Tab-separated\n * * `.psv` Pipe-separated\n * * `.yaml` Yaml file, also supports `.yml`\n * * `.dbf` Database file, commonly used in ESRI-shapefile format.\n *\n * @function writeData\n * @param {String} filePath Input file path\n * @param {Array|Object|String} data Data to write\n * @param {Object} [options] Optional options object, see below\n * @param {Boolean} [options.makeDirectories=false] If `true`, create intermediate directories to your data file. Can also be `makeDirs` for short.\n * @param {Function|Array} [options.replacer] Used for JSON formats. Function to filter your objects before writing or an array of whitelisted keys to keep. Examples below. See JSON.stringify docs for more info https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\n * @param {Number} [options.indent] Used for JSON and YAML formats. Specifies indent level. Default for YAML is `2`, `0` for JSON.\n * @param {String} [options.writeMethod='safeDump'] Used for YAML formats. Can also be `\"dump\"` to allow writing of RegExes and functions. The `options` object will also pass anything onto `js-yaml`. See its docs for other options. Example shown below with `sortKeys`. https://github.com/nodeca/js-yaml#safedump-object---options-\n * @param {Array} [options.columns] Used for tabular formats. Optionally specify a list of column names to use. Otherwise they are detected from the data. See `d3-dsv` for more detail: https://github.com/d3/d3-dsv/blob/master/README.md#dsv_format\n * @param {Function} callback Has signature `(err, dataStr)`. `dataStr` is the data that was written out as a string\n *\n * @example\n * io.writeData('path/to/data.json', jsonData, function (err, dataString) {\n * console.log(err)\n * })\n *\n * io.writeData('path/to/create/to/data.csv', flatJsonData, {makeDirectories: true}, function (err, dataString) {\n * console.log(err)\n * })\n *\n * io.writeData('path/to/to/data.yaml', jsonData, {writeMehod: \"dump\", sortKeys: true}, function (err, dataString) {\n * console.log(err)\n * })\n *\n * io.writeData('path/to/to/data.json', jsonData, {indent: 4}, function (err, dataString) {\n * console.log(err)\n * })\n *\n * io.writeData('path/to/to/data.json', jsonData, {\n * indent: 4,\n * replacer: function (key, value) {\n * // Filtering out string properties\n * if (typeof value === \"string\") {\n * return undefined\n * }\n * return value\n * }\n * }, function (err, dataString) {\n * console.log(err)\n * })\n *\n * io.writeData('path/to/to/data.json', jsonData, {\n * indent: 4,\n * replacer: ['name', 'occupation'] // Only keep \"name\" and \"occupation\" values\n * }, function (err, dataString) {\n * console.log(err)\n * })\n */\nexport default function writeData (outPath, data, opts_, cb) {\n if (typeof cb === 'undefined') {\n cb = opts_\n opts_ = undefined\n }\n if (_.isEmpty(data)) {\n warn('You didn\\'t pass any data to write for file: `' + outPath + '`. Writing out an empty file...')\n }\n\n if (typeof opts_ === 'object' && (opts_.makeDirectories === true || opts_.makeDirs === true)) {\n makeDirectories(outPath, proceed)\n } else {\n proceed()\n }\n\n function proceed (err) {\n if (err) {\n throw err\n }\n\n opts_ = omit(opts_, ['makeDirectories', 'makeDirs'])\n var writeOptions\n if (typeof opts_ !== 'function') {\n writeOptions = opts_\n }\n\n var fileFormatter = discernFileFormatter(outPath)\n var formattedData = fileFormatter(data, writeOptions)\n fs.writeFile(outPath, formattedData, function (err) {\n cb(err, formattedData)\n })\n }\n}\n","import readData from '../readers/readData'\nimport writeData from '../writers/writeData'\n\n/**\n * Reads in data given a path ending in the file format with {@link readData} and writes to file using {@link writeData}. A convenience function for converting files to more other formats. All formats can convert to all others except you can't convert object-only formats such as aml or yaml files that are not lists into tabular formats, which must be lists.\n *\n * @function convertData\n * @param {String} inFilePath Input file path\n * @param {String} outFilePath Output file path\n * @param {Object} [options] Optional config object that's passed to {@link writeData}. See that documentation for full options, which vary depending on the output format you choose.\n * @param {Function} callback Has signature `(err, dataStr)`. `dataStr` is the data that was written out as a string\n *\n * @example\n * io.convertData('path/to/data.dbf', 'path/to/data.csv', function (err, dataStr) {\n * console.log(err)\n * })\n *\n * io.convertData('path/to/data.tsv', 'path/to/create/to/data.dbf', {makeDirectories: true}, function (err, dataStr) {\n * console.log(err)\n * })\n */\nexport default function convertData (inPath, outPath, opts_, cb) {\n if (typeof cb === 'undefined') {\n cb = opts_\n }\n readData(inPath, function (error, jsonData) {\n if (error) {\n cb(error)\n } else {\n writeData(outPath, jsonData, opts_, cb)\n }\n })\n}\n","import identity from '../utils/identity'\nimport readData from '../readers/readData'\n\n/**\n * Asynchronously read a dbf file. Returns an empty array if file is empty.\n *\n * @function readDbf\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readDbf('path/to/data.dbf', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Transform values on load\n * io.readDbf('path/to/data.csv', function (row, i) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }, function (err, data) {\n * console.log(data) // Converted json data\n * })\n */\nexport default function readDbf (filePath, opts_, cb) {\n var parserOptions = {\n map: identity\n }\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, parserOptions, cb)\n}\n","import readDbf from '../directReaders/readDbf'\nimport writeData from '../writers/writeData'\n\n/**\n * Reads in a dbf file with {@link readData} and write to file using {@link writeData}. A convenience function for converting DBFs to more useable formats. Formerly known as `writeDbfToData` and is aliased for legacy support.\n *\n * @function convertDbfToData\n * @param {String} inFilePath Input file path\n * @param {String} outFilePath Output file path\n * @param {Object} [options] Optional config object that's passed to {@link writeData}. See that documentation for full options, which vary depending on the output format you choose.\n * @param {Function} callback Has signature `(err, dataStr)`. `dataStr` is the data that was written out as a string\n *\n * @example\n * io.convertDbfToData('path/to/data.dbf', 'path/to/data.csv', function (err, dataStr) {\n * console.log(err)\n * })\n *\n * io.convertDbfToData('path/to/data.dbf', 'path/to/create/to/data.csv', {makeDirectories: true}, function (err, dataStr) {\n * console.log(err)\n * })\n */\nexport default function convertDbfToData (inPath, outPath, opts_, cb) {\n if (typeof cb === 'undefined') {\n cb = opts_\n }\n readDbf(inPath, function (error, jsonData) {\n if (error) {\n cb(error)\n } else {\n writeData(outPath, jsonData, opts_, cb)\n }\n })\n}\n","/**\n * A port of jQuery's extend. Merge the contents of two or more objects together into the first object. Supports deep extending with `true` as the first argument.\n *\n * @function extend\n * @param {Boolean} [deepExtend] Optional, set to `true` to merge recursively.\n * @param {Object} destination The object to modify\n * @param {Object} source The object whose keys to take\n * @param {Object} [source2] Optional, You can add any number of objects as arguments.\n * @returns {Object} result The merged object. Note that the `destination` object will always be modified.\n *\n * @example\n * var mergedObj = io.extend({}, {name: 'indian-ocean'}, {alias: 'io'})\n * console.log(mergedObj)\n * // {\n * // name: 'indian-ocean',\n * // alias: 'io'\n * // }\n *\n * var name = {name: 'indian-ocean'}\n * io.extend(name, {alias: 'io'})\n * console.log(name)\n * // {\n * // name: 'indian-ocean',\n * // alias: 'io'\n * // }\n *\n * @example\n * var object1 = {\n * apple: 0,\n * banana: { weight: 52, price: 100 },\n * cherry: 97\n * }\n * var object2 = {\n * banana: { price: 200 },\n * almond: 100\n * }\n * io.extend(true, object1, object2)\n * console.log(object1)\n * // {\n * // apple: 0,\n * // banana: {\n * // weight: 52,\n * // price: 200\n * // },\n * // cherry: 97,\n * // almond: 100\n * // }\n *\n */\nexport default function extend () {\n var options\n var name\n var src\n var copy\n var copyIsArray\n var clone\n var target = arguments[0] || {}\n var i = 1\n var length = arguments.length\n var deep = false\n\n // Handle a deep copy situation\n if (typeof target === 'boolean') {\n deep = target\n\n // Skip the boolean and the target\n target = arguments[i] || {}\n i++\n }\n\n // Handle case when target is a string or something (possible in deep copy)\n if (typeof target !== 'object' && typeof target !== 'function') {\n target = {}\n }\n\n // Extend indian-ocean itself if only one argument is passed\n if (i === length) {\n target = this\n i--\n }\n\n for (; i < length; i++) {\n // Only deal with non-null/undefined values\n if ((options = arguments[i]) != null) {\n // Extend the base object\n for (name in options) {\n src = target[name]\n copy = options[name]\n\n // Prevent never-ending loop\n if (target === copy) {\n continue\n }\n\n // Recurse if we're merging plain objects or arrays\n if (deep && copy && (typeof copy === 'object') ||\n (copyIsArray = Array.isArray(copy))) {\n if (copyIsArray) {\n copyIsArray = false\n clone = src && Array.isArray(src) ? src : []\n } else {\n clone = src && typeof src === 'object' ? src : {}\n }\n\n // Never move original objects, clone them\n target[name] = extend(deep, clone, copy)\n\n // Don't bring in undefined values\n } else if (copy !== undefined) {\n target[name] = copy\n }\n }\n }\n }\n\n // Return the modified object\n return target\n}\n","import extend from './extend'\n/**\n * A more semantic convenience function. Delegates to {@link extend} and passes `true` as the first argument. Deep merge the contents of two or more objects together into the first object.\n *\n * @function deepExtend\n * @param {Object} destination The object to modify\n * @param {Object} source The object whose keys to take\n * @param {Object} [source2] Optional, You can add any number of objects as arguments.\n * @returns {Object} result The merged object. Note that the `destination` object will always be modified.\n *\n * @example\n * var object1 = {\n * apple: 0,\n * banana: { weight: 52, price: 100 },\n * cherry: 97\n * }\n * var object2 = {\n * banana: { price: 200 },\n * almond: 100\n * }\n * io.deepExtend(object1, object2)\n * console.log(object1)\n * // {\n * // apple: 0,\n * // banana: {\n * // weight: 52,\n * // price: 200\n * // },\n * // cherry: 97,\n * // almond: 100\n * // }\n *\n */\nexport default function deepExtend () {\n var args = Array.prototype.slice.call(arguments) // Make real array from arguments\n args.unshift(true) // Add `true` as first arg.\n extend.apply(this, args)\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n\n/**\n * Asynchronously test whether a file exists or not by using `fs.access` modified from https://github.com/nodejs/io.js/issues/1592#issuecomment-98392899.\n *\n * @function exists\n * @param {String} filePath Input file path\n * @param {Function} callback Has signature `(err, exists)`\n *\n * @example\n * var exists = io.exists('path/to/data.tsv', function (err, exists) {\n * console.log(exists) // `true` if the file exists, `false` if not.\n * })\n *\n */\nexport default function exists (filePath, cb) {\n fs.access(filePath, function (err) {\n var exists\n if (err && err.code === 'ENOENT') {\n exists = false\n err = null\n } else if (!err) {\n exists = true\n }\n cb(err, exists)\n })\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n\n/**\n * Syncronous version of {@link exists}. Delegates to `fs.existsSync` if that function is available.\n *\n * @function existsSync\n * @param {String} filePath Input file path\n * @returns {Boolean} Whether the file exists or not\n *\n * @example\n * var exists = io.existsSync('path/to/data.tsv')\n * console.log(exists) // `true` if file exists, `false` if not.\n */\nexport default function existsSync (filePath) {\n if (fs.existsSync) {\n return fs.existsSync(filePath)\n } else {\n try {\n fs.accessSync(filePath)\n return true\n } catch (ex) {\n return false\n }\n }\n}\n","import {extname} from '../utils/path'\n\n/**\n * Test whether a file name has the given extension\n *\n * @function extMatchesStr\n * @param {String} filePath Input file path\n * @param {String} extension The extension to test. An empty string will match a file with no extension.\n * @returns {Boolean} Whether it matched or not.\n *\n * @example\n * var matches = io.extMatchesStr('path/to/data.tsv', 'tsv')\n * console.log(matches) // `true`\n */\nexport default function extMatchesStr (filePath, extension) {\n // Chop '.' off extension returned by extname\n var ext = extname(filePath).slice(1)\n return ext === extension\n}\n","/* istanbul ignore next */\nimport mkdirp from 'mkdirp'\nimport {dirname} from '../utils/path'\n\n/**\n * Synchronous version of {link #makeDirectories}. Delegates to [mkdirp](http://npmjs.org/package/mkdirp) module\n *\n * @function makeDirectoriesSync\n * @param {String} outPath The path to a file\n *\n * @example\n * io.makeDirectories('path/to/create/to/data.tsv')\n *\n */\nexport default function makeDirectoriesSync (outPath) {\n mkdirp.sync(dirname(outPath))\n}\n","/**\n * Test whether a string matches a given Regular Expression.\n *\n * @function matchesRegExp\n * @param {String} filePath Input file path or file path.\n * @param {RegExp} RegExp The Regular Expression to match against.\n * @returns {Boolean} Whether they match.\n *\n * @example\n * var matches = io.matchesRegExp('.gitignore', /\\.gitignore/)\n * console.log(matches) // `true`\n *\n * var matches = io.matchesRegExp('data/final-data/basic.csv', /\\/final-data\\//)\n * console.log(matches) // `true`\n */\nexport default function matchesRegExp (filePath, regEx) {\n return regEx.test(filePath)\n}\n","export default function isRegExp (obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]'\n}\n","import extMatchesStr from './extMatchesStr'\nimport matchesRegExp from './matchesRegExp'\nimport isRegExp from '../utils/isRegExp'\n\n/**\n * Test whether a file name or path matches a given matcher. Delegates to {@link extMatchesStr} if `matcher` is a string` and tests only against the file name extension. Delegates to {@link matchesRegExp} if matcher is a Regular Expression and tests against entire string, which is usefulf or testing the full file path.\n *\n * @function matches\n * @param {String} filePath Input file path or path to the file.\n * @returns {String|RegExp} matcher The string or Regular Expression to match against.\n *\n * @example\n * var matches = io.matches('path/to/data.tsv', 'tsv')\n * console.log(matches) // `true`\n *\n * var matches = io.matches('.gitignore', /\\.gitignore/)\n * console.log(matches) // `true`\n *\n * var matches = io.matches('file/with/no-extention', '') // Nb. Dot files are treated as files with no extention\n * console.log(matches) // `true`\n */\nexport default function matches (filePath, matcher) {\n if (typeof matcher === 'string') {\n return extMatchesStr(filePath, matcher)\n } else if (isRegExp(matcher)) {\n return matchesRegExp(filePath, matcher)\n } else {\n throw new Error('Matcher argument must be String or Regular Expression')\n }\n}\n","/* istanbul ignore next */\nimport _ from 'underscore'\nimport getParser from '../helpers/getParser'\nimport discernParser from '../helpers/discernParser'\nimport discernLoader from '../helpers/discernLoader'\nimport omit from '../utils/omit'\n\n/**\n * Syncronous version of {@link readData}. Read data given a path ending in the file format. This function detects the same formats as the asynchronous {@link readData} except for `.dbf` files, which it cannot read.\n *\n * * `.json` Array of objects or object\n * * `.csv` Comma-separated\n * * `.tsv` Tab-separated\n * * `.psv` Pipe-separated\n * * `.yaml` or `.yml` Yaml file\n * * `.aml` ArchieML\n * * `.txt` Text file (a string)\n * * other All others are read as a text file\n *\n * @function readDataSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {String|Function|Object} [parserOptions.parser] This can be a string that is the file's delimiter, a function that returns JSON, or, for convenience, can also be a dsv object such as `dsv.dsv('_')` or any object that has a `parse` method that's a function. See `parsers` in library source for examples.\n * @param {Function} [parserOptions.map] Transformation function. See {@link directReaders} for format-specific function signature. In brief, tabular formats get passed a `(row, i, columns)` and must return the modified row. Text or AML formats are passed the full document and must return the modified document. JSON arrays are mapped like tabular documents with `(row, i)` and return the modified row. JSON objects are mapped with Underscore's `_.mapObject` with `(value, key)` and return the modified value.\n * @param {Function} [parserOptions.reviver] Used for JSON files, otherwise ignored. See {@link readJsonSync} for details.\n * @param {Function} [parserOptions.filename] Used for JSON files, otherwise ignored. See {@link readJsonSync} for details.\n * @param {String} [parserOptions.loadMethod=\"safeLoad\"] Used for for YAML files, otherwise ignored. See {@link readYamlSync} for details.\n * @returns {Object} the contents of the file as JSON\n *\n * @example\n * var data = io.readDataSync('path/to/data.tsv')\n * console.log(data) // Json data\n *\n * // Parser specified as a string\n * var data = io.readDataSync('path/to/data.usv', {parser: '_'})\n * console.log(data) // Json data\n *\n * // Parser specified as a function\n * var myParser = dsv.dsv('_').parse\n * // var myParser = dsv.dsv('_') // This also works\n * var data = io.readDataSync('path/to/data.usv', {parser: myParser})\n * console.log(data) // Json data\n *\n * // Parser as an object with a `parse` method\n * var naiveJsonLines = function(dataAsString) {\n * return dataAsString.split('\\n').map(function (row) { return JSON.parse(row) })\n * }\n * var data = io.readDataSync('path/to/data.jsonlines', {parser: naiveJsonLines})\n * console.log(data) // Json data\n *\n * // Shorthand for specifying a map function\n * var data = io.readData('path/to/data.csv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * })\n * console.log(data) // Json data\n *\n * // Explicitly specify a map function and a filename for a json file. See `readJson` for more details\n * var data = io.readData('path/to/data.json', {\n * map: function (k, v) {\n * if (typeof v === 'number') {\n * return v * 2\n * }\n * return v\n * },\n * filename: 'awesome-data.json'\n * })\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n */\nexport default function readDataSync (filePath, opts_) {\n var parser\n var parserOptions\n if (arguments.length === 2) {\n if (opts_.parser) {\n parser = getParser(opts_.parser)\n opts_ = omit(opts_, ['parser'])\n if (_.isEmpty(opts_)) {\n opts_ = undefined\n }\n } else {\n parser = discernParser(filePath)\n }\n\n if (opts_ && opts_.parserOptions) {\n if (typeof opts_.parserOptions === 'function') {\n parserOptions = {map: opts_.parserOptions}\n } else {\n parserOptions = opts_.parserOptions\n }\n } else if (opts_) {\n if (typeof opts_ === 'function') {\n parserOptions = {map: opts_}\n } else {\n parserOptions = opts_\n }\n }\n } else {\n parser = discernParser(filePath)\n }\n var loader = discernLoader(filePath, {sync: true})\n return loader(filePath, parser, parserOptions)\n}\n","export var slice = [].slice;\n","import {slice} from \"./array\";\n\nvar noabort = {};\n\nfunction Queue(size) {\n this._size = size;\n this._call =\n this._error = null;\n this._tasks = [];\n this._data = [];\n this._waiting =\n this._active =\n this._ended =\n this._start = 0; // inside a synchronous task callback?\n}\n\nQueue.prototype = queue.prototype = {\n constructor: Queue,\n defer: function(callback) {\n if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n if (this._call) throw new Error(\"defer after await\");\n if (this._error != null) return this;\n var t = slice.call(arguments, 1);\n t.push(callback);\n ++this._waiting, this._tasks.push(t);\n poke(this);\n return this;\n },\n abort: function() {\n if (this._error == null) abort(this, new Error(\"abort\"));\n return this;\n },\n await: function(callback) {\n if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n if (this._call) throw new Error(\"multiple await\");\n this._call = function(error, results) { callback.apply(null, [error].concat(results)); };\n maybeNotify(this);\n return this;\n },\n awaitAll: function(callback) {\n if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n if (this._call) throw new Error(\"multiple await\");\n this._call = callback;\n maybeNotify(this);\n return this;\n }\n};\n\nfunction poke(q) {\n if (!q._start) {\n try { start(q); } // let the current task complete\n catch (e) {\n if (q._tasks[q._ended + q._active - 1]) abort(q, e); // task errored synchronously\n else if (!q._data) throw e; // await callback errored synchronously\n }\n }\n}\n\nfunction start(q) {\n while (q._start = q._waiting && q._active < q._size) {\n var i = q._ended + q._active,\n t = q._tasks[i],\n j = t.length - 1,\n c = t[j];\n t[j] = end(q, i);\n --q._waiting, ++q._active;\n t = c.apply(null, t);\n if (!q._tasks[i]) continue; // task finished synchronously\n q._tasks[i] = t || noabort;\n }\n}\n\nfunction end(q, i) {\n return function(e, r) {\n if (!q._tasks[i]) return; // ignore multiple callbacks\n --q._active, ++q._ended;\n q._tasks[i] = null;\n if (q._error != null) return; // ignore secondary errors\n if (e != null) {\n abort(q, e);\n } else {\n q._data[i] = r;\n if (q._waiting) poke(q);\n else maybeNotify(q);\n }\n };\n}\n\nfunction abort(q, e) {\n var i = q._tasks.length, t;\n q._error = e; // ignore active callbacks\n q._data = undefined; // allow gc\n q._waiting = NaN; // prevent starting\n\n while (--i >= 0) {\n if (t = q._tasks[i]) {\n q._tasks[i] = null;\n if (t.abort) {\n try { t.abort(); }\n catch (e) { /* ignore */ }\n }\n }\n }\n\n q._active = NaN; // allow notification\n maybeNotify(q);\n}\n\nfunction maybeNotify(q) {\n if (!q._active && q._call) {\n var d = q._data;\n q._data = undefined; // allow gc\n q._call(q._error, d);\n }\n}\n\nexport default function queue(concurrency) {\n if (concurrency == null) concurrency = Infinity;\n else if (!((concurrency = +concurrency) >= 1)) throw new Error(\"invalid concurrency\");\n return new Queue(concurrency);\n}\n","// Used internally by `readdir` functions to make more DRY\n/* istanbul ignore next */\nimport fs from 'fs'\n/* istanbul ignore next */\nimport queue from 'd3-queue/src/queue'\nimport matches from '../helpers/matches'\nimport identity from '../utils/identity'\nimport {joinPath} from '../utils/path'\n\nexport default function readdir (modeInfo, dirPath, opts_, cb) {\n opts_ = opts_ || {}\n var isAsync = modeInfo.async\n\n // Convert to array if a string\n opts_.include = strToArray(opts_.include)\n opts_.exclude = strToArray(opts_.exclude)\n\n // Set defaults if not provided\n opts_.includeMatchAll = (opts_.includeMatchAll) ? 'every' : 'some'\n opts_.excludeMatchAll = (opts_.excludeMatchAll) ? 'every' : 'some'\n\n if (isAsync === true) {\n fs.readdir(dirPath, function (err, files) {\n if (err) {\n throw err\n }\n filter(files, cb)\n })\n } else {\n return filterSync(fs.readdirSync(dirPath))\n }\n\n function strToArray (val) {\n if (val && !Array.isArray(val)) {\n val = [val]\n }\n return val\n }\n\n function filterByType (file, cb) {\n var filePath = (opts_.fullPath) ? file : joinPath(dirPath, file)\n if (isAsync === true) {\n fs.stat(filePath, function (err, stats) {\n var filtered = getFiltered(stats.isDirectory())\n cb(err, filtered)\n })\n } else {\n return getFiltered(fs.statSync(filePath).isDirectory())\n }\n\n function getFiltered (isDir) {\n if (opts_.skipDirectories) {\n if (isDir) {\n return false\n }\n }\n if (opts_.skipFiles) {\n if (!isDir) {\n return false\n }\n }\n return file\n }\n }\n\n function filterByMatchers (files) {\n var filtered = files.filter(function (fileName) {\n var isExcluded\n var isIncluded\n\n // Don't include if matches exclusion matcher\n if (opts_.exclude) {\n isExcluded = opts_.exclude[opts_.excludeMatchAll](function (matcher) {\n return matches(fileName, matcher)\n })\n if (isExcluded === true) {\n return false\n }\n }\n\n // Include if matches inclusion matcher, exclude if it doesn't\n if (opts_.include) {\n isIncluded = opts_.include[opts_.includeMatchAll](function (matcher) {\n return matches(fileName, matcher)\n })\n return isIncluded\n }\n\n // Return true if it makes it to here\n return true\n })\n\n // Prefix with the full path if that's what we asked for\n if (opts_.fullPath === true) {\n filtered = filtered.map(function (fileName) {\n return joinPath(dirPath, fileName)\n })\n }\n\n return filtered\n }\n\n function filterSync (files) {\n var filtered = filterByMatchers(files)\n\n return filtered.map(function (file) {\n return filterByType(file)\n }).filter(identity)\n }\n\n function filter (files, cb) {\n var filterQ = queue()\n\n var filtered = filterByMatchers(files)\n\n filtered.forEach(function (fileName) {\n filterQ.defer(filterByType, fileName)\n })\n\n filterQ.awaitAll(function (err, namesOfType) {\n cb(err, namesOfType.filter(identity))\n })\n }\n}\n","import readdir from './readdir'\n\n/**\n * Asynchronously get a list of a directory's files and folders if certain critera are met.\n *\n * @function readdirFilter\n * @param {String} dirPath The directory to read from\n * @param {Object} options Filter options, see below\n * @param {Boolean} [options.fullPath=false] If `true`, return the full path of the file, otherwise just return the file name.\n * @param {Boolean} [options.skipFiles=false] If `true`, omit files from the results.\n * @param {Boolean} [options.skipDirectories=false] If `true`, omit directories from the results.\n * @param {String|RegExp|Array} options.include If given a string, return files that have that string as their extension. If given a Regular Expression, return the files whose name matches the pattern. Can also take a list of either type. List matching behavior is described in `includeMatchAll`.\n * @param {String|RegExp|Array} options.exclude If given a string, return files that do not have that string as their extension. If given a Regular Expression, omit files whose name matches the pattern. Can also take a list of either type. List matching behavior is described in `excludeMatchAll`.\n * @param {Boolean} [options.includeMatchAll=false] If true, require all include conditions to be met for a file to be included.\n * @param {Boolean} [options.excludeMatchAll=false] If true, require all exclude conditions to be met for a file to be excluded.\n * @param {Function} callback Has signature `(err, data)` where `files` is a list of matching file names.\n *\n * @example\n * // dir contains `data-0.tsv`, `data-0.json`, `data-0.csv`, `data-1.csv`, `.hidden-file`\n * io.readdirFilter('path/to/files', {include: 'csv'}, function(err, files){\n * console.log(files) // ['data-0.csv', 'data-1.csv']\n * })\n *\n * io.readdirFilter('path/to/files', {include: [/^data/], exclude: ['csv', 'json']}, , function(err, files){\n * console.log(files) // ['path/to/files/data-0.csv', 'path/to/files/data-1.csv', 'path/to/files/data-0.tsv']\n * })\n *\n */\nexport default function readdirFilter (dirPath, opts_, cb) {\n if (typeof cb === 'undefined') {\n cb = opts_\n opts_ = undefined\n }\n\n readdir({async: true}, dirPath, opts_, cb)\n}\n","import readdir from './readdir'\n\n/**\n * Syncronous version of {@link readdirFilter}. Get a list of a directory's files and folders if certain critera are met.\n *\n * @function readdirFilterSync\n * @param {String} dirPath The directory to read from\n * @param {Object} options Filter options, see below\n * @param {Boolean} [options.fullPath=false] If `true`, return the full path of the file, otherwise just return the file name.\n * @param {Boolean} [options.skipFiles=false] If `true`, omit files from the results.\n * @param {Boolean} [options.skipDirectories=false] If `true`, omit directories from the results.\n * @param {String|RegExp|Array} options.include If given a string, return files that have that string as their extension. If given a Regular Expression, return the files whose name matches the pattern. Can also take a list of either type. List matching behavior is described in `includeMatchAll`.\n * @param {String|RegExp|Array} options.exclude If given a string, return files that do not have that string as their extension. If given a Regular Expression, omit files whose name matches the pattern. Can also take a list of either type. List matching behavior is described in `excludeMatchAll`.\n * @param {Boolean} [options.includeMatchAll=false] If true, require all include conditions to be met for a file to be included.\n * @param {Boolean} [options.excludeMatchAll=false] If true, require all exclude conditions to be met for a file to be excluded.\n * @returns {Array} List of matching file names\n *\n * @example\n * // dir contains `data-0.tsv`, `data-0.json`, `data-0.csv`, `data-1.csv`, `.hidden-file`\n * var files = io.readdirFilterSync('path/to/files', {include: 'csv'})\n * console.log(files) // ['data-0.csv', 'data-1.csv']\n *\n * var files = io.readdirFilterSync('path/to/files', {include: [/^data/], exclude: 'json', fullPath: true})\n * console.log(files) // ['path/to/files/data-0.csv', 'path/to/files/data-1.csv', 'path/to/files/data-0.tsv']\n *\n * var files = io.readdirFilterSync('path/to/files', {include: [/^data/, 'json'], fullPath: true, includeMatchAll: true})\n * console.log(files) // ['path/to/files/data-0.json', 'path/to/files/data-1.json']\n *\n */\nexport default function readdirFilterSync (dirPath, opts_) {\n return readdir({async: false}, dirPath, opts_)\n}\n","import readData from '../readers/readData'\nimport parserAml from '../parsers/aml'\n\n/**\n * Asynchronously read an ArchieMl file. Returns an empty object if file is empty.\n *\n * @function readAml\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Takes the parsed file (usually an object) and must return the modified file. See example below.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readAml('path/to/data.aml', function (err, data) {\n * console.log(data) // json data\n * })\n *\n * // With map\n * io.readAml('path/to/data.aml', function (amlFile) {\n * amlFile.height = amlFile.height * 2\n * return amlFile\n * }, function (err, data) {\n * console.log(data) // json data with height multiplied by 2\n * })\n */\nexport default function readAml (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserAml, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserAml from '../parsers/aml'\n\n/**\n * Synchronously read an ArchieML file. Returns an empty object if file is empty.\n *\n * @function readAmlSync\n * @param {String} filePath Input file path\n * @param {Function} [map] Optional map function. Takes the parsed file (usually an object) and must return the modified file. See example below.\n * @returns {Object} The parsed file\n *\n * @example\n * var data = io.readAmlSync('path/to/data.aml')\n * console.log(data) // json data\n *\n * var data = io.readAmlSync('path/to/data-with-comments.aml', function (amlFile) {\n * amlFile.height = amlFile.height * 2\n * return amlFile\n * })\n * console.log(data) // json data with height multiplied by 2\n */\nexport default function readAmlSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserAml, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserCsv from '../parsers/csv'\n\n/**\n * Asynchronously read a comma-separated value file. Returns an empty array if file is empty.\n *\n * @function readCsv\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readCsv('path/to/data.csv', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Transform values on load\n * io.readCsv('path/to/data.csv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }, function (err, data) {\n * console.log(data) // Converted json data\n * })\n *\n * // Pass in an object with a `map` key\n * io.readCsv('path/to/data.csv', {map: function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }}, function (err, data) {\n * console.log(data) // Converted json data\n * })\n */\nexport default function readCsv (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserCsv, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserCsv from '../parsers/csv'\n\n/**\n * Synchronously read a comma-separated value file. Returns an empty array if file is empty.\n *\n * @function readCsvSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @returns {Array} the contents of the file as JSON\n *\n * @example\n * var data = io.readCsvSync('path/to/data.csv')\n * console.log(data) // Json data\n *\n * // Transform values on load\n * var data = io.readCsvSync('path/to/data.csv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * })\n * console.log(data) // Json data with casted values\n *\n * // Pass in an object with a `map` key\n * var data = io.readCsvSync('path/to/data.csv', {map: function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }})\n * console.log(data) // Json data with casted values\n */\nexport default function readCsvSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserCsv, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserJson from '../parsers/json'\n\n/**\n * Asynchronously read a JSON file. Returns an empty array if file is empty.\n *\n * @function readJson\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {Function} [parserOptions.map] Map function. Called once for each row if your file is an array (it tests if the first non-whitespace character is a `[`) with a callback signature `(row, i)` and delegates to `_.map`. Otherwise it's considered an object and the callback the signature is `(value, key)` and delegates to `_.mapObject`. See example below.\n * @param {String} [parserOptions.filename] File name displayed in the error message.\n * @param {Function} [parserOptions.reviver] A function that prescribes how the value originally produced by parsing is mapped before being returned. See JSON.parse docs for more: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readJson('path/to/data.json', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Specify a map\n * io.readJson('path/to/data.json', function (row, i) {\n * row.height = row.height * 2\n * return row\n * }, function (err, data) {\n * console.log(data) // Json data with height multiplied by two\n * })\n *\n * // Specify a filename\n * io.readJson('path/to/data.json', 'awesome-data.json', function (err, data) {\n * console.log(data) // Json data, any errors are reported with `fileName`.\n * })\n *\n * // Specify a map and a filename\n * io.readJson('path/to/data.json', {\n * map: function (row, i) {\n * row.height = row.height * 2\n * return row\n * },\n * filename: 'awesome-data.json'\n * }, function (err, data) {\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n * })\n *\n * // Specify a map and a filename on json object\n * io.readJson('path/to/json-object.json', {\n * map: function (value, key) {\n * if (typeof value === 'number') {\n * return value * 2\n * }\n * return value\n * },\n * filename: 'awesome-data.json'\n * }, function (err, data) {\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n * })\n *\n * // Specify a reviver function and a filename\n * io.readJson('path/to/data.json', {\n * reviver: function (k, v) {\n * if (typeof v === 'number') {\n * return v * 2\n * }\n * return v\n * },\n * filename: 'awesome-data.json'\n * }, function (err, data) {\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n * })\n */\nexport default function readJson (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserJson, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserJson from '../parsers/json'\n\n/**\n * Synchronously read a JSON file. Returns an empty array if file is empty.\n *\n * @function readJsonSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {Function} [parserOptions.map] Map function. Called once for each row if your file is an array (it tests if the first non-whitespace character is a `[`) with a callback signature `(row, i)` and delegates to `_.map`. Otherwise it's considered an object and the callback the signature is `(value, key)` and delegates to `_.mapObject`. See example below.\n * @param {String} [parserOptions.filename] File name displayed in the error message.\n * @param {Function} [parserOptions.reviver] A function that prescribes how the value originally produced by parsing is mapped before being returned. See JSON.parse docs for more: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter\n * @returns {Array|Object} The contents of the file as JSON\n *\n * @example\n * var data = io.readJsonSync('path/to/data.json')\n * console.log(data) // Json data\n *\n * // Specify a map\n * var data = io.readJson('path/to/data.json', function (k, v) {\n * if (typeof v === 'number') {\n * return v * 2\n * }\n * return v\n * })\n * console.log(data) // Json data with any number values multiplied by two\n *\n * // Specify a filename\n * var data = io.readJson('path/to/data.json', 'awesome-data.json')\n * console.log(data) // Json data, any errors are reported with `fileName`.\n *\n * // Specify a map and a filename\n * var data = io.readJsonSync('path/to/data.json', {\n * map: function (k, v) {\n * if (typeof v === 'number') {\n * return v * 2\n * }\n * return v\n * },\n * filename: 'awesome-data.json'\n * })\n *\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n */\nexport default function readJsonSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserJson, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserPsv from '../parsers/psv'\n\n/**\n * Asynchronously read a pipe-separated value file. Returns an empty array if file is empty.\n *\n * @function readPsv\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readPsv('path/to/data.psv', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Transform values on load\n * io.readPsv('path/to/data.psv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }, function (err, data) {\n * console.log(data) // Json data with casted values\n * })\n */\nexport default function readPsv (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserPsv, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserPsv from '../parsers/psv'\n\n/**\n * Synchronously read a pipe-separated value file. Returns an empty array if file is empty.\n *\n * @function readPsvSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @returns {Array} The contents of the file as JSON\n *\n * @example\n * var data = io.readPsvSync('path/to/data.psv')\n * console.log(data) // Json data\n *\n * var data = io.readPsvSync('path/to/data.psv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * })\n * console.log(data) // Json data with casted values\n */\nexport default function readPsvSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserPsv, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserTsv from '../parsers/tsv'\n\n/**\n * Asynchronously read a tab-separated value file. Returns an empty array if file is empty.\n *\n * @function readTsv\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readTsv('path/to/data.tsv', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Transform values on load\n * io.readTsv('path/to/data.tsv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }, function (err, data) {\n * console.log(data) // Json data with casted values\n * })\n */\nexport default function readTsv (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserTsv, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserTsv from '../parsers/tsv'\n\n/**\n * Synchronously read a tab-separated value file. Returns an empty array if file is empty.\n *\n * @function readTsvSync\n * @param {String} filePath Input file path\n * @param {Function} [map] Optional map function, called once for each row (header row skipped). Has signature `(row, i, columns)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @returns {Array} the contents of the file as JSON\n *\n * @example\n * var data = io.readTsvSync('path/to/data.tsv')\n * console.log(data) // Json data\n *\n * // Transform values on load\n * var data = io.readTsvSync('path/to/data.tsv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * })\n * console.log(data) // Json data with casted values\n */\nexport default function readTsvSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserTsv, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserTxt from '../parsers/txt'\n\n/**\n * Asynchronously read a text file. Returns an empty string if file is empty.\n *\n * @function readTxt\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Takes the file read in as text and return the modified file. See example below.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readTxt('path/to/data.txt', function (err, data) {\n * console.log(data) // string data\n * })\n *\n * io.readTxt('path/to/data.txt', function (str) {\n * return str.replace(/hello/g, 'goodbye') // Replace all instances of `\"hello\"` with `\"goodbye\"`\n * }, function (err, data) {\n * console.log(data) // string data with values replaced\n * })\n */\nexport default function readTxt (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserTxt, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserTxt from '../parsers/txt'\n\n/**\n * Synchronously read a text file. Returns an empty string if file is empty.\n *\n * @function readTxtSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Takes the file read in as text and must return the modified file. See example below.\n * @returns {String} the contents of the file as a string\n *\n * @example\n * var data = io.readTxtSync('path/to/data.txt')\n * console.log(data) // string data\n *\n * var data = io.readTxtSync('path/to/data.txt', function (str) {\n * return str.replace(/hello/g, 'goodbye') // Replace all instances of `\"hello\"` with `\"goodbye\"`\n * })\n * console.log(data) // string data with values replaced\n */\nexport default function readTxtSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserTxt, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserYaml from '../parsers/yaml'\n\n/**\n * Asynchronously read a yaml file. Returns an empty object if file is empty. `parseOptions` will pass any other optinos directl to js-yaml library. See its documentation for more detail https://github.com/nodeca/js-yaml\n *\n * @function readYaml\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {Function} [parserOptions.map] Optional map function. Called once for each row (header row skipped). If your file is an array (it tests if first non-whitespace character is a `[`), the callback has the signature `(row, i)` and delegates to `_.map`. Otherwise it's considered an object and the callback has the signature `(value, key)` and delegates to `_.mapObject`. See example below.\n * @param {String} [parserOptions.loadMethod=\"safeLoad\"] The js-yaml library allows you to specify a more liberal `\"load\"` option which will accept RegExp and function values in your file.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * // Can be `.yaml` or `.yml` extension\n * io.readYaml('path/to/data.yaml', function (err, data) {\n * console.log(data) // json data\n * })\n *\n * // With map function shorthand on an object\n * io.readYaml('path/to/data.yaml', function (yamlFile) {\n * yamlFile.height = yamlFile.height * 2\n * return yamlFile\n * }, function (err, data) {\n * console.log(data) // json data with `height` values doubled\n * })\n *\n * // With map function on an object and load settings\n * io.readYaml('path/to/data.yaml', {\n * loadMethod: 'load',\n * map: function (value, key) {\n * yamlFile.height = yamlFile.height * 2\n * return yamlFile\n * }\n * }, function (err, data) {\n * console.log(data) // json data with `height` values doubled\n * })\n */\nexport default function readYaml (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserYaml, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserYaml from '../parsers/yaml'\n\n/**\n * Synchronously read a yaml file. Returns an empty object if file is empty. `parseOptions` will pass any other optinos directl to js-yaml library. See its documentation for more detail https://github.com/nodeca/js-yaml\n *\n * @function readYamlSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {Function} [parserOptions.map] Optional map function. Called once for each row (header row skipped). If your file is an array (it tests if first non-whitespace character is a `[`), the callback has the signature `(row, i)` and delegates to `_.map`. Otherwise it's considered an object and the callback has the signature `(value, key)` and delegates to `_.mapObject`. See example below.\n * @param {String} [parserOptions.loadMethod=\"safeLoad\"] The js-yaml library allows you to specify a more liberal `\"load\"` method which will accept RegExp and function values in your file.\n * @returns {Array|Object} the contents of the file as a string\n *\n * @example\n * // Can be `.yaml` or `.yml` extension\n * var data = io.readYamlSync('path/to/data.yaml')\n * console.log(data) // json data\n *\n * // With map function\n * var data = io.readYaml('path/to/data.yaml', function (yamlFile) {\n * yamlFile.height = yamlFile.height * 2\n * return yamlFile\n * })\n * console.log(data) // json data with `height` values doubled\n *\n * // With map function and load settings\n * var data = io.readYaml('path/to/data.yaml', {\n * loadMethod: 'load',\n * map: function (yamlFile) {\n * yamlFile.height = yamlFile.height * 2\n * return yamlFile\n * }\n * })\n * console.log(data) // json data with `height` values doubled\n */\nexport default function readYamlSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserYaml, parserOptions: parserOptions})\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n/* istanbul ignore next */\nimport _ from 'underscore'\nimport makeDirectories from '../helpers/makeDirectories'\nimport readData from '../readers/readData'\nimport writeData from './writeData'\nimport extend from '../helpers/extend'\nimport omit from '../utils/omit'\n\n/**\n * Append to an existing data object, creating a new file if one does not exist. If appending to an object, data is extended with {@link extend}. For tabular formats (csv, tsv, etc), existing data and new data must be an array of flat objects (cannot contain nested objects or arrays).\n *\n * Supported formats:\n *\n * * `.json` Array of objects\n * * `.csv` Comma-separated\n * * `.tsv` Tab-separated\n * * `.psv` Pipe-separated\n * * `.yaml` or `.yml` Yaml\n *\n * *Note: Does not currently support .dbf files.*\n *\n * @function appendData\n * @param {String} filePath File to append to\n * @param {Array|Object} data The new data to append\n * @param {Object} [options] Optional options object passed to {@link writeData}. See that function for format-specific options.\n * @param {Function} callback Has signature `(err, data)`. Data is the combined data that was written out\n *\n * @example\n * io.appendData('path/to/data.json', jsonData, function (err) {\n * console.log(err)\n * })\n *\n * io.appendData('path/to/create/to/data.csv', flatJsonData, {makeDirectories: true}, function (err){\n * console.log(err)\n * })\n */\nexport default function appendData (outPath, data, opts_, cb) {\n if (typeof cb === 'undefined') {\n cb = opts_\n }\n if (typeof opts_ === 'object' && (opts_.makeDirectories === true || opts_.makeDirs === true)) {\n makeDirectories(outPath, proceed)\n } else {\n proceed()\n }\n function proceed (err) {\n if (err) {\n throw err\n }\n opts_ = omit(opts_, ['makeDirectories', 'makeDirs'])\n // Run append file to delegate creating a new file if none exists\n fs.appendFile(outPath, '', function (err) {\n if (!err) {\n readData(outPath, function (err, existingData) {\n if (!err) {\n if (!_.isEmpty(existingData)) {\n if (Array.isArray(existingData)) {\n data = existingData.concat(data)\n } else if (typeof existingData === 'object') {\n data = extend({}, existingData, data)\n }\n }\n writeData(outPath, data, opts_, cb)\n } else {\n cb(err)\n }\n })\n } else {\n cb(err)\n }\n })\n }\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n/* istanbul ignore next */\nimport _ from 'underscore'\nimport warn from '../reporters/warn'\nimport discernFileFormatter from '../helpers/discernFileFormatter'\nimport makeDirectoriesSync from '../helpers/makeDirectoriesSync'\nimport omit from '../utils/omit'\n\n/**\n * Syncronous version of {@link writers#writeData}\n *\n * Supports the same formats with the exception of `.dbf` files\n *\n * @function writeDataSync\n * @param {String} filePath Input file path\n * @param {Array|Object|String} data Data to write\n * @param {Object} [options] Optional options object, see below\n * @param {Boolean} [options.makeDirectories=false] If `true`, create intermediate directories to your data file. Can also be `makeDirs` for short.\n * @param {Function|Array} [options.replacer] Used for JSON formats. Function to filter your objects before writing or an array of whitelisted keys to keep. Examples below. See JSON.stringify docs for more info https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\n * @param {Number} [options.indent] Used for JSON and YAML formats. Specifies indent level. Default for YAML is `2`, `0` for JSON.\n * @param {String} [options.writeMethod='safeDump'] Used for YAML formats. Can also be `\"dump\"` to allow writing of RegExes and functions. The `options` object will also pass anything onto `js-yaml`. See its docs for other options. Example shown below with `sortKeys`. https://github.com/nodeca/js-yaml#safedump-object---options-\n * @param {Array} [options.columns] Used for tabular formats. Optionally specify a list of column names to use. Otherwise they are detected from the data. See `d3-dsv` for more detail: https://github.com/d3/d3-dsv/blob/master/README.md#dsv_format\n * @returns {String} The that was written as a string\n *\n * @example\n * io.writeDataSync('path/to/data.json', jsonData)\n *\n * io.writeDataSync('path/to/create/to/data.csv', flatJsonData, {makeDirs: true})\n *\n * io.writeDataSync('path/to/to/data.yaml', jsonData, {writeMehod: \"dump\", sortKeys: true})\n *\n * io.writeDataSync('path/to/to/data.json', jsonData, {indent: 4})\n *\n * io.writeDataSync('path/to/to/data.json', jsonData, {\n * indent: 4,\n * replacer: function (key, value) {\n * // Filtering out string properties\n * if (typeof value === \"string\") {\n * return undefined\n * }\n * return value\n * }\n * })\n *\n * io.writeDataSync('path/to/to/data.json', jsonData, {\n * indent: 4,\n * replacer: ['name', 'occupation'] // Only keep \"name\" and \"occupation\" values\n * })\n */\nexport default function writeDataSync (outPath, data, opts_) {\n if (_.isEmpty(data)) {\n warn('You didn\\'t pass any data to write for file: `' + outPath + '`. Writing out an empty file...')\n }\n var writeOptions\n if (typeof opts_ === 'object') {\n if (opts_.makeDirectories === true || opts_.makeDirs === true) {\n makeDirectoriesSync(outPath)\n }\n writeOptions = opts_\n }\n opts_ = omit(opts_, ['makeDirectories', 'makeDirs'])\n var fileFormatter = discernFileFormatter(outPath)\n var formattedData = fileFormatter(data, writeOptions)\n fs.writeFileSync(outPath, formattedData)\n return formattedData\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n/* istanbul ignore next */\nimport _ from 'underscore'\nimport makeDirectoriesSync from '../helpers/makeDirectoriesSync'\nimport readDataSync from '../readers/readDataSync'\nimport writeDataSync from './writeDataSync'\nimport extend from '../helpers/extend'\nimport omit from '../utils/omit'\n\n/**\n * Synchronous version of {@link writers#appendData}. See that function for supported formats\n *\n * @function appendDataSync\n * @param {String} filePath File to append to\n * @param {Array|Object} data The new data to append\n * @param {Object} [options] Optional options object passed to {@link writeData}. See that function for format-specific options.\n * @returns {Object} The combined data that was written\n *\n * @example\n * io.appendDataSync('path/to/data.json', jsonData)\n *\n * io.appendDataSync('path/to/create/to/data.csv', flatJsonData, {makeDirectories: true})\n */\nexport default function appendDataSync (outPath, data, opts_) {\n // Run append file to delegate creating a new file if none exists\n if (opts_ && (opts_.makeDirectories === true || opts_.makeDirs === true)) {\n makeDirectoriesSync(outPath)\n }\n opts_ = omit(opts_, ['makeDirectories', 'makeDirs'])\n fs.appendFileSync(outPath, '')\n var existingData = readDataSync(outPath)\n if (!_.isEmpty(existingData)) {\n if (Array.isArray(existingData)) {\n data = existingData.concat(data)\n } else if (typeof existingData === 'object') {\n data = extend({}, existingData, data)\n }\n }\n writeDataSync(outPath, data, opts_)\n return data\n}\n","// converters\nexport {default as convertData} from './src/converters/convertData'\nexport {default as convertDbfToData} from './src/converters/convertDbfToData'\nexport {default as writeDbfToData} from './src/converters/convertDbfToData' // Legacy support\n// formatters\nexport {default as formatters} from './src/formatters/index'\nexport {default as formatCsv} from './src/formatters/csv'\nexport {default as formatDbf} from './src/formatters/dbf'\nexport {default as formatJson} from './src/formatters/json'\nexport {default as formatPsv} from './src/formatters/psv'\nexport {default as formatTsv} from './src/formatters/tsv'\nexport {default as formatTxt} from './src/formatters/txt'\nexport {default as formatYaml} from './src/formatters/yaml'\n// helpers\nexport {default as deepExtend} from './src/helpers/deepExtend'\nexport {default as discernFileFormatter} from './src/helpers/discernFileFormatter'\nexport {default as discernFormat} from './src/helpers/discernFormat'\nexport {default as discernParser} from './src/helpers/discernParser'\nexport {default as exists} from './src/helpers/exists'\nexport {default as existsSync} from './src/helpers/existsSync'\nexport {default as extend} from './src/helpers/extend'\nexport {default as extMatchesStr} from './src/helpers/extMatchesStr'\nexport {default as getParser} from './src/helpers/getParser'\nexport {default as makeDirectories} from './src/helpers/makeDirectories'\nexport {default as makeDirectoriesSync} from './src/helpers/makeDirectoriesSync'\nexport {default as matches} from './src/helpers/matches'\nexport {default as matchesRegExp} from './src/helpers/matchesRegExp'\n// parsers\nexport {default as parsers} from './src/parsers/index'\nexport {default as parseAml} from './src/parsers/aml'\nexport {default as parseCsv} from './src/parsers/csv'\nexport {default as parseJson} from './src/parsers/json'\nexport {default as parsePsv} from './src/parsers/psv'\nexport {default as parseTsv} from './src/parsers/tsv'\nexport {default as parseTxt} from './src/parsers/txt'\nexport {default as parseYaml} from './src/parsers/yaml'\n// readers\nexport {default as readData} from './src/readers/readData'\nexport {default as readDataSync} from './src/readers/readDataSync'\nexport {default as readdirFilter} from './src/readers/readdirFilter'\nexport {default as readdirFilterSync} from './src/readers/readdirFilterSync'\n// directReaders\nexport {default as readAml} from './src/directReaders/readAml'\nexport {default as readAmlSync} from './src/directReaders/readAmlSync'\nexport {default as readCsv} from './src/directReaders/readCsv'\nexport {default as readCsvSync} from './src/directReaders/readCsvSync'\nexport {default as readDbf} from './src/directReaders/readDbf'\nexport {default as readJson} from './src/directReaders/readJson'\nexport {default as readJsonSync} from './src/directReaders/readJsonSync'\nexport {default as readPsv} from './src/directReaders/readPsv'\nexport {default as readPsvSync} from './src/directReaders/readPsvSync'\nexport {default as readTsv} from './src/directReaders/readTsv'\nexport {default as readTsvSync} from './src/directReaders/readTsvSync'\nexport {default as readTxt} from './src/directReaders/readTxt'\nexport {default as readTxtSync} from './src/directReaders/readTxtSync'\nexport {default as readYaml} from './src/directReaders/readYaml'\nexport {default as readYamlSync} from './src/directReaders/readYamlSync'\n// writers\nexport {default as appendData} from './src/writers/appendData'\nexport {default as appendDataSync} from './src/writers/appendDataSync'\nexport {default as writeData} from './src/writers/writeData'\nexport {default as writeDataSync} from './src/writers/writeDataSync'\n"],"names":["root","previousUnderscore","_","ArrayProto","Array","prototype","ObjProto","Object","FuncProto","Function","push","slice","toString","hasOwnProperty","nativeIsArray","isArray","nativeKeys","keys","nativeBind","bind","nativeCreate","create","Ctor","obj","_wrapped","module","exports","VERSION","optimizeCb","func","context","argCount","value","call","other","index","collection","accumulator","apply","arguments","cb","identity","isFunction","isObject","matcher","property","iteratee","Infinity","createAssigner","keysFunc","undefinedOnly","length","source","l","i","key","baseCreate","result","MAX_ARRAY_INDEX","Math","pow","getLength","isArrayLike","each","forEach","map","collect","results","currentKey","createReduce","dir","iterator","memo","reduce","foldl","inject","reduceRight","foldr","find","detect","predicate","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","contains","includes","include","item","fromIndex","guard","values","indexOf","invoke","method","args","isFunc","pluck","where","attrs","findWhere","max","lastComputed","computed","min","shuffle","set","shuffled","rand","random","sample","n","sortBy","sort","left","right","a","criteria","b","group","behavior","groupBy","has","indexBy","countBy","toArray","size","partition","pass","fail","first","head","take","array","initial","last","rest","tail","drop","compact","flatten","input","shallow","strict","startIndex","output","idx","isArguments","j","len","without","difference","uniq","unique","isSorted","isBoolean","seen","union","intersection","argsLength","zip","unzip","object","createPredicateIndexFinder","findLastIndex","sortedIndex","low","high","mid","floor","createIndexFinder","predicateFind","isNaN","lastIndexOf","range","start","stop","step","ceil","executeBound","sourceFunc","boundFunc","callingContext","self","TypeError","bound","concat","partial","boundArgs","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","remaining","trailing","debounce","immediate","timestamp","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","collectNonEnumProps","nonEnumIdx","constructor","proto","prop","allKeys","mapObject","pairs","invert","functions","methods","names","extend","extendOwn","assign","pick","oiteratee","omit","String","defaults","props","clone","tap","interceptor","isMatch","eq","aStack","bStack","className","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isString","isElement","nodeType","type","name","Int8Array","isFinite","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","unescapeMap","createEscaper","escaper","match","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","noMatch","escapes","escapeChar","template","text","settings","oldSettings","interpolate","evaluate","offset","variable","render","e","data","argument","chain","instance","_chain","mixin","valueOf","toJSON","define","amd","this","EOL","EOF","QUOTE","NEWLINE","RETURN","objectConverter","columns","JSON","stringify","customConverter","f","row","inferColumns","rows","columnSet","column","delimiter","reFormat","DELIMITER","charCodeAt","parse","convert","parseRows","I","N","token","eof","eol","c","t","format","formatValue","formatRows","formatRow","splitPathRe","posixSplitPath","filename","out","exec","shift","extname","dirname","path","joinPath","discernFormat","filePath","ext","formatName","csv","dsv","csvParse","csvFormat","str","parserOptions","d","mapFn","trim","charAt","jsonParser","reviver","dsvFormat","tsv","tsvParse","tsvFormat","isNothing","subject","sequence","target","sourceKeys","repeat","count","cycle","isNegativeZero","number","Number","NEGATIVE_INFINITY","YAMLException","reason","mark","message","captureStackTrace","stack","common","require$$0","Mark","buffer","line","getSnippet","indent","maxLength","end","snippet","TYPE_CONSTRUCTOR_OPTIONS","YAML_NODE_KINDS","compileStyleAliases","style","alias","Type","tag","kind","resolve","construct","instanceOf","represent","defaultStyle","styleAliases","require$$1","require$$2","compileList","schema","exclude","includedSchema","currentType","previousType","previousIndex","compileMap","collectType","Schema","definition","implicit","explicit","loadKind","compiledImplicit","compiledExplicit","compiledTypeMap","DEFAULT","createSchema","schemas","types","require$$3","resolveYamlNull","constructYamlNull","resolveYamlBoolean","constructYamlBoolean","isHexCode","isOctCode","isDecCode","resolveYamlInteger","hasDigits","ch","constructYamlInteger","sign","base","digits","parseInt","split","v","unshift","isInteger","toUpperCase","YAML_FLOAT_PATTERN","resolveYamlFloat","constructYamlFloat","toLowerCase","POSITIVE_INFINITY","NaN","SCIENTIFIC_WITHOUT_DOT","representYamlFloat","res","isFloat","require$$4","require$$5","YAML_DATE_REGEXP","YAML_TIMESTAMP_REGEXP","resolveYamlTimestamp","constructYamlTimestamp","year","month","day","hour","minute","second","fraction","delta","tz_hour","tz_minute","date","UTC","setTime","representYamlTimestamp","toISOString","resolveYamlMerge","NodeBuffer","_require","require","Buffer","__","BASE64_MAP","resolveYamlBinary","code","bitlen","constructYamlBinary","tailbits","bits","from","representYamlBinary","isBinary","isBuffer","_hasOwnProperty","_toString","resolveYamlOmap","objectKeys","pair","pairKey","pairHasKey","constructYamlOmap","resolveYamlPairs","constructYamlPairs","resolveYamlSet","constructYamlSet","require$$6","require$$7","resolveJavascriptUndefined","constructJavascriptUndefined","undefined","representJavascriptUndefined","resolveJavascriptRegExp","regexp","modifiers","constructJavascriptRegExp","representJavascriptRegExp","global","multiline","ignoreCase","isRegExp","esprima","window","resolveJavascriptFunction","ast","body","expression","err","constructJavascriptFunction","params","param","representJavascriptFunction","DEFAULT_SAFE_SCHEMA","DEFAULT_FULL_SCHEMA","CONTEXT_FLOW_IN","CONTEXT_FLOW_OUT","CONTEXT_BLOCK_IN","CONTEXT_BLOCK_OUT","CHOMPING_CLIP","CHOMPING_STRIP","CHOMPING_KEEP","PATTERN_NON_PRINTABLE","PATTERN_NON_ASCII_LINE_BREAKS","PATTERN_FLOW_INDICATORS","PATTERN_TAG_HANDLE","PATTERN_TAG_URI","is_EOL","is_WHITE_SPACE","is_WS_OR_EOL","is_FLOW_INDICATOR","fromHexCode","lc","escapedHexLen","fromDecimalCode","simpleEscapeSequence","charFromCodepoint","fromCharCode","simpleEscapeCheck","simpleEscapeMap","State","onWarning","legacy","json","listener","implicitTypes","typeMap","lineStart","lineIndent","documents","generateError","state","throwError","throwWarning","directiveHandlers","handleYamlDirective","major","minor","version","checkLineBreaks","handleTagDirective","handle","tagMap","captureSegment","checkJson","_position","_length","_character","_result","mergeMappings","destination","overridableKeys","quantity","storeMappingPair","keyTag","keyNode","valueNode","startLine","startPos","readLineBreak","skipSeparationSpace","allowComments","checkIndent","lineBreaks","testDocumentSeparator","writeFoldedLines","readPlainScalar","nodeIndent","withinFlowCollection","preceding","following","captureStart","captureEnd","hasPendingContent","_line","_lineStart","_lineIndent","_kind","readSingleQuotedScalar","readDoubleQuotedScalar","hexLength","hexResult","tmp","readFlowCollection","readNext","_tag","_anchor","anchor","terminator","isPair","isExplicitPair","isMapping","anchorMap","readBlockScalar","folding","chomping","didReadContent","detectedIndent","textIndent","emptyLines","atMoreIndented","readBlockSequence","detected","readBlockMapping","flowIndent","allowCompact","_pos","atExplicitKey","composeNode","readTagProperty","isVerbatim","isNamed","tagHandle","tagName","readAnchorProperty","readAlias","parentIndent","nodeContext","allowToSeek","allowBlockStyles","allowBlockScalars","allowBlockCollections","indentStatus","hasContent","typeIndex","typeQuantity","blockIndent","atNewLine","readDocument","documentStart","directiveName","directiveArgs","hasDirectives","loadDocuments","loadAll","load","safeLoadAll","safeLoad","CHAR_TAB","CHAR_LINE_FEED","CHAR_SPACE","CHAR_EXCLAMATION","CHAR_DOUBLE_QUOTE","CHAR_SHARP","CHAR_PERCENT","CHAR_AMPERSAND","CHAR_SINGLE_QUOTE","CHAR_ASTERISK","CHAR_COMMA","CHAR_MINUS","CHAR_COLON","CHAR_GREATER_THAN","CHAR_QUESTION","CHAR_COMMERCIAL_AT","CHAR_LEFT_SQUARE_BRACKET","CHAR_RIGHT_SQUARE_BRACKET","CHAR_GRAVE_ACCENT","CHAR_LEFT_CURLY_BRACKET","CHAR_VERTICAL_LINE","CHAR_RIGHT_CURLY_BRACKET","ESCAPE_SEQUENCES","DEPRECATED_BOOLEANS_SYNTAX","compileStyleMap","encodeHex","character","skipInvalid","flowLevel","styleMap","sortKeys","lineWidth","noRefs","noCompatMode","condenseFlow","explicitTypes","duplicates","usedDuplicates","indentString","spaces","ind","next","generateNextLine","level","testImplicitResolving","isWhitespace","isPrintable","isPlainSafe","isPlainSafeFirst","STYLE_PLAIN","STYLE_SINGLE","STYLE_LITERAL","STYLE_FOLDED","STYLE_DOUBLE","chooseScalarStyle","singleLineOnly","indentPerLevel","testAmbiguousType","char","hasLineBreak","hasFoldableLine","shouldTrackWidth","previousLineBreak","plain","writeScalar","iskey","dump","testAmbiguity","blockHeader","dropEndingNewline","foldString","escapeString","indentIndicator","clip","keep","chomp","width","lineRe","nextLF","lastIndex","foldLine","prevMoreIndented","moreIndented","breakRe","curr","nextChar","escapeSeq","writeFlowSequence","writeNode","writeBlockSequence","writeFlowMapping","objectKeyList","objectKey","objectValue","pairBuffer","writeBlockMapping","explicitPair","detectType","typeList","block","objectOrArray","duplicateIndex","duplicate","getDuplicateReferences","objects","duplicatesIndexes","inspectNode","safeDump","loader","dumper","deprecated","require$$8","require$$9","yaml","blackList","newObj","loadMethod","yamlParser","whitespacePattern","slugBlacklist","nextLine","startKey","commandKey","arrayElement","scopePattern","scope","stackScope","bufferScope","bufferKey","bufferString","isSkipping","comments","arrayType","flags","substring","parseStartKey","restOfLine","parseArrayElement","parseCommandKey","command","flushBuffer","flushBufferInto","parseScope","scopeType","scopeKey","lastStackItem","nesting","keyScope","parsedScopeKey","keyBits","stackScopeItem","parseText","incrementArrayElement","arrayFirstKey","existingBufferKey","archieml","formatsIndex","formatsList","equivalents","parsers","equivalent","discernParser","opts_","parser","getParser","delimiterOrParser","file","readFile","fileFormat","parsed","fs","readFileSync","shapefile","dbf","openDbf","then","read","log","done","catch","error","loaders","fileSync","discernLoader","which","sync","readData","cb_","matchOperatorsRe","assembleStyles","styles","colors","grey","gray","groupName","styleName","defineProperty","ansiRegex","re","argv","process","hasFlag","flag","pos","env","stdout","isTTY","platform","TERM","escapeStringRegexp","ansiStyles","stripAnsi","hasAnsi","supportsColor","defineProps","defineProperties","isSimpleWindowsTerm","Chalk","enabled","blue","open","ret","closeRe","close","build","_styles","chalk","builder","applyStyle","__proto__","argsLen","nestedStyles","originalDim","dim","init","msg","yellow","red","bold","cyan","formattingPreflight","writeOptions","replacer","writeMethod","lpad","rpad","writeField","view","fieldLength","setUint8","fieldSize","multi","bytesPer","features","fields","inherit","isDef","o","p","lib","structure","meta","field_meta","fieldDescLength","bytesPerRecord","ArrayBuffer","DataView","getFullYear","getMonth","getDate","setUint32","headerLength","setUint16","setInt8","x","num","val","substr","toBuffer","ab","byteLength","Uint8Array","buf","formatters","discernFileFormatter","formatter","_0777","mkdirP","mkdirp","opts","made","mode","xfs","umask","mkdir","er","stat","er2","isDirectory","mkdirSync","err0","statSync","err1","makeDirectories","outPath","writeData","makeDirs","proceed","fileFormatter","formattedData","writeFile","convertData","inPath","jsonData","readDbf","convertDbfToData","src","copy","copyIsArray","deep","deepExtend","exists","access","existsSync","accessSync","ex","extMatchesStr","extension","makeDirectoriesSync","matchesRegExp","regEx","readDataSync","noabort","Queue","_size","_call","_error","_tasks","_data","_waiting","_active","_ended","_start","queue","callback","abort","poke","q","r","maybeNotify","concurrency","readdir","modeInfo","dirPath","isAsync","async","strToArray","includeMatchAll","excludeMatchAll","files","filterSync","readdirSync","filterByType","fullPath","stats","filtered","getFiltered","isDir","skipDirectories","skipFiles","filterByMatchers","fileName","isExcluded","isIncluded","filterQ","awaitAll","namesOfType","readdirFilter","readdirFilterSync","readAml","parserAml","readAmlSync","readCsv","parserCsv","readCsvSync","readJson","parserJson","readJsonSync","readPsv","parserPsv","readPsvSync","readTsv","parserTsv","readTsvSync","readTxt","parserTxt","readTxtSync","readYaml","parserYaml","readYamlSync","appendData","appendFile","existingData","writeDataSync","writeFileSync","appendDataSync","appendFileSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;eAKY;;;;;;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AAP,OAAwB,QAA5B,EAAsC;aACpCr2B,SAAO,EAAP,EAAWq2B,YAAX,EAAyB1xB,IAAzB,CAAP;;;gBAGUwrB,OAAd,EAAuBxrB,IAAvB,EAA6B0iB,KAA7B;SACO1iB,IAAP;;;ACxCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"indian-ocean.node.js","sources":["../node_modules/underscore/underscore.js","../node_modules/d3-dsv/src/dsv.js","../src/utils/path.js","../src/helpers/discernFormat.js","../node_modules/d3-dsv/src/csv.js","../src/parsers/csv.js","../src/utils/identity.js","../src/parsers/json.js","../src/parsers/psv.js","../node_modules/d3-dsv/src/tsv.js","../src/parsers/tsv.js","../src/parsers/txt.js","../node_modules/js-yaml/lib/js-yaml/common.js","../node_modules/js-yaml/lib/js-yaml/exception.js","../node_modules/js-yaml/lib/js-yaml/mark.js","../node_modules/js-yaml/lib/js-yaml/type.js","../node_modules/js-yaml/lib/js-yaml/schema.js","../node_modules/js-yaml/lib/js-yaml/type/str.js","../node_modules/js-yaml/lib/js-yaml/type/seq.js","../node_modules/js-yaml/lib/js-yaml/type/map.js","../node_modules/js-yaml/lib/js-yaml/schema/failsafe.js","../node_modules/js-yaml/lib/js-yaml/type/null.js","../node_modules/js-yaml/lib/js-yaml/type/bool.js","../node_modules/js-yaml/lib/js-yaml/type/int.js","../node_modules/js-yaml/lib/js-yaml/type/float.js","../node_modules/js-yaml/lib/js-yaml/schema/json.js","../node_modules/js-yaml/lib/js-yaml/schema/core.js","../node_modules/js-yaml/lib/js-yaml/type/timestamp.js","../node_modules/js-yaml/lib/js-yaml/type/merge.js","../node_modules/js-yaml/lib/js-yaml/type/binary.js","../node_modules/js-yaml/lib/js-yaml/type/omap.js","../node_modules/js-yaml/lib/js-yaml/type/pairs.js","../node_modules/js-yaml/lib/js-yaml/type/set.js","../node_modules/js-yaml/lib/js-yaml/schema/default_safe.js","../node_modules/js-yaml/lib/js-yaml/type/js/undefined.js","../node_modules/js-yaml/lib/js-yaml/type/js/regexp.js","../node_modules/js-yaml/lib/js-yaml/type/js/function.js","../node_modules/js-yaml/lib/js-yaml/schema/default_full.js","../node_modules/js-yaml/lib/js-yaml/loader.js","../node_modules/js-yaml/lib/js-yaml/dumper.js","../node_modules/js-yaml/lib/js-yaml.js","../node_modules/js-yaml/index.js","../src/utils/omit.js","../src/parsers/yaml.js","../node_modules/archieml/archieml.js","../src/parsers/aml.js","../src/config/equivalentFormats.js","../src/parsers/index.js","../src/helpers/discernParser.js","../src/helpers/getParser.js","../src/loaders/file.js","../src/loaders/fileSync.js","../src/loaders/dbf.js","../src/loaders/index.js","../src/helpers/discernLoader.js","../src/readers/readData.js","../node_modules/escape-string-regexp/index.js","../node_modules/ansi-styles/index.js","../node_modules/ansi-regex/index.js","../node_modules/strip-ansi/index.js","../node_modules/has-ansi/index.js","../node_modules/supports-color/index.js","../node_modules/chalk/index.js","../src/reporters/notListError.js","../src/utils/formattingPreflight.js","../src/reporters/parseError.js","../src/formatters/csv.js","../src/formatters/json.js","../src/formatters/psv.js","../src/formatters/tsv.js","../src/formatters/txt.js","../src/formatters/yaml.js","../node_modules/dbf/src/fieldsize.js","../node_modules/dbf/src/lib.js","../node_modules/dbf/src/fields.js","../node_modules/dbf/src/structure.js","../node_modules/dbf/index.js","../src/formatters/dbf.js","../src/formatters/index.js","../src/helpers/discernFileFormatter.js","../node_modules/mkdirp/index.js","../src/helpers/makeDirectories.js","../src/reporters/warn.js","../src/utils/warnIfEmpty.js","../src/writers/writeData.js","../src/converters/convertData.js","../src/directReaders/readDbf.js","../src/converters/convertDbfToData.js","../src/helpers/extend.js","../src/helpers/deepExtend.js","../src/helpers/exists.js","../src/helpers/existsSync.js","../src/helpers/extMatchesStr.js","../src/helpers/makeDirectoriesSync.js","../src/helpers/matchesRegExp.js","../src/utils/isRegExp.js","../src/helpers/matches.js","../src/readers/readDataSync.js","../node_modules/d3-queue/src/array.js","../node_modules/d3-queue/src/queue.js","../src/readers/readdir.js","../src/readers/readdirFilter.js","../src/readers/readdirFilterSync.js","../src/directReaders/readAml.js","../src/directReaders/readAmlSync.js","../src/directReaders/readCsv.js","../src/directReaders/readCsvSync.js","../src/directReaders/readJson.js","../src/directReaders/readJsonSync.js","../src/directReaders/readPsv.js","../src/directReaders/readPsvSync.js","../src/directReaders/readTsv.js","../src/directReaders/readTsvSync.js","../src/directReaders/readTxt.js","../src/directReaders/readTxtSync.js","../src/directReaders/readYaml.js","../src/directReaders/readYamlSync.js","../src/writers/appendData.js","../src/writers/writeDataSync.js","../src/writers/appendDataSync.js","../index.node.js"],"sourcesContent":["// Underscore.js 1.8.3\n// http://underscorejs.org\n// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n // Baseline setup\n // --------------\n\n // Establish the root object, `window` in the browser, or `exports` on the server.\n var root = this;\n\n // Save the previous value of the `_` variable.\n var previousUnderscore = root._;\n\n // Save bytes in the minified (but not gzipped) version:\n var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n // Create quick reference variables for speed access to core prototypes.\n var\n push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n // All **ECMAScript 5** native function implementations that we hope to use\n // are declared here.\n var\n nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeBind = FuncProto.bind,\n nativeCreate = Object.create;\n\n // Naked function reference for surrogate-prototype-swapping.\n var Ctor = function(){};\n\n // Create a safe reference to the Underscore object for use below.\n var _ = function(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n };\n\n // Export the Underscore object for **Node.js**, with\n // backwards-compatibility for the old `require()` API. If we're in\n // the browser, add `_` as a global object.\n if (typeof exports !== 'undefined') {\n if (typeof module !== 'undefined' && module.exports) {\n exports = module.exports = _;\n }\n exports._ = _;\n } else {\n root._ = _;\n }\n\n // Current version.\n _.VERSION = '1.8.3';\n\n // Internal function that returns an efficient (for current engines) version\n // of the passed-in callback, to be repeatedly applied in other Underscore\n // functions.\n var optimizeCb = function(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n case 2: return function(value, other) {\n return func.call(context, value, other);\n };\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n };\n\n // A mostly-internal function to generate callbacks that can be applied\n // to each element in a collection, returning the desired result — either\n // identity, an arbitrary callback, a property matcher, or a property accessor.\n var cb = function(value, context, argCount) {\n if (value == null) return _.identity;\n if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n if (_.isObject(value)) return _.matcher(value);\n return _.property(value);\n };\n _.iteratee = function(value, context) {\n return cb(value, context, Infinity);\n };\n\n // An internal function for creating assigner functions.\n var createAssigner = function(keysFunc, undefinedOnly) {\n return function(obj) {\n var length = arguments.length;\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n };\n\n // An internal function for creating a new object that inherits from another.\n var baseCreate = function(prototype) {\n if (!_.isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n };\n\n var property = function(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n };\n\n // Helper for collection methods to determine whether a collection\n // should be iterated as an array or as an object\n // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n var getLength = property('length');\n var isArrayLike = function(collection) {\n var length = getLength(collection);\n return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n };\n\n // Collection Functions\n // --------------------\n\n // The cornerstone, an `each` implementation, aka `forEach`.\n // Handles raw objects in addition to array-likes. Treats all\n // sparse array-likes as if they were dense.\n _.each = _.forEach = function(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var keys = _.keys(obj);\n for (i = 0, length = keys.length; i < length; i++) {\n iteratee(obj[keys[i]], keys[i], obj);\n }\n }\n return obj;\n };\n\n // Return the results of applying the iteratee to each element.\n _.map = _.collect = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Create a reducing function iterating left or right.\n function createReduce(dir) {\n // Optimized iterator function as using arguments.length\n // in the main function will deoptimize the, see #1991.\n function iterator(obj, iteratee, memo, keys, index, length) {\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = keys ? keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n }\n\n return function(obj, iteratee, memo, context) {\n iteratee = optimizeCb(iteratee, context, 4);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n // Determine the initial value if none is provided.\n if (arguments.length < 3) {\n memo = obj[keys ? keys[index] : index];\n index += dir;\n }\n return iterator(obj, iteratee, memo, keys, index, length);\n };\n }\n\n // **Reduce** builds up a single result from a list of values, aka `inject`,\n // or `foldl`.\n _.reduce = _.foldl = _.inject = createReduce(1);\n\n // The right-associative version of reduce, also known as `foldr`.\n _.reduceRight = _.foldr = createReduce(-1);\n\n // Return the first value which passes a truth test. Aliased as `detect`.\n _.find = _.detect = function(obj, predicate, context) {\n var key;\n if (isArrayLike(obj)) {\n key = _.findIndex(obj, predicate, context);\n } else {\n key = _.findKey(obj, predicate, context);\n }\n if (key !== void 0 && key !== -1) return obj[key];\n };\n\n // Return all the elements that pass a truth test.\n // Aliased as `select`.\n _.filter = _.select = function(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n _.each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n };\n\n // Return all the elements for which a truth test fails.\n _.reject = function(obj, predicate, context) {\n return _.filter(obj, _.negate(cb(predicate)), context);\n };\n\n // Determine whether all of the elements match a truth test.\n // Aliased as `all`.\n _.every = _.all = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n };\n\n // Determine if at least one element in the object matches a truth test.\n // Aliased as `any`.\n _.some = _.any = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = !isArrayLike(obj) && _.keys(obj),\n length = (keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = keys ? keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n };\n\n // Determine if the array or object contains a given item (using `===`).\n // Aliased as `includes` and `include`.\n _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return _.indexOf(obj, item, fromIndex) >= 0;\n };\n\n // Invoke a method (with arguments) on every item in a collection.\n _.invoke = function(obj, method) {\n var args = slice.call(arguments, 2);\n var isFunc = _.isFunction(method);\n return _.map(obj, function(value) {\n var func = isFunc ? method : value[method];\n return func == null ? func : func.apply(value, args);\n });\n };\n\n // Convenience version of a common use case of `map`: fetching a property.\n _.pluck = function(obj, key) {\n return _.map(obj, _.property(key));\n };\n\n // Convenience version of a common use case of `filter`: selecting only objects\n // containing specific `key:value` pairs.\n _.where = function(obj, attrs) {\n return _.filter(obj, _.matcher(attrs));\n };\n\n // Convenience version of a common use case of `find`: getting the first object\n // containing specific `key:value` pairs.\n _.findWhere = function(obj, attrs) {\n return _.find(obj, _.matcher(attrs));\n };\n\n // Return the maximum element (or element-based computation).\n _.max = function(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Return the minimum element (or element-based computation).\n _.min = function(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null && obj != null) {\n obj = isArrayLike(obj) ? obj : _.values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index, list) {\n computed = iteratee(value, index, list);\n if (computed < lastComputed || computed === Infinity && result === Infinity) {\n result = value;\n lastComputed = computed;\n }\n });\n }\n return result;\n };\n\n // Shuffle a collection, using the modern version of the\n // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n _.shuffle = function(obj) {\n var set = isArrayLike(obj) ? obj : _.values(obj);\n var length = set.length;\n var shuffled = Array(length);\n for (var index = 0, rand; index < length; index++) {\n rand = _.random(0, index);\n if (rand !== index) shuffled[index] = shuffled[rand];\n shuffled[rand] = set[index];\n }\n return shuffled;\n };\n\n // Sample **n** random values from a collection.\n // If **n** is not specified, returns a single random element.\n // The internal `guard` argument allows it to work with `map`.\n _.sample = function(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = _.values(obj);\n return obj[_.random(obj.length - 1)];\n }\n return _.shuffle(obj).slice(0, Math.max(0, n));\n };\n\n // Sort the object's values by a criterion produced by an iteratee.\n _.sortBy = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n return _.pluck(_.map(obj, function(value, index, list) {\n return {\n value: value,\n index: index,\n criteria: iteratee(value, index, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n };\n\n // An internal function used for aggregate \"group by\" operations.\n var group = function(behavior) {\n return function(obj, iteratee, context) {\n var result = {};\n iteratee = cb(iteratee, context);\n _.each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n };\n\n // Groups the object's values by a criterion. Pass either a string attribute\n // to group by, or a function that returns the criterion.\n _.groupBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key].push(value); else result[key] = [value];\n });\n\n // Indexes the object's values by a criterion, similar to `groupBy`, but for\n // when you know that your index values will be unique.\n _.indexBy = group(function(result, value, key) {\n result[key] = value;\n });\n\n // Counts instances of an object that group by a certain criterion. Pass\n // either a string attribute to count by, or a function that returns the\n // criterion.\n _.countBy = group(function(result, value, key) {\n if (_.has(result, key)) result[key]++; else result[key] = 1;\n });\n\n // Safely create a real, live array from anything iterable.\n _.toArray = function(obj) {\n if (!obj) return [];\n if (_.isArray(obj)) return slice.call(obj);\n if (isArrayLike(obj)) return _.map(obj, _.identity);\n return _.values(obj);\n };\n\n // Return the number of elements in an object.\n _.size = function(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n };\n\n // Split a collection into two arrays: one whose elements all satisfy the given\n // predicate, and one whose elements all do not satisfy the predicate.\n _.partition = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var pass = [], fail = [];\n _.each(obj, function(value, key, obj) {\n (predicate(value, key, obj) ? pass : fail).push(value);\n });\n return [pass, fail];\n };\n\n // Array Functions\n // ---------------\n\n // Get the first element of an array. Passing **n** will return the first N\n // values in the array. Aliased as `head` and `take`. The **guard** check\n // allows it to work with `_.map`.\n _.first = _.head = _.take = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[0];\n return _.initial(array, array.length - n);\n };\n\n // Returns everything but the last entry of the array. Especially useful on\n // the arguments object. Passing **n** will return all the values in\n // the array, excluding the last N.\n _.initial = function(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n };\n\n // Get the last element of an array. Passing **n** will return the last N\n // values in the array.\n _.last = function(array, n, guard) {\n if (array == null) return void 0;\n if (n == null || guard) return array[array.length - 1];\n return _.rest(array, Math.max(0, array.length - n));\n };\n\n // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n // Especially useful on the arguments object. Passing an **n** will return\n // the rest N values in the array.\n _.rest = _.tail = _.drop = function(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n };\n\n // Trim out all falsy values from an array.\n _.compact = function(array) {\n return _.filter(array, _.identity);\n };\n\n // Internal implementation of a recursive `flatten` function.\n var flatten = function(input, shallow, strict, startIndex) {\n var output = [], idx = 0;\n for (var i = startIndex || 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n //flatten current level of array or arguments object\n if (!shallow) value = flatten(value, shallow, strict);\n var j = 0, len = value.length;\n output.length += len;\n while (j < len) {\n output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n };\n\n // Flatten out an array, either recursively (by default), or just one level.\n _.flatten = function(array, shallow) {\n return flatten(array, shallow, false);\n };\n\n // Return a version of the array that does not contain the specified value(s).\n _.without = function(array) {\n return _.difference(array, slice.call(arguments, 1));\n };\n\n // Produce a duplicate-free version of the array. If the array has already\n // been sorted, you have the option of using a faster algorithm.\n // Aliased as `unique`.\n _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n if (!_.isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!_.contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!_.contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n };\n\n // Produce an array that contains the union: each distinct element from all of\n // the passed-in arrays.\n _.union = function() {\n return _.uniq(flatten(arguments, true, true));\n };\n\n // Produce an array that contains every item shared between all the\n // passed-in arrays.\n _.intersection = function(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (_.contains(result, item)) continue;\n for (var j = 1; j < argsLength; j++) {\n if (!_.contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n };\n\n // Take the difference between one array and a number of other arrays.\n // Only the elements present in just the first array will remain.\n _.difference = function(array) {\n var rest = flatten(arguments, true, true, 1);\n return _.filter(array, function(value){\n return !_.contains(rest, value);\n });\n };\n\n // Zip together multiple lists into a single array -- elements that share\n // an index go together.\n _.zip = function() {\n return _.unzip(arguments);\n };\n\n // Complement of _.zip. Unzip accepts an array of arrays and groups\n // each array's elements on shared indices\n _.unzip = function(array) {\n var length = array && _.max(array, getLength).length || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = _.pluck(array, index);\n }\n return result;\n };\n\n // Converts lists into objects. Pass either a single array of `[key, value]`\n // pairs, or two parallel arrays of the same length -- one of keys, and one of\n // the corresponding values.\n _.object = function(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n };\n\n // Generator function to create the findIndex and findLastIndex functions\n function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n }\n\n // Returns the first index on an array-like that passes a predicate test\n _.findIndex = createPredicateIndexFinder(1);\n _.findLastIndex = createPredicateIndexFinder(-1);\n\n // Use a comparator function to figure out the smallest index at which\n // an object should be inserted so as to maintain order. Uses binary search.\n _.sortedIndex = function(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n };\n\n // Generator function to create the indexOf and lastIndexOf functions\n function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), _.isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n }\n\n // Return the position of the first occurrence of an item in an array,\n // or -1 if the item is not included in the array.\n // If the array is large and already in sort order, pass `true`\n // for **isSorted** to use binary search.\n _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n // Generate an integer Array containing an arithmetic progression. A port of\n // the native Python `range()` function. See\n // [the Python documentation](http://docs.python.org/library/functions.html#range).\n _.range = function(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n step = step || 1;\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n };\n\n // Function (ahem) Functions\n // ------------------\n\n // Determines whether to execute a function as a constructor\n // or a normal function with the provided arguments\n var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (_.isObject(result)) return result;\n return self;\n };\n\n // Create a function bound to a given object (assigning `this`, and arguments,\n // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n // available.\n _.bind = function(func, context) {\n if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n var args = slice.call(arguments, 2);\n var bound = function() {\n return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));\n };\n return bound;\n };\n\n // Partially apply a function by creating a version that has had some of its\n // arguments pre-filled, without changing its dynamic `this` context. _ acts\n // as a placeholder, allowing any combination of arguments to be pre-filled.\n _.partial = function(func) {\n var boundArgs = slice.call(arguments, 1);\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n };\n\n // Bind a number of an object's methods to that object. Remaining arguments\n // are the method names to be bound. Useful for ensuring that all callbacks\n // defined on an object belong to it.\n _.bindAll = function(obj) {\n var i, length = arguments.length, key;\n if (length <= 1) throw new Error('bindAll must be passed function names');\n for (i = 1; i < length; i++) {\n key = arguments[i];\n obj[key] = _.bind(obj[key], obj);\n }\n return obj;\n };\n\n // Memoize an expensive function by storing its results.\n _.memoize = function(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n };\n\n // Delays a function for the given number of milliseconds, and then calls\n // it with the arguments supplied.\n _.delay = function(func, wait) {\n var args = slice.call(arguments, 2);\n return setTimeout(function(){\n return func.apply(null, args);\n }, wait);\n };\n\n // Defers a function, scheduling it to run after the current call stack has\n // cleared.\n _.defer = _.partial(_.delay, _, 1);\n\n // Returns a function, that, when invoked, will only be triggered at most once\n // during a given window of time. Normally, the throttled function will run\n // as much as it can, without ever going more than once per `wait` duration;\n // but if you'd like to disable the execution on the leading edge, pass\n // `{leading: false}`. To disable execution on the trailing edge, ditto.\n _.throttle = function(func, wait, options) {\n var context, args, result;\n var timeout = null;\n var previous = 0;\n if (!options) options = {};\n var later = function() {\n previous = options.leading === false ? 0 : _.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function() {\n var now = _.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n };\n\n // Returns a function, that, as long as it continues to be invoked, will not\n // be triggered. The function will be called after it stops being called for\n // N milliseconds. If `immediate` is passed, trigger the function on the\n // leading edge, instead of the trailing.\n _.debounce = function(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n\n var later = function() {\n var last = _.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n }\n }\n };\n\n return function() {\n context = this;\n args = arguments;\n timestamp = _.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n };\n\n // Returns the first function passed as an argument to the second,\n // allowing you to adjust arguments, run code before and after, and\n // conditionally execute the original function.\n _.wrap = function(func, wrapper) {\n return _.partial(wrapper, func);\n };\n\n // Returns a negated version of the passed-in predicate.\n _.negate = function(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n };\n\n // Returns a function that is the composition of a list of functions, each\n // consuming the return value of the function that follows.\n _.compose = function() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n };\n\n // Returns a function that will only be executed on and after the Nth call.\n _.after = function(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n };\n\n // Returns a function that will only be executed up to (but not including) the Nth call.\n _.before = function(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n };\n\n // Returns a function that will be executed at most one time, no matter how\n // often you call it. Useful for lazy initialization.\n _.once = _.partial(_.before, 2);\n\n // Object Functions\n // ----------------\n\n // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n function collectNonEnumProps(obj, keys) {\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n keys.push(prop);\n }\n }\n }\n\n // Retrieve the names of an object's own properties.\n // Delegates to **ECMAScript 5**'s native `Object.keys`\n _.keys = function(obj) {\n if (!_.isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (_.has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve all the property names of an object.\n _.allKeys = function(obj) {\n if (!_.isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n };\n\n // Retrieve the values of an object's properties.\n _.values = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[keys[i]];\n }\n return values;\n };\n\n // Returns the results of applying the iteratee to each element of the object\n // In contrast to _.map it returns an object\n _.mapObject = function(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var keys = _.keys(obj),\n length = keys.length,\n results = {},\n currentKey;\n for (var index = 0; index < length; index++) {\n currentKey = keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n };\n\n // Convert an object into a list of `[key, value]` pairs.\n _.pairs = function(obj) {\n var keys = _.keys(obj);\n var length = keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [keys[i], obj[keys[i]]];\n }\n return pairs;\n };\n\n // Invert the keys and values of an object. The values must be serializable.\n _.invert = function(obj) {\n var result = {};\n var keys = _.keys(obj);\n for (var i = 0, length = keys.length; i < length; i++) {\n result[obj[keys[i]]] = keys[i];\n }\n return result;\n };\n\n // Return a sorted list of the function names available on the object.\n // Aliased as `methods`\n _.functions = _.methods = function(obj) {\n var names = [];\n for (var key in obj) {\n if (_.isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n };\n\n // Extend a given object with all the properties in passed-in object(s).\n _.extend = createAssigner(_.allKeys);\n\n // Assigns a given object with all the own properties in the passed-in object(s)\n // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n _.extendOwn = _.assign = createAssigner(_.keys);\n\n // Returns the first key on an object that passes a predicate test\n _.findKey = function(obj, predicate, context) {\n predicate = cb(predicate, context);\n var keys = _.keys(obj), key;\n for (var i = 0, length = keys.length; i < length; i++) {\n key = keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n };\n\n // Return a copy of the object only containing the whitelisted properties.\n _.pick = function(object, oiteratee, context) {\n var result = {}, obj = object, iteratee, keys;\n if (obj == null) return result;\n if (_.isFunction(oiteratee)) {\n keys = _.allKeys(obj);\n iteratee = optimizeCb(oiteratee, context);\n } else {\n keys = flatten(arguments, false, false, 1);\n iteratee = function(value, key, obj) { return key in obj; };\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n };\n\n // Return a copy of the object without the blacklisted properties.\n _.omit = function(obj, iteratee, context) {\n if (_.isFunction(iteratee)) {\n iteratee = _.negate(iteratee);\n } else {\n var keys = _.map(flatten(arguments, false, false, 1), String);\n iteratee = function(value, key) {\n return !_.contains(keys, key);\n };\n }\n return _.pick(obj, iteratee, context);\n };\n\n // Fill in a given object with default properties.\n _.defaults = createAssigner(_.allKeys, true);\n\n // Creates an object that inherits from the given prototype object.\n // If additional properties are provided then they will be added to the\n // created object.\n _.create = function(prototype, props) {\n var result = baseCreate(prototype);\n if (props) _.extendOwn(result, props);\n return result;\n };\n\n // Create a (shallow-cloned) duplicate of an object.\n _.clone = function(obj) {\n if (!_.isObject(obj)) return obj;\n return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n };\n\n // Invokes interceptor with the obj, and then returns obj.\n // The primary purpose of this method is to \"tap into\" a method chain, in\n // order to perform operations on intermediate results within the chain.\n _.tap = function(obj, interceptor) {\n interceptor(obj);\n return obj;\n };\n\n // Returns whether an object has a given set of `key:value` pairs.\n _.isMatch = function(object, attrs) {\n var keys = _.keys(attrs), length = keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n };\n\n\n // Internal recursive comparison function for `isEqual`.\n var eq = function(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // A strict comparison is necessary because `null == undefined`.\n if (a == null || b == null) return a === b;\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n switch (className) {\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n _.isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var keys = _.keys(a), key;\n length = keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (_.keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = keys[length];\n if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n };\n\n // Perform a deep comparison to check if two objects are equal.\n _.isEqual = function(a, b) {\n return eq(a, b);\n };\n\n // Is a given array, string, or object empty?\n // An \"empty\" object has no enumerable own-properties.\n _.isEmpty = function(obj) {\n if (obj == null) return true;\n if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n return _.keys(obj).length === 0;\n };\n\n // Is a given value a DOM element?\n _.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n };\n\n // Is a given value an array?\n // Delegates to ECMA5's native Array.isArray\n _.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n };\n\n // Is a given variable an object?\n _.isObject = function(obj) {\n var type = typeof obj;\n return type === 'function' || type === 'object' && !!obj;\n };\n\n // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.\n _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {\n _['is' + name] = function(obj) {\n return toString.call(obj) === '[object ' + name + ']';\n };\n });\n\n // Define a fallback version of the method in browsers (ahem, IE < 9), where\n // there isn't any inspectable \"Arguments\" type.\n if (!_.isArguments(arguments)) {\n _.isArguments = function(obj) {\n return _.has(obj, 'callee');\n };\n }\n\n // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n // IE 11 (#1621), and in Safari 8 (#1929).\n if (typeof /./ != 'function' && typeof Int8Array != 'object') {\n _.isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n }\n\n // Is a given object a finite number?\n _.isFinite = function(obj) {\n return isFinite(obj) && !isNaN(parseFloat(obj));\n };\n\n // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n _.isNaN = function(obj) {\n return _.isNumber(obj) && obj !== +obj;\n };\n\n // Is a given value a boolean?\n _.isBoolean = function(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n };\n\n // Is a given value equal to null?\n _.isNull = function(obj) {\n return obj === null;\n };\n\n // Is a given variable undefined?\n _.isUndefined = function(obj) {\n return obj === void 0;\n };\n\n // Shortcut function for checking if an object has a given property directly\n // on itself (in other words, not on a prototype).\n _.has = function(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n };\n\n // Utility Functions\n // -----------------\n\n // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n // previous owner. Returns a reference to the Underscore object.\n _.noConflict = function() {\n root._ = previousUnderscore;\n return this;\n };\n\n // Keep the identity function around for default iteratees.\n _.identity = function(value) {\n return value;\n };\n\n // Predicate-generating functions. Often useful outside of Underscore.\n _.constant = function(value) {\n return function() {\n return value;\n };\n };\n\n _.noop = function(){};\n\n _.property = property;\n\n // Generates a function for a given object that returns a given property.\n _.propertyOf = function(obj) {\n return obj == null ? function(){} : function(key) {\n return obj[key];\n };\n };\n\n // Returns a predicate for checking whether an object has a given set of\n // `key:value` pairs.\n _.matcher = _.matches = function(attrs) {\n attrs = _.extendOwn({}, attrs);\n return function(obj) {\n return _.isMatch(obj, attrs);\n };\n };\n\n // Run a function **n** times.\n _.times = function(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n };\n\n // Return a random integer between min and max (inclusive).\n _.random = function(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n };\n\n // A (possibly faster) way to get the current timestamp as an integer.\n _.now = Date.now || function() {\n return new Date().getTime();\n };\n\n // List of HTML entities for escaping.\n var escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n };\n var unescapeMap = _.invert(escapeMap);\n\n // Functions for escaping and unescaping strings to/from HTML interpolation.\n var createEscaper = function(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped\n var source = '(?:' + _.keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n };\n _.escape = createEscaper(escapeMap);\n _.unescape = createEscaper(unescapeMap);\n\n // If the value of the named `property` is a function then invoke it with the\n // `object` as context; otherwise, return it.\n _.result = function(object, property, fallback) {\n var value = object == null ? void 0 : object[property];\n if (value === void 0) {\n value = fallback;\n }\n return _.isFunction(value) ? value.call(object) : value;\n };\n\n // Generate a unique integer id (unique within the entire client session).\n // Useful for temporary DOM ids.\n var idCounter = 0;\n _.uniqueId = function(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n };\n\n // By default, Underscore uses ERB-style template delimiters, change the\n // following template settings to use alternative delimiters.\n _.templateSettings = {\n evaluate : /<%([\\s\\S]+?)%>/g,\n interpolate : /<%=([\\s\\S]+?)%>/g,\n escape : /<%-([\\s\\S]+?)%>/g\n };\n\n // When customizing `templateSettings`, if you don't want to define an\n // interpolation, evaluation or escaping regex, we need one that is\n // guaranteed not to match.\n var noMatch = /(.)^/;\n\n // Certain characters need to be escaped so that they can be put into a\n // string literal.\n var escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n };\n\n var escaper = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n var escapeChar = function(match) {\n return '\\\\' + escapes[match];\n };\n\n // JavaScript micro-templating, similar to John Resig's implementation.\n // Underscore templating handles arbitrary delimiters, preserves whitespace,\n // and correctly escapes quotes within interpolated code.\n // NB: `oldSettings` only exists for backwards compatibility.\n _.template = function(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = _.defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escaper, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offest.\n return match;\n });\n source += \"';\\n\";\n\n // If a variable is not specified, place data values in local scope.\n if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n try {\n var render = new Function(settings.variable || 'obj', '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n var argument = settings.variable || 'obj';\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n };\n\n // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n _.chain = function(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n };\n\n // OOP\n // ---------------\n // If Underscore is called as a function, it returns a wrapped object that\n // can be used OO-style. This wrapper holds altered versions of all the\n // underscore functions. Wrapped objects may be chained.\n\n // Helper function to continue chaining intermediate results.\n var result = function(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n };\n\n // Add your own custom functions to the Underscore object.\n _.mixin = function(obj) {\n _.each(_.functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return result(this, func.apply(_, args));\n };\n });\n };\n\n // Add all of the Underscore functions to the wrapper object.\n _.mixin(_);\n\n // Add all mutator Array functions to the wrapper.\n _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n return result(this, obj);\n };\n });\n\n // Add all accessor Array functions to the wrapper.\n _.each(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n return result(this, method.apply(this._wrapped, arguments));\n };\n });\n\n // Extracts the result from a wrapped and chained object.\n _.prototype.value = function() {\n return this._wrapped;\n };\n\n // Provide unwrapping proxy for some methods used in engine operations\n // such as arithmetic and JSON stringification.\n _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n _.prototype.toString = function() {\n return '' + this._wrapped;\n };\n\n // AMD registration happens at the end for compatibility with AMD loaders\n // that may not enforce next-turn semantics on modules. Even though general\n // practice for AMD registration is to be anonymous, underscore registers\n // as a named module because, like jQuery, it is a base library that is\n // popular enough to be bundled in a third party lib, but not be part of\n // an AMD load request. Those cases could generate an error when an\n // anonymous define() is called outside of a loader request.\n if (typeof define === 'function' && define.amd) {\n define('underscore', [], function() {\n return _;\n });\n }\n}.call(this));\n","var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"]\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function(row, i) {\n return f(object(row), i, columns);\n };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n\n rows.forEach(function(row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n\n return columns;\n}\n\nexport default function(delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert, columns, rows = parseRows(text, function(row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns;\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // current line number\n t, // current token\n eof = N <= 0, // current token followed by EOF?\n eol = false; // current token followed by EOL?\n\n // Strip the trailing newline.\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL;\n\n // Unescape quotes.\n var i, j = I, c;\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n if ((i = I) >= N) eof = true;\n else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n }\n\n // Find next delimiter or newline.\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n }\n\n // Return last token before EOF.\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n while (t !== EOL && t !== EOF) row.push(t), t = token();\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(rows.map(function(row) {\n return columns.map(function(column) {\n return formatValue(row[column]);\n }).join(delimiter);\n })).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(text) {\n return text == null ? \"\"\n : reFormat.test(text += \"\") ? \"\\\"\" + text.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n : text;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatRows: formatRows\n };\n}\n","/* --------------------------------------------\n * Browser-implementations of NodeJS path module, adapted from Rich Harris, https://github.com/rollup/rollup/blob/master/browser/path.js\n */\n\nconst splitPathRe = /^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^/]+?|)(\\.[^./]*|))(?:[/]*)$/\n\nfunction posixSplitPath (filename) {\n const out = splitPathRe.exec(filename)\n out.shift()\n return out\n}\n\nexport function extname (filename) {\n return posixSplitPath(filename)[3]\n}\n\nexport function dirname (path) {\n const match = /(\\/|\\\\)[^/\\\\]*$/.exec(path)\n if (!match) return '.'\n\n const dir = path.slice(0, -match[0].length)\n\n // If `dir` is the empty string, we're at root.\n return dir || '/'\n}\n\nexport function joinPath () {\n var args = Array.prototype.slice.call(arguments)\n return args.join('/') // TODO, windows\n}\n","import {extname} from '../utils/path'\n\n/**\n * Given a `filePath` return the file's extension. Used internally by {@link discernParser} and {@link discernFileFormatter}. Returns `false` for files without an extension, including dotfiles\n *\n * @function discernFormat\n * @param {String} filePath Input file path\n * @returns {String} The file's extension\n *\n * @example\n * var format = io.discernFormat('path/to/data.csv')\n * console.log(format) // 'csv'\n *\n * @example\n * var format = io.discernFormat('path/to/.dotfile')\n * console.log(format) // false\n */\nexport default function discernFormat (filePath) {\n var ext = extname(filePath)\n if (ext === '') return false\n\n // Chop '.' off extension returned by extname\n var formatName = ext.slice(1)\n return formatName\n}\n","import dsv from \"./dsv\";\n\nvar csv = dsv(\",\");\n\nexport var csvParse = csv.parse;\nexport var csvParseRows = csv.parseRows;\nexport var csvFormat = csv.format;\nexport var csvFormatRows = csv.formatRows;\n","/* istanbul ignore next */\nimport {csvParse} from 'd3-dsv/src/csv'\n\nexport default function (str, parserOptions) {\n parserOptions = parserOptions || {}\n return csvParse(str, parserOptions.map)\n}\n","export default (d => d)\n","/* istanbul ignore next */\nimport _ from 'underscore'\nimport identity from '../utils/identity'\n\nexport default function (str, parserOptions) {\n parserOptions = parserOptions || {}\n // Do a naive test whether this is a string or an object\n var mapFn = parserOptions.map ? str.trim().charAt(0) === '[' ? _.map : _.mapObject : identity\n var jsonParser = JSON.parse\n return mapFn(jsonParser(str, parserOptions.reviver, parserOptions.filename), parserOptions.map)\n}\n","/* istanbul ignore next */\nimport dsvFormat from 'd3-dsv/src/dsv'\n\nexport default function (str, parserOptions) {\n parserOptions = parserOptions || {}\n return dsvFormat('|').parse(str, parserOptions.map)\n}\n","import dsv from \"./dsv\";\n\nvar tsv = dsv(\"\\t\");\n\nexport var tsvParse = tsv.parse;\nexport var tsvParseRows = tsv.parseRows;\nexport var tsvFormat = tsv.format;\nexport var tsvFormatRows = tsv.formatRows;\n","/* istanbul ignore next */\nimport {tsvParse} from 'd3-dsv/src/tsv'\n\nexport default function (str, parserOptions) {\n parserOptions = parserOptions || {}\n return tsvParse(str, parserOptions.map)\n}\n","export default function (str, parserOptions) {\n return (parserOptions && typeof parserOptions.map === 'function') ? parserOptions.map(str) : str\n}\n","'use strict';\n\n\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nmodule.exports.isNothing = isNothing;\nmodule.exports.isObject = isObject;\nmodule.exports.toArray = toArray;\nmodule.exports.repeat = repeat;\nmodule.exports.isNegativeZero = isNegativeZero;\nmodule.exports.extend = extend;\n","// YAML error class. http://stackoverflow.com/questions/8458984\n//\n'use strict';\n\nfunction YAMLException(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : '');\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException.prototype = Object.create(Error.prototype);\nYAMLException.prototype.constructor = YAMLException;\n\n\nYAMLException.prototype.toString = function toString(compact) {\n var result = this.name + ': ';\n\n result += this.reason || '(unknown reason)';\n\n if (!compact && this.mark) {\n result += ' ' + this.mark.toString();\n }\n\n return result;\n};\n\n\nmodule.exports = YAMLException;\n","'use strict';\n\n\nvar common = require('./common');\n\n\nfunction Mark(name, buffer, position, line, column) {\n this.name = name;\n this.buffer = buffer;\n this.position = position;\n this.line = line;\n this.column = column;\n}\n\n\nMark.prototype.getSnippet = function getSnippet(indent, maxLength) {\n var head, start, tail, end, snippet;\n\n if (!this.buffer) return null;\n\n indent = indent || 4;\n maxLength = maxLength || 75;\n\n head = '';\n start = this.position;\n\n while (start > 0 && '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) {\n start -= 1;\n if (this.position - start > (maxLength / 2 - 1)) {\n head = ' ... ';\n start += 5;\n break;\n }\n }\n\n tail = '';\n end = this.position;\n\n while (end < this.buffer.length && '\\x00\\r\\n\\x85\\u2028\\u2029'.indexOf(this.buffer.charAt(end)) === -1) {\n end += 1;\n if (end - this.position > (maxLength / 2 - 1)) {\n tail = ' ... ';\n end -= 5;\n break;\n }\n }\n\n snippet = this.buffer.slice(start, end);\n\n return common.repeat(' ', indent) + head + snippet + tail + '\\n' +\n common.repeat(' ', indent + this.position - start + head.length) + '^';\n};\n\n\nMark.prototype.toString = function toString(compact) {\n var snippet, where = '';\n\n if (this.name) {\n where += 'in \"' + this.name + '\" ';\n }\n\n where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);\n\n if (!compact) {\n snippet = this.getSnippet();\n\n if (snippet) {\n where += ':\\n' + snippet;\n }\n }\n\n return where;\n};\n\n\nmodule.exports = Mark;\n","'use strict';\n\nvar YAMLException = require('./exception');\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new YAMLException('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new YAMLException('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nmodule.exports = Type;\n","'use strict';\n\n/*eslint-disable max-len*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar Type = require('./type');\n\n\nfunction compileList(schema, name, result) {\n var exclude = [];\n\n schema.include.forEach(function (includedSchema) {\n result = compileList(includedSchema, name, result);\n });\n\n schema[name].forEach(function (currentType) {\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag && previousType.kind === currentType.kind) {\n exclude.push(previousIndex);\n }\n });\n\n result.push(currentType);\n });\n\n return result.filter(function (type, index) {\n return exclude.indexOf(index) === -1;\n });\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {}\n }, index, length;\n\n function collectType(type) {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema(definition) {\n this.include = definition.include || [];\n this.implicit = definition.implicit || [];\n this.explicit = definition.explicit || [];\n\n this.implicit.forEach(function (type) {\n if (type.loadKind && type.loadKind !== 'scalar') {\n throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n });\n\n this.compiledImplicit = compileList(this, 'implicit', []);\n this.compiledExplicit = compileList(this, 'explicit', []);\n this.compiledTypeMap = compileMap(this.compiledImplicit, this.compiledExplicit);\n}\n\n\nSchema.DEFAULT = null;\n\n\nSchema.create = function createSchema() {\n var schemas, types;\n\n switch (arguments.length) {\n case 1:\n schemas = Schema.DEFAULT;\n types = arguments[0];\n break;\n\n case 2:\n schemas = arguments[0];\n types = arguments[1];\n break;\n\n default:\n throw new YAMLException('Wrong number of arguments for Schema.create function');\n }\n\n schemas = common.toArray(schemas);\n types = common.toArray(types);\n\n if (!schemas.every(function (schema) { return schema instanceof Schema; })) {\n throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');\n }\n\n if (!types.every(function (type) { return type instanceof Type; })) {\n throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n return new Schema({\n include: schemas,\n explicit: types\n });\n};\n\n\nmodule.exports = Schema;\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n","'use strict';\n\nvar Type = require('../type');\n\nmodule.exports = new Type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n","// Standard YAML's Failsafe schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2802346\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n explicit: [\n require('../type/str'),\n require('../type/seq'),\n require('../type/map')\n ]\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n // base 8\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n // base 10 (except 0) or base 60\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch === ':') break;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n // if !base60 - done;\n if (ch !== ':') return true;\n\n // base60 almost not used, no needs to optimize\n return /^(:[0-5]?[0-9])+$/.test(data.slice(index));\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch, base, digits = [];\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value, 16);\n return sign * parseInt(value, 8);\n }\n\n if (value.indexOf(':') !== -1) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseInt(v, 10));\n });\n\n value = 0;\n base = 1;\n\n digits.forEach(function (d) {\n value += (d * base);\n base *= 60;\n });\n\n return sign * value;\n\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (object) { return '0b' + object.toString(2); },\n octal: function (object) { return '0' + object.toString(8); },\n decimal: function (object) { return object.toString(10); },\n hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n","'use strict';\n\nvar common = require('../common');\nvar Type = require('../type');\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // 20:59\n '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign, base, digits;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n digits = [];\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n\n } else if (value.indexOf(':') >= 0) {\n value.split(':').forEach(function (v) {\n digits.unshift(parseFloat(v, 10));\n });\n\n value = 0.0;\n base = 1;\n\n digits.forEach(function (d) {\n value += d * base;\n base *= 60;\n });\n\n return sign * value;\n\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n","// Standard YAML's JSON schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2803231\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, this schema is not such strict as defined in the YAML specification.\n// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./failsafe')\n ],\n implicit: [\n require('../type/null'),\n require('../type/bool'),\n require('../type/int'),\n require('../type/float')\n ]\n});\n","// Standard YAML's Core schema.\n// http://www.yaml.org/spec/1.2/spec.html#id2804923\n//\n// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\n// So, Core schema has no distinctions from JSON schema is JS-YAML.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./json')\n ]\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n","'use strict';\n\nvar Type = require('../type');\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n","'use strict';\n\n/*eslint-disable no-bitwise*/\n\nvar NodeBuffer;\n\ntry {\n // A trick for browserified version, to not include `Buffer` shim\n var _require = require;\n NodeBuffer = _require('buffer').Buffer;\n} catch (__) {}\n\nvar Type = require('../type');\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n // Wrap into Buffer for NodeJS and leave Array for browser\n if (NodeBuffer) {\n // Support node 6.+ Buffer API when available\n return NodeBuffer.from ? NodeBuffer.from(result) : new NodeBuffer(result);\n }\n\n return result;\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(object) {\n return NodeBuffer && NodeBuffer.isBuffer(object);\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _toString = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n","'use strict';\n\nvar Type = require('../type');\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n","// JS-YAML's default schema for `safeLoad` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on standard YAML's Core schema and includes most of\n// extra types described at YAML tag repository. (http://yaml.org/type/)\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = new Schema({\n include: [\n require('./core')\n ],\n implicit: [\n require('../type/timestamp'),\n require('../type/merge')\n ],\n explicit: [\n require('../type/binary'),\n require('../type/omap'),\n require('../type/pairs'),\n require('../type/set')\n ]\n});\n","'use strict';\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptUndefined() {\n return true;\n}\n\nfunction constructJavascriptUndefined() {\n /*eslint-disable no-undefined*/\n return undefined;\n}\n\nfunction representJavascriptUndefined() {\n return '';\n}\n\nfunction isUndefined(object) {\n return typeof object === 'undefined';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/undefined', {\n kind: 'scalar',\n resolve: resolveJavascriptUndefined,\n construct: constructJavascriptUndefined,\n predicate: isUndefined,\n represent: representJavascriptUndefined\n});\n","'use strict';\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptRegExp(data) {\n if (data === null) return false;\n if (data.length === 0) return false;\n\n var regexp = data,\n tail = /\\/([gim]*)$/.exec(data),\n modifiers = '';\n\n // if regexp starts with '/' it can have modifiers and must be properly closed\n // `/foo/gim` - modifiers tail can be maximum 3 chars\n if (regexp[0] === '/') {\n if (tail) modifiers = tail[1];\n\n if (modifiers.length > 3) return false;\n // if expression starts with /, is should be properly terminated\n if (regexp[regexp.length - modifiers.length - 1] !== '/') return false;\n }\n\n return true;\n}\n\nfunction constructJavascriptRegExp(data) {\n var regexp = data,\n tail = /\\/([gim]*)$/.exec(data),\n modifiers = '';\n\n // `/foo/gim` - tail can be maximum 4 chars\n if (regexp[0] === '/') {\n if (tail) modifiers = tail[1];\n regexp = regexp.slice(1, regexp.length - modifiers.length - 1);\n }\n\n return new RegExp(regexp, modifiers);\n}\n\nfunction representJavascriptRegExp(object /*, style*/) {\n var result = '/' + object.source + '/';\n\n if (object.global) result += 'g';\n if (object.multiline) result += 'm';\n if (object.ignoreCase) result += 'i';\n\n return result;\n}\n\nfunction isRegExp(object) {\n return Object.prototype.toString.call(object) === '[object RegExp]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/regexp', {\n kind: 'scalar',\n resolve: resolveJavascriptRegExp,\n construct: constructJavascriptRegExp,\n predicate: isRegExp,\n represent: representJavascriptRegExp\n});\n","'use strict';\n\nvar esprima;\n\n// Browserified version does not have esprima\n//\n// 1. For node.js just require module as deps\n// 2. For browser try to require mudule via external AMD system.\n// If not found - try to fallback to window.esprima. If not\n// found too - then fail to parse.\n//\ntry {\n // workaround to exclude package from browserify list.\n var _require = require;\n esprima = _require('esprima');\n} catch (_) {\n /*global window */\n if (typeof window !== 'undefined') esprima = window.esprima;\n}\n\nvar Type = require('../../type');\n\nfunction resolveJavascriptFunction(data) {\n if (data === null) return false;\n\n try {\n var source = '(' + data + ')',\n ast = esprima.parse(source, { range: true });\n\n if (ast.type !== 'Program' ||\n ast.body.length !== 1 ||\n ast.body[0].type !== 'ExpressionStatement' ||\n ast.body[0].expression.type !== 'FunctionExpression') {\n return false;\n }\n\n return true;\n } catch (err) {\n return false;\n }\n}\n\nfunction constructJavascriptFunction(data) {\n /*jslint evil:true*/\n\n var source = '(' + data + ')',\n ast = esprima.parse(source, { range: true }),\n params = [],\n body;\n\n if (ast.type !== 'Program' ||\n ast.body.length !== 1 ||\n ast.body[0].type !== 'ExpressionStatement' ||\n ast.body[0].expression.type !== 'FunctionExpression') {\n throw new Error('Failed to resolve function');\n }\n\n ast.body[0].expression.params.forEach(function (param) {\n params.push(param.name);\n });\n\n body = ast.body[0].expression.body.range;\n\n // Esprima's ranges include the first '{' and the last '}' characters on\n // function expressions. So cut them out.\n /*eslint-disable no-new-func*/\n return new Function(params, source.slice(body[0] + 1, body[1] - 1));\n}\n\nfunction representJavascriptFunction(object /*, style*/) {\n return object.toString();\n}\n\nfunction isFunction(object) {\n return Object.prototype.toString.call(object) === '[object Function]';\n}\n\nmodule.exports = new Type('tag:yaml.org,2002:js/function', {\n kind: 'scalar',\n resolve: resolveJavascriptFunction,\n construct: constructJavascriptFunction,\n predicate: isFunction,\n represent: representJavascriptFunction\n});\n","// JS-YAML's default schema for `load` function.\n// It is not described in the YAML specification.\n//\n// This schema is based on JS-YAML's default safe schema and includes\n// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function.\n//\n// Also this schema is used as default base schema at `Schema.create` function.\n\n\n'use strict';\n\n\nvar Schema = require('../schema');\n\n\nmodule.exports = Schema.DEFAULT = new Schema({\n include: [\n require('./default_safe')\n ],\n explicit: [\n require('../type/js/undefined'),\n require('../type/js/regexp'),\n require('../type/js/function')\n ]\n});\n","'use strict';\n\n/*eslint-disable max-len,no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar Mark = require('./mark');\nvar DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\nvar DEFAULT_FULL_SCHEMA = require('./schema/default_full');\n\n\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.onWarning = options['onWarning'] || null;\n this.legacy = options['legacy'] || false;\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n return new YAMLException(\n message,\n new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)));\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startPos) {\n var index, quantity;\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty.call(overridableKeys, keyNode) &&\n _hasOwnProperty.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n _result[keyNode] = valueNode;\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = {},\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _pos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = {},\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n _pos = state.position;\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else {\n break; // Reading is done. Go to the epilogue.\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _pos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if (state.lineIndent > nodeIndent && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!state.anchorMap.hasOwnProperty(alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag !== null && state.tag !== '!') {\n if (state.tag === '?') {\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only assigned to plain scalars. So, it isn't\n // needed to check for 'kind' conformity.\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = {};\n state.anchorMap = {};\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State(input, options);\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll(input, iterator, options) {\n var documents = loadDocuments(input, options), index, length;\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new YAMLException('expected a single document in the stream, but found more');\n}\n\n\nfunction safeLoadAll(input, output, options) {\n if (typeof output === 'function') {\n loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n } else {\n return loadAll(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n }\n}\n\n\nfunction safeLoad(input, options) {\n return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\n\nmodule.exports.loadAll = loadAll;\nmodule.exports.load = load;\nmodule.exports.safeLoadAll = safeLoadAll;\nmodule.exports.safeLoad = safeLoad;\n","'use strict';\n\n/*eslint-disable no-use-before-define*/\n\nvar common = require('./common');\nvar YAMLException = require('./exception');\nvar DEFAULT_FULL_SCHEMA = require('./schema/default_full');\nvar DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\nfunction State(options) {\n this.schema = options['schema'] || DEFAULT_FULL_SCHEMA;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== 0xFEFF /* BOM */)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// Simplified test for values allowed after the first character in plain style.\nfunction isPlainSafe(c) {\n // Uses a subset of nb-char - c-flow-indicator - \":\" - \"#\"\n // where nb-char ::= c-printable - b-char - c-byte-order-mark.\n return isPrintable(c) && c !== 0xFEFF\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // - \":\" - \"#\"\n && c !== CHAR_COLON\n && c !== CHAR_SHARP;\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n return isPrintable(c) && c !== 0xFEFF\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType) {\n var i;\n var char;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(string.charCodeAt(0))\n && !isWhitespace(string.charCodeAt(string.length - 1));\n\n if (singleLineOnly) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char);\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char);\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n return plain && !testAmbiguousType(string)\n ? STYLE_PLAIN : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (string[0] === ' ' && indentPerLevel > 9) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// • No ending newline => unaffected; already using strip \"-\" chomping.\n// • Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey) {\n state.dump = (function () {\n if (string.length === 0) {\n return \"''\";\n }\n if (!state.noCompatMode &&\n DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1) {\n return \"'\" + string + \"'\";\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth, testAmbiguity)) {\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string, lineWidth) + '\"';\n default:\n throw new YAMLException('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = (string[0] === ' ') ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char, nextChar;\n var escapeSeq;\n\n for (var i = 0; i < string.length; i++) {\n char = string.charCodeAt(i);\n // Check for surrogate pairs (reference Unicode 3.0 section \"3.7 Surrogates\").\n if (char >= 0xD800 && char <= 0xDBFF/* high surrogate */) {\n nextChar = string.charCodeAt(i + 1);\n if (nextChar >= 0xDC00 && nextChar <= 0xDFFF/* low surrogate */) {\n // Combine the surrogate pair and store it escaped.\n result += encodeHex((char - 0xD800) * 0x400 + nextChar - 0xDC00 + 0x10000);\n // Advance index one extra since we already used that char here.\n i++; continue;\n }\n }\n escapeSeq = ESCAPE_SEQUENCES[char];\n result += !escapeSeq && isPrintable(char)\n ? string[i]\n : escapeSeq || encodeHex(char);\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n // Write only valid elements.\n if (writeNode(state, level, object[index], false, false)) {\n if (index !== 0) _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n // Write only valid elements.\n if (writeNode(state, level + 1, object[index], true, true)) {\n if (!compact || index !== 0) {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = state.condenseFlow ? '\"' : '';\n\n if (index !== 0) pairBuffer += ', ';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new YAMLException('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || index !== 0) {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n state.tag = explicit ? type.tag : '?';\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new YAMLException('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n writeBlockSequence(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey);\n }\n } else {\n if (state.skipInvalid) return false;\n throw new YAMLException('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n state.dump = '!<' + state.tag + '> ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n if (writeNode(state, 0, input, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nfunction safeDump(input, options) {\n return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\n}\n\nmodule.exports.dump = dump;\nmodule.exports.safeDump = safeDump;\n","'use strict';\n\n\nvar loader = require('./js-yaml/loader');\nvar dumper = require('./js-yaml/dumper');\n\n\nfunction deprecated(name) {\n return function () {\n throw new Error('Function ' + name + ' is deprecated and cannot be used.');\n };\n}\n\n\nmodule.exports.Type = require('./js-yaml/type');\nmodule.exports.Schema = require('./js-yaml/schema');\nmodule.exports.FAILSAFE_SCHEMA = require('./js-yaml/schema/failsafe');\nmodule.exports.JSON_SCHEMA = require('./js-yaml/schema/json');\nmodule.exports.CORE_SCHEMA = require('./js-yaml/schema/core');\nmodule.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe');\nmodule.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full');\nmodule.exports.load = loader.load;\nmodule.exports.loadAll = loader.loadAll;\nmodule.exports.safeLoad = loader.safeLoad;\nmodule.exports.safeLoadAll = loader.safeLoadAll;\nmodule.exports.dump = dumper.dump;\nmodule.exports.safeDump = dumper.safeDump;\nmodule.exports.YAMLException = require('./js-yaml/exception');\n\n// Deprecated schema names from JS-YAML 2.0.x\nmodule.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe');\nmodule.exports.SAFE_SCHEMA = require('./js-yaml/schema/default_safe');\nmodule.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full');\n\n// Deprecated functions from JS-YAML 1.x.x\nmodule.exports.scan = deprecated('scan');\nmodule.exports.parse = deprecated('parse');\nmodule.exports.compose = deprecated('compose');\nmodule.exports.addConstructor = deprecated('addConstructor');\n","'use strict';\n\n\nvar yaml = require('./lib/js-yaml.js');\n\n\nmodule.exports = yaml;\n","// Return a copy of the object, filtered to omit the blacklisted array of keys.\nexport default function omit (obj, blackList) {\n var newObj = {}\n Object.keys(obj || {}).forEach(key => {\n if (blackList.indexOf(key) === -1) {\n newObj[key] = obj[key]\n }\n })\n return newObj\n}\n","/* istanbul ignore next */\nimport yamlParser from 'js-yaml'\nimport identity from '../utils/identity'\nimport omit from '../utils/omit'\n\nexport default function (str, parserOptions) {\n parserOptions = parserOptions || {}\n var map = parserOptions.map || identity\n var loadMethod = parserOptions.loadMethod || 'safeLoad'\n var data = yamlParser[loadMethod](str, omit(parserOptions, ['map', 'loadMethod'])) || {}\n return map(data, map)\n}\n","\n\n// Structure inspired by John Resig's HTML parser\n// http://ejohn.org/blog/pure-javascript-html-parser/\n\n(function() {\n 'use strict';\n\n// The load function takes a string of text as its only argument.\n// It then proceeds to match the text to one of several regular expressions\n// which match patterns for different types of commands in AML.\nfunction load(input, options) {\n var whitespacePattern = '\\\\u0000\\\\u0009\\\\u000A\\\\u000B\\\\u000C\\\\u000D\\\\u0020\\\\u00A0\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u200B\\\\u2028\\\\u2029\\\\u202F\\\\u205F\\\\u3000\\\\uFEFF';\n var slugBlacklist = whitespacePattern + '\\\\u005B\\\\u005C\\\\u005D\\\\u007B\\\\u007D\\\\u003A';\n\n var nextLine = new RegExp('.*((\\r|\\n)+)');\n var startKey = new RegExp('^\\\\s*([^' + slugBlacklist + ']+)[ \\t\\r]*:[ \\t\\r]*(.*(?:\\n|\\r|$))');\n var commandKey = new RegExp('^\\\\s*:[ \\t\\r]*(endskip|ignore|skip|end).*?(\\n|\\r|$)', 'i');\n var arrayElement = new RegExp('^\\\\s*\\\\*[ \\t\\r]*(.*(?:\\n|\\r|$))');\n var scopePattern = new RegExp('^\\\\s*(\\\\[|\\\\{)[ \\t\\r]*([\\+\\.]*)[ \\t\\r]*([^' + slugBlacklist + ']*)[ \\t\\r]*(?:\\\\]|\\\\}).*?(\\n|\\r|$)');\n\n var data = {},\n scope = data,\n\n stack = [],\n stackScope = undefined,\n\n bufferScope = null,\n bufferKey = null,\n bufferString = '',\n\n isSkipping = false;\n\n var options = options || {};\n if (options.comments !== true) options.comments = false;\n\n while (input) {\n // Inside the input stream loop, the `input` string is trimmed down as matches\n // are found, and fires a call to the matching parse*() function.\n var match;\n\n if (commandKey.exec(input)) {\n match = commandKey.exec(input);\n\n parseCommandKey(match[1].toLowerCase());\n\n } else if (!isSkipping && startKey.exec(input) &&\n (!stackScope || stackScope.arrayType !== 'simple')) {\n match = startKey.exec(input);\n\n parseStartKey(match[1], match[2] || '');\n\n } else if (!isSkipping && arrayElement.exec(input) && stackScope && stackScope.array &&\n (stackScope.arrayType !== 'complex' && stackScope.arrayType !== 'freeform') &&\n stackScope.flags.indexOf('+') < 0) {\n match = arrayElement.exec(input);\n\n parseArrayElement(match[1]);\n\n } else if (!isSkipping && scopePattern.exec(input)) {\n match = scopePattern.exec(input);\n\n parseScope(match[1], match[2], match[3]);\n\n } else if (nextLine.exec(input)) {\n match = nextLine.exec(input);\n\n parseText(match[0]);\n\n } else {\n // End of document reached\n parseText(input);\n input = '';\n }\n\n if (match) input = input.substring(match[0].length);\n }\n\n // The following parse functions add to the global `data` object and update\n // scoping variables to keep track of what we're parsing.\n\n function parseStartKey(key, restOfLine) {\n // When a new key is encountered, the rest of the line is immediately added as\n // its value, by calling `flushBuffer`.\n flushBuffer();\n\n incrementArrayElement(key);\n\n if (stackScope && stackScope.flags.indexOf('+') > -1) key = 'value';\n\n bufferKey = key;\n bufferString = restOfLine;\n\n flushBufferInto(key, {replace: true});\n }\n\n function parseArrayElement(value) {\n flushBuffer();\n\n stackScope.arrayType = stackScope.arrayType || 'simple';\n\n stackScope.array.push('');\n bufferKey = stackScope.array;\n bufferString = value;\n flushBufferInto(stackScope.array, {replace: true});\n }\n\n function parseCommandKey(command) {\n // if isSkipping, don't parse any command unless :endskip\n\n if (isSkipping && !(command === \"endskip\" || command === \"ignore\")) return flushBuffer();\n\n switch (command) {\n case \"end\":\n // When we get to an end key, save whatever was in the buffer to the last\n // active key.\n if (bufferKey) flushBufferInto(bufferKey, {replace: false});\n return;\n\n case \"ignore\":\n // When \":ignore\" is reached, stop parsing immediately\n input = '';\n break;\n\n case \"skip\":\n isSkipping = true;\n break;\n\n case \"endskip\":\n isSkipping = false;\n break;\n }\n\n flushBuffer();\n }\n\n function parseScope(scopeType, flags, scopeKey) {\n // Throughout the parsing, `scope` refers to one of the following:\n // * `data`\n // * an object - one level within `data` - when we're within a {scope} block\n // * an object at the end of an array - which is one level within `data` -\n // when we're within an [array] block.\n //\n // `scope` changes whenever a scope key is encountered. It also changes\n // within parseStartKey when we start a new object within an array.\n flushBuffer();\n\n if (scopeKey == '') {\n\n // Move up a level\n var lastStackItem = stack.pop();\n scope = (lastStackItem ? lastStackItem.scope : data) || data\n stackScope = stack[stack.length - 1];\n\n } else if (scopeType === '[' || scopeType === '{') {\n var nesting = false;\n var keyScope = data;\n\n // If the flags include \".\", drill down into the appropriate scope.\n if (flags.indexOf('.') > -1) {\n incrementArrayElement(scopeKey, flags);\n nesting = true;\n if (stackScope) keyScope = scope;\n\n // Otherwise, make sure we reset to the global scope\n } else {\n scope = data;\n stack = [];\n }\n\n // Within freeforms, the `type` of nested objects and arrays is taken\n // verbatim from the `keyScope`.\n if (stackScope && stackScope.flags.indexOf('+') > -1) {\n var parsedScopeKey = scopeKey;\n\n // Outside of freeforms, dot-notation interpreted as nested data.\n } else {\n var keyBits = scopeKey.split('.');\n for (var i=0; i -1 && flags.indexOf('.') > -1) {\n if (scopeType === '[') parsedScopeKey = 'value';\n else if (scopeType === '{') scope = scope.value = {};\n }\n\n var stackScopeItem = {\n array: null,\n arrayType: null,\n arrayFirstKey: null,\n flags: flags,\n scope: scope\n };\n if (scopeType == '[') {\n stackScopeItem.array = keyScope[parsedScopeKey] = [];\n if (flags.indexOf('+') > -1) stackScopeItem.arrayType = 'freeform';\n if (nesting) {\n stack.push(stackScopeItem);\n } else {\n stack = [stackScopeItem];\n }\n stackScope = stack[stack.length - 1];\n\n } else if (scopeType == '{') {\n if (nesting) {\n stack.push(stackScopeItem);\n } else {\n scope = keyScope[parsedScopeKey] = (typeof keyScope[parsedScopeKey] === 'object') ? keyScope[parsedScopeKey] : {};\n stack = [stackScopeItem];\n }\n stackScope = stack[stack.length - 1];\n }\n }\n }\n\n function parseText(text) {\n if (stackScope && stackScope.flags.indexOf('+') > -1 && text.match(/[^\\n\\r\\s]/)) {\n stackScope.array.push({\"type\": \"text\", \"value\": text.replace(/(^\\s*)|(\\s*$)/g, '')});\n } else {\n bufferString += input.substring(0, text.length);\n }\n }\n\n function incrementArrayElement(key) {\n // Special handling for arrays. If this is the start of the array, remember\n // which key was encountered first. If this is a duplicate encounter of\n // that key, start a new object.\n\n if (stackScope && stackScope.array) {\n // If we're within a simple array, ignore\n stackScope.arrayType = stackScope.arrayType || 'complex';\n if (stackScope.arrayType === 'simple') return;\n\n // arrayFirstKey may be either another key, or null\n if (stackScope.arrayFirstKey === null || stackScope.arrayFirstKey === key) stackScope.array.push(scope = {});\n if (stackScope.flags.indexOf('+') > -1) {\n scope.type = key\n } else {\n stackScope.arrayFirstKey = stackScope.arrayFirstKey || key;\n }\n }\n }\n\n function formatValue(value, type) {\n if (options.comments) {\n value = value.replace(/(?:^\\\\)?\\[[^\\[\\]\\n\\r]*\\](?!\\])/mg, \"\"); // remove comments\n value = value.replace(/\\[\\[([^\\[\\]\\n\\r]*)\\]\\]/g, \"[$1]\"); // [[]] => []\n }\n\n if (type == 'append') {\n // If we're appending to a multi-line string, escape special punctuation\n // by using a backslash at the beginning of any line.\n // Note we do not do this processing for the first line of any value.\n value = value.replace(new RegExp('^(\\\\s*)\\\\\\\\', 'gm'), \"$1\");\n }\n\n return value;\n }\n\n function flushBuffer() {\n var result = bufferString + '';\n bufferString = '';\n bufferKey = null;\n return result;\n }\n\n function flushBufferInto(key, options) {\n options = options || {};\n var existingBufferKey = bufferKey;\n var value = flushBuffer();\n\n if (options.replace) {\n value = formatValue(value, 'replace').replace(new RegExp('^\\\\s*'), '');\n bufferString = (new RegExp('\\\\s*$')).exec(value)[0];\n bufferKey = existingBufferKey\n } else {\n value = formatValue(value, 'append');\n }\n\n if (typeof key === 'object') {\n // key is an array\n if (options.replace) key[key.length - 1] = '';\n\n key[key.length - 1] += value.replace(new RegExp('\\\\s*$'), '');\n\n } else {\n var keyBits = key.split('.');\n bufferScope = scope;\n\n for (var i=0; i {\n return {name: key, equivalents: formatsIndex[key]}\n})\n","import csv from './csv'\nimport json from './json'\nimport psv from './psv'\nimport tsv from './tsv'\nimport txt from './txt'\nimport yaml from './yaml'\nimport aml from './aml'\nimport {formatsList} from '../config/equivalentFormats'\n\nlet parsers = {\n csv,\n json,\n psv,\n tsv,\n txt,\n yaml,\n aml\n}\n\nformatsList.forEach(format => {\n format.equivalents.forEach(equivalent => {\n parsers[equivalent] = parsers[format.name]\n })\n})\n\nexport default parsers\n","/* istanbul ignore next */\nimport dsvFormat from 'd3-dsv/src/dsv'\nimport discernFormat from './discernFormat'\nimport parsers from '../parsers/index'\n\n/**\n * Given a `filePath` return a parser that can read that file as json. Parses as text if format not supported by a built-in parser. If given a delimiter string as the second argument, return a parser for that delimiter regardless of `filePath`. Used internally by {@link readData} and {@link readDataSync}.\n *\n * @function discernParser\n * @param {String} [filePath] Input file path\n * @param {Object} [options] Optional options object, see below\n * @param {Object} [options.delimiter] If `{delimiter: true}`, it will treat the string given as `filePath` as a delimiter and delegate to `dsv.dsvFormat`.\n * @returns {Function} A parser that can parse a file string into json\n *\n * @example\n * var parser = io.discernParser('path/to/data.csv')\n * var json = parser('name,price\\nApple,120\\nPear,300')\n\n * var parser = io.discernParser('_', {delimiter: true})\n * var json = parser('name_price\\nApple_120\\nPear_300')\n */\nexport default function discernParser (filePath, opts_) {\n if (opts_ && opts_.delimiter === true) {\n return dsvFormat(filePath).parse\n }\n var format = discernFormat(filePath)\n var parser = parsers[format]\n // If we don't have a parser for this format, return as text\n if (typeof parser === 'undefined') {\n parser = parsers['txt']\n }\n return parser\n}\n","import discernParser from './discernParser'\n\n// Our `readData` fns can take either a delimiter to parse a file, or a full blown parser\n// Determine what they passed in with this handy function\nexport default function getParser (delimiterOrParser) {\n var parser\n if (typeof delimiterOrParser === 'string') {\n parser = discernParser(delimiterOrParser, {delimiter: true})\n } else if (typeof delimiterOrParser === 'function' || typeof delimiterOrParser === 'object') {\n parser = delimiterOrParser\n }\n return parser\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\nimport discernFormat from '../helpers/discernFormat'\nimport {formatsIndex} from '../config/equivalentFormats'\n\nexport default function file (filePath, parser, parserOptions, cb) {\n fs.readFile(filePath, 'utf8', function (err, data) {\n var fileFormat = discernFormat(filePath)\n if ((fileFormat === 'json' || formatsIndex.json.indexOf(fileFormat) > -1) && data === '') {\n data = '[]'\n }\n if (err) {\n cb(err)\n return false\n }\n var parsed\n try {\n if (typeof parser === 'function') {\n parsed = parser(data, parserOptions)\n } else if (typeof parser === 'object' && typeof parser.parse === 'function') {\n parsed = parser.parse(data, parserOptions)\n } else {\n parsed = 'Your specified parser is not properly formatted. It must either be a function or have a `parse` method.'\n }\n } catch (err) {\n cb(err)\n return\n }\n cb(null, parsed)\n })\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\nimport discernFormat from '../helpers/discernFormat'\nimport {formatsIndex} from '../config/equivalentFormats'\n\nexport default function file (filePath, parser, parserOptions, cb) {\n var data = fs.readFileSync(filePath, 'utf8')\n var fileFormat = discernFormat(filePath)\n if ((fileFormat === 'json' || formatsIndex.json.indexOf(fileFormat) > -1) && data === '') {\n data = '[]'\n }\n\n var parsed\n if (typeof parser === 'function') {\n parsed = parser(data, parserOptions)\n } else if (typeof parser === 'object' && typeof parser.parse === 'function') {\n parsed = parser.parse(data, parserOptions)\n } else {\n return new Error('Your specified parser is not properly formatted. It must either be a function or have a `parse` method.')\n }\n\n // if (opts_ && opts_.flatten) {\n // parsed = _.map(parsed, flatten)\n // }\n return parsed\n}\n","/* istanbul ignore next */\nvar shapefile = require('shapefile')\nimport identity from '../utils/identity'\n\nexport default function dbf (filePath, parser, parserOptions, cb) {\n var values = []\n parserOptions = parserOptions || {}\n var map = parserOptions.map || identity\n var i = 0\n shapefile.openDbf(filePath)\n .then(source => source.read()\n .then(function log (result) {\n i++\n if (result.done) return cb(null, values)\n values.push(map(result.value, i))\n return source.read().then(log)\n }))\n .catch(error => cb(error.stack))\n}\n","import file from './file'\nimport fileSync from './fileSync'\nimport dbf from './dbf'\nimport {formatsList} from '../config/equivalentFormats'\n\nlet loaders = {\n async: {\n aml: file,\n csv: file,\n psv: file,\n tsv: file,\n txt: file,\n json: file,\n yaml: file,\n dbf\n },\n sync: {\n aml: fileSync,\n csv: fileSync,\n psv: fileSync,\n tsv: fileSync,\n txt: fileSync,\n json: fileSync,\n yaml: fileSync\n }\n}\n\nformatsList.forEach(format => {\n format.equivalents.forEach(equivalent => {\n Object.keys(loaders).forEach(key => {\n loaders[key][equivalent] = loaders[key][format.name]\n })\n })\n})\n\nexport default loaders\n","import discernFormat from './discernFormat'\nimport loaders from '../loaders/index'\n\nexport default function discernLoader (filePath, opts_ = {}) {\n var which = opts_.sync === true ? 'sync' : 'async'\n var format = discernFormat(filePath)\n var loader = loaders[which][format]\n // If we don't have a loader for this format, read in as a normal file\n if (typeof loader === 'undefined') {\n loader = loaders[which]['txt']\n }\n return loader\n}\n","/* istanbul ignore next */\nimport _ from 'underscore'\nimport getParser from '../helpers/getParser'\nimport discernLoader from '../helpers/discernLoader'\nimport discernParser from '../helpers/discernParser'\nimport omit from '../utils/omit'\n\n/**\n * Asynchronously read data given a path ending in the file format.\n *\n * Supported formats / extensions:\n *\n * * `.json` Array of objects or object\n * * `.csv` Comma-separated\n * * `.tsv` Tab-separated\n * * `.psv` Pipe-separated\n * * `.yaml` or `.yml` Yaml file\n * * `.aml` ArchieML\n * * `.txt` Text file (a string)\n * * `.dbf` Database format used for shapefiles\n * * other All others are read as a text file\n *\n * @function readData\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {String|Function|Object} [parserOptions.parser] This can be a string that is the file's delimiter, a function that returns JSON, or, for convenience, can also be a dsv object such as `dsv.dsv('_')` or any object that has a `parse` method that's a function. See `parsers` in library source for examples.\n * @param {Function} [parserOptions.map] Transformation function. See {@link directReaders} for format-specific function signature. In brief, tabular formats get passed a `(row, i, columns)` and must return the modified row. Text or AML formats are passed the full document and must return the modified document. JSON arrays are mapped like tabular documents with `(row, i)` and return the modified row. JSON objects are mapped with Underscore's `_.mapObject` with `(value, key)` and return the modified value.\n * @param {Function} [parserOptions.reviver] Used for JSON files, otherwise ignored. See {@link readJson} for details.\n * @param {Function} [parserOptions.filename] Used for JSON files, otherwise ignored. See {@link readJson} for details.\n * @param {String} [parserOptions.loadMethod=\"safeLoad\"] Used for for YAML files, otherwise ignored. See {@link readYaml} for details.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readData('path/to/data.tsv', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Parser specified as a string\n * io.readData('path/to/data.usv', {parser: '_'}, function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Parser specified as a function\n * var myParser = dsv.dsv('_').parse\n * // var myParser = dsv.dsv('_') // This also works\n * io.readData('path/to/data.usv', {parser: myParser}, function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Parser specified as a function\n * var naiveJsonLines = function (dataAsString) {\n * return dataAsString.split('\\n').map(function (row) { return JSON.parse(row) })\n * }\n * io.readData('path/to/data.jsonlines', {parser: naiveJsonLines}, function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Shorthand for specifying a map function\n * io.readData('path/to/data.csv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }, function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Explicitly specify a map function and a filename for a json file. See `readJson` for more details\n * io.readData('path/to/data.json', {\n * map: function (k, v) {\n * if (typeof v === 'number') {\n * return v * 2\n * }\n * return v\n * },\n * filename: 'awesome-data.json'\n * }, function (err, data) {\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n * })\n */\nexport default function readData (filePath, opts_, cb_) {\n var cb = arguments[arguments.length - 1]\n var parser\n var parserOptions\n if (arguments.length === 3) {\n if (opts_.parser) {\n parser = getParser(opts_.parser)\n opts_ = omit(opts_, ['parser'])\n if (_.isEmpty(opts_)) {\n opts_ = undefined\n }\n } else {\n parser = discernParser(filePath)\n }\n\n if (opts_ && opts_.parserOptions) {\n if (typeof opts_.parserOptions === 'function') {\n parserOptions = {map: opts_.parserOptions}\n } else {\n parserOptions = opts_.parserOptions\n }\n } else if (opts_) {\n if (typeof opts_ === 'function') {\n parserOptions = {map: opts_}\n } else {\n parserOptions = opts_\n }\n }\n } else {\n parser = discernParser(filePath)\n }\n var loader = discernLoader(filePath)\n loader(filePath, parser, parserOptions, cb)\n}\n","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n","'use strict';\n\nfunction assembleStyles () {\n\tvar styles = {\n\t\tmodifiers: {\n\t\t\treset: [0, 0],\n\t\t\tbold: [1, 22], // 21 isn't widely supported and 22 does the same thing\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolors: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\t\t\tgray: [90, 39]\n\t\t},\n\t\tbgColors: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49]\n\t\t}\n\t};\n\n\t// fix humans\n\tstyles.colors.grey = styles.colors.gray;\n\n\tObject.keys(styles).forEach(function (groupName) {\n\t\tvar group = styles[groupName];\n\n\t\tObject.keys(group).forEach(function (styleName) {\n\t\t\tvar style = group[styleName];\n\n\t\t\tstyles[styleName] = group[styleName] = {\n\t\t\t\topen: '\\u001b[' + style[0] + 'm',\n\t\t\t\tclose: '\\u001b[' + style[1] + 'm'\n\t\t\t};\n\t\t});\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t});\n\n\treturn styles;\n}\n\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\nmodule.exports = function () {\n\treturn /[\\u001b\\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g;\n};\n","'use strict';\nvar ansiRegex = require('ansi-regex')();\n\nmodule.exports = function (str) {\n\treturn typeof str === 'string' ? str.replace(ansiRegex, '') : str;\n};\n","'use strict';\nvar ansiRegex = require('ansi-regex');\nvar re = new RegExp(ansiRegex().source); // remove the `g` flag\nmodule.exports = re.test.bind(re);\n","'use strict';\nvar argv = process.argv;\n\nvar terminator = argv.indexOf('--');\nvar hasFlag = function (flag) {\n\tflag = '--' + flag;\n\tvar pos = argv.indexOf(flag);\n\treturn pos !== -1 && (terminator !== -1 ? pos < terminator : true);\n};\n\nmodule.exports = (function () {\n\tif ('FORCE_COLOR' in process.env) {\n\t\treturn true;\n\t}\n\n\tif (hasFlag('no-color') ||\n\t\thasFlag('no-colors') ||\n\t\thasFlag('color=false')) {\n\t\treturn false;\n\t}\n\n\tif (hasFlag('color') ||\n\t\thasFlag('colors') ||\n\t\thasFlag('color=true') ||\n\t\thasFlag('color=always')) {\n\t\treturn true;\n\t}\n\n\tif (process.stdout && !process.stdout.isTTY) {\n\t\treturn false;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn true;\n\t}\n\n\tif ('COLORTERM' in process.env) {\n\t\treturn true;\n\t}\n\n\tif (process.env.TERM === 'dumb') {\n\t\treturn false;\n\t}\n\n\tif (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {\n\t\treturn true;\n\t}\n\n\treturn false;\n})();\n","'use strict';\nvar escapeStringRegexp = require('escape-string-regexp');\nvar ansiStyles = require('ansi-styles');\nvar stripAnsi = require('strip-ansi');\nvar hasAnsi = require('has-ansi');\nvar supportsColor = require('supports-color');\nvar defineProps = Object.defineProperties;\nvar isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM);\n\nfunction Chalk(options) {\n\t// detect mode if not set manually\n\tthis.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled;\n}\n\n// use bright blue on Windows as the normal blue color is illegible\nif (isSimpleWindowsTerm) {\n\tansiStyles.blue.open = '\\u001b[94m';\n}\n\nvar styles = (function () {\n\tvar ret = {};\n\n\tObject.keys(ansiStyles).forEach(function (key) {\n\t\tansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');\n\n\t\tret[key] = {\n\t\t\tget: function () {\n\t\t\t\treturn build.call(this, this._styles.concat(key));\n\t\t\t}\n\t\t};\n\t});\n\n\treturn ret;\n})();\n\nvar proto = defineProps(function chalk() {}, styles);\n\nfunction build(_styles) {\n\tvar builder = function () {\n\t\treturn applyStyle.apply(builder, arguments);\n\t};\n\n\tbuilder._styles = _styles;\n\tbuilder.enabled = this.enabled;\n\t// __proto__ is used because we must return a function, but there is\n\t// no way to create a function with a different prototype.\n\t/* eslint-disable no-proto */\n\tbuilder.__proto__ = proto;\n\n\treturn builder;\n}\n\nfunction applyStyle() {\n\t// support varags, but simply cast to string in case there's only one arg\n\tvar args = arguments;\n\tvar argsLen = args.length;\n\tvar str = argsLen !== 0 && String(arguments[0]);\n\n\tif (argsLen > 1) {\n\t\t// don't slice `arguments`, it prevents v8 optimizations\n\t\tfor (var a = 1; a < argsLen; a++) {\n\t\t\tstr += ' ' + args[a];\n\t\t}\n\t}\n\n\tif (!this.enabled || !str) {\n\t\treturn str;\n\t}\n\n\tvar nestedStyles = this._styles;\n\tvar i = nestedStyles.length;\n\n\t// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,\n\t// see https://github.com/chalk/chalk/issues/58\n\t// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.\n\tvar originalDim = ansiStyles.dim.open;\n\tif (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) {\n\t\tansiStyles.dim.open = '';\n\t}\n\n\twhile (i--) {\n\t\tvar code = ansiStyles[nestedStyles[i]];\n\n\t\t// Replace any instances already present with a re-opening code\n\t\t// otherwise only the part of the string until said closing code\n\t\t// will be colored, and the rest will simply be 'plain'.\n\t\tstr = code.open + str.replace(code.closeRe, code.open) + code.close;\n\t}\n\n\t// Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue.\n\tansiStyles.dim.open = originalDim;\n\n\treturn str;\n}\n\nfunction init() {\n\tvar ret = {};\n\n\tObject.keys(styles).forEach(function (name) {\n\t\tret[name] = {\n\t\t\tget: function () {\n\t\t\t\treturn build.call(this, [name]);\n\t\t\t}\n\t\t};\n\t});\n\n\treturn ret;\n}\n\ndefineProps(Chalk.prototype, init());\n\nmodule.exports = new Chalk();\nmodule.exports.styles = ansiStyles;\nmodule.exports.hasColor = hasAnsi;\nmodule.exports.stripColor = stripAnsi;\nmodule.exports.supportsColor = supportsColor;\n","/* istanbul ignore next */\nimport chalk from 'chalk'\n\nexport default function (format) {\n throw new Error(chalk.red('[indian-ocean] You passed in an object but converting to ' + chalk.bold(format) + ' requires a list of objects.') + chalk.cyan('\\nIf you would like to write a one-row csv, put your object in a list like so: `' + chalk.bold('[data]') + '`\\n'))\n}\n","import notListError from '../reporters/notListError'\n\n// Some shared data integrity checks for formatters\nexport default function formattingPreflight (file, format) {\n if (file === '') {\n return []\n } else if (!Array.isArray(file)) {\n notListError(format)\n }\n return file\n}\n","/* istanbul ignore next */\nimport chalk from 'chalk'\n\nexport default function (format) {\n throw new Error(chalk.red('[indian-ocean] Error converting your data to ' + chalk.bold(format) + '.') + '\\n\\n' + chalk.cyan('Your data most likely contains objects or lists. Object values can only be strings for this format. Please convert before writing to file.\\n'))\n}\n","/* istanbul ignore next */\nimport {csvFormat} from 'd3-dsv/src/csv'\nimport formattingPreflight from '../utils/formattingPreflight'\nimport parseError from '../reporters/parseError'\n\nexport default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n file = formattingPreflight(file, 'csv')\n try {\n return csvFormat(file, writeOptions.columns)\n } catch (err) {\n parseError('csv')\n }\n}\n","export default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n return JSON.stringify(file, writeOptions.replacer, writeOptions.indent)\n}\n","/* istanbul ignore next */\nimport dsvFormat from 'd3-dsv/src/dsv'\nimport formattingPreflight from '../utils/formattingPreflight'\nimport parseError from '../reporters/parseError'\n\nexport default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n file = formattingPreflight(file, 'psv')\n try {\n return dsvFormat('|').format(file, writeOptions.columns)\n } catch (err) {\n parseError('psv')\n }\n}\n","/* istanbul ignore next */\nimport {tsvFormat} from 'd3-dsv/src/tsv'\nimport formattingPreflight from '../utils/formattingPreflight'\nimport parseError from '../reporters/parseError'\n\nexport default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n file = formattingPreflight(file, 'tsv')\n try {\n return tsvFormat(file, writeOptions.columns)\n } catch (err) {\n parseError('tsv')\n }\n}\n","export default function (file) {\n return file\n}\n","/* istanbul ignore next */\nimport yamlParser from 'js-yaml'\nimport omit from '../utils/omit'\n// import formattingPreflight from '../utils/formattingPreflight'\n// import parseError from '../reporters/parseError'\n\nexport default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n var writeMethod = writeOptions.writeMethod || 'safeDump'\n return yamlParser[writeMethod](file, omit(writeOptions, ['writeMethod']))\n}\n","module.exports = {\n // string\n C: 254,\n // boolean\n L: 1,\n // date\n D: 8,\n // number\n N: 18,\n // number\n M: 18,\n // number, float\n F: 18,\n // number\n B: 8,\n};\n","/**\n * @param {string} str\n * @param {number} len\n * @param {string} char\n * @returns {string}\n */\nmodule.exports.lpad = function lpad(str, len, char) {\n while (str.length < len) { str = char + str; } return str;\n};\n\n/**\n * @param {string} str\n * @param {number} len\n * @param {string} char\n * @returns {string}\n */\nmodule.exports.rpad = function rpad(str, len, char) {\n while (str.length < len) { str = str + char; } return str;\n};\n\n/**\n * @param {object} view\n * @param {number} fieldLength\n * @param {string} str\n * @param {number} offset\n * @returns {number}\n */\nmodule.exports.writeField = function writeField(view, fieldLength, str, offset) {\n for (var i = 0; i < fieldLength; i++) {\n view.setUint8(offset, str.charCodeAt(i)); offset++;\n }\n return offset;\n};\n","var fieldSize = require('./fieldsize');\n\nvar types = {\n string: 'C',\n number: 'N',\n boolean: 'L',\n // type to use if all values of a field are null\n null: 'C'\n};\n\nmodule.exports.multi = multi;\nmodule.exports.bytesPer = bytesPer;\nmodule.exports.obj = obj;\n\nfunction multi(features) {\n var fields = {};\n features.forEach(collect);\n function collect(f) { inherit(fields, f); }\n return obj(fields);\n}\n\n/**\n * @param {Object} a\n * @param {Object} b\n * @returns {Object}\n */\nfunction inherit(a, b) {\n for (var i in b) {\n var isDef = typeof b[i] !== 'undefined' && b[i] !== null;\n if (typeof a[i] === 'undefined' || isDef) {\n a[i] = b[i];\n }\n }\n return a;\n}\n\nfunction obj(_) {\n var fields = {}, o = [];\n for (var p in _) fields[p] = _[p] === null ? 'null' : typeof _[p];\n for (var n in fields) {\n var t = types[fields[n]];\n if(t){\n o.push({\n name: n,\n type: t,\n size: fieldSize[t]\n });\n }\n }\n return o;\n}\n\n/**\n * @param {Array} fields\n * @returns {Array}\n */\nfunction bytesPer(fields) {\n // deleted flag\n return fields.reduce(function(memo, f) { return memo + f.size; }, 1);\n}\n","var fieldSize = require('./fieldsize'),\n lib = require('./lib'),\n fields = require('./fields');\n\n/**\n * @param {Array} data\n * @param {Array} meta\n * @returns {Object} view\n */\nmodule.exports = function structure(data, meta) {\n\n var field_meta = meta || fields.multi(data),\n fieldDescLength = (32 * field_meta.length) + 1,\n bytesPerRecord = fields.bytesPer(field_meta), // deleted flag\n buffer = new ArrayBuffer(\n // field header\n fieldDescLength +\n // header\n 32 +\n // contents\n (bytesPerRecord * data.length) +\n // EOF marker\n 1\n ),\n now = new Date(),\n view = new DataView(buffer);\n\n // version number - dBase III\n view.setUint8(0, 0x03);\n // date of last update\n view.setUint8(1, now.getFullYear() - 1900);\n view.setUint8(2, now.getMonth() + 1);\n view.setUint8(3, now.getDate());\n // number of records\n view.setUint32(4, data.length, true);\n\n // length of header\n var headerLength = fieldDescLength + 32;\n view.setUint16(8, headerLength, true);\n // length of each record\n view.setUint16(10, bytesPerRecord, true);\n\n // Terminator\n view.setInt8(32 + fieldDescLength - 1, 0x0D);\n\n field_meta.forEach(function(f, i) {\n // field name\n f.name.split('').slice(0, 10).forEach(function(c, x) {\n view.setInt8(32 + i * 32 + x, c.charCodeAt(0));\n });\n // field type\n view.setInt8(32 + i * 32 + 11, f.type.charCodeAt(0));\n // field length\n view.setInt8(32 + i * 32 + 16, f.size);\n if (f.type == 'N') view.setInt8(32 + i * 32 + 17, 3);\n });\n\n var offset = fieldDescLength + 32;\n\n data.forEach(function(row, num) {\n // delete flag: this is not deleted\n view.setUint8(offset, 32);\n offset++;\n field_meta.forEach(function(f) {\n var val = row[f.name];\n if (val === null || typeof val === 'undefined') val = '';\n\n switch (f.type) {\n // boolean\n case 'L':\n view.setUint8(offset, val ? 84 : 70);\n offset++;\n break;\n\n // date\n case 'D':\n offset = lib.writeField(view, 8,\n lib.lpad(val.toString(), 8, ' '), offset);\n break;\n\n // number\n case 'N':\n offset = lib.writeField(view, f.size,\n lib.lpad(val.toString(), f.size, ' ').substr(0, 18),\n offset);\n break;\n\n // string\n case 'C':\n offset = lib.writeField(view, f.size,\n lib.rpad(val.toString(), f.size, ' '), offset);\n break;\n\n default:\n throw new Error('Unknown field type');\n }\n });\n });\n\n // EOF flag\n view.setUint8(offset, 0x1A);\n\n return view;\n};\n","module.exports.structure = require('./src/structure');\n","/* istanbul ignore next */\nimport dbf from 'dbf'\n\nexport default function (file, writeOptions) {\n writeOptions = writeOptions || {}\n function toBuffer (ab) {\n var buffer = new Buffer(ab.byteLength)\n var view = new Uint8Array(ab)\n for (var i = 0; i < buffer.length; ++i) {\n buffer[i] = view[i]\n }\n return buffer\n }\n var buf = dbf.structure(file)\n return toBuffer(buf.buffer)\n}\n","import csv from './csv'\nimport json from './json'\nimport psv from './psv'\nimport tsv from './tsv'\nimport txt from './txt'\nimport yaml from './yaml'\nimport dbf from './dbf'\nimport {formatsList} from '../config/equivalentFormats'\n\nlet formatters = {\n csv,\n json,\n psv,\n tsv,\n txt,\n yaml,\n dbf\n}\n\nformatsList.forEach(format => {\n format.equivalents.forEach(equivalent => {\n formatters[equivalent] = formatters[format.name]\n })\n})\n\nexport default formatters\n","import discernFormat from './discernFormat'\nimport formatters from '../formatters/index'\n\n/**\n * Returns a formatter that will format json data to file type specified by the extension in `filePath`. Used internally by {@link writeData} and {@link writeDataSync}.\n *\n * @function discernFileFormatter\n * @param {String} filePath Input file path\n * @returns {Function} A formatter function that will write the extension format\n *\n * @example\n * var formatter = io.discernFileFormatter('path/to/data.tsv')\n * var csv = formatter(json)\n */\nexport default function discernFileFormatter (filePath) {\n var format = discernFormat(filePath)\n var formatter = formatters[format]\n // If we don't have a parser for this format, return as text\n if (typeof formatter === 'undefined') {\n formatter = formatters['txt']\n }\n return formatter\n}\n","var path = require('path');\nvar fs = require('fs');\nvar _0777 = parseInt('0777', 8);\n\nmodule.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;\n\nfunction mkdirP (p, opts, f, made) {\n if (typeof opts === 'function') {\n f = opts;\n opts = {};\n }\n else if (!opts || typeof opts !== 'object') {\n opts = { mode: opts };\n }\n \n var mode = opts.mode;\n var xfs = opts.fs || fs;\n \n if (mode === undefined) {\n mode = _0777 & (~process.umask());\n }\n if (!made) made = null;\n \n var cb = f || function () {};\n p = path.resolve(p);\n \n xfs.mkdir(p, mode, function (er) {\n if (!er) {\n made = made || p;\n return cb(null, made);\n }\n switch (er.code) {\n case 'ENOENT':\n mkdirP(path.dirname(p), opts, function (er, made) {\n if (er) cb(er, made);\n else mkdirP(p, opts, cb, made);\n });\n break;\n\n // In the case of any other error, just see if there's a dir\n // there already. If so, then hooray! If not, then something\n // is borked.\n default:\n xfs.stat(p, function (er2, stat) {\n // if the stat fails, then that's super weird.\n // let the original error be the failure reason.\n if (er2 || !stat.isDirectory()) cb(er, made)\n else cb(null, made);\n });\n break;\n }\n });\n}\n\nmkdirP.sync = function sync (p, opts, made) {\n if (!opts || typeof opts !== 'object') {\n opts = { mode: opts };\n }\n \n var mode = opts.mode;\n var xfs = opts.fs || fs;\n \n if (mode === undefined) {\n mode = _0777 & (~process.umask());\n }\n if (!made) made = null;\n\n p = path.resolve(p);\n\n try {\n xfs.mkdirSync(p, mode);\n made = made || p;\n }\n catch (err0) {\n switch (err0.code) {\n case 'ENOENT' :\n made = sync(path.dirname(p), opts, made);\n sync(p, opts, made);\n break;\n\n // In the case of any other error, just see if there's a dir\n // there already. If so, then hooray! If not, then something\n // is borked.\n default:\n var stat;\n try {\n stat = xfs.statSync(p);\n }\n catch (err1) {\n throw err0;\n }\n if (!stat.isDirectory()) throw err0;\n break;\n }\n }\n\n return made;\n};\n","/* istanbul ignore next */\nimport mkdirp from 'mkdirp'\nimport {dirname} from '../utils/path'\n\n/**\n * Asynchronously create directories along a given file path. Delegates to [mkdirp](http://npmjs.org/package/mkdirp) module. If the last element in your file path is also a folder, it must end in `/` or else it will be interpreted as a file and not created.\n *\n * @function makeDirectories\n * @param {String} outPath The path to a file\n * @param {Function} callback The function to do once this is done. Has signature of `(err)`\n *\n * @example\n * io.makeDirectories('path/to/create/to/data.tsv', function (err) {\n * console.log(err) // null\n * })\n *\n * // Must end in `/` for the last item to be interpreted as a folder as well.\n * io.makeDirectories('path/to/create/to/another-folder/', function (err) {\n * console.log(err) // null\n * })\n *\n */\nexport default function makeDirectories (outPath, cb) {\n mkdirp(dirname(outPath), function (err) {\n cb(err)\n })\n}\n","/* istanbul ignore next */\nimport chalk from 'chalk'\n\nexport default function (msg) {\n console.log(chalk.gray('[indian-ocean]') + ' ' + chalk.yellow('Warning:', msg))\n}\n","import _ from 'underscore'\nimport warn from '../reporters/warn'\n\nexport default function warnIfEmpty (data, outPath, verbose) {\n if (verbose !== false) {\n if (!data || _.isEmpty(data)) {\n let msg = 'You didn\\'t pass any data to write for file: `' + outPath + '`. Writing out an empty '\n if (!data) {\n msg += 'file'\n } else if (_.isEmpty(data)) {\n msg += Array.isArray(data) === true ? 'array' : 'object'\n }\n msg += '...'\n warn(msg)\n }\n }\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n/* istanbul ignore next */\nimport discernFileFormatter from '../helpers/discernFileFormatter'\nimport makeDirectories from '../helpers/makeDirectories'\nimport omit from '../utils/omit'\nimport warnIfEmpty from '../utils/warnIfEmpty'\n\n/**\n * Write the data object, inferring the file format from the file ending specified in `fileName`.\n *\n * Supported formats:\n *\n * * `.json` Array of objects, also supports `.geojson` and `.topojson`\n * * `.csv` Comma-separated\n * * `.tsv` Tab-separated\n * * `.psv` Pipe-separated\n * * `.yaml` Yaml file, also supports `.yml`\n * * `.dbf` Database file, commonly used in ESRI-shapefile format.\n *\n * @function writeData\n * @param {String} filePath Input file path\n * @param {Array|Object|String} data Data to write\n * @param {Object} [options] Optional options object, see below\n * @param {Boolean} [options.makeDirectories=false] If `true`, create intermediate directories to your data file. Can also be `makeDirs` for short.\n * @param {Function|Array} [options.replacer] Used for JSON formats. Function to filter your objects before writing or an array of whitelisted keys to keep. Examples below. See JSON.stringify docs for more info https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\n * @param {Boolean} [options.verbose=true] Verbose logging output, mostly just warns if you write an empty file. Set to `false` if don't want any output.\n * @param {Number} [options.indent] Used for JSON and YAML formats. Specifies indent level. Default for YAML is `2`, `0` for JSON.\n * @param {String} [options.writeMethod='safeDump'] Used for YAML formats. Can also be `\"dump\"` to allow writing of RegExes and functions. The `options` object will also pass anything onto `js-yaml`. See its docs for other options. Example shown below with `sortKeys`. https://github.com/nodeca/js-yaml#safedump-object---options-\n * @param {Array} [options.columns] Used for tabular formats. Optionally specify a list of column names to use. Otherwise they are detected from the data. See `d3-dsv` for more detail: https://github.com/d3/d3-dsv/blob/master/README.md#dsv_format\n * @param {Function} callback Has signature `(err, dataStr)`. `dataStr` is the data that was written out as a string\n *\n * @example\n * io.writeData('path/to/data.json', jsonData, function (err, dataString) {\n * console.log(err)\n * })\n *\n * io.writeData('path/to/create/to/data.csv', flatJsonData, {makeDirectories: true}, function (err, dataString) {\n * console.log(err)\n * })\n *\n * io.writeData('path/to/to/data.yaml', jsonData, {writeMehod: \"dump\", sortKeys: true}, function (err, dataString) {\n * console.log(err)\n * })\n *\n * io.writeData('path/to/to/data.json', jsonData, {indent: 4}, function (err, dataString) {\n * console.log(err)\n * })\n *\n * io.writeData('path/to/to/data.json', jsonData, {\n * indent: 4,\n * replacer: function (key, value) {\n * // Filtering out string properties\n * if (typeof value === \"string\") {\n * return undefined\n * }\n * return value\n * }\n * }, function (err, dataString) {\n * console.log(err)\n * })\n *\n * io.writeData('path/to/to/data.json', jsonData, {\n * indent: 4,\n * replacer: ['name', 'occupation'] // Only keep \"name\" and \"occupation\" values\n * }, function (err, dataString) {\n * console.log(err)\n * })\n */\nexport default function writeData (outPath, data, opts_, cb) {\n if (typeof cb === 'undefined') {\n cb = opts_\n opts_ = undefined\n }\n warnIfEmpty(data, outPath, opts_.verbose)\n\n if (typeof opts_ === 'object' && (opts_.makeDirectories === true || opts_.makeDirs === true)) {\n makeDirectories(outPath, proceed)\n } else {\n proceed()\n }\n\n function proceed (err) {\n if (err) {\n throw err\n }\n\n opts_ = omit(opts_, ['makeDirectories', 'makeDirs'])\n var writeOptions\n if (typeof opts_ !== 'function') {\n writeOptions = opts_\n }\n\n var fileFormatter = discernFileFormatter(outPath)\n var formattedData = fileFormatter(data, writeOptions)\n fs.writeFile(outPath, formattedData, function (err) {\n cb(err, formattedData)\n })\n }\n}\n","import readData from '../readers/readData'\nimport writeData from '../writers/writeData'\n\n/**\n * Reads in data given a path ending in the file format with {@link readData} and writes to file using {@link writeData}. A convenience function for converting files to more other formats. All formats can convert to all others except you can't convert object-only formats such as aml or yaml files that are not lists into tabular formats, which must be lists.\n *\n * @function convertData\n * @param {String} inFilePath Input file path\n * @param {String} outFilePath Output file path\n * @param {Object} [options] Optional config object that's passed to {@link writeData}. See that documentation for full options, which vary depending on the output format you choose.\n * @param {Function} callback Has signature `(err, dataStr)`. `dataStr` is the data that was written out as a string\n *\n * @example\n * io.convertData('path/to/data.dbf', 'path/to/data.csv', function (err, dataStr) {\n * console.log(err)\n * })\n *\n * io.convertData('path/to/data.tsv', 'path/to/create/to/data.dbf', {makeDirectories: true}, function (err, dataStr) {\n * console.log(err)\n * })\n */\nexport default function convertData (inPath, outPath, opts_, cb) {\n if (typeof cb === 'undefined') {\n cb = opts_\n }\n readData(inPath, function (error, jsonData) {\n if (error) {\n cb(error)\n } else {\n writeData(outPath, jsonData, opts_, cb)\n }\n })\n}\n","import identity from '../utils/identity'\nimport readData from '../readers/readData'\n\n/**\n * Asynchronously read a dbf file. Returns an empty array if file is empty.\n *\n * @function readDbf\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readDbf('path/to/data.dbf', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Transform values on load\n * io.readDbf('path/to/data.csv', function (row, i) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }, function (err, data) {\n * console.log(data) // Converted json data\n * })\n */\nexport default function readDbf (filePath, opts_, cb) {\n var parserOptions = {\n map: identity\n }\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, parserOptions, cb)\n}\n","import readDbf from '../directReaders/readDbf'\nimport writeData from '../writers/writeData'\n\n/**\n * Reads in a dbf file with {@link readData} and write to file using {@link writeData}. A convenience function for converting DBFs to more useable formats. Formerly known as `writeDbfToData` and is aliased for legacy support.\n *\n * @function convertDbfToData\n * @param {String} inFilePath Input file path\n * @param {String} outFilePath Output file path\n * @param {Object} [options] Optional config object that's passed to {@link writeData}. See that documentation for full options, which vary depending on the output format you choose.\n * @param {Function} callback Has signature `(err, dataStr)`. `dataStr` is the data that was written out as a string\n *\n * @example\n * io.convertDbfToData('path/to/data.dbf', 'path/to/data.csv', function (err, dataStr) {\n * console.log(err)\n * })\n *\n * io.convertDbfToData('path/to/data.dbf', 'path/to/create/to/data.csv', {makeDirectories: true}, function (err, dataStr) {\n * console.log(err)\n * })\n */\nexport default function convertDbfToData (inPath, outPath, opts_, cb) {\n if (typeof cb === 'undefined') {\n cb = opts_\n }\n readDbf(inPath, function (error, jsonData) {\n if (error) {\n cb(error)\n } else {\n writeData(outPath, jsonData, opts_, cb)\n }\n })\n}\n","/**\n * A port of jQuery's extend. Merge the contents of two or more objects together into the first object. Supports deep extending with `true` as the first argument.\n *\n * @function extend\n * @param {Boolean} [deepExtend] Optional, set to `true` to merge recursively.\n * @param {Object} destination The object to modify\n * @param {Object} source The object whose keys to take\n * @param {Object} [source2] Optional, You can add any number of objects as arguments.\n * @returns {Object} result The merged object. Note that the `destination` object will always be modified.\n *\n * @example\n * var mergedObj = io.extend({}, {name: 'indian-ocean'}, {alias: 'io'})\n * console.log(mergedObj)\n * // {\n * // name: 'indian-ocean',\n * // alias: 'io'\n * // }\n *\n * var name = {name: 'indian-ocean'}\n * io.extend(name, {alias: 'io'})\n * console.log(name)\n * // {\n * // name: 'indian-ocean',\n * // alias: 'io'\n * // }\n *\n * @example\n * var object1 = {\n * apple: 0,\n * banana: { weight: 52, price: 100 },\n * cherry: 97\n * }\n * var object2 = {\n * banana: { price: 200 },\n * almond: 100\n * }\n * io.extend(true, object1, object2)\n * console.log(object1)\n * // {\n * // apple: 0,\n * // banana: {\n * // weight: 52,\n * // price: 200\n * // },\n * // cherry: 97,\n * // almond: 100\n * // }\n *\n */\nexport default function extend () {\n var options\n var name\n var src\n var copy\n var copyIsArray\n var clone\n var target = arguments[0] || {}\n var i = 1\n var length = arguments.length\n var deep = false\n\n // Handle a deep copy situation\n if (typeof target === 'boolean') {\n deep = target\n\n // Skip the boolean and the target\n target = arguments[i] || {}\n i++\n }\n\n // Handle case when target is a string or something (possible in deep copy)\n if (typeof target !== 'object' && typeof target !== 'function') {\n target = {}\n }\n\n // Extend indian-ocean itself if only one argument is passed\n if (i === length) {\n target = this\n i--\n }\n\n for (; i < length; i++) {\n // Only deal with non-null/undefined values\n if ((options = arguments[i]) != null) {\n // Extend the base object\n for (name in options) {\n src = target[name]\n copy = options[name]\n\n // Prevent never-ending loop\n if (target === copy) {\n continue\n }\n\n // Recurse if we're merging plain objects or arrays\n if (deep && copy && (typeof copy === 'object') ||\n (copyIsArray = Array.isArray(copy))) {\n if (copyIsArray) {\n copyIsArray = false\n clone = src && Array.isArray(src) ? src : []\n } else {\n clone = src && typeof src === 'object' ? src : {}\n }\n\n // Never move original objects, clone them\n target[name] = extend(deep, clone, copy)\n\n // Don't bring in undefined values\n } else if (copy !== undefined) {\n target[name] = copy\n }\n }\n }\n }\n\n // Return the modified object\n return target\n}\n","import extend from './extend'\n/**\n * A more semantic convenience function. Delegates to {@link extend} and passes `true` as the first argument. Deep merge the contents of two or more objects together into the first object.\n *\n * @function deepExtend\n * @param {Object} destination The object to modify\n * @param {Object} source The object whose keys to take\n * @param {Object} [source2] Optional, You can add any number of objects as arguments.\n * @returns {Object} result The merged object. Note that the `destination` object will always be modified.\n *\n * @example\n * var object1 = {\n * apple: 0,\n * banana: { weight: 52, price: 100 },\n * cherry: 97\n * }\n * var object2 = {\n * banana: { price: 200 },\n * almond: 100\n * }\n * io.deepExtend(object1, object2)\n * console.log(object1)\n * // {\n * // apple: 0,\n * // banana: {\n * // weight: 52,\n * // price: 200\n * // },\n * // cherry: 97,\n * // almond: 100\n * // }\n *\n */\nexport default function deepExtend () {\n var args = Array.prototype.slice.call(arguments) // Make real array from arguments\n args.unshift(true) // Add `true` as first arg.\n extend.apply(this, args)\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n\n/**\n * Asynchronously test whether a file exists or not by using `fs.access` modified from https://github.com/nodejs/io.js/issues/1592#issuecomment-98392899.\n *\n * @function exists\n * @param {String} filePath Input file path\n * @param {Function} callback Has signature `(err, exists)`\n *\n * @example\n * var exists = io.exists('path/to/data.tsv', function (err, exists) {\n * console.log(exists) // `true` if the file exists, `false` if not.\n * })\n *\n */\nexport default function exists (filePath, cb) {\n fs.access(filePath, function (err) {\n var exists\n if (err && err.code === 'ENOENT') {\n exists = false\n err = null\n } else if (!err) {\n exists = true\n }\n cb(err, exists)\n })\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n\n/**\n * Syncronous version of {@link exists}. Delegates to `fs.existsSync` if that function is available.\n *\n * @function existsSync\n * @param {String} filePath Input file path\n * @returns {Boolean} Whether the file exists or not\n *\n * @example\n * var exists = io.existsSync('path/to/data.tsv')\n * console.log(exists) // `true` if file exists, `false` if not.\n */\nexport default function existsSync (filePath) {\n if (fs.existsSync) {\n return fs.existsSync(filePath)\n } else {\n try {\n fs.accessSync(filePath)\n return true\n } catch (ex) {\n return false\n }\n }\n}\n","import {extname} from '../utils/path'\n\n/**\n * Test whether a file name has the given extension\n *\n * @function extMatchesStr\n * @param {String} filePath Input file path\n * @param {String} extension The extension to test. An empty string will match a file with no extension.\n * @returns {Boolean} Whether it matched or not.\n *\n * @example\n * var matches = io.extMatchesStr('path/to/data.tsv', 'tsv')\n * console.log(matches) // `true`\n */\nexport default function extMatchesStr (filePath, extension) {\n // Chop '.' off extension returned by extname\n var ext = extname(filePath).slice(1)\n return ext === extension\n}\n","/* istanbul ignore next */\nimport mkdirp from 'mkdirp'\nimport {dirname} from '../utils/path'\n\n/**\n * Synchronous version of {@link makeDirectories}. Delegates to [mkdirp](http://npmjs.org/package/mkdirp) module.\n *\n * @function makeDirectoriesSync\n * @param {String} outPath The path to a file\n *\n * @example\n * io.makeDirectoriesSync('path/to/create/to/data.tsv')\n *\n * @example\n * // Must end in `/` for the last item to be interpreted as a folder as well.\n * io.makeDirectoriesSync('path/to/create/to/another-folder/')\n *\n */\nexport default function makeDirectoriesSync (outPath) {\n mkdirp.sync(dirname(outPath))\n}\n","/**\n * Test whether a string matches a given Regular Expression.\n *\n * @function matchesRegExp\n * @param {String} filePath Input file path or file path.\n * @param {RegExp} RegExp The Regular Expression to match against.\n * @returns {Boolean} Whether they match.\n *\n * @example\n * var matches = io.matchesRegExp('.gitignore', /\\.gitignore/)\n * console.log(matches) // `true`\n *\n * var matches = io.matchesRegExp('data/final-data/basic.csv', /\\/final-data\\//)\n * console.log(matches) // `true`\n */\nexport default function matchesRegExp (filePath, regEx) {\n return regEx.test(filePath)\n}\n","export default function isRegExp (obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]'\n}\n","import extMatchesStr from './extMatchesStr'\nimport matchesRegExp from './matchesRegExp'\nimport isRegExp from '../utils/isRegExp'\n\n/**\n * Test whether a file name or path matches a given matcher. Delegates to {@link extMatchesStr} if `matcher` is a string` and tests only against the file name extension. Delegates to {@link matchesRegExp} if matcher is a Regular Expression and tests against entire string, which is usefulf or testing the full file path.\n *\n * @function matches\n * @param {String} filePath Input file path or path to the file.\n * @returns {String|RegExp} matcher The string or Regular Expression to match against.\n *\n * @example\n * var matches = io.matches('path/to/data.tsv', 'tsv')\n * console.log(matches) // `true`\n *\n * var matches = io.matches('.gitignore', /\\.gitignore/)\n * console.log(matches) // `true`\n *\n * var matches = io.matches('file/with/no-extention', '') // Nb. Dot files are treated as files with no extention\n * console.log(matches) // `true`\n */\nexport default function matches (filePath, matcher) {\n if (typeof matcher === 'string') {\n return extMatchesStr(filePath, matcher)\n } else if (isRegExp(matcher)) {\n return matchesRegExp(filePath, matcher)\n } else {\n throw new Error('Matcher argument must be String or Regular Expression')\n }\n}\n","/* istanbul ignore next */\nimport _ from 'underscore'\nimport getParser from '../helpers/getParser'\nimport discernParser from '../helpers/discernParser'\nimport discernLoader from '../helpers/discernLoader'\nimport omit from '../utils/omit'\n\n/**\n * Syncronous version of {@link readData}. Read data given a path ending in the file format. This function detects the same formats as the asynchronous {@link readData} except for `.dbf` files, which it cannot read.\n *\n * * `.json` Array of objects or object\n * * `.csv` Comma-separated\n * * `.tsv` Tab-separated\n * * `.psv` Pipe-separated\n * * `.yaml` or `.yml` Yaml file\n * * `.aml` ArchieML\n * * `.txt` Text file (a string)\n * * other All others are read as a text file\n *\n * @function readDataSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {String|Function|Object} [parserOptions.parser] This can be a string that is the file's delimiter, a function that returns JSON, or, for convenience, can also be a dsv object such as `dsv.dsv('_')` or any object that has a `parse` method that's a function. See `parsers` in library source for examples.\n * @param {Function} [parserOptions.map] Transformation function. See {@link directReaders} for format-specific function signature. In brief, tabular formats get passed a `(row, i, columns)` and must return the modified row. Text or AML formats are passed the full document and must return the modified document. JSON arrays are mapped like tabular documents with `(row, i)` and return the modified row. JSON objects are mapped with Underscore's `_.mapObject` with `(value, key)` and return the modified value.\n * @param {Function} [parserOptions.reviver] Used for JSON files, otherwise ignored. See {@link readJsonSync} for details.\n * @param {Function} [parserOptions.filename] Used for JSON files, otherwise ignored. See {@link readJsonSync} for details.\n * @param {String} [parserOptions.loadMethod=\"safeLoad\"] Used for for YAML files, otherwise ignored. See {@link readYamlSync} for details.\n * @returns {Object} the contents of the file as JSON\n *\n * @example\n * var data = io.readDataSync('path/to/data.tsv')\n * console.log(data) // Json data\n *\n * // Parser specified as a string\n * var data = io.readDataSync('path/to/data.usv', {parser: '_'})\n * console.log(data) // Json data\n *\n * // Parser specified as a function\n * var myParser = dsv.dsv('_').parse\n * // var myParser = dsv.dsv('_') // This also works\n * var data = io.readDataSync('path/to/data.usv', {parser: myParser})\n * console.log(data) // Json data\n *\n * // Parser as an object with a `parse` method\n * var naiveJsonLines = function(dataAsString) {\n * return dataAsString.split('\\n').map(function (row) { return JSON.parse(row) })\n * }\n * var data = io.readDataSync('path/to/data.jsonlines', {parser: naiveJsonLines})\n * console.log(data) // Json data\n *\n * // Shorthand for specifying a map function\n * var data = io.readData('path/to/data.csv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * })\n * console.log(data) // Json data\n *\n * // Explicitly specify a map function and a filename for a json file. See `readJson` for more details\n * var data = io.readData('path/to/data.json', {\n * map: function (k, v) {\n * if (typeof v === 'number') {\n * return v * 2\n * }\n * return v\n * },\n * filename: 'awesome-data.json'\n * })\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n */\nexport default function readDataSync (filePath, opts_) {\n var parser\n var parserOptions\n if (arguments.length === 2) {\n if (opts_.parser) {\n parser = getParser(opts_.parser)\n opts_ = omit(opts_, ['parser'])\n if (_.isEmpty(opts_)) {\n opts_ = undefined\n }\n } else {\n parser = discernParser(filePath)\n }\n\n if (opts_ && opts_.parserOptions) {\n if (typeof opts_.parserOptions === 'function') {\n parserOptions = {map: opts_.parserOptions}\n } else {\n parserOptions = opts_.parserOptions\n }\n } else if (opts_) {\n if (typeof opts_ === 'function') {\n parserOptions = {map: opts_}\n } else {\n parserOptions = opts_\n }\n }\n } else {\n parser = discernParser(filePath)\n }\n var loader = discernLoader(filePath, {sync: true})\n return loader(filePath, parser, parserOptions)\n}\n","export var slice = [].slice;\n","import {slice} from \"./array\";\n\nvar noabort = {};\n\nfunction Queue(size) {\n this._size = size;\n this._call =\n this._error = null;\n this._tasks = [];\n this._data = [];\n this._waiting =\n this._active =\n this._ended =\n this._start = 0; // inside a synchronous task callback?\n}\n\nQueue.prototype = queue.prototype = {\n constructor: Queue,\n defer: function(callback) {\n if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n if (this._call) throw new Error(\"defer after await\");\n if (this._error != null) return this;\n var t = slice.call(arguments, 1);\n t.push(callback);\n ++this._waiting, this._tasks.push(t);\n poke(this);\n return this;\n },\n abort: function() {\n if (this._error == null) abort(this, new Error(\"abort\"));\n return this;\n },\n await: function(callback) {\n if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n if (this._call) throw new Error(\"multiple await\");\n this._call = function(error, results) { callback.apply(null, [error].concat(results)); };\n maybeNotify(this);\n return this;\n },\n awaitAll: function(callback) {\n if (typeof callback !== \"function\") throw new Error(\"invalid callback\");\n if (this._call) throw new Error(\"multiple await\");\n this._call = callback;\n maybeNotify(this);\n return this;\n }\n};\n\nfunction poke(q) {\n if (!q._start) {\n try { start(q); } // let the current task complete\n catch (e) {\n if (q._tasks[q._ended + q._active - 1]) abort(q, e); // task errored synchronously\n else if (!q._data) throw e; // await callback errored synchronously\n }\n }\n}\n\nfunction start(q) {\n while (q._start = q._waiting && q._active < q._size) {\n var i = q._ended + q._active,\n t = q._tasks[i],\n j = t.length - 1,\n c = t[j];\n t[j] = end(q, i);\n --q._waiting, ++q._active;\n t = c.apply(null, t);\n if (!q._tasks[i]) continue; // task finished synchronously\n q._tasks[i] = t || noabort;\n }\n}\n\nfunction end(q, i) {\n return function(e, r) {\n if (!q._tasks[i]) return; // ignore multiple callbacks\n --q._active, ++q._ended;\n q._tasks[i] = null;\n if (q._error != null) return; // ignore secondary errors\n if (e != null) {\n abort(q, e);\n } else {\n q._data[i] = r;\n if (q._waiting) poke(q);\n else maybeNotify(q);\n }\n };\n}\n\nfunction abort(q, e) {\n var i = q._tasks.length, t;\n q._error = e; // ignore active callbacks\n q._data = undefined; // allow gc\n q._waiting = NaN; // prevent starting\n\n while (--i >= 0) {\n if (t = q._tasks[i]) {\n q._tasks[i] = null;\n if (t.abort) {\n try { t.abort(); }\n catch (e) { /* ignore */ }\n }\n }\n }\n\n q._active = NaN; // allow notification\n maybeNotify(q);\n}\n\nfunction maybeNotify(q) {\n if (!q._active && q._call) {\n var d = q._data;\n q._data = undefined; // allow gc\n q._call(q._error, d);\n }\n}\n\nexport default function queue(concurrency) {\n if (concurrency == null) concurrency = Infinity;\n else if (!((concurrency = +concurrency) >= 1)) throw new Error(\"invalid concurrency\");\n return new Queue(concurrency);\n}\n","// Used internally by `readdir` functions to make more DRY\n/* istanbul ignore next */\nimport fs from 'fs'\n/* istanbul ignore next */\nimport queue from 'd3-queue/src/queue'\nimport matches from '../helpers/matches'\nimport identity from '../utils/identity'\nimport {joinPath} from '../utils/path'\n\nexport default function readdir (modeInfo, dirPath, opts_, cb) {\n opts_ = opts_ || {}\n var isAsync = modeInfo.async\n\n // Convert to array if a string\n opts_.include = strToArray(opts_.include)\n opts_.exclude = strToArray(opts_.exclude)\n\n // Set defaults if not provided\n opts_.includeMatchAll = (opts_.includeMatchAll) ? 'every' : 'some'\n opts_.excludeMatchAll = (opts_.excludeMatchAll) ? 'every' : 'some'\n\n if (isAsync === true) {\n fs.readdir(dirPath, function (err, files) {\n if (err) {\n throw err\n }\n filter(files, cb)\n })\n } else {\n return filterSync(fs.readdirSync(dirPath))\n }\n\n function strToArray (val) {\n if (val && !Array.isArray(val)) {\n val = [val]\n }\n return val\n }\n\n function filterByType (file, cb) {\n var filePath = (opts_.fullPath) ? file : joinPath(dirPath, file)\n if (isAsync === true) {\n fs.stat(filePath, function (err, stats) {\n var filtered = getFiltered(stats.isDirectory())\n cb(err, filtered)\n })\n } else {\n return getFiltered(fs.statSync(filePath).isDirectory())\n }\n\n function getFiltered (isDir) {\n if (opts_.skipDirectories) {\n if (isDir) {\n return false\n }\n }\n if (opts_.skipFiles) {\n if (!isDir) {\n return false\n }\n }\n return file\n }\n }\n\n function filterByMatchers (files) {\n var filtered = files.filter(function (fileName) {\n var isExcluded\n var isIncluded\n\n // Don't include if matches exclusion matcher\n if (opts_.exclude) {\n isExcluded = opts_.exclude[opts_.excludeMatchAll](function (matcher) {\n return matches(fileName, matcher)\n })\n if (isExcluded === true) {\n return false\n }\n }\n\n // Include if matches inclusion matcher, exclude if it doesn't\n if (opts_.include) {\n isIncluded = opts_.include[opts_.includeMatchAll](function (matcher) {\n return matches(fileName, matcher)\n })\n return isIncluded\n }\n\n // Return true if it makes it to here\n return true\n })\n\n // Prefix with the full path if that's what we asked for\n if (opts_.fullPath === true) {\n filtered = filtered.map(function (fileName) {\n return joinPath(dirPath, fileName)\n })\n }\n\n return filtered\n }\n\n function filterSync (files) {\n var filtered = filterByMatchers(files)\n\n return filtered.map(function (file) {\n return filterByType(file)\n }).filter(identity)\n }\n\n function filter (files, cb) {\n var filterQ = queue()\n\n var filtered = filterByMatchers(files)\n\n filtered.forEach(function (fileName) {\n filterQ.defer(filterByType, fileName)\n })\n\n filterQ.awaitAll(function (err, namesOfType) {\n cb(err, namesOfType.filter(identity))\n })\n }\n}\n","import readdir from './readdir'\n\n/**\n * Asynchronously get a list of a directory's files and folders if certain critera are met.\n *\n * @function readdirFilter\n * @param {String} dirPath The directory to read from\n * @param {Object} options Filter options, see below\n * @param {Boolean} [options.fullPath=false] If `true`, return the full path of the file, otherwise just return the file name.\n * @param {Boolean} [options.skipFiles=false] If `true`, omit files from the results.\n * @param {Boolean} [options.skipDirectories=false] If `true`, omit directories from the results.\n * @param {String|RegExp|Array} options.include If given a string, return files that have that string as their extension. If given a Regular Expression, return the files whose name matches the pattern. Can also take a list of either type. List matching behavior is described in `includeMatchAll`.\n * @param {String|RegExp|Array} options.exclude If given a string, return files that do not have that string as their extension. If given a Regular Expression, omit files whose name matches the pattern. Can also take a list of either type. List matching behavior is described in `excludeMatchAll`.\n * @param {Boolean} [options.includeMatchAll=false] If true, require all include conditions to be met for a file to be included.\n * @param {Boolean} [options.excludeMatchAll=false] If true, require all exclude conditions to be met for a file to be excluded.\n * @param {Function} callback Has signature `(err, data)` where `files` is a list of matching file names.\n *\n * @example\n * // dir contains `data-0.tsv`, `data-0.json`, `data-0.csv`, `data-1.csv`, `.hidden-file`\n * io.readdirFilter('path/to/files', {include: 'csv'}, function(err, files){\n * console.log(files) // ['data-0.csv', 'data-1.csv']\n * })\n *\n * io.readdirFilter('path/to/files', {include: [/^data/], exclude: ['csv', 'json']}, , function(err, files){\n * console.log(files) // ['path/to/files/data-0.csv', 'path/to/files/data-1.csv', 'path/to/files/data-0.tsv']\n * })\n *\n */\nexport default function readdirFilter (dirPath, opts_, cb) {\n if (typeof cb === 'undefined') {\n cb = opts_\n opts_ = undefined\n }\n\n readdir({async: true}, dirPath, opts_, cb)\n}\n","import readdir from './readdir'\n\n/**\n * Syncronous version of {@link readdirFilter}. Get a list of a directory's files and folders if certain critera are met.\n *\n * @function readdirFilterSync\n * @param {String} dirPath The directory to read from\n * @param {Object} options Filter options, see below\n * @param {Boolean} [options.fullPath=false] If `true`, return the full path of the file, otherwise just return the file name.\n * @param {Boolean} [options.skipFiles=false] If `true`, omit files from the results.\n * @param {Boolean} [options.skipDirectories=false] If `true`, omit directories from the results.\n * @param {String|RegExp|Array} options.include If given a string, return files that have that string as their extension. If given a Regular Expression, return the files whose name matches the pattern. Can also take a list of either type. List matching behavior is described in `includeMatchAll`.\n * @param {String|RegExp|Array} options.exclude If given a string, return files that do not have that string as their extension. If given a Regular Expression, omit files whose name matches the pattern. Can also take a list of either type. List matching behavior is described in `excludeMatchAll`.\n * @param {Boolean} [options.includeMatchAll=false] If true, require all include conditions to be met for a file to be included.\n * @param {Boolean} [options.excludeMatchAll=false] If true, require all exclude conditions to be met for a file to be excluded.\n * @returns {Array} List of matching file names\n *\n * @example\n * // dir contains `data-0.tsv`, `data-0.json`, `data-0.csv`, `data-1.csv`, `.hidden-file`\n * var files = io.readdirFilterSync('path/to/files', {include: 'csv'})\n * console.log(files) // ['data-0.csv', 'data-1.csv']\n *\n * var files = io.readdirFilterSync('path/to/files', {include: [/^data/], exclude: 'json', fullPath: true})\n * console.log(files) // ['path/to/files/data-0.csv', 'path/to/files/data-1.csv', 'path/to/files/data-0.tsv']\n *\n * var files = io.readdirFilterSync('path/to/files', {include: [/^data/, 'json'], fullPath: true, includeMatchAll: true})\n * console.log(files) // ['path/to/files/data-0.json', 'path/to/files/data-1.json']\n *\n */\nexport default function readdirFilterSync (dirPath, opts_) {\n return readdir({async: false}, dirPath, opts_)\n}\n","import readData from '../readers/readData'\nimport parserAml from '../parsers/aml'\n\n/**\n * Asynchronously read an ArchieMl file. Returns an empty object if file is empty.\n *\n * @function readAml\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Takes the parsed file (usually an object) and must return the modified file. See example below.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readAml('path/to/data.aml', function (err, data) {\n * console.log(data) // json data\n * })\n *\n * // With map\n * io.readAml('path/to/data.aml', function (amlFile) {\n * amlFile.height = amlFile.height * 2\n * return amlFile\n * }, function (err, data) {\n * console.log(data) // json data with height multiplied by 2\n * })\n */\nexport default function readAml (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserAml, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserAml from '../parsers/aml'\n\n/**\n * Synchronously read an ArchieML file. Returns an empty object if file is empty.\n *\n * @function readAmlSync\n * @param {String} filePath Input file path\n * @param {Function} [map] Optional map function. Takes the parsed file (usually an object) and must return the modified file. See example below.\n * @returns {Object} The parsed file\n *\n * @example\n * var data = io.readAmlSync('path/to/data.aml')\n * console.log(data) // json data\n *\n * var data = io.readAmlSync('path/to/data-with-comments.aml', function (amlFile) {\n * amlFile.height = amlFile.height * 2\n * return amlFile\n * })\n * console.log(data) // json data with height multiplied by 2\n */\nexport default function readAmlSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserAml, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserCsv from '../parsers/csv'\n\n/**\n * Asynchronously read a comma-separated value file. Returns an empty array if file is empty.\n *\n * @function readCsv\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readCsv('path/to/data.csv', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Transform values on load\n * io.readCsv('path/to/data.csv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }, function (err, data) {\n * console.log(data) // Converted json data\n * })\n *\n * // Pass in an object with a `map` key\n * io.readCsv('path/to/data.csv', {map: function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }}, function (err, data) {\n * console.log(data) // Converted json data\n * })\n */\nexport default function readCsv (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserCsv, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserCsv from '../parsers/csv'\n\n/**\n * Synchronously read a comma-separated value file. Returns an empty array if file is empty.\n *\n * @function readCsvSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @returns {Array} the contents of the file as JSON\n *\n * @example\n * var data = io.readCsvSync('path/to/data.csv')\n * console.log(data) // Json data\n *\n * // Transform values on load\n * var data = io.readCsvSync('path/to/data.csv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * })\n * console.log(data) // Json data with casted values\n *\n * // Pass in an object with a `map` key\n * var data = io.readCsvSync('path/to/data.csv', {map: function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }})\n * console.log(data) // Json data with casted values\n */\nexport default function readCsvSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserCsv, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserJson from '../parsers/json'\n\n/**\n * Asynchronously read a JSON file. Returns an empty array if file is empty.\n *\n * @function readJson\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {Function} [parserOptions.map] Map function. Called once for each row if your file is an array (it tests if the first non-whitespace character is a `[`) with a callback signature `(row, i)` and delegates to `_.map`. Otherwise it's considered an object and the callback the signature is `(value, key)` and delegates to `_.mapObject`. See example below.\n * @param {String} [parserOptions.filename] File name displayed in the error message.\n * @param {Function} [parserOptions.reviver] A function that prescribes how the value originally produced by parsing is mapped before being returned. See JSON.parse docs for more: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readJson('path/to/data.json', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Specify a map\n * io.readJson('path/to/data.json', function (row, i) {\n * row.height = row.height * 2\n * return row\n * }, function (err, data) {\n * console.log(data) // Json data with height multiplied by two\n * })\n *\n * // Specify a filename\n * io.readJson('path/to/data.json', 'awesome-data.json', function (err, data) {\n * console.log(data) // Json data, any errors are reported with `fileName`.\n * })\n *\n * // Specify a map and a filename\n * io.readJson('path/to/data.json', {\n * map: function (row, i) {\n * row.height = row.height * 2\n * return row\n * },\n * filename: 'awesome-data.json'\n * }, function (err, data) {\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n * })\n *\n * // Specify a map and a filename on json object\n * io.readJson('path/to/json-object.json', {\n * map: function (value, key) {\n * if (typeof value === 'number') {\n * return value * 2\n * }\n * return value\n * },\n * filename: 'awesome-data.json'\n * }, function (err, data) {\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n * })\n *\n * // Specify a reviver function and a filename\n * io.readJson('path/to/data.json', {\n * reviver: function (k, v) {\n * if (typeof v === 'number') {\n * return v * 2\n * }\n * return v\n * },\n * filename: 'awesome-data.json'\n * }, function (err, data) {\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n * })\n */\nexport default function readJson (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserJson, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserJson from '../parsers/json'\n\n/**\n * Synchronously read a JSON file. Returns an empty array if file is empty.\n *\n * @function readJsonSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {Function} [parserOptions.map] Map function. Called once for each row if your file is an array (it tests if the first non-whitespace character is a `[`) with a callback signature `(row, i)` and delegates to `_.map`. Otherwise it's considered an object and the callback the signature is `(value, key)` and delegates to `_.mapObject`. See example below.\n * @param {String} [parserOptions.filename] File name displayed in the error message.\n * @param {Function} [parserOptions.reviver] A function that prescribes how the value originally produced by parsing is mapped before being returned. See JSON.parse docs for more: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Using_the_reviver_parameter\n * @returns {Array|Object} The contents of the file as JSON\n *\n * @example\n * var data = io.readJsonSync('path/to/data.json')\n * console.log(data) // Json data\n *\n * // Specify a map\n * var data = io.readJson('path/to/data.json', function (k, v) {\n * if (typeof v === 'number') {\n * return v * 2\n * }\n * return v\n * })\n * console.log(data) // Json data with any number values multiplied by two\n *\n * // Specify a filename\n * var data = io.readJson('path/to/data.json', 'awesome-data.json')\n * console.log(data) // Json data, any errors are reported with `fileName`.\n *\n * // Specify a map and a filename\n * var data = io.readJsonSync('path/to/data.json', {\n * map: function (k, v) {\n * if (typeof v === 'number') {\n * return v * 2\n * }\n * return v\n * },\n * filename: 'awesome-data.json'\n * })\n *\n * console.log(data) // Json data with any number values multiplied by two and errors reported with `fileName`\n */\nexport default function readJsonSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserJson, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserPsv from '../parsers/psv'\n\n/**\n * Asynchronously read a pipe-separated value file. Returns an empty array if file is empty.\n *\n * @function readPsv\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readPsv('path/to/data.psv', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Transform values on load\n * io.readPsv('path/to/data.psv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }, function (err, data) {\n * console.log(data) // Json data with casted values\n * })\n */\nexport default function readPsv (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserPsv, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserPsv from '../parsers/psv'\n\n/**\n * Synchronously read a pipe-separated value file. Returns an empty array if file is empty.\n *\n * @function readPsvSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @returns {Array} The contents of the file as JSON\n *\n * @example\n * var data = io.readPsvSync('path/to/data.psv')\n * console.log(data) // Json data\n *\n * var data = io.readPsvSync('path/to/data.psv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * })\n * console.log(data) // Json data with casted values\n */\nexport default function readPsvSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserPsv, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserTsv from '../parsers/tsv'\n\n/**\n * Asynchronously read a tab-separated value file. Returns an empty array if file is empty.\n *\n * @function readTsv\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Called once for each row with the signature `(row, i)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readTsv('path/to/data.tsv', function (err, data) {\n * console.log(data) // Json data\n * })\n *\n * // Transform values on load\n * io.readTsv('path/to/data.tsv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * }, function (err, data) {\n * console.log(data) // Json data with casted values\n * })\n */\nexport default function readTsv (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserTsv, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserTsv from '../parsers/tsv'\n\n/**\n * Synchronously read a tab-separated value file. Returns an empty array if file is empty.\n *\n * @function readTsvSync\n * @param {String} filePath Input file path\n * @param {Function} [map] Optional map function, called once for each row (header row skipped). Has signature `(row, i, columns)` and must return the transformed row. See example below or d3-dsv documentation for details.\n * @returns {Array} the contents of the file as JSON\n *\n * @example\n * var data = io.readTsvSync('path/to/data.tsv')\n * console.log(data) // Json data\n *\n * // Transform values on load\n * var data = io.readTsvSync('path/to/data.tsv', function (row, i, columns) {\n * console.log(columns) // [ 'name', 'occupation', 'height' ]\n * row.height = +row.height // Convert this value to a number\n * return row\n * })\n * console.log(data) // Json data with casted values\n */\nexport default function readTsvSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserTsv, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserTxt from '../parsers/txt'\n\n/**\n * Asynchronously read a text file. Returns an empty string if file is empty.\n *\n * @function readTxt\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Takes the file read in as text and return the modified file. See example below.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * io.readTxt('path/to/data.txt', function (err, data) {\n * console.log(data) // string data\n * })\n *\n * io.readTxt('path/to/data.txt', function (str) {\n * return str.replace(/hello/g, 'goodbye') // Replace all instances of `\"hello\"` with `\"goodbye\"`\n * }, function (err, data) {\n * console.log(data) // string data with values replaced\n * })\n */\nexport default function readTxt (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserTxt, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserTxt from '../parsers/txt'\n\n/**\n * Synchronously read a text file. Returns an empty string if file is empty.\n *\n * @function readTxtSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [map] Optional map function or an object with `map` key that is a function. Takes the file read in as text and must return the modified file. See example below.\n * @returns {String} the contents of the file as a string\n *\n * @example\n * var data = io.readTxtSync('path/to/data.txt')\n * console.log(data) // string data\n *\n * var data = io.readTxtSync('path/to/data.txt', function (str) {\n * return str.replace(/hello/g, 'goodbye') // Replace all instances of `\"hello\"` with `\"goodbye\"`\n * })\n * console.log(data) // string data with values replaced\n */\nexport default function readTxtSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserTxt, parserOptions: parserOptions})\n}\n","import readData from '../readers/readData'\nimport parserYaml from '../parsers/yaml'\n\n/**\n * Asynchronously read a yaml file. Returns an empty object if file is empty. `parseOptions` will pass any other optinos directl to js-yaml library. See its documentation for more detail https://github.com/nodeca/js-yaml\n *\n * @function readYaml\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {Function} [parserOptions.map] Optional map function. Called once for each row (header row skipped). If your file is an array (it tests if first non-whitespace character is a `[`), the callback has the signature `(row, i)` and delegates to `_.map`. Otherwise it's considered an object and the callback has the signature `(value, key)` and delegates to `_.mapObject`. See example below.\n * @param {String} [parserOptions.loadMethod=\"safeLoad\"] The js-yaml library allows you to specify a more liberal `\"load\"` option which will accept RegExp and function values in your file.\n * @param {Function} callback Has signature `(err, data)`\n *\n * @example\n * // Can be `.yaml` or `.yml` extension\n * io.readYaml('path/to/data.yaml', function (err, data) {\n * console.log(data) // json data\n * })\n *\n * // With map function shorthand on an object\n * io.readYaml('path/to/data.yaml', function (yamlFile) {\n * yamlFile.height = yamlFile.height * 2\n * return yamlFile\n * }, function (err, data) {\n * console.log(data) // json data with `height` values doubled\n * })\n *\n * // With map function on an object and load settings\n * io.readYaml('path/to/data.yaml', {\n * loadMethod: 'load',\n * map: function (value, key) {\n * yamlFile.height = yamlFile.height * 2\n * return yamlFile\n * }\n * }, function (err, data) {\n * console.log(data) // json data with `height` values doubled\n * })\n */\nexport default function readYaml (filePath, opts_, cb) {\n var parserOptions\n if (typeof cb === 'undefined') {\n cb = opts_\n } else {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n readData(filePath, {parser: parserYaml, parserOptions: parserOptions}, cb)\n}\n","import readDataSync from '../readers/readDataSync'\nimport parserYaml from '../parsers/yaml'\n\n/**\n * Synchronously read a yaml file. Returns an empty object if file is empty. `parseOptions` will pass any other optinos directl to js-yaml library. See its documentation for more detail https://github.com/nodeca/js-yaml\n *\n * @function readYamlSync\n * @param {String} filePath Input file path\n * @param {Function|Object} [parserOptions] Optional map function or an object specifying the optional options below.\n * @param {Function} [parserOptions.map] Optional map function. Called once for each row (header row skipped). If your file is an array (it tests if first non-whitespace character is a `[`), the callback has the signature `(row, i)` and delegates to `_.map`. Otherwise it's considered an object and the callback has the signature `(value, key)` and delegates to `_.mapObject`. See example below.\n * @param {String} [parserOptions.loadMethod=\"safeLoad\"] The js-yaml library allows you to specify a more liberal `\"load\"` method which will accept RegExp and function values in your file.\n * @returns {Array|Object} the contents of the file as a string\n *\n * @example\n * // Can be `.yaml` or `.yml` extension\n * var data = io.readYamlSync('path/to/data.yaml')\n * console.log(data) // json data\n *\n * // With map function\n * var data = io.readYaml('path/to/data.yaml', function (yamlFile) {\n * yamlFile.height = yamlFile.height * 2\n * return yamlFile\n * })\n * console.log(data) // json data with `height` values doubled\n *\n * // With map function and load settings\n * var data = io.readYaml('path/to/data.yaml', {\n * loadMethod: 'load',\n * map: function (yamlFile) {\n * yamlFile.height = yamlFile.height * 2\n * return yamlFile\n * }\n * })\n * console.log(data) // json data with `height` values doubled\n */\nexport default function readYamlSync (filePath, opts_) {\n var parserOptions\n if (typeof opts_ !== 'undefined') {\n parserOptions = typeof opts_ === 'function' ? {map: opts_} : opts_\n }\n return readDataSync(filePath, {parser: parserYaml, parserOptions: parserOptions})\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n/* istanbul ignore next */\nimport _ from 'underscore'\nimport makeDirectories from '../helpers/makeDirectories'\nimport readData from '../readers/readData'\nimport writeData from './writeData'\nimport extend from '../helpers/extend'\nimport omit from '../utils/omit'\n\n/**\n * Append to an existing data object, creating a new file if one does not exist. If appending to an object, data is extended with {@link extend}. For tabular formats (csv, tsv, etc), existing data and new data must be an array of flat objects (cannot contain nested objects or arrays).\n *\n * Supported formats:\n *\n * * `.json` Array of objects\n * * `.csv` Comma-separated\n * * `.tsv` Tab-separated\n * * `.psv` Pipe-separated\n * * `.yaml` or `.yml` Yaml\n *\n * *Note: Does not currently support .dbf files.*\n *\n * @function appendData\n * @param {String} filePath File to append to\n * @param {Array|Object} data The new data to append\n * @param {Object} [options] Optional options object passed to {@link writeData}. See that function for format-specific options.\n * @param {Function} callback Has signature `(err, data)`. Data is the combined data that was written out\n *\n * @example\n * io.appendData('path/to/data.json', jsonData, function (err) {\n * console.log(err)\n * })\n *\n * io.appendData('path/to/create/to/data.csv', flatJsonData, {makeDirectories: true}, function (err){\n * console.log(err)\n * })\n */\nexport default function appendData (outPath, data, opts_, cb) {\n if (typeof cb === 'undefined') {\n cb = opts_\n }\n if (typeof opts_ === 'object' && (opts_.makeDirectories === true || opts_.makeDirs === true)) {\n makeDirectories(outPath, proceed)\n } else {\n proceed()\n }\n function proceed (err) {\n if (err) {\n throw err\n }\n opts_ = omit(opts_, ['makeDirectories', 'makeDirs'])\n // Run append file to delegate creating a new file if none exists\n fs.appendFile(outPath, '', function (err) {\n if (!err) {\n readData(outPath, function (err, existingData) {\n if (!err) {\n if (!_.isEmpty(existingData)) {\n if (Array.isArray(existingData)) {\n data = existingData.concat(data)\n } else if (typeof existingData === 'object') {\n data = extend({}, existingData, data)\n }\n }\n writeData(outPath, data, opts_, cb)\n } else {\n cb(err)\n }\n })\n } else {\n cb(err)\n }\n })\n }\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n/* istanbul ignore next */\nimport discernFileFormatter from '../helpers/discernFileFormatter'\nimport makeDirectoriesSync from '../helpers/makeDirectoriesSync'\nimport omit from '../utils/omit'\nimport warnIfEmpty from '../utils/warnIfEmpty'\n\n/**\n * Syncronous version of {@link writers#writeData}\n *\n * Supports the same formats with the exception of `.dbf` files\n *\n * @function writeDataSync\n * @param {String} filePath Input file path\n * @param {Array|Object|String} data Data to write\n * @param {Object} [options] Optional options object, see below\n * @param {Boolean} [options.makeDirectories=false] If `true`, create intermediate directories to your data file. Can also be `makeDirs` for short.\n * @param {Function|Array} [options.replacer] Used for JSON formats. Function to filter your objects before writing or an array of whitelisted keys to keep. Examples below. See JSON.stringify docs for more info https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify\n * @param {Boolean} [options.verbose=true] Verbose logging output, mostly just warns if you write an empty file. Set to `false` if don't want any output.\n * @param {Number} [options.indent] Used for JSON and YAML formats. Specifies indent level. Default for YAML is `2`, `0` for JSON.\n * @param {String} [options.writeMethod='safeDump'] Used for YAML formats. Can also be `\"dump\"` to allow writing of RegExes and functions. The `options` object will also pass anything onto `js-yaml`. See its docs for other options. Example shown below with `sortKeys`. https://github.com/nodeca/js-yaml#safedump-object---options-\n * @param {Array} [options.columns] Used for tabular formats. Optionally specify a list of column names to use. Otherwise they are detected from the data. See `d3-dsv` for more detail: https://github.com/d3/d3-dsv/blob/master/README.md#dsv_format\n * @returns {String} The that was written as a string\n *\n * @example\n * io.writeDataSync('path/to/data.json', jsonData)\n *\n * io.writeDataSync('path/to/create/to/data.csv', flatJsonData, {makeDirs: true})\n *\n * io.writeDataSync('path/to/to/data.yaml', jsonData, {writeMehod: \"dump\", sortKeys: true})\n *\n * io.writeDataSync('path/to/to/data.json', jsonData, {indent: 4})\n *\n * io.writeDataSync('path/to/to/data.json', jsonData, {\n * indent: 4,\n * replacer: function (key, value) {\n * // Filtering out string properties\n * if (typeof value === \"string\") {\n * return undefined\n * }\n * return value\n * }\n * })\n *\n * io.writeDataSync('path/to/to/data.json', jsonData, {\n * indent: 4,\n * replacer: ['name', 'occupation'] // Only keep \"name\" and \"occupation\" values\n * })\n */\nexport default function writeDataSync (outPath, data, opts_) {\n warnIfEmpty(data, outPath, opts_.verbose)\n var writeOptions\n if (typeof opts_ === 'object') {\n if (opts_.makeDirectories === true || opts_.makeDirs === true) {\n makeDirectoriesSync(outPath)\n }\n writeOptions = opts_\n }\n opts_ = omit(opts_, ['makeDirectories', 'makeDirs'])\n var fileFormatter = discernFileFormatter(outPath)\n var formattedData = fileFormatter(data, writeOptions)\n fs.writeFileSync(outPath, formattedData)\n return formattedData\n}\n","/* istanbul ignore next */\nimport fs from 'fs'\n/* istanbul ignore next */\nimport _ from 'underscore'\nimport makeDirectoriesSync from '../helpers/makeDirectoriesSync'\nimport readDataSync from '../readers/readDataSync'\nimport writeDataSync from './writeDataSync'\nimport extend from '../helpers/extend'\nimport omit from '../utils/omit'\n\n/**\n * Synchronous version of {@link writers#appendData}. See that function for supported formats\n *\n * @function appendDataSync\n * @param {String} filePath File to append to\n * @param {Array|Object} data The new data to append\n * @param {Object} [options] Optional options object passed to {@link writeData}. See that function for format-specific options.\n * @returns {Object} The combined data that was written\n *\n * @example\n * io.appendDataSync('path/to/data.json', jsonData)\n *\n * io.appendDataSync('path/to/create/to/data.csv', flatJsonData, {makeDirectories: true})\n */\nexport default function appendDataSync (outPath, data, opts_) {\n // Run append file to delegate creating a new file if none exists\n if (opts_ && (opts_.makeDirectories === true || opts_.makeDirs === true)) {\n makeDirectoriesSync(outPath)\n }\n opts_ = omit(opts_, ['makeDirectories', 'makeDirs'])\n fs.appendFileSync(outPath, '')\n var existingData = readDataSync(outPath)\n if (!_.isEmpty(existingData)) {\n if (Array.isArray(existingData)) {\n data = existingData.concat(data)\n } else if (typeof existingData === 'object') {\n data = extend({}, existingData, data)\n }\n }\n writeDataSync(outPath, data, opts_)\n return data\n}\n","// converters\nexport {default as convertData} from './src/converters/convertData'\nexport {default as convertDbfToData} from './src/converters/convertDbfToData'\nexport {default as writeDbfToData} from './src/converters/convertDbfToData' // Legacy support\n// formatters\nexport {default as formatters} from './src/formatters/index'\nexport {default as formatCsv} from './src/formatters/csv'\nexport {default as formatDbf} from './src/formatters/dbf'\nexport {default as formatJson} from './src/formatters/json'\nexport {default as formatPsv} from './src/formatters/psv'\nexport {default as formatTsv} from './src/formatters/tsv'\nexport {default as formatTxt} from './src/formatters/txt'\nexport {default as formatYaml} from './src/formatters/yaml'\n// helpers\nexport {default as deepExtend} from './src/helpers/deepExtend'\nexport {default as discernFileFormatter} from './src/helpers/discernFileFormatter'\nexport {default as discernFormat} from './src/helpers/discernFormat'\nexport {default as discernParser} from './src/helpers/discernParser'\nexport {default as exists} from './src/helpers/exists'\nexport {default as existsSync} from './src/helpers/existsSync'\nexport {default as extend} from './src/helpers/extend'\nexport {default as extMatchesStr} from './src/helpers/extMatchesStr'\nexport {default as getParser} from './src/helpers/getParser'\nexport {default as makeDirectories} from './src/helpers/makeDirectories'\nexport {default as makeDirectoriesSync} from './src/helpers/makeDirectoriesSync'\nexport {default as matches} from './src/helpers/matches'\nexport {default as matchesRegExp} from './src/helpers/matchesRegExp'\n// parsers\nexport {default as parsers} from './src/parsers/index'\nexport {default as parseAml} from './src/parsers/aml'\nexport {default as parseCsv} from './src/parsers/csv'\nexport {default as parseJson} from './src/parsers/json'\nexport {default as parsePsv} from './src/parsers/psv'\nexport {default as parseTsv} from './src/parsers/tsv'\nexport {default as parseTxt} from './src/parsers/txt'\nexport {default as parseYaml} from './src/parsers/yaml'\n// readers\nexport {default as readData} from './src/readers/readData'\nexport {default as readDataSync} from './src/readers/readDataSync'\nexport {default as readdirFilter} from './src/readers/readdirFilter'\nexport {default as readdirFilterSync} from './src/readers/readdirFilterSync'\n// directReaders\nexport {default as readAml} from './src/directReaders/readAml'\nexport {default as readAmlSync} from './src/directReaders/readAmlSync'\nexport {default as readCsv} from './src/directReaders/readCsv'\nexport {default as readCsvSync} from './src/directReaders/readCsvSync'\nexport {default as readDbf} from './src/directReaders/readDbf'\nexport {default as readJson} from './src/directReaders/readJson'\nexport {default as readJsonSync} from './src/directReaders/readJsonSync'\nexport {default as readPsv} from './src/directReaders/readPsv'\nexport {default as readPsvSync} from './src/directReaders/readPsvSync'\nexport {default as readTsv} from './src/directReaders/readTsv'\nexport {default as readTsvSync} from './src/directReaders/readTsvSync'\nexport {default as readTxt} from './src/directReaders/readTxt'\nexport {default as readTxtSync} from './src/directReaders/readTxtSync'\nexport {default as readYaml} from './src/directReaders/readYaml'\nexport {default as readYamlSync} from './src/directReaders/readYamlSync'\n// writers\nexport {default as appendData} from './src/writers/appendData'\nexport {default as appendDataSync} from './src/writers/appendDataSync'\nexport {default as writeData} from './src/writers/writeData'\nexport {default as writeDataSync} from './src/writers/writeDataSync'\n"],"names":["root","previousUnderscore","_","ArrayProto","Array","prototype","ObjProto","Object","FuncProto","Function","push","slice","toString","hasOwnProperty","nativeIsArray","isArray","nativeKeys","keys","nativeBind","bind","nativeCreate","create","Ctor","obj","_wrapped","module","exports","VERSION","optimizeCb","func","context","argCount","value","call","other","index","collection","accumulator","apply","arguments","cb","identity","isFunction","isObject","matcher","property","iteratee","Infinity","createAssigner","keysFunc","undefinedOnly","length","source","l","i","key","baseCreate","result","MAX_ARRAY_INDEX","Math","pow","getLength","isArrayLike","each","forEach","map","collect","results","currentKey","createReduce","dir","iterator","memo","reduce","foldl","inject","reduceRight","foldr","find","detect","predicate","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","contains","includes","include","item","fromIndex","guard","values","indexOf","invoke","method","args","isFunc","pluck","where","attrs","findWhere","max","lastComputed","computed","min","shuffle","set","shuffled","rand","random","sample","n","sortBy","sort","left","right","a","criteria","b","group","behavior","groupBy","has","indexBy","countBy","toArray","size","partition","pass","fail","first","head","take","array","initial","last","rest","tail","drop","compact","flatten","input","shallow","strict","startIndex","output","idx","isArguments","j","len","without","difference","uniq","unique","isSorted","isBoolean","seen","union","intersection","argsLength","zip","unzip","object","createPredicateIndexFinder","findLastIndex","sortedIndex","low","high","mid","floor","createIndexFinder","predicateFind","isNaN","lastIndexOf","range","start","stop","step","ceil","executeBound","sourceFunc","boundFunc","callingContext","self","TypeError","bound","concat","partial","boundArgs","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","remaining","trailing","debounce","immediate","timestamp","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","collectNonEnumProps","nonEnumIdx","constructor","proto","prop","allKeys","mapObject","pairs","invert","functions","methods","names","extend","extendOwn","assign","pick","oiteratee","omit","String","defaults","props","clone","tap","interceptor","isMatch","eq","aStack","bStack","className","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isString","isElement","nodeType","type","name","Int8Array","isFinite","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","unescapeMap","createEscaper","escaper","match","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","noMatch","escapes","escapeChar","template","text","settings","oldSettings","interpolate","evaluate","offset","variable","render","e","data","argument","chain","instance","_chain","mixin","valueOf","toJSON","define","amd","this","EOL","EOF","QUOTE","NEWLINE","RETURN","objectConverter","columns","JSON","stringify","customConverter","f","row","inferColumns","rows","columnSet","column","delimiter","reFormat","DELIMITER","charCodeAt","parse","convert","parseRows","I","N","token","eof","eol","c","t","format","formatValue","formatRows","formatRow","splitPathRe","posixSplitPath","filename","out","exec","shift","extname","dirname","path","joinPath","discernFormat","filePath","ext","formatName","csv","dsv","csvParse","csvFormat","str","parserOptions","d","mapFn","trim","charAt","jsonParser","reviver","dsvFormat","tsv","tsvParse","tsvFormat","isNothing","subject","sequence","target","sourceKeys","repeat","count","cycle","isNegativeZero","number","Number","NEGATIVE_INFINITY","YAMLException","reason","mark","message","captureStackTrace","stack","common","require$$0","Mark","buffer","line","getSnippet","indent","maxLength","end","snippet","TYPE_CONSTRUCTOR_OPTIONS","YAML_NODE_KINDS","compileStyleAliases","style","alias","Type","tag","kind","resolve","construct","instanceOf","represent","defaultStyle","styleAliases","require$$1","require$$2","compileList","schema","exclude","includedSchema","currentType","previousType","previousIndex","compileMap","collectType","Schema","definition","implicit","explicit","loadKind","compiledImplicit","compiledExplicit","compiledTypeMap","DEFAULT","createSchema","schemas","types","require$$3","resolveYamlNull","constructYamlNull","resolveYamlBoolean","constructYamlBoolean","isHexCode","isOctCode","isDecCode","resolveYamlInteger","hasDigits","ch","constructYamlInteger","sign","base","digits","parseInt","split","v","unshift","isInteger","toUpperCase","YAML_FLOAT_PATTERN","resolveYamlFloat","constructYamlFloat","toLowerCase","POSITIVE_INFINITY","NaN","SCIENTIFIC_WITHOUT_DOT","representYamlFloat","res","isFloat","require$$4","require$$5","YAML_DATE_REGEXP","YAML_TIMESTAMP_REGEXP","resolveYamlTimestamp","constructYamlTimestamp","year","month","day","hour","minute","second","fraction","delta","tz_hour","tz_minute","date","UTC","setTime","representYamlTimestamp","toISOString","resolveYamlMerge","NodeBuffer","_require","require","Buffer","__","BASE64_MAP","resolveYamlBinary","code","bitlen","constructYamlBinary","tailbits","bits","from","representYamlBinary","isBinary","isBuffer","_hasOwnProperty","_toString","resolveYamlOmap","objectKeys","pair","pairKey","pairHasKey","constructYamlOmap","resolveYamlPairs","constructYamlPairs","resolveYamlSet","constructYamlSet","require$$6","require$$7","resolveJavascriptUndefined","constructJavascriptUndefined","undefined","representJavascriptUndefined","resolveJavascriptRegExp","regexp","modifiers","constructJavascriptRegExp","representJavascriptRegExp","global","multiline","ignoreCase","isRegExp","esprima","window","resolveJavascriptFunction","ast","body","expression","err","constructJavascriptFunction","params","param","representJavascriptFunction","DEFAULT_SAFE_SCHEMA","DEFAULT_FULL_SCHEMA","CONTEXT_FLOW_IN","CONTEXT_FLOW_OUT","CONTEXT_BLOCK_IN","CONTEXT_BLOCK_OUT","CHOMPING_CLIP","CHOMPING_STRIP","CHOMPING_KEEP","PATTERN_NON_PRINTABLE","PATTERN_NON_ASCII_LINE_BREAKS","PATTERN_FLOW_INDICATORS","PATTERN_TAG_HANDLE","PATTERN_TAG_URI","is_EOL","is_WHITE_SPACE","is_WS_OR_EOL","is_FLOW_INDICATOR","fromHexCode","lc","escapedHexLen","fromDecimalCode","simpleEscapeSequence","charFromCodepoint","fromCharCode","simpleEscapeCheck","simpleEscapeMap","State","onWarning","legacy","json","listener","implicitTypes","typeMap","lineStart","lineIndent","documents","generateError","state","throwError","throwWarning","directiveHandlers","handleYamlDirective","major","minor","version","checkLineBreaks","handleTagDirective","handle","tagMap","captureSegment","checkJson","_position","_length","_character","_result","mergeMappings","destination","overridableKeys","quantity","storeMappingPair","keyTag","keyNode","valueNode","startLine","startPos","readLineBreak","skipSeparationSpace","allowComments","checkIndent","lineBreaks","testDocumentSeparator","writeFoldedLines","readPlainScalar","nodeIndent","withinFlowCollection","preceding","following","captureStart","captureEnd","hasPendingContent","_line","_lineStart","_lineIndent","_kind","readSingleQuotedScalar","readDoubleQuotedScalar","hexLength","hexResult","tmp","readFlowCollection","readNext","_tag","_anchor","anchor","terminator","isPair","isExplicitPair","isMapping","anchorMap","readBlockScalar","folding","chomping","didReadContent","detectedIndent","textIndent","emptyLines","atMoreIndented","readBlockSequence","detected","readBlockMapping","flowIndent","allowCompact","_pos","atExplicitKey","composeNode","readTagProperty","isVerbatim","isNamed","tagHandle","tagName","readAnchorProperty","readAlias","parentIndent","nodeContext","allowToSeek","allowBlockStyles","allowBlockScalars","allowBlockCollections","indentStatus","hasContent","typeIndex","typeQuantity","blockIndent","atNewLine","readDocument","documentStart","directiveName","directiveArgs","hasDirectives","loadDocuments","loadAll","load","safeLoadAll","safeLoad","CHAR_TAB","CHAR_LINE_FEED","CHAR_SPACE","CHAR_EXCLAMATION","CHAR_DOUBLE_QUOTE","CHAR_SHARP","CHAR_PERCENT","CHAR_AMPERSAND","CHAR_SINGLE_QUOTE","CHAR_ASTERISK","CHAR_COMMA","CHAR_MINUS","CHAR_COLON","CHAR_GREATER_THAN","CHAR_QUESTION","CHAR_COMMERCIAL_AT","CHAR_LEFT_SQUARE_BRACKET","CHAR_RIGHT_SQUARE_BRACKET","CHAR_GRAVE_ACCENT","CHAR_LEFT_CURLY_BRACKET","CHAR_VERTICAL_LINE","CHAR_RIGHT_CURLY_BRACKET","ESCAPE_SEQUENCES","DEPRECATED_BOOLEANS_SYNTAX","compileStyleMap","encodeHex","character","skipInvalid","flowLevel","styleMap","sortKeys","lineWidth","noRefs","noCompatMode","condenseFlow","explicitTypes","duplicates","usedDuplicates","indentString","spaces","ind","next","generateNextLine","level","testImplicitResolving","isWhitespace","isPrintable","isPlainSafe","isPlainSafeFirst","STYLE_PLAIN","STYLE_SINGLE","STYLE_LITERAL","STYLE_FOLDED","STYLE_DOUBLE","chooseScalarStyle","singleLineOnly","indentPerLevel","testAmbiguousType","char","hasLineBreak","hasFoldableLine","shouldTrackWidth","previousLineBreak","plain","writeScalar","iskey","dump","testAmbiguity","blockHeader","dropEndingNewline","foldString","escapeString","indentIndicator","clip","keep","chomp","width","lineRe","nextLF","lastIndex","foldLine","prevMoreIndented","moreIndented","breakRe","curr","nextChar","escapeSeq","writeFlowSequence","writeNode","writeBlockSequence","writeFlowMapping","objectKeyList","objectKey","objectValue","pairBuffer","writeBlockMapping","explicitPair","detectType","typeList","block","objectOrArray","duplicateIndex","duplicate","getDuplicateReferences","objects","duplicatesIndexes","inspectNode","safeDump","loader","dumper","deprecated","require$$8","require$$9","yaml","blackList","newObj","loadMethod","yamlParser","whitespacePattern","slugBlacklist","nextLine","startKey","commandKey","arrayElement","scopePattern","scope","stackScope","bufferScope","bufferKey","bufferString","isSkipping","comments","arrayType","flags","substring","parseStartKey","restOfLine","parseArrayElement","parseCommandKey","command","flushBuffer","flushBufferInto","parseScope","scopeType","scopeKey","lastStackItem","nesting","keyScope","parsedScopeKey","keyBits","stackScopeItem","parseText","incrementArrayElement","arrayFirstKey","existingBufferKey","archieml","formatsIndex","formatsList","equivalents","parsers","equivalent","discernParser","opts_","parser","getParser","delimiterOrParser","file","readFile","fileFormat","parsed","fs","readFileSync","shapefile","dbf","openDbf","then","read","log","done","catch","error","loaders","fileSync","discernLoader","which","sync","readData","cb_","matchOperatorsRe","assembleStyles","styles","colors","grey","gray","groupName","styleName","defineProperty","ansiRegex","re","argv","process","hasFlag","flag","pos","env","stdout","isTTY","platform","TERM","escapeStringRegexp","ansiStyles","stripAnsi","hasAnsi","supportsColor","defineProps","defineProperties","isSimpleWindowsTerm","Chalk","enabled","blue","open","ret","closeRe","close","build","_styles","chalk","builder","applyStyle","__proto__","argsLen","nestedStyles","originalDim","dim","init","red","bold","cyan","formattingPreflight","writeOptions","replacer","writeMethod","lpad","rpad","writeField","view","fieldLength","setUint8","fieldSize","multi","bytesPer","features","fields","inherit","isDef","o","p","lib","structure","meta","field_meta","fieldDescLength","bytesPerRecord","ArrayBuffer","DataView","getFullYear","getMonth","getDate","setUint32","headerLength","setUint16","setInt8","x","num","val","substr","toBuffer","ab","byteLength","Uint8Array","buf","formatters","discernFileFormatter","formatter","_0777","mkdirP","mkdirp","opts","made","mode","xfs","umask","mkdir","er","stat","er2","isDirectory","mkdirSync","err0","statSync","err1","makeDirectories","outPath","msg","yellow","warnIfEmpty","verbose","writeData","makeDirs","proceed","fileFormatter","formattedData","writeFile","convertData","inPath","jsonData","readDbf","convertDbfToData","src","copy","copyIsArray","deep","deepExtend","exists","access","existsSync","accessSync","ex","extMatchesStr","extension","makeDirectoriesSync","matchesRegExp","regEx","readDataSync","noabort","Queue","_size","_call","_error","_tasks","_data","_waiting","_active","_ended","_start","queue","callback","abort","poke","q","r","maybeNotify","concurrency","readdir","modeInfo","dirPath","isAsync","async","strToArray","includeMatchAll","excludeMatchAll","files","filterSync","readdirSync","filterByType","fullPath","stats","filtered","getFiltered","isDir","skipDirectories","skipFiles","filterByMatchers","fileName","isExcluded","isIncluded","filterQ","awaitAll","namesOfType","readdirFilter","readdirFilterSync","readAml","parserAml","readAmlSync","readCsv","parserCsv","readCsvSync","readJson","parserJson","readJsonSync","readPsv","parserPsv","readPsvSync","readTsv","parserTsv","readTsvSync","readTxt","parserTxt","readTxtSync","readYaml","parserYaml","readYamlSync","appendData","appendFile","existingData","writeDataSync","writeFileSync","appendDataSync","appendFileSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;eAKY;;;;;;QAMNA,OAAO,IAAX;;;QAGIC,qBAAqBD,KAAKE,CAA9B;;;QAGIC,aAAaC,MAAMC,SAAvB;QAAkCC,WAAWC,OAAOF,SAApD;QAA+DG,YAAYC,SAASJ,SAApF;;;QAIEK,OAAmBP,WAAWO,IADhC;QAEEC,QAAmBR,WAAWQ,KAFhC;QAGEC,WAAmBN,SAASM,QAH9B;QAIEC,iBAAmBP,SAASO,cAJ9B;;;;QASEC,gBAAqBV,MAAMW,OAD7B;QAEEC,aAAqBT,OAAOU,IAF9B;QAGEC,aAAqBV,UAAUW,IAHjC;QAIEC,eAAqBb,OAAOc,MAJ9B;;;QAOIC,OAAO,YAAU,EAArB;;;QAGIpB,IAAI,UAASqB,GAAT,EAAc;UAChBA,eAAerB,CAAnB,EAAsB,OAAOqB,GAAP;UAClB,EAAE,gBAAgBrB,CAAlB,CAAJ,EAA0B,OAAO,IAAIA,CAAJ,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 7c59fbf..aaf8550 100644 --- a/docs/index.html +++ b/docs/index.html @@ -547,7 +547,7 @@

- + source @@ -767,7 +767,7 @@

- + source @@ -977,7 +977,7 @@

- + source @@ -1161,7 +1161,7 @@

- + source @@ -1356,7 +1356,7 @@

- + source @@ -1450,6 +1450,17 @@

+ + options.verbose Boolean + + (default true) + + Verbose logging output. Currently, the only logging output is a warning if you write an empty file. Set to +false + if don't want that. + + + options.indent Number? @@ -1576,7 +1587,7 @@

- + source @@ -1670,6 +1681,17 @@

+ + options.verbose Boolean + + (default true) + + Verbose logging output. Currently, the only logging output is a warning if you write an empty file. Set to +false + if don't want that. + + + options.indent Number? @@ -1771,7 +1793,7 @@

- + source @@ -1887,7 +1909,7 @@

- + source @@ -2002,7 +2024,7 @@

- + source @@ -2103,7 +2125,7 @@

- + source @@ -2197,7 +2219,7 @@

- + source @@ -2301,7 +2323,7 @@

- + source @@ -2414,7 +2436,7 @@

- + source @@ -2522,7 +2544,7 @@

- + source @@ -2711,7 +2733,7 @@

- + source @@ -2873,7 +2895,7 @@

- + source @@ -2977,7 +2999,7 @@

- + source @@ -3076,7 +3098,7 @@

- + source @@ -3180,7 +3202,7 @@

- + source @@ -3278,7 +3300,7 @@

- + source @@ -3377,7 +3399,7 @@

- + source @@ -3472,7 +3494,7 @@

- + source @@ -3627,7 +3649,7 @@

- + source @@ -3792,7 +3814,7 @@

- + source @@ -3901,7 +3923,7 @@

- + source @@ -4025,7 +4047,7 @@

- + source @@ -4142,7 +4164,7 @@

- + source @@ -4221,7 +4243,7 @@

- + source @@ -4304,7 +4326,7 @@

- + source @@ -4424,7 +4446,7 @@

- + source @@ -4506,7 +4528,7 @@

- + source @@ -4585,7 +4607,7 @@

- + source @@ -4729,7 +4751,7 @@

- + source @@ -4817,7 +4839,7 @@

- + source @@ -4904,7 +4926,7 @@

- + source @@ -4978,7 +5000,7 @@

- + source @@ -5063,7 +5085,7 @@

- + source diff --git a/package.json b/package.json index 56f16ac..e92c3e0 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "dev": "rm -rf dist && mkdir dist && rollup --config -w", "start": "npm run build && npm test", "test": "standard --fix src/**/*.js && rm -rf test/tmp-* && mocha", - "coverager": "nyc --reporter=lcov mocha" + "coverage": "nyc --reporter=lcov mocha" }, "repository": { "type": "git", diff --git a/src/utils/warnIfEmpty.js b/src/utils/warnIfEmpty.js new file mode 100644 index 0000000..daa524f --- /dev/null +++ b/src/utils/warnIfEmpty.js @@ -0,0 +1,17 @@ +import _ from 'underscore' +import warn from '../reporters/warn' + +export default function warnIfEmpty (data, outPath, verbose) { + if (verbose !== false) { + if (!data || _.isEmpty(data)) { + let msg = 'You didn\'t pass any data to write for file: `' + outPath + '`. Writing out an empty ' + if (!data) { + msg += 'file' + } else if (_.isEmpty(data)) { + msg += Array.isArray(data) === true ? 'array' : 'object' + } + msg += '...' + warn(msg) + } + } +} diff --git a/src/writers/writeData.js b/src/writers/writeData.js index 6052f03..0f101b2 100644 --- a/src/writers/writeData.js +++ b/src/writers/writeData.js @@ -1,11 +1,10 @@ /* istanbul ignore next */ import fs from 'fs' /* istanbul ignore next */ -import _ from 'underscore' -import warn from '../reporters/warn' import discernFileFormatter from '../helpers/discernFileFormatter' import makeDirectories from '../helpers/makeDirectories' import omit from '../utils/omit' +import warnIfEmpty from '../utils/warnIfEmpty' /** * Write the data object, inferring the file format from the file ending specified in `fileName`. @@ -25,6 +24,7 @@ import omit from '../utils/omit' * @param {Object} [options] Optional options object, see below * @param {Boolean} [options.makeDirectories=false] If `true`, create intermediate directories to your data file. Can also be `makeDirs` for short. * @param {Function|Array} [options.replacer] Used for JSON formats. Function to filter your objects before writing or an array of whitelisted keys to keep. Examples below. See JSON.stringify docs for more info https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify + * @param {Boolean} [options.verbose=true] Verbose logging output. Currently, the only logging output is a warning if you write an empty file. Set to `false` if don't want that. * @param {Number} [options.indent] Used for JSON and YAML formats. Specifies indent level. Default for YAML is `2`, `0` for JSON. * @param {String} [options.writeMethod='safeDump'] Used for YAML formats. Can also be `"dump"` to allow writing of RegExes and functions. The `options` object will also pass anything onto `js-yaml`. See its docs for other options. Example shown below with `sortKeys`. https://github.com/nodeca/js-yaml#safedump-object---options- * @param {Array} [options.columns] Used for tabular formats. Optionally specify a list of column names to use. Otherwise they are detected from the data. See `d3-dsv` for more detail: https://github.com/d3/d3-dsv/blob/master/README.md#dsv_format @@ -72,9 +72,7 @@ export default function writeData (outPath, data, opts_, cb) { cb = opts_ opts_ = undefined } - if (_.isEmpty(data)) { - warn('You didn\'t pass any data to write for file: `' + outPath + '`. Writing out an empty file...') - } + warnIfEmpty(data, outPath, opts_.verbose) if (typeof opts_ === 'object' && (opts_.makeDirectories === true || opts_.makeDirs === true)) { makeDirectories(outPath, proceed) diff --git a/src/writers/writeDataSync.js b/src/writers/writeDataSync.js index a1e0b4f..a3796f8 100644 --- a/src/writers/writeDataSync.js +++ b/src/writers/writeDataSync.js @@ -1,11 +1,10 @@ /* istanbul ignore next */ import fs from 'fs' /* istanbul ignore next */ -import _ from 'underscore' -import warn from '../reporters/warn' import discernFileFormatter from '../helpers/discernFileFormatter' import makeDirectoriesSync from '../helpers/makeDirectoriesSync' import omit from '../utils/omit' +import warnIfEmpty from '../utils/warnIfEmpty' /** * Syncronous version of {@link writers#writeData} @@ -18,6 +17,7 @@ import omit from '../utils/omit' * @param {Object} [options] Optional options object, see below * @param {Boolean} [options.makeDirectories=false] If `true`, create intermediate directories to your data file. Can also be `makeDirs` for short. * @param {Function|Array} [options.replacer] Used for JSON formats. Function to filter your objects before writing or an array of whitelisted keys to keep. Examples below. See JSON.stringify docs for more info https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify + * @param {Boolean} [options.verbose=true] Verbose logging output. Currently, the only logging output is a warning if you write an empty file. Set to `false` if don't want that. * @param {Number} [options.indent] Used for JSON and YAML formats. Specifies indent level. Default for YAML is `2`, `0` for JSON. * @param {String} [options.writeMethod='safeDump'] Used for YAML formats. Can also be `"dump"` to allow writing of RegExes and functions. The `options` object will also pass anything onto `js-yaml`. See its docs for other options. Example shown below with `sortKeys`. https://github.com/nodeca/js-yaml#safedump-object---options- * @param {Array} [options.columns] Used for tabular formats. Optionally specify a list of column names to use. Otherwise they are detected from the data. See `d3-dsv` for more detail: https://github.com/d3/d3-dsv/blob/master/README.md#dsv_format @@ -49,9 +49,7 @@ import omit from '../utils/omit' * }) */ export default function writeDataSync (outPath, data, opts_) { - if (_.isEmpty(data)) { - warn('You didn\'t pass any data to write for file: `' + outPath + '`. Writing out an empty file...') - } + warnIfEmpty(data, outPath, opts_.verbose) var writeOptions if (typeof opts_ === 'object') { if (opts_.makeDirectories === true || opts_.makeDirs === true) {