Browse Source

first commit

b s s m 3 years ago
commit
e0c8121d0c
100 changed files with 15605 additions and 0 deletions
  1. 11 0
      .hbuilderx/launch.json
  2. 17 0
      App.vue
  3. 66 0
      api/apis.js
  4. 75 0
      components/html2canvas/html2canvas.vue
  5. 11 0
      main.js
  6. 85 0
      manifest.json
  7. 1 0
      node_modules/.bin/mqtt
  8. 1 0
      node_modules/.bin/mqtt_pub
  9. 1 0
      node_modules/.bin/mqtt_sub
  10. 413 0
      node_modules/accounting/accounting.js
  11. 4 0
      node_modules/accounting/accounting.min.js
  12. 18 0
      node_modules/accounting/demo-resources/js/libs/jquery.min.js
  13. 28 0
      node_modules/accounting/demo-resources/js/prettify.js
  14. 186 0
      node_modules/accounting/demo-resources/style.css
  15. 473 0
      node_modules/accounting/index.html
  16. 22 0
      node_modules/accounting/license
  17. 67 0
      node_modules/accounting/package.json
  18. 60 0
      node_modules/accounting/readme.md
  19. 23 0
      node_modules/accounting/tests/jasmine/core/formatMoneySpec.js
  20. 132 0
      node_modules/accounting/tests/jasmine/core/formatNumberSpec.js
  21. 31 0
      node_modules/accounting/tests/jasmine/core/unformatSpec.js
  22. 20 0
      node_modules/accounting/tests/jasmine/lib/jasmine/MIT.LICENSE
  23. 188 0
      node_modules/accounting/tests/jasmine/lib/jasmine/jasmine-html.js
  24. 166 0
      node_modules/accounting/tests/jasmine/lib/jasmine/jasmine.css
  25. 2421 0
      node_modules/accounting/tests/jasmine/lib/jasmine/jasmine.js
  26. 22 0
      node_modules/accounting/tests/jasmine/runner.html
  27. 97 0
      node_modules/accounting/tests/qunit/methods.js
  28. 76 0
      node_modules/accounting/tests/qunit/speed.js
  29. 32 0
      node_modules/accounting/tests/qunit/test.html
  30. 19 0
      node_modules/accounting/tests/qunit/vendor/jquery.js
  31. 670 0
      node_modules/accounting/tests/qunit/vendor/jslitmus.js
  32. 196 0
      node_modules/accounting/tests/qunit/vendor/qunit.css
  33. 2360 0
      node_modules/accounting/tests/qunit/vendor/qunit.js
  34. 2 0
      node_modules/async-limiter/.eslintignore
  35. 10 0
      node_modules/async-limiter/.nycrc
  36. 9 0
      node_modules/async-limiter/.travis.yml
  37. 8 0
      node_modules/async-limiter/LICENSE
  38. 67 0
      node_modules/async-limiter/index.js
  39. 69 0
      node_modules/async-limiter/package.json
  40. 132 0
      node_modules/async-limiter/readme.md
  41. 5 0
      node_modules/balanced-match/.npmignore
  42. 21 0
      node_modules/balanced-match/LICENSE.md
  43. 91 0
      node_modules/balanced-match/README.md
  44. 59 0
      node_modules/balanced-match/index.js
  45. 77 0
      node_modules/balanced-match/package.json
  46. 22 0
      node_modules/base64-arraybuffer/LICENSE-MIT
  47. 20 0
      node_modules/base64-arraybuffer/README.md
  48. 4 0
      node_modules/base64-arraybuffer/index.d.ts
  49. 67 0
      node_modules/base64-arraybuffer/lib/base64-arraybuffer.js
  50. 60 0
      node_modules/base64-arraybuffer/package.json
  51. 21 0
      node_modules/base64-js/LICENSE
  52. 34 0
      node_modules/base64-js/README.md
  53. 1 0
      node_modules/base64-js/base64js.min.js
  54. 3 0
      node_modules/base64-js/index.d.ts
  55. 150 0
      node_modules/base64-js/index.js
  56. 76 0
      node_modules/base64-js/package.json
  57. 17 0
      node_modules/bl/.travis.yml
  58. 396 0
      node_modules/bl/BufferList.js
  59. 13 0
      node_modules/bl/LICENSE.md
  60. 247 0
      node_modules/bl/README.md
  61. 84 0
      node_modules/bl/bl.js
  62. 38 0
      node_modules/bl/node_modules/readable-stream/CONTRIBUTING.md
  63. 136 0
      node_modules/bl/node_modules/readable-stream/GOVERNANCE.md
  64. 47 0
      node_modules/bl/node_modules/readable-stream/LICENSE
  65. 106 0
      node_modules/bl/node_modules/readable-stream/README.md
  66. 127 0
      node_modules/bl/node_modules/readable-stream/errors-browser.js
  67. 116 0
      node_modules/bl/node_modules/readable-stream/errors.js
  68. 17 0
      node_modules/bl/node_modules/readable-stream/experimentalWarning.js
  69. 139 0
      node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js
  70. 39 0
      node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js
  71. 1124 0
      node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js
  72. 201 0
      node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js
  73. 697 0
      node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js
  74. 207 0
      node_modules/bl/node_modules/readable-stream/lib/internal/streams/async_iterator.js
  75. 210 0
      node_modules/bl/node_modules/readable-stream/lib/internal/streams/buffer_list.js
  76. 105 0
      node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.js
  77. 104 0
      node_modules/bl/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
  78. 3 0
      node_modules/bl/node_modules/readable-stream/lib/internal/streams/from-browser.js
  79. 64 0
      node_modules/bl/node_modules/readable-stream/lib/internal/streams/from.js
  80. 97 0
      node_modules/bl/node_modules/readable-stream/lib/internal/streams/pipeline.js
  81. 27 0
      node_modules/bl/node_modules/readable-stream/lib/internal/streams/state.js
  82. 1 0
      node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream-browser.js
  83. 1 0
      node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.js
  84. 97 0
      node_modules/bl/node_modules/readable-stream/package.json
  85. 9 0
      node_modules/bl/node_modules/readable-stream/readable-browser.js
  86. 16 0
      node_modules/bl/node_modules/readable-stream/readable.js
  87. 69 0
      node_modules/bl/package.json
  88. 21 0
      node_modules/bl/test/convert.js
  89. 492 0
      node_modules/bl/test/indexOf.js
  90. 32 0
      node_modules/bl/test/isBufferList.js
  91. 869 0
      node_modules/bl/test/test.js
  92. 21 0
      node_modules/brace-expansion/LICENSE
  93. 129 0
      node_modules/brace-expansion/README.md
  94. 201 0
      node_modules/brace-expansion/index.js
  95. 75 0
      node_modules/brace-expansion/package.json
  96. 21 0
      node_modules/buffer-from/LICENSE
  97. 69 0
      node_modules/buffer-from/index.js
  98. 52 0
      node_modules/buffer-from/package.json
  99. 69 0
      node_modules/buffer-from/readme.md
  100. 0 0
      node_modules/buffer/AUTHORS.md

+ 11 - 0
.hbuilderx/launch.json

@@ -0,0 +1,11 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version": "0.0",
+    "configurations": [{
+            "type": "uniCloud",
+            "default": {
+                "launchtype": "remote"
+            }
+        }
+    ]
+}

+ 17 - 0
App.vue

@@ -0,0 +1,17 @@
+<script>
+	export default {
+		onLaunch: function() {
+			console.log('App Launch')
+		},
+		onShow: function() {
+			console.log('App Show')
+		},
+		onHide: function() {
+			console.log('App Hide')
+		}
+	}
+</script>
+
+<style>
+	/*每个页面公共css */
+</style>

+ 66 - 0
api/apis.js

@@ -0,0 +1,66 @@
+import fetch from "../utils/request.js"
+
+// import {API,videoApi} from "./baseURL.js"
+// const API = 'https://poker2021-front-guess-api.lizhiyuedong.com'
+const videoApi = "https://lzyd-front-user-api.lizhiyuedong.com/"
+const sportApi = "http://lzyd-front-sport-api.lizhiyuedong.com/"
+const sportApi1 = "http://192.168.0.101:4002/"
+
+// //获取首页
+// export async function GetHome(payload) {
+//   return fetch({
+//     url: API + '/home/index',
+//     payload,
+//     method: 'get'
+//   })
+// }
+
+// // 加入竞猜
+// export async function JoinGuess(payload) {
+// 	return fetch({
+// 		url: API + '/guess/joinguess',
+//     payload,
+//     method: 'post'
+// 	})
+// }
+
+// 获取用户信息
+export async function GetUserInfo(payload) {
+  return fetch({
+    url: videoApi + 'customer/getInfo',
+    payload,
+    method: 'get'
+  })
+}
+// 获取运动参数
+export async function GetSportInfo(payload) {
+  return fetch({
+    url: sportApi + 'api/runData/speed',
+    payload,
+    method: 'get'
+  })
+}
+// 获取运动参数
+export async function GetSportSummary(payload) {
+  return fetch({
+    url: sportApi + 'api/runData/summary',
+    payload,
+    method: 'post'
+  })
+}
+// 获取地图参数
+export async function GetMapsInfo(payload) {
+  return fetch({
+    url: sportApi + 'api/correction/trackPointAmpSearch',
+    payload,
+    method: 'get'
+  })
+}
+// 上传base64
+export async function uploadBase64(payload) {
+  return fetch({
+    url: 'https://lzyd-front-user-api.lizhiyuedong.com/customer/uploadBase64',
+    payload,
+    method: 'post'
+  })
+}

+ 75 - 0
components/html2canvas/html2canvas.vue

@@ -0,0 +1,75 @@
+<template>
+	<view>
+		<view class="html2canvas" :prop="domId" :change:prop="html2canvas.create">
+			<slot></slot>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { base64ToPath } from '@/static/libs/image-tools.js';
+	export default {
+		name: 'html2canvas',
+		props: {
+			domId: {
+				type: String,
+				required: true
+			}
+		},
+		methods: {
+			async renderFinish(base64) {
+				try{
+					const imgPath = await base64ToPath(base64, '.jpeg');
+					this.$emit('renderFinish', imgPath);
+				}catch(e){
+					//TODO handle the exception
+					console.log('html2canvas error', e)
+				}
+			},
+			showLoading() {
+				uni.showToast({
+					title: "正在生成海报",
+					icon: "none",
+					mask: true,
+					duration: 100000
+				})
+			},
+			hideLoading() {
+				uni.hideToast();
+			}
+		}
+	}
+</script>
+
+<script module="html2canvas" lang="renderjs">
+import html2canvas from 'html2canvas';
+export default {
+	methods: {
+		async create(domId) {
+			try {
+				this.$ownerInstance.callMethod('showLoading', true);
+				const timeout = setTimeout(async ()=> {
+					const shareContent = document.querySelector(domId);
+					const canvas = await html2canvas(shareContent,{
+						width: shareContent.offsetWidth,//设置canvas尺寸与所截图尺寸相同,防止白边
+						height: shareContent.offsetHeight,//防止白边
+						logging: true,
+						useCORS: true
+					});
+					const base64 = canvas.toDataURL('image/jpeg', 1);
+					this.$ownerInstance.callMethod('renderFinish', base64);
+					this.$ownerInstance.callMethod('hideLoading', true);
+					clearTimeout(timeout);
+				}, 500);
+			} catch(error){
+				console.log(error)
+			}
+		}
+	}
+}
+</script>
+
+
+<style lang="scss">
+
+</style>

+ 11 - 0
main.js

@@ -0,0 +1,11 @@
+import Vue from 'vue'
+import App from './App'
+
+Vue.config.productionTip = false
+
+App.mpType = 'app'
+
+const app = new Vue({
+    ...App
+})
+app.$mount()

+ 85 - 0
manifest.json

@@ -0,0 +1,85 @@
+{
+    "name" : "打卡坐标",
+    "appid" : "",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "h5" : {
+        "title" : "打卡坐标",
+        "domain" : "www.baidu.com",
+        "router" : {
+            "base" : "/lzyd-maps/"
+        },
+        "devServer" : {
+            "https" : false
+        }
+    }
+}

+ 1 - 0
node_modules/.bin/mqtt

@@ -0,0 +1 @@
+../mqtt/mqtt.js

+ 1 - 0
node_modules/.bin/mqtt_pub

@@ -0,0 +1 @@
+../mqtt/bin/pub.js

+ 1 - 0
node_modules/.bin/mqtt_sub

@@ -0,0 +1 @@
+../mqtt/bin/sub.js

+ 413 - 0
node_modules/accounting/accounting.js

@@ -0,0 +1,413 @@
+/*!
+ * accounting.js v0.4.1
+ * Copyright 2014 Open Exchange Rates
+ *
+ * Freely distributable under the MIT license.
+ * Portions of accounting.js are inspired or borrowed from underscore.js
+ *
+ * Full details and documentation:
+ * http://openexchangerates.github.io/accounting.js/
+ */
+
+(function(root, undefined) {
+
+	/* --- Setup --- */
+
+	// Create the local library object, to be exported or referenced globally later
+	var lib = {};
+
+	// Current version
+	lib.version = '0.4.1';
+
+
+	/* --- Exposed settings --- */
+
+	// The library's settings configuration object. Contains default parameters for
+	// currency and number formatting
+	lib.settings = {
+		currency: {
+			symbol : "$",		// default currency symbol is '$'
+			format : "%s%v",	// controls output: %s = symbol, %v = value (can be object, see docs)
+			decimal : ".",		// decimal point separator
+			thousand : ",",		// thousands separator
+			precision : 2,		// decimal places
+			grouping : 3		// digit grouping (not implemented yet)
+		},
+		number: {
+			precision : 0,		// default precision on numbers is 0
+			grouping : 3,		// digit grouping (not implemented yet)
+			thousand : ",",
+			decimal : "."
+		}
+	};
+
+
+	/* --- Internal Helper Methods --- */
+
+	// Store reference to possibly-available ECMAScript 5 methods for later
+	var nativeMap = Array.prototype.map,
+		nativeIsArray = Array.isArray,
+		toString = Object.prototype.toString;
+
+	/**
+	 * Tests whether supplied parameter is a string
+	 * from underscore.js
+	 */
+	function isString(obj) {
+		return !!(obj === '' || (obj && obj.charCodeAt && obj.substr));
+	}
+
+	/**
+	 * Tests whether supplied parameter is a string
+	 * from underscore.js, delegates to ECMA5's native Array.isArray
+	 */
+	function isArray(obj) {
+		return nativeIsArray ? nativeIsArray(obj) : toString.call(obj) === '[object Array]';
+	}
+
+	/**
+	 * Tests whether supplied parameter is a true object
+	 */
+	function isObject(obj) {
+		return obj && toString.call(obj) === '[object Object]';
+	}
+
+	/**
+	 * Extends an object with a defaults object, similar to underscore's _.defaults
+	 *
+	 * Used for abstracting parameter handling from API methods
+	 */
+	function defaults(object, defs) {
+		var key;
+		object = object || {};
+		defs = defs || {};
+		// Iterate over object non-prototype properties:
+		for (key in defs) {
+			if (defs.hasOwnProperty(key)) {
+				// Replace values with defaults only if undefined (allow empty/zero values):
+				if (object[key] == null) object[key] = defs[key];
+			}
+		}
+		return object;
+	}
+
+	/**
+	 * Implementation of `Array.map()` for iteration loops
+	 *
+	 * Returns a new Array as a result of calling `iterator` on each array value.
+	 * Defers to native Array.map if available
+	 */
+	function map(obj, iterator, context) {
+		var results = [], i, j;
+
+		if (!obj) return results;
+
+		// Use native .map method if it exists:
+		if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
+
+		// Fallback for native .map:
+		for (i = 0, j = obj.length; i < j; i++ ) {
+			results[i] = iterator.call(context, obj[i], i, obj);
+		}
+		return results;
+	}
+
+	/**
+	 * Check and normalise the value of precision (must be positive integer)
+	 */
+	function checkPrecision(val, base) {
+		val = Math.round(Math.abs(val));
+		return isNaN(val)? base : val;
+	}
+
+
+	/**
+	 * Parses a format string or object and returns format obj for use in rendering
+	 *
+	 * `format` is either a string with the default (positive) format, or object
+	 * containing `pos` (required), `neg` and `zero` values (or a function returning
+	 * either a string or object)
+	 *
+	 * Either string or format.pos must contain "%v" (value) to be valid
+	 */
+	function checkCurrencyFormat(format) {
+		var defaults = lib.settings.currency.format;
+
+		// Allow function as format parameter (should return string or object):
+		if ( typeof format === "function" ) format = format();
+
+		// Format can be a string, in which case `value` ("%v") must be present:
+		if ( isString( format ) && format.match("%v") ) {
+
+			// Create and return positive, negative and zero formats:
+			return {
+				pos : format,
+				neg : format.replace("-", "").replace("%v", "-%v"),
+				zero : format
+			};
+
+		// If no format, or object is missing valid positive value, use defaults:
+		} else if ( !format || !format.pos || !format.pos.match("%v") ) {
+
+			// If defaults is a string, casts it to an object for faster checking next time:
+			return ( !isString( defaults ) ) ? defaults : lib.settings.currency.format = {
+				pos : defaults,
+				neg : defaults.replace("%v", "-%v"),
+				zero : defaults
+			};
+
+		}
+		// Otherwise, assume format was fine:
+		return format;
+	}
+
+
+	/* --- API Methods --- */
+
+	/**
+	 * Takes a string/array of strings, removes all formatting/cruft and returns the raw float value
+	 * Alias: `accounting.parse(string)`
+	 *
+	 * Decimal must be included in the regular expression to match floats (defaults to
+	 * accounting.settings.number.decimal), so if the number uses a non-standard decimal 
+	 * separator, provide it as the second argument.
+	 *
+	 * Also matches bracketed negatives (eg. "$ (1.99)" => -1.99)
+	 *
+	 * Doesn't throw any errors (`NaN`s become 0) but this may change in future
+	 */
+	var unformat = lib.unformat = lib.parse = function(value, decimal) {
+		// Recursively unformat arrays:
+		if (isArray(value)) {
+			return map(value, function(val) {
+				return unformat(val, decimal);
+			});
+		}
+
+		// Fails silently (need decent errors):
+		value = value || 0;
+
+		// Return the value as-is if it's already a number:
+		if (typeof value === "number") return value;
+
+		// Default decimal point comes from settings, but could be set to eg. "," in opts:
+		decimal = decimal || lib.settings.number.decimal;
+
+		 // Build regex to strip out everything except digits, decimal point and minus sign:
+		var regex = new RegExp("[^0-9-" + decimal + "]", ["g"]),
+			unformatted = parseFloat(
+				("" + value)
+				.replace(/\((.*)\)/, "-$1") // replace bracketed values with negatives
+				.replace(regex, '')         // strip out any cruft
+				.replace(decimal, '.')      // make sure decimal point is standard
+			);
+
+		// This will fail silently which may cause trouble, let's wait and see:
+		return !isNaN(unformatted) ? unformatted : 0;
+	};
+
+
+	/**
+	 * Implementation of toFixed() that treats floats more like decimals
+	 *
+	 * Fixes binary rounding issues (eg. (0.615).toFixed(2) === "0.61") that present
+	 * problems for accounting- and finance-related software.
+	 */
+	var toFixed = lib.toFixed = function(value, precision) {
+		precision = checkPrecision(precision, lib.settings.number.precision);
+		var power = Math.pow(10, precision);
+
+		// Multiply up by precision, round accurately, then divide and use native toFixed():
+		return (Math.round(lib.unformat(value) * power) / power).toFixed(precision);
+	};
+
+
+	/**
+	 * Format a number, with comma-separated thousands and custom precision/decimal places
+	 * Alias: `accounting.format()`
+	 *
+	 * Localise by overriding the precision and thousand / decimal separators
+	 * 2nd parameter `precision` can be an object matching `settings.number`
+	 */
+	var formatNumber = lib.formatNumber = lib.format = function(number, precision, thousand, decimal) {
+		// Resursively format arrays:
+		if (isArray(number)) {
+			return map(number, function(val) {
+				return formatNumber(val, precision, thousand, decimal);
+			});
+		}
+
+		// Clean up number:
+		number = unformat(number);
+
+		// Build options object from second param (if object) or all params, extending defaults:
+		var opts = defaults(
+				(isObject(precision) ? precision : {
+					precision : precision,
+					thousand : thousand,
+					decimal : decimal
+				}),
+				lib.settings.number
+			),
+
+			// Clean up precision
+			usePrecision = checkPrecision(opts.precision),
+
+			// Do some calc:
+			negative = number < 0 ? "-" : "",
+			base = parseInt(toFixed(Math.abs(number || 0), usePrecision), 10) + "",
+			mod = base.length > 3 ? base.length % 3 : 0;
+
+		// Format the number:
+		return negative + (mod ? base.substr(0, mod) + opts.thousand : "") + base.substr(mod).replace(/(\d{3})(?=\d)/g, "$1" + opts.thousand) + (usePrecision ? opts.decimal + toFixed(Math.abs(number), usePrecision).split('.')[1] : "");
+	};
+
+
+	/**
+	 * Format a number into currency
+	 *
+	 * Usage: accounting.formatMoney(number, symbol, precision, thousandsSep, decimalSep, format)
+	 * defaults: (0, "$", 2, ",", ".", "%s%v")
+	 *
+	 * Localise by overriding the symbol, precision, thousand / decimal separators and format
+	 * Second param can be an object matching `settings.currency` which is the easiest way.
+	 *
+	 * To do: tidy up the parameters
+	 */
+	var formatMoney = lib.formatMoney = function(number, symbol, precision, thousand, decimal, format) {
+		// Resursively format arrays:
+		if (isArray(number)) {
+			return map(number, function(val){
+				return formatMoney(val, symbol, precision, thousand, decimal, format);
+			});
+		}
+
+		// Clean up number:
+		number = unformat(number);
+
+		// Build options object from second param (if object) or all params, extending defaults:
+		var opts = defaults(
+				(isObject(symbol) ? symbol : {
+					symbol : symbol,
+					precision : precision,
+					thousand : thousand,
+					decimal : decimal,
+					format : format
+				}),
+				lib.settings.currency
+			),
+
+			// Check format (returns object with pos, neg and zero):
+			formats = checkCurrencyFormat(opts.format),
+
+			// Choose which format to use for this value:
+			useFormat = number > 0 ? formats.pos : number < 0 ? formats.neg : formats.zero;
+
+		// Return with currency symbol added:
+		return useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(number), checkPrecision(opts.precision), opts.thousand, opts.decimal));
+	};
+
+
+	/**
+	 * Format a list of numbers into an accounting column, padding with whitespace
+	 * to line up currency symbols, thousand separators and decimals places
+	 *
+	 * List should be an array of numbers
+	 * Second parameter can be an object containing keys that match the params
+	 *
+	 * Returns array of accouting-formatted number strings of same length
+	 *
+	 * NB: `white-space:pre` CSS rule is required on the list container to prevent
+	 * browsers from collapsing the whitespace in the output strings.
+	 */
+	lib.formatColumn = function(list, symbol, precision, thousand, decimal, format) {
+		if (!list) return [];
+
+		// Build options object from second param (if object) or all params, extending defaults:
+		var opts = defaults(
+				(isObject(symbol) ? symbol : {
+					symbol : symbol,
+					precision : precision,
+					thousand : thousand,
+					decimal : decimal,
+					format : format
+				}),
+				lib.settings.currency
+			),
+
+			// Check format (returns object with pos, neg and zero), only need pos for now:
+			formats = checkCurrencyFormat(opts.format),
+
+			// Whether to pad at start of string or after currency symbol:
+			padAfterSymbol = formats.pos.indexOf("%s") < formats.pos.indexOf("%v") ? true : false,
+
+			// Store value for the length of the longest string in the column:
+			maxLength = 0,
+
+			// Format the list according to options, store the length of the longest string:
+			formatted = map(list, function(val, i) {
+				if (isArray(val)) {
+					// Recursively format columns if list is a multi-dimensional array:
+					return lib.formatColumn(val, opts);
+				} else {
+					// Clean up the value
+					val = unformat(val);
+
+					// Choose which format to use for this value (pos, neg or zero):
+					var useFormat = val > 0 ? formats.pos : val < 0 ? formats.neg : formats.zero,
+
+						// Format this value, push into formatted list and save the length:
+						fVal = useFormat.replace('%s', opts.symbol).replace('%v', formatNumber(Math.abs(val), checkPrecision(opts.precision), opts.thousand, opts.decimal));
+
+					if (fVal.length > maxLength) maxLength = fVal.length;
+					return fVal;
+				}
+			});
+
+		// Pad each number in the list and send back the column of numbers:
+		return map(formatted, function(val, i) {
+			// Only if this is a string (not a nested array, which would have already been padded):
+			if (isString(val) && val.length < maxLength) {
+				// Depending on symbol position, pad after symbol or at index 0:
+				return padAfterSymbol ? val.replace(opts.symbol, opts.symbol+(new Array(maxLength - val.length + 1).join(" "))) : (new Array(maxLength - val.length + 1).join(" ")) + val;
+			}
+			return val;
+		});
+	};
+
+
+	/* --- Module Definition --- */
+
+	// Export accounting for CommonJS. If being loaded as an AMD module, define it as such.
+	// Otherwise, just add `accounting` to the global object
+	if (typeof exports !== 'undefined') {
+		if (typeof module !== 'undefined' && module.exports) {
+			exports = module.exports = lib;
+		}
+		exports.accounting = lib;
+	} else if (typeof define === 'function' && define.amd) {
+		// Return the library as an AMD module:
+		define([], function() {
+			return lib;
+		});
+	} else {
+		// Use accounting.noConflict to restore `accounting` back to its original value.
+		// Returns a reference to the library's `accounting` object;
+		// e.g. `var numbers = accounting.noConflict();`
+		lib.noConflict = (function(oldAccounting) {
+			return function() {
+				// Reset the value of the root's `accounting` variable:
+				root.accounting = oldAccounting;
+				// Delete the noConflict method:
+				lib.noConflict = undefined;
+				// Return reference to the library to re-assign it:
+				return lib;
+			};
+		})(root.accounting);
+
+		// Declare `fx` on the root (global/window) object:
+		root['accounting'] = lib;
+	}
+
+	// Root will be `window` in browser or `global` on the server:
+}(this));

File diff suppressed because it is too large
+ 4 - 0
node_modules/accounting/accounting.min.js


File diff suppressed because it is too large
+ 18 - 0
node_modules/accounting/demo-resources/js/libs/jquery.min.js


File diff suppressed because it is too large
+ 28 - 0
node_modules/accounting/demo-resources/js/prettify.js


+ 186 - 0
node_modules/accounting/demo-resources/style.css

@@ -0,0 +1,186 @@
+/* Borrowed from Markdown.css: http://kevinburke.bitbucket.org/markdowncss/markdown.css */
+body{
+    margin: 0 auto;
+    font-family: Georgia, Palatino, serif;
+    color: #444444;
+    line-height: 1;
+    max-width: 960px;
+    padding: 30px;
+}
+h1, h2, h3, h4 {
+    color: #111111;
+    font-weight: 400;
+}
+h1, h2, h3, h4, h5, p, ul, ol {
+    margin-bottom: 24px;
+    padding: 0;
+}
+h1 {
+    font-size: 48px;
+}
+h2 {
+    font-size: 36px;
+    margin: 24px 0 6px;
+}
+h3 {
+    font-size: 24px;
+}
+h4 {
+    font-size: 21px;
+}
+h5 {
+    font-size: 18px;
+}
+a {
+    color: #0099ff;
+    margin: 0;
+    padding: 0;
+    vertical-align: baseline;
+}
+li {
+    line-height: 24px;
+}
+li ul, li ul {
+	margin-left: 24px;
+}
+p, ul, ol {
+    font-size: 16px;
+    line-height: 24px;
+    max-width: 540px;
+}
+pre {
+    padding: 0px 24px;
+    max-width: 800px;
+    white-space: pre-wrap;
+}
+code {
+    font-family: Consolas, Monaco, Andale Mono, monospace;
+    line-height: 1.5;
+    font-size: 13px;
+}
+aside {
+    display: block;
+    float: right;
+    width: 390px;
+}
+blockquote {
+    margin: 1em 2em;
+    max-width: 476px;
+}
+blockquote p {
+    color: #666;
+    max-width: 460px;
+}
+hr {
+    margin: 0;
+    padding:0;
+    border:0;
+    outline:0;
+    height:2px;
+    background: #bbb;
+}
+
+
+/* Some overrides: */
+/* Thx to http://twitter.github.com/bootstrap/ */
+
+h1 { font-size:40px; }
+h2 { font-size:30px; }
+h3 { font-size:22px; }
+h4 { font-size:18px; padding-top:10px;}
+h5 { font-size:1em; margin-bottom:1em; }
+p, ul, ol { max-width: 580px; }
+ol, ul { padding-left:24px; font-size:0.85em }
+ol#list { font-size:1em }
+a:hover, a:focus { outline:none; color:#e25525 }
+
+section {
+	padding:0 0 10px;
+}
+table{width:100%;margin-bottom:18px;padding:0;text-align:left;border-collapse:separate;font-size:13px;}table th,table td{padding:10px 10px 9px;line-height:13.5px;vertical-align:middle;border-bottom:1px solid #ddd;}
+table th{padding-top:9px;font-weight:bold;border-bottom-width:2px;}
+
+td {
+	white-space:pre;
+	font-family:monospace;
+}
+
+pre {
+	background-color: whiteSmoke;
+	display: block;
+	padding: 17px;
+	margin: 0 0 22px;
+	line-height: 18px;
+	border: 1px solid rgba(0, 0, 0, 0.15);
+	-webkit-border-radius: 3px;
+	-moz-border-radius: 3px;
+	border-radius: 3px;
+	white-space: pre-wrap;
+	overflow:hidden;
+}
+code, pre {
+	padding: 0 3px 2px;
+	font-family: Consolas, Monaco, "Andale Mono", "Courier New", monospace;
+	font-size: 13px;
+	-webkit-border-radius: 3px;
+	-moz-border-radius: 3px;
+	border-radius: 3px;
+}
+
+pre.prettyprint {
+  background: #fefbf3;
+  padding: 9px;
+  border: 1px solid rgba(0,0,0,.2);
+  -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1);
+  -moz-box-shadow: 0 1px 2px rgba(0,0,0,.1);
+  box-shadow: 0 1px 2px rgba(0,0,0,.1);
+}
+
+.pln{color:#222}
+@media screen{
+    .str{color:#080}
+    .kwd{color:#008}
+    .com{color:#800}
+    .typ{color:#606}
+    .lit{color:#066}
+    .pun,
+    .opn,
+    .clo{color:#660}
+    .tag{color:#008}
+    .atn{color:#606}
+    .atv{color:#080}
+    .dec,
+    .var{color:#606}
+    .fun{color:red}
+}
+@media print,projection{
+    .str{color:#060}
+    .kwd{color:#006;font-weight:bold}
+    .com{color:#600;font-style:italic}
+    .typ{color:#404;font-weight:bold}
+    .lit{color:#044}
+    .pun,
+    .opn,
+    .clo{color:#440}
+    .tag{color:#006;font-weight:bold}
+    .atn{color:#404}
+    .atv{color:#060}
+}
+
+
+div.well {
+	background: whiteSmoke;
+	margin: 20px 0;
+	padding: 5px 12px;
+	min-height: 20px;
+	border: 1px solid #DDD;
+	-webkit-border-radius: 4px;
+	-moz-border-radius: 4px;
+	border-radius: 4px;
+	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+	-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+.well p {
+	max-width:100%;
+}

+ 473 - 0
node_modules/accounting/index.html

@@ -0,0 +1,473 @@
+<!doctype html>
+<html lang="en" class="no-js">
+<head>
+	<meta charset="utf-8">
+	<title>accounting.js: JavaScript number and currency formatting library</title>
+	<link href="demo-resources/style.css" rel="stylesheet"/>
+	<link rel="canonical" href="http://openexchangerates.github.io/accounting.js/" />
+	<script type="text/javascript">
+		var _gaq = _gaq || [];
+		_gaq.push(['_setAccount', 'UA-17884149-3']);
+		_gaq.push(['_trackPageview']);
+		(function() {
+			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+		})();
+	</script>
+</head>
+
+<body>
+	<section>
+		<h1>accounting.js</h1>
+		<p><strong>accounting.js</strong> is a tiny JavaScript library by <a href="https://openexchangerates.org" title="Open Exchange Rates free currency data API" target="_blank">Open Exchange Rates</a>, providing simple and advanced number, money and currency formatting.</p>
+
+		<p>Features custom output formats, parsing/unformatting of numbers, easy localisation and spreadsheet-style column formatting (to line up symbols and decimals).</p>
+
+		<p>It's lightweight, has no dependencies and is suitable for all client-side and server-side JavaScript applications.</p>
+
+		<p><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="josscrowcroft" data-url="http://openexchangerates.github.io/accounting.js" data-text="accounting.js - JavaScript library for money/currency formatting">Tweet</a> &nbsp; <g:plusone size="medium"></g:plusone></p>
+		<ul>
+			<li><a href="#methods" title="library methods overvew">methods &amp; examples</a>
+			<li><a href="#demo" title="demo">demo</a>
+			<li><a href="#instructions" title="instructions">instructions</a>
+			<li><a href="#documentation" title="documentation">documentation</a>
+			<li><a href="#roadmap" title="roadmap">roadmap</a>
+			<li><a href="#support" title="support">feedback / support</a>
+			<li><a href="#download" title="download">download</a>
+			<li><a href="#links" title="links">links</a>
+		</ul>
+	</section>
+
+	<section id="methods">
+		<h2>Library Methods</h2>
+
+		<h4><strong>formatMoney()</strong> - format any number into currency</h4>
+
+		<p>The most basic library function for formatting numbers as money values, with customisable currency symbol, precision (decimal places), and thousand/decimal separators:</p>
+		<pre class="prettyprint lang-js">// Default usage:
+accounting.formatMoney(12345678); // $12,345,678.00
+
+// European formatting (custom symbol and separators), can also use options object as second parameter:
+accounting.formatMoney(4999.99, "&euro;", 2, ".", ","); // &euro;4.999,99
+
+// Negative values can be formatted nicely:
+accounting.formatMoney(-500000, "&pound; ", 0); // &pound; -500,000
+
+// Simple `format` string allows control of symbol position (%v = value, %s = symbol):
+accounting.formatMoney(5318008, { symbol: "GBP",  format: "%v %s" }); // 5,318,008.00 GBP</pre>
+
+
+		<h4><strong>formatColumn()</strong> - format a list of values for column-display</h4>
+
+		<p>This table demonstrates how <strong>accounting.js</strong> can take a list of numbers and money-format them with padding to line up currency symbols and decimal places</p>
+		<p>In order for the padded spaces to render correctly, the containing element must be CSS styled with <code>white-space: pre</code> (pre-formatted) - otherwise the browser will squash them into single spaces.</p>
+
+		<table id="demo-table">
+			<thead>
+				<tr>
+					<th>Original Number:</th>
+					<th>With accounting.js:</th>
+					<th>Different settings:</th>
+					<th>European format:</th>
+					<th>Symbol after value:</th>
+				</tr>
+			</thead>
+			<tbody></tbody>
+		</table>
+		<pre class="prettyprint lang-js">// Format list of numbers for display:
+accounting.formatColumn([123.5, 3456.49, 777888.99, 12345678, -5432], "$ ");</pre>
+
+
+		<h4><strong>formatNumber()</strong> - format a number with custom precision and localisation</h4>
+
+		<p>The base function of the library, which takes any number or array of numbers, runs <code>accounting.unformat()</code> to remove any formatting, and returns the number(s) formatted with separated thousands and custom precision:</p>
+		<pre class="prettyprint lang-js">accounting.formatNumber(5318008); // 5,318,008
+accounting.formatNumber(9876543.21, 3, " "); // 9 876 543.210</pre>
+
+
+		<h4><strong>toFixed()</strong> - better rounding for floating point numbers</h4>
+
+		<p>Implementation of toFixed() that treats floats more like decimal values than binary, fixing inconsistent precision rounding in JavaScript (where some .05 values round up, while others round down):</p>
+		<pre class="prettyprint lang-js">(0.615).toFixed(2); // "0.61"
+accounting.toFixed(0.615, 2); // "0.62"</pre>
+
+
+		<h4><strong>unformat()</strong> - parse a value from any formatted number/currency string</h4>
+
+		<p>Takes any number and removes all currency formatting. Aliased as <code>accounting.parse()</code></p>
+		<pre class="prettyprint lang-js">accounting.unformat("&pound; 12,345,678.90 GBP"); // 12345678.9</pre>
+	</section>
+
+	<section id="demo">
+		<h2>Demo / Try it out</h2>
+
+
+		<h4>Money formatting:</h4>
+
+		<div class="well">
+			<p>Enter any number into the box and choose currency. Uses <code>accounting.formatMoney()</code>:</p>
+			<p>
+				<select id="demo-number-symbol">
+					<option value="$ ">$</option>
+					<option value="&pound; ">&pound;</option>
+					<option value="HK$ ">HK$</option>
+					<option data-locale="european" value="&euro; ">&euro; </option>
+				</select>
+				<input type="text" maxlength="20" class="" id="demo-number-value" value="" />
+			</p>
+			<p>Result: <strong><span id="demo-number-result">$ 0.00</span></strong></p>
+		</div>
+
+
+		<h4>Column formatting:</h4>
+
+		<div class="well">
+			<p>Edit the values in the table to see how <strong>formatColumn()</strong> keeps them aligned:</p>
+			<table id="demo-column">
+				<tbody>
+					<tr>
+						<td><input type="text" value="1000000" maxlength="20" /></td>
+						<td class="output">$ 1,000,000.00</td>
+						<td class="output2">GBP 1,000,000</td>
+					</tr>
+					<tr>
+						<td><input type="text" value="-5000" maxlength="20" /></td>
+						<td class="output">$    -5,000.00</td>
+						<td class="output2">GBP   (5,000)</td>
+					</tr>
+					<tr>
+						<td><input type="text" value="0" maxlength="20" /></td>
+						<td class="output">$         0.00</td>
+						<td class="output2">GBP        --</td>
+					</tr>
+				</tbody>
+			</table>
+		</div>
+	</section>
+
+
+	<section id="instructions">
+		<h2>Basic Instructions:</h2>
+
+		<p>1. Download the script and put it somewhere, then reference it in your HTML like so:</p>
+		<pre class="prettyprint">&lt;script src=&quot;path/to/accounting.js&quot;&gt;&lt;/script&gt;
+
+&lt;script type=&quot;text/javascript&quot;&gt;
+	// Library ready to use:
+	accounting.formatMoney(5318008);
+&lt;/script&gt;</pre>
+
+		<p>2. See the documentation and source-code for full method/parameter information.</p>
+	</section>
+
+
+	<section id="documentation">
+
+		<h2>Documentation</h2>
+
+		<p>Information on the parameters of each method. See <a href="#methods" title="accounting.js library methods">library methods</a> above for more examples. Optional parameters are in <code><em>[italics]</em></code>, with the default value indicated.</p>
+
+
+		<h4><strong>accounting.settings</strong></h4>
+
+		<pre class="prettyprint lang-js">// Settings object that controls default parameters for library methods:
+accounting.settings = {
+	currency: {
+		symbol : "$",   // default currency symbol is '$'
+		format: "%s%v", // controls output: %s = symbol, %v = value/number (can be object: see below)
+		decimal : ".",  // decimal point separator
+		thousand: ",",  // thousands separator
+		precision : 2   // decimal places
+	},
+	number: {
+		precision : 0,  // default precision on numbers is 0
+		thousand: ",",
+		decimal : "."
+	}
+}
+
+// These can be changed externally to edit the library's defaults:
+accounting.settings.currency.format = "%s %v";
+
+// Format can be an object, with `pos`, `neg` and `zero`:
+accounting.settings.currency.format = {
+	pos : "%s %v",   // for positive values, eg. "$ 1.00" (required)
+	neg : "%s (%v)", // for negative values, eg. "$ (1.00)" <em>[optional]</em>
+	zero: "%s  -- "  // for zero values, eg. "$  --" <em>[optional]</em>
+};
+
+// Example using underscore.js - extend default settings (also works with $.extend in jQuery):
+accounting.settings.number = _.defaults({
+	precision: 2,
+	thousand: " "
+}, accounting.settings.number);</pre>
+
+
+		<h4><strong>accounting.formatMoney()</strong></h4>
+
+		<pre class="prettyprint lang-js">// Standard usage and parameters (returns string):
+accounting.formatMoney(number<em>,[symbol = "$"],[precision = 2],[thousand = ","],[decimal = "."],[format = "%s%v"]</em>)
+
+// Second parameter can be an object:
+accounting.formatMoney(number<em>, [options]</em>)
+
+// Available fields in options object, matching `settings.currency`:
+var options = {
+	symbol : "$",
+	decimal : ".",
+	thousand: ",",
+	precision : 2,
+	format: "%s%v"
+};
+
+// Example usage:
+accounting.formatMoney(12345678); // $12,345,678.00
+accounting.formatMoney(4999.99, "&euro;", 2, ".", ","); // &euro;4.999,99
+accounting.formatMoney(-500000, "&pound; ", 0); // &pound; -500,000
+
+// Example usage with options object:
+accounting.formatMoney(5318008, {
+	symbol: "GBP",
+	precision: 0,
+	thousand: "&middot",
+	format: {
+		pos : "%s %v",
+		neg : "%s (%v)",
+		zero: "%s  --"
+	}
+});
+
+// Will recursively format an array of values:
+accounting.formatMoney([123, 456, [78, 9]], "$", 0); // ["$123", "$456", ["$78", "$9"]]</pre>
+
+
+
+		<h4><strong>accounting.formatColumn()</strong></h4>
+
+		<pre class="prettyprint lang-js">// Standard usage and parameters (returns array):
+accounting.formatColumn(list<em>, [symbol = "$"],[precision = 2],[thousand = ","],[decimal = "."],[format = "%s%v"]</em>)
+
+// Second parameter can be an object (see formatNumber for available options):
+accounting.formatColumn(list, <em>[options]</em>)
+
+// Example usage (NB. use a space after the symbol to add arbitrary padding to all values):
+var list = [123, 12345];
+accounting.formatColumn(list, "$ ", 0); // ["$    123", "$ 12,345"]
+
+// List of numbers can be a multi-dimensional array (formatColumn is applied recursively):
+var list = [[1, 100], [900, 9]];
+accounting.formatColumn(list); // [["$  1.00", "$100.00"], ["$900.00", "$  9.00"]]</pre>
+
+
+		<h4><strong>accounting.formatNumber()</strong></h4>
+
+		<pre class="prettyprint lang-js">// Standard usage and parameters (returns string):
+accounting.formatNumber(number<em>, [precision = 0], [thousand = ","], [decimal = "."]</em>)
+
+// Second parameter can also be an object matching `settings.number`:
+accounting.formatNumber(number<em>, [object]</em>)
+
+// Example usage:
+accounting.formatNumber(9876543); // 9,876,543
+accounting.formatNumber(4999.99, 2, ".", ","); // 4.999,99
+
+// Example usage with options object:
+accounting.formatNumber(5318008, {
+	precision : 3,
+	thousand : " "
+});
+
+// Will recursively format an array of values:
+accounting.formatNumber([123456, [7890, 123]]); // ["123,456", ["7,890", "123"]]</pre>
+
+
+		<h4><strong>accounting.toFixed()</strong></h4>
+
+		<pre class="prettyprint lang-js">// Standard usage and parameters (returns string):
+accounting.toFixed(number<em>, [precision = 0]</em>);
+
+// Example usage:
+accounting.toFixed(0.615, 2); // "0.62"
+
+// Compare to regular JavaScript `Number.toFixed()` method:
+(0.615).toFixed(2); // "0.61"</pre>
+
+
+		<h4><strong>accounting.unformat()</strong></h4>
+
+		<pre class="prettyprint lang-js">// Standard usage and parameters (returns number):
+accounting.unformat(string<em>, [decimal]</em>);
+
+// Example usage:
+accounting.unformat("GBP &pound; 12,345,678.90"); // 12345678.9
+
+// If a non-standard decimal separator was used (eg. a comma) unformat() will need it in order to work out
+// which part of the number is a decimal/float:
+accounting.unformat("&euro; 1.000.000,00", ","); // 1000000</pre>
+
+	</section>
+
+
+	<section id="roadmap">
+		<h2>Roadmap</h2>
+
+		<h4>Next Version:</h4>
+		<ul>
+			<li><s>Add more fine-grained control of formatting, with negatives and zero-values</s></li>
+			<li><s>Implement <code>map()</code> and type-checking helper methods to clean up API methods</s></li>
+			<li>Find performance bottlenecks and work on speed optimisations</li>
+			<li>Write more tests, docs and examples, add FAQ</li>
+			<li>Implement <a href="https://github.com/openexchangerates/accounting.js/issues/" title="accounting.js issues">feedback</a></li>
+		</ul>
+
+		<h4>Later:</h4>
+		<ul>
+			<li>Add padding parameter to override amount of space between currency symbol and value.</li>
+			<li>Add digit-grouping control, to allow eg. "$10,0000"</li>
+			<li>Add choice of rounding method for precision (up, down or nearest-neighbour).</li>
+			<li>Add several other general and excel-style money formatting methods.</li>
+			<li>Create NPM package, if there's demand for it.</li>
+			<li>Create wrapper for jQuery as a separate plugin (not in core) to allow eg. <code>$('td.accounting').formatMoney()</code></li>
+		</ul>
+
+		<p>See the <a href="https://github.com/openexchangerates/accounting.js/issues" title="accounting.js issues">Github Issues page</a> for currently active issues.</p>
+	</section>
+
+	<section id="support">
+		<h2>Feedback / Support</h2>
+
+		<p>Please create issues on the <a href="https://github.com/openexchangerates/accounting.js" title="accounting.js Github repository">accounting.js Github repository</a> if you have feedback or need support, or <a href="mailto:info@openexchangerates.org" title="Contact Open Exchange Rates">contact Open Exchange Rates here</a>.</p>
+	</section>
+
+	<section id="download">
+		<h2>Download</h2>
+
+		<ul>
+			<li><strong><a href="https://raw.github.com/openexchangerates/accounting.js/master/accounting.js" title="accounting.js">accounting.js</a></strong> - Latest version from Github (12kb)</li>
+			<li><strong><a href="https://raw.github.com/openexchangerates/accounting.js/master/accounting.min.js" title="accounting.min.js">accounting.min.js</a></strong> - Latest version from Github (3kb, minified)</li>
+			<li>Or check out the <a href="https://github.com/openexchangerates/accounting.js" title="accounting.js Github repository">accounting.js Github repository</a> for the full package.</li>
+		</ul>
+	</section>
+
+	<section id="links">
+
+		<h2>Links</h2>
+		<p>accounting.js is maintained by <strong><a href="https://openexchangerates.org" title="Open Exchange Rates free currency data API" target="_blank">Open Exchange Rates</a></strong> - the lightweight currency data API for startups, SMEs and Fortune 500s.</p>
+		<p>Feedback, support or questions? <strong><a href="mailto:info@openexchangerates.org" title="Contact Open Exchange Rates">Contact Open Exchange Rates</a></strong> for guidance.</p>
+		<p>Bugs, issues, suggestions or contributions? Please <strong><a href="https://github.com/openexchangerates/accounting.js" title="accounting.js Github repository">post them here</a></strong>.</p>
+		<p>accounting.js works great with <strong><a href="http://openexchangerates.github.com/money.js" title="money.js - JavaScript currency conversion library">money.js</a></strong> - the tiny (1kb) standalone JavaScript currency conversion library, for web & nodeJS</p>
+
+		<br />
+		<hr />
+		<p><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="josscrowcroft" data-url="http://openexchangerates.github.io/accounting.js" data-text="accounting.js - JavaScript library for money/currency formatting">Tweet</a> &nbsp; <g:plusone size="medium"></g:plusone></p>
+	</section>
+
+
+	<script src="accounting.min.js"></script>
+	<script src="demo-resources/js/libs/jquery.min.js"></script>
+	<script src="demo-resources/js/prettify.js"></script>
+
+	<script type="text/javascript">
+
+		// demo functions:
+		jQuery(document).ready(function($) {
+			var numbers = [123.5, 3456.615, 777888.99, -5432, -1234567, 0];
+
+			// Use accounting.js to format the list of numbers several ways:
+			var formatted = accounting.formatColumn(numbers, "$ "),
+			    different = accounting.formatColumn(numbers, {
+			    	symbol:"HK$",
+			    	precision:0,
+			    	format: {
+			    		pos : "%s %v",
+			    		neg : "%s (%v)",
+			    		zero : "%s --"
+			    	}
+			    }),
+			    european  = accounting.formatColumn(numbers, {
+			    	symbol: '&euro; ',
+			    	thousand:'.',
+			    	decimal:','
+			    }),
+			    symbolAfter = accounting.formatColumn(numbers, {
+			    	symbol : "GBP",
+			    	format : "%v %s"
+			    });
+
+			// Concat some nasty demo HTML:
+			for ( var i = 0; i < numbers.length; i++ ) {
+				$('<tr><td>'+numbers[i]+'</td><td>'+formatted[i]+'</td><td>'+different[i]+'</td><td>'+european[i]+'</td><td>'+symbolAfter[i]+'</td></tr>').appendTo('table#demo-table tbody');
+			}
+
+
+			// Try it yourself clicky demo:
+			var $demoValue = $('#demo-number-value'),
+			    $demoSymbol = $('#demo-number-symbol'),
+			    $demoResult = $('#demo-number-result');
+
+			$demoValue.add($demoSymbol).bind('keydown keyup keypress focus blur paste change', function() {
+			 	var symbol = $demoSymbol.find(':selected').val(),
+			 	    result = accounting.formatMoney(
+			 	    	$demoValue.val(),
+			 	    	symbol,
+			 	    	2,
+			 	    	($demoSymbol.find(':selected').data('locale') === 'european') ? "." : ",",
+			 	    	($demoSymbol.find(':selected').data('locale') === 'european') ? "," : "."
+			 	    );
+				$demoResult.text(result);
+			});
+
+
+			// Try it yourself clicky column formatting demo:
+			var $columnValues = $('#demo-column').find('input'),
+			    $columnOutputs = $('#demo-column').find('.output'),
+			    $columnOutputs2 = $('#demo-column').find('.output2');
+
+			$columnValues.bind('keydown keyup keypress focus blur paste', function() {
+			 	var list = $.map( $columnValues, function(each) { return $(each).val(); } ),
+			 		formatted = accounting.formatColumn(list, {
+			 			format : "%s %v"
+			 		}),
+			 		formatted2 = accounting.formatColumn(list, {
+			 			symbol : "GBP",
+			 			precision : 0,
+			 			format : {
+			 				pos : "%s %v",
+			 				neg : "%s (%v)",
+			 				zero: "%s --"
+			 			}
+			 		});
+
+			 	$.each($columnOutputs, function(i, each) {
+			 		$(each).text(formatted[i]);
+			 	});
+			 	$.each($columnOutputs2, function(i, each) {
+			 		$(each).text(formatted2[i]);
+			 	});
+			});
+
+		});
+
+		// prettify:
+		prettyPrint();
+
+		// twitter:
+		(function(d, t) {
+			var g = d.createElement(t),
+				s = d.getElementsByTagName(t)[0];
+			g.async = true;
+			g.src = 'http://platform.twitter.com/widgets.js';
+			s.parentNode.insertBefore(g, s);
+		})(document, 'script');
+
+		// google plus:
+		window.___gcfg = {lang: 'en-GB'};
+		(function() {
+			var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+			po.src = 'https://apis.google.com/js/plusone.js';
+			var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
+		})();
+	</script>
+</body>
+</html>

+ 22 - 0
node_modules/accounting/license

@@ -0,0 +1,22 @@
+Copyright (c) 2014 Open Exchange Rates
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.

+ 67 - 0
node_modules/accounting/package.json

@@ -0,0 +1,67 @@
+{
+  "_from": "accounting@^0.4.1",
+  "_id": "accounting@0.4.1",
+  "_inBundle": false,
+  "_integrity": "sha1-h91BA+/39EYPHhhvXGd+1s9WaIM=",
+  "_location": "/accounting",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "accounting@^0.4.1",
+    "name": "accounting",
+    "escapedName": "accounting",
+    "rawSpec": "^0.4.1",
+    "saveSpec": null,
+    "fetchSpec": "^0.4.1"
+  },
+  "_requiredBy": [
+    "/vue-h5-plus"
+  ],
+  "_resolved": "https://registry.npmjs.org/accounting/-/accounting-0.4.1.tgz",
+  "_shasum": "87dd4103eff7f4460f1e186f5c677ed6cf566883",
+  "_spec": "accounting@^0.4.1",
+  "_where": "/Users/bssm/Desktop/fabTest/html2canvas-renderjs示例/node_modules/vue-h5-plus",
+  "author": {
+    "name": "Open Exchange Rates",
+    "email": "info@openexchangerates.org",
+    "url": "https://www.openexchangerates.org"
+  },
+  "bugs": {
+    "url": "https://github.com/openexchangerates/accounting.js/issues"
+  },
+  "bundleDependencies": false,
+  "contributors": [
+    {
+      "name": "Open Exchange Rates",
+      "email": "info@openxchangerates.org",
+      "url": "https://openexchangerates.org"
+    },
+    {
+      "name": "Joss Crowcroft",
+      "email": "josscrowcroft@gmail.com",
+      "url": "http://www.josscrowcroft.com"
+    }
+  ],
+  "dependencies": {},
+  "deprecated": false,
+  "description": "number, money and currency formatting library",
+  "homepage": "http://openexchangerates.github.io/accounting.js",
+  "keywords": [
+    "accounting",
+    "number",
+    "money",
+    "currency",
+    "format",
+    "utilities",
+    "finance",
+    "exchange"
+  ],
+  "main": "accounting.js",
+  "name": "accounting",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/openexchangerates/accounting.js.git"
+  },
+  "version": "0.4.1"
+}

+ 60 - 0
node_modules/accounting/readme.md

@@ -0,0 +1,60 @@
+**accounting.js** is a tiny JavaScript library for number, money and currency parsing/formatting. It's lightweight, fully localisable, has no dependencies, and works great client-side or server-side. Use standalone or as a nodeJS/npm and AMD/requireJS module.
+
+Visit the plugin homepage for demos and documentation: **http://openexchangerates.github.io/accounting.js/**
+
+Please checkout or download the latest stable tag before using in production. [Bug reports](https://github.com/openexchangerates/accounting.js/issues) and pull requests are welcome.
+
+Maintained by [Open Exchange Rates](https://openexchangerates.org "Free reliable exchange rates/currency conversion data API") and originally by [@josscrowcroft](http://twitter.com/josscrowcroft) and other [contributors](https://github.com/openexchangerates/accounting.js/contributors).
+
+---
+
+### Works great with:
+
+* **[money.js](http://openexchangerates.github.com/money.js "JavaScript and NodeJS Currency Conversion Library")** - a tiny (1kb) standalone JavaScript currency conversion library, for web & nodeJS
+* **[Open Exchange Rates](https://openexchangerates.org "realtime and historical exchange rates/currency conversion data API")** - the free currency conversion data API
+
+---
+
+## Changelog
+
+**v0.4.1** - Alias `accounting.formatNumber()` as `accounting.format()`
+
+**v0.4** - Transferred repository to Open Exchange Rates for ongoing maintenance
+
+**v0.3.2** - Fixed package.json dependencies (should be empty object)
+
+**v0.3.0**
+* Rewrote library structure similar to underscore.js for use as a nodeJS/npm and AMD module. Use `npm install accounting` and then `var accounting = require("accounting");` in your nodeJS scripts. 
+* Also works with requireJS or any AMD module loader.
+* **unformat** now only attempts to parse the number if it's not already a valid number. 
+* `acounting.unformat` now also aliased as `acounting.parse`
+* Fixed an IE bug in the `defaults` method
+
+**v0.2.2** - Fixed same issue as \#Num: #24 in **formatNumber**; switch to Google Closure Compiler for minified version.
+
+**v0.2.1** - Fixed issue \#Num: #24 (locally-defined settings object was being modified by **formatMoney**)
+
+**v0.2**
+* Rewrote formatting system for **formatMoney** and **formatColumn** for better control of string output
+* Now supports separate formats for negative and zero values (optionally) via `accounting.settings.currency.format`
+* Internal improvements and helper methods
+
+**v0.1.4**
+* **formatMoney** recursively formats arrays
+* Added Jasmine test suite (thanks to [millermedeiros](https://github.com/millermedeiros)) and QUnit functionality/speed tests
+
+**v0.1.3**
+* Added configurable settings object for default formatting parameters.
+* Added `format` parameter to control symbol and value position (default `"%s%v"`, or [symbol][value])
+* Methods consistently accept object as 2nd parameter, matching/overriding the library defaults
+
+**v0.1.2**
+* **formatColumn** works recursively on nested arrays (e.g. `accounting.formatColumn( [[1,12,123,1234], [1234,123,12,1]] )`, returns matching array with inner columns lined up)
+* Fix rounding in **formatNumber**
+
+**v0.1.1**
+* Added **toFixed** method (`accounting.toFixed(value, precision)`), which treats floats more like decimals for more accurate currency rounding
+* Minified version preserves semicolons
+* Fixed `NaN` errors when no value in **unformat**
+
+**v0.1** - First version

+ 23 - 0
node_modules/accounting/tests/jasmine/core/formatMoneySpec.js

@@ -0,0 +1,23 @@
+describe('formatMoney()', function(){
+    
+    it('should work for small numbers', function(){
+    
+        expect( accounting.formatMoney(123) ).toBe( '$123.00' );
+        expect( accounting.formatMoney(123.45) ).toBe( '$123.45' );
+        expect( accounting.formatMoney(12345.67) ).toBe( '$12,345.67' );
+    
+    });
+
+    it('should work for negative numbers', function(){
+    
+        expect( accounting.formatMoney(-123) ).toBe( '$-123.00' );
+        expect( accounting.formatMoney(-123.45) ).toBe( '$-123.45' );
+        expect( accounting.formatMoney(-12345.67) ).toBe( '$-12,345.67' );
+    
+    });
+
+    it('should allow precision to be `0` and not override with default `2`', function(){
+        expect( accounting.formatMoney(5318008, "$", 0) ).toBe( '$5,318,008' );
+    });
+
+});

+ 132 - 0
node_modules/accounting/tests/jasmine/core/formatNumberSpec.js

@@ -0,0 +1,132 @@
+describe('formatNumber', function(){
+
+    describe('rounding and enforce precision', function(){
+
+        it('should enforce precision and round values', function(){
+        
+            expect( accounting.formatNumber(123.456789, 0) ).toBe( '123' );
+            expect( accounting.formatNumber(123.456789, 1) ).toBe( '123.5' );
+            expect( accounting.formatNumber(123.456789, 2) ).toBe( '123.46' );
+            expect( accounting.formatNumber(123.456789, 3) ).toBe( '123.457' );
+            expect( accounting.formatNumber(123.456789, 4) ).toBe( '123.4568' );
+            expect( accounting.formatNumber(123.456789, 5) ).toBe( '123.45679' );
+
+        });
+
+        it('should fix floting point rounding error', function(){
+
+            expect( accounting.formatNumber(0.615, 2) ).toBe( '0.62' );
+            expect( accounting.formatNumber(0.614, 2) ).toBe( '0.61' );
+
+        });
+
+        it('should work for large numbers', function(){
+            
+            expect( accounting.formatNumber(123456.54321, 0) ).toBe( '123,457' );
+            expect( accounting.formatNumber(123456.54321, 1) ).toBe( '123,456.5' );
+            expect( accounting.formatNumber(123456.54321, 2) ).toBe( '123,456.54' );
+            expect( accounting.formatNumber(123456.54321, 3) ).toBe( '123,456.543' );
+            expect( accounting.formatNumber(123456.54321, 4) ).toBe( '123,456.5432' );
+            expect( accounting.formatNumber(123456.54321, 5) ).toBe( '123,456.54321' );
+
+            expect( accounting.formatNumber(98765432.12, 0) ).toBe( '98,765,432' );
+            expect( accounting.formatNumber(98765432.12, 1) ).toBe( '98,765,432.1' );
+            expect( accounting.formatNumber(98765432.12, 2) ).toBe( '98,765,432.12' );
+            expect( accounting.formatNumber(98765432.12, 3) ).toBe( '98,765,432.120' );
+            expect( accounting.formatNumber(98765432.12, 4) ).toBe( '98,765,432.1200' );
+
+        });
+
+        it('should work for negative numbers', function(){
+            
+            expect( accounting.formatNumber(-123456.54321, 0) ).toBe( '-123,457' );
+            expect( accounting.formatNumber(-123456.54321, 1) ).toBe( '-123,456.5' );
+            expect( accounting.formatNumber(-123456.54321, 2) ).toBe( '-123,456.54' );
+            expect( accounting.formatNumber(-123456.54321, 3) ).toBe( '-123,456.543' );
+            expect( accounting.formatNumber(-123456.54321, 4) ).toBe( '-123,456.5432' );
+            expect( accounting.formatNumber(-123456.54321, 5) ).toBe( '-123,456.54321' );
+
+            expect( accounting.formatNumber(-98765432.12, 0) ).toBe( '-98,765,432' );
+            expect( accounting.formatNumber(-98765432.12, 1) ).toBe( '-98,765,432.1' );
+            expect( accounting.formatNumber(-98765432.12, 2) ).toBe( '-98,765,432.12' );
+            expect( accounting.formatNumber(-98765432.12, 3) ).toBe( '-98,765,432.120' );
+            expect( accounting.formatNumber(-98765432.12, 4) ).toBe( '-98,765,432.1200' );
+
+        });
+
+    });
+
+
+    describe('separators', function(){
+
+        it('should allow setting thousands separator', function(){
+            expect( accounting.formatNumber(98765432.12, 0, '|') ).toBe( '98|765|432' );
+            expect( accounting.formatNumber(98765432.12, 1, '>') ).toBe( '98>765>432.1' );
+            expect( accounting.formatNumber(98765432.12, 2, '*') ).toBe( '98*765*432.12' );
+            expect( accounting.formatNumber(98765432.12, 3, '\'') ).toBe( '98\'765\'432.120' );
+            expect( accounting.formatNumber(98765432.12, 4, ']') ).toBe( '98]765]432.1200' );
+        });
+
+
+        it('should allow setting decimal separator', function(){
+            expect( accounting.formatNumber(98765432.12, 0, null, '|') ).toBe( '98,765,432' );
+            expect( accounting.formatNumber(98765432.12, 1, null, '>') ).toBe( '98,765,432>1' );
+            expect( accounting.formatNumber(98765432.12, 2, null, '*') ).toBe( '98,765,432*12' );
+            expect( accounting.formatNumber(98765432.12, 3, null, '\'') ).toBe( '98,765,432\'120' );
+            expect( accounting.formatNumber(98765432.12, 4, null, ']') ).toBe( '98,765,432]1200' );
+        });
+
+        it('should allow setting thousand and decimal separators', function(){
+            expect( accounting.formatNumber(98765432.12, 0, '\\', '|') ).toBe( '98\\765\\432' );
+            expect( accounting.formatNumber(98765432.12, 1, '<', '>') ).toBe( '98<765<432>1' );
+            expect( accounting.formatNumber(98765432.12, 2, '&', '*') ).toBe( '98&765&432*12' );
+            expect( accounting.formatNumber(98765432.12, 3, '"', '\'') ).toBe( '98"765"432\'120' );
+            expect( accounting.formatNumber(98765432.12, 4, '[', ']') ).toBe( '98[765[432]1200' );
+        });
+
+        it('should use default separators if null', function(){
+            expect( accounting.formatNumber(12345.12345, 2, null, null) ).toBe('12,345.12');
+        });
+
+        it('should use empty separators if passed as empty string', function(){
+            expect( accounting.formatNumber(12345.12345, 2, '', '') ).toBe('1234512');
+        });
+
+    });
+
+
+    describe('multiple numbers (array)', function(){
+    
+        it('should handle an array of numbers', function(){
+
+            var vals = accounting.formatNumber([123, 456.78, 1234.123], 2);
+
+            expect( vals[0] ).toBe( '123.00' );
+            expect( vals[1] ).toBe( '456.78' );
+            expect( vals[2] ).toBe( '1,234.12' );
+        });
+
+    });
+
+    describe('properties object', function(){
+    
+        it('should accept a properties object', function(){
+
+            var val = accounting.formatNumber(123456789.1234, {
+                thousand : '.',
+                decimal : ',',
+                precision : 3
+            });
+
+            expect( val ).toBe( '123.456.789,123' );
+        });
+
+        it('properties should be optional', function(){
+            var val = accounting.formatNumber(123456789.1234, {});
+            expect( val ).toBe( '123,456,789' );
+        });
+
+    });
+
+
+});

+ 31 - 0
node_modules/accounting/tests/jasmine/core/unformatSpec.js

@@ -0,0 +1,31 @@
+describe('unformat()', function(){
+
+    it('should remove padding special chars', function(){
+        expect( accounting.unformat('$ 123,456') ).toBe( 123456 );
+        expect( accounting.unformat('$ 123,456.78') ).toBe( 123456.78 );
+        expect( accounting.unformat('&*()$ 123,456') ).toBe( 123456 );
+        expect( accounting.unformat(';$@#$%^&123,456.78') ).toBe( 123456.78 );
+    });
+
+    it('should work with negative numbers', function(){
+        expect( accounting.unformat('$ -123,456') ).toBe( -123456 );
+        expect( accounting.unformat('$ -123,456.78') ).toBe( -123456.78 );
+        expect( accounting.unformat('&*()$ -123,456') ).toBe( -123456 );
+        expect( accounting.unformat(';$@#$%^&-123,456.78') ).toBe( -123456.78 );
+    });
+    
+    it('should accept different decimal separators', function(){    
+        expect( accounting.unformat('$ 123,456', ',') ).toBe( 123.456 );
+        expect( accounting.unformat('$ 123456|78', '|') ).toBe( 123456.78 );
+        expect( accounting.unformat('&*()$ 123>456', '>') ).toBe( 123.456 );
+        expect( accounting.unformat(';$@#$%^&123,456\'78', '\'') ).toBe( 123456.78 );
+    });
+
+    it('should accept an array', function(){
+        var vals = accounting.unformat(['$ 123', '$567.89', 'R$12,345,678.901']);
+        expect( vals[0] ).toBe( 123 );
+        expect( vals[1] ).toBe( 567.89 );
+        expect( vals[2] ).toBe( 12345678.901 );
+    });
+
+});

+ 20 - 0
node_modules/accounting/tests/jasmine/lib/jasmine/MIT.LICENSE

@@ -0,0 +1,20 @@
+Copyright (c) 2008-2010 Pivotal Labs
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 188 - 0
node_modules/accounting/tests/jasmine/lib/jasmine/jasmine-html.js

@@ -0,0 +1,188 @@
+jasmine.TrivialReporter = function(doc) {
+  this.document = doc || document;
+  this.suiteDivs = {};
+  this.logRunningSpecs = false;
+};
+
+jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) {
+  var el = document.createElement(type);
+
+  for (var i = 2; i < arguments.length; i++) {
+    var child = arguments[i];
+
+    if (typeof child === 'string') {
+      el.appendChild(document.createTextNode(child));
+    } else {
+      if (child) { el.appendChild(child); }
+    }
+  }
+
+  for (var attr in attrs) {
+    if (attr == "className") {
+      el[attr] = attrs[attr];
+    } else {
+      el.setAttribute(attr, attrs[attr]);
+    }
+  }
+
+  return el;
+};
+
+jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
+  var showPassed, showSkipped;
+
+  this.outerDiv = this.createDom('div', { className: 'jasmine_reporter' },
+      this.createDom('div', { className: 'banner' },
+        this.createDom('div', { className: 'logo' },
+            this.createDom('a', { href: 'http://pivotal.github.com/jasmine/', target: "_blank" }, "Jasmine"),
+            this.createDom('span', { className: 'version' }, runner.env.versionString())),
+        this.createDom('div', { className: 'options' },
+            "Show ",
+            showPassed = this.createDom('input', { id: "__jasmine_TrivialReporter_showPassed__", type: 'checkbox' }),
+            this.createDom('label', { "for": "__jasmine_TrivialReporter_showPassed__" }, " passed "),
+            showSkipped = this.createDom('input', { id: "__jasmine_TrivialReporter_showSkipped__", type: 'checkbox' }),
+            this.createDom('label', { "for": "__jasmine_TrivialReporter_showSkipped__" }, " skipped")
+            )
+          ),
+
+      this.runnerDiv = this.createDom('div', { className: 'runner running' },
+          this.createDom('a', { className: 'run_spec', href: '?' }, "run all"),
+          this.runnerMessageSpan = this.createDom('span', {}, "Running..."),
+          this.finishedAtSpan = this.createDom('span', { className: 'finished-at' }, ""))
+      );
+
+  this.document.body.appendChild(this.outerDiv);
+
+  var suites = runner.suites();
+  for (var i = 0; i < suites.length; i++) {
+    var suite = suites[i];
+    var suiteDiv = this.createDom('div', { className: 'suite' },
+        this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, "run"),
+        this.createDom('a', { className: 'description', href: '?spec=' + encodeURIComponent(suite.getFullName()) }, suite.description));
+    this.suiteDivs[suite.id] = suiteDiv;
+    var parentDiv = this.outerDiv;
+    if (suite.parentSuite) {
+      parentDiv = this.suiteDivs[suite.parentSuite.id];
+    }
+    parentDiv.appendChild(suiteDiv);
+  }
+
+  this.startedAt = new Date();
+
+  var self = this;
+  showPassed.onclick = function(evt) {
+    if (showPassed.checked) {
+      self.outerDiv.className += ' show-passed';
+    } else {
+      self.outerDiv.className = self.outerDiv.className.replace(/ show-passed/, '');
+    }
+  };
+
+  showSkipped.onclick = function(evt) {
+    if (showSkipped.checked) {
+      self.outerDiv.className += ' show-skipped';
+    } else {
+      self.outerDiv.className = self.outerDiv.className.replace(/ show-skipped/, '');
+    }
+  };
+};
+
+jasmine.TrivialReporter.prototype.reportRunnerResults = function(runner) {
+  var results = runner.results();
+  var className = (results.failedCount > 0) ? "runner failed" : "runner passed";
+  this.runnerDiv.setAttribute("class", className);
+  //do it twice for IE
+  this.runnerDiv.setAttribute("className", className);
+  var specs = runner.specs();
+  var specCount = 0;
+  for (var i = 0; i < specs.length; i++) {
+    if (this.specFilter(specs[i])) {
+      specCount++;
+    }
+  }
+  var message = "" + specCount + " spec" + (specCount == 1 ? "" : "s" ) + ", " + results.failedCount + " failure" + ((results.failedCount == 1) ? "" : "s");
+  message += " in " + ((new Date().getTime() - this.startedAt.getTime()) / 1000) + "s";
+  this.runnerMessageSpan.replaceChild(this.createDom('a', { className: 'description', href: '?'}, message), this.runnerMessageSpan.firstChild);
+
+  this.finishedAtSpan.appendChild(document.createTextNode("Finished at " + new Date().toString()));
+};
+
+jasmine.TrivialReporter.prototype.reportSuiteResults = function(suite) {
+  var results = suite.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.totalCount == 0) { // todo: change this to check results.skipped
+    status = 'skipped';
+  }
+  this.suiteDivs[suite.id].className += " " + status;
+};
+
+jasmine.TrivialReporter.prototype.reportSpecStarting = function(spec) {
+  if (this.logRunningSpecs) {
+    this.log('>> Jasmine Running ' + spec.suite.description + ' ' + spec.description + '...');
+  }
+};
+
+jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) {
+  var results = spec.results();
+  var status = results.passed() ? 'passed' : 'failed';
+  if (results.skipped) {
+    status = 'skipped';
+  }
+  var specDiv = this.createDom('div', { className: 'spec '  + status },
+      this.createDom('a', { className: 'run_spec', href: '?spec=' + encodeURIComponent(spec.getFullName()) }, "run"),
+      this.createDom('a', {
+        className: 'description',
+        href: '?spec=' + encodeURIComponent(spec.getFullName()),
+        title: spec.getFullName()
+      }, spec.description));
+
+
+  var resultItems = results.getItems();
+  var messagesDiv = this.createDom('div', { className: 'messages' });
+  for (var i = 0; i < resultItems.length; i++) {
+    var result = resultItems[i];
+
+    if (result.type == 'log') {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage log'}, result.toString()));
+    } else if (result.type == 'expect' && result.passed && !result.passed()) {
+      messagesDiv.appendChild(this.createDom('div', {className: 'resultMessage fail'}, result.message));
+
+      if (result.trace.stack) {
+        messagesDiv.appendChild(this.createDom('div', {className: 'stackTrace'}, result.trace.stack));
+      }
+    }
+  }
+
+  if (messagesDiv.childNodes.length > 0) {
+    specDiv.appendChild(messagesDiv);
+  }
+
+  this.suiteDivs[spec.suite.id].appendChild(specDiv);
+};
+
+jasmine.TrivialReporter.prototype.log = function() {
+  var console = jasmine.getGlobal().console;
+  if (console && console.log) {
+    if (console.log.apply) {
+      console.log.apply(console, arguments);
+    } else {
+      console.log(arguments); // ie fix: console.log.apply doesn't exist on ie
+    }
+  }
+};
+
+jasmine.TrivialReporter.prototype.getLocation = function() {
+  return this.document.location;
+};
+
+jasmine.TrivialReporter.prototype.specFilter = function(spec) {
+  var paramMap = {};
+  var params = this.getLocation().search.substring(1).split('&');
+  for (var i = 0; i < params.length; i++) {
+    var p = params[i].split('=');
+    paramMap[decodeURIComponent(p[0])] = decodeURIComponent(p[1]);
+  }
+
+  if (!paramMap["spec"]) return true;
+  return spec.getFullName().indexOf(paramMap["spec"]) == 0;
+};

+ 166 - 0
node_modules/accounting/tests/jasmine/lib/jasmine/jasmine.css

@@ -0,0 +1,166 @@
+body {
+  font-family: "Helvetica Neue Light", "Lucida Grande", "Calibri", "Arial", sans-serif;
+}
+
+
+.jasmine_reporter a:visited, .jasmine_reporter a {
+  color: #303; 
+}
+
+.jasmine_reporter a:hover, .jasmine_reporter a:active {
+  color: blue; 
+}
+
+.run_spec {
+  float:right;
+  padding-right: 5px;
+  font-size: .8em;
+  text-decoration: none;
+}
+
+.jasmine_reporter {
+  margin: 0 5px;
+}
+
+.banner {
+  color: #303;
+  background-color: #fef;
+  padding: 5px;
+}
+
+.logo {
+  float: left;
+  font-size: 1.1em;
+  padding-left: 5px;
+}
+
+.logo .version {
+  font-size: .6em;
+  padding-left: 1em;
+}
+
+.runner.running {
+  background-color: yellow;
+}
+
+
+.options {
+  text-align: right;
+  font-size: .8em;
+}
+
+
+
+
+.suite {
+  border: 1px outset gray;
+  margin: 5px 0;
+  padding-left: 1em;
+}
+
+.suite .suite {
+  margin: 5px; 
+}
+
+.suite.passed {
+  background-color: #dfd;
+}
+
+.suite.failed {
+  background-color: #fdd;
+}
+
+.spec {
+  margin: 5px;
+  padding-left: 1em;
+  clear: both;
+}
+
+.spec.failed, .spec.passed, .spec.skipped {
+  padding-bottom: 5px;
+  border: 1px solid gray;
+}
+
+.spec.failed {
+  background-color: #fbb;
+  border-color: red;
+}
+
+.spec.passed {
+  background-color: #bfb;
+  border-color: green;
+}
+
+.spec.skipped {
+  background-color: #bbb;
+}
+
+.messages {
+  border-left: 1px dashed gray;
+  padding-left: 1em;
+  padding-right: 1em;
+}
+
+.passed {
+  background-color: #cfc;
+  display: none;
+}
+
+.failed {
+  background-color: #fbb;
+}
+
+.skipped {
+  color: #777;
+  background-color: #eee;
+  display: none;
+}
+
+
+/*.resultMessage {*/
+  /*white-space: pre;*/
+/*}*/
+
+.resultMessage span.result {
+  display: block;
+  line-height: 2em;
+  color: black;
+}
+
+.resultMessage .mismatch {
+  color: black;
+}
+
+.stackTrace {
+  white-space: pre;
+  font-size: .8em;
+  margin-left: 10px;
+  max-height: 5em;
+  overflow: auto;
+  border: 1px inset red;
+  padding: 1em;
+  background: #eef;
+}
+
+.finished-at {
+  padding-left: 1em;
+  font-size: .6em;
+}
+
+.show-passed .passed,
+.show-skipped .skipped {
+  display: block;
+}
+
+
+#jasmine_content {
+  position:fixed;
+  right: 100%;
+}
+
+.runner {
+  border: 1px solid gray;
+  display: block;
+  margin: 5px 0;
+  padding: 2px 0 2px 10px;
+}

File diff suppressed because it is too large
+ 2421 - 0
node_modules/accounting/tests/jasmine/lib/jasmine/jasmine.js


+ 22 - 0
node_modules/accounting/tests/jasmine/runner.html

@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>Jasmine Test Runner</title>
+        <link rel="stylesheet" href="lib/jasmine/jasmine.css">
+        <script src="lib/jasmine/jasmine.js"></script>
+        <script src="lib/jasmine/jasmine-html.js"></script>
+
+		<script src="../../accounting.js"></script>
+
+        <script src="core/formatNumberSpec.js"></script>
+        <script src="core/unformatSpec.js"></script>
+        <script src="core/formatMoneySpec.js"></script>
+    </head>
+    <body>
+        <script>
+            //run specs and add reporter
+            jasmine.getEnv().addReporter(new jasmine.TrivialReporter());
+            jasmine.getEnv().execute();
+        </script>
+    </body>
+</html>

+ 97 - 0
node_modules/accounting/tests/qunit/methods.js

@@ -0,0 +1,97 @@
+$(document).ready(function() {
+
+	module("Library Methods");
+
+	test("accounting.unformat()", function() {
+		equals(accounting.unformat("$12,345,678.90 USD"), 12345678.9, 'Can unformat currency to float');
+		equals(accounting.unformat(1234567890), 1234567890, 'Returns same value when passed an integer');
+		equals(accounting.unformat("string"), 0, 'Returns 0 for a string with no numbers');
+		equals(accounting.unformat({joss:1}), 0, 'Returns 0 for object');
+
+		accounting.settings.number.decimal = ',';
+		equals(accounting.unformat("100,00"), 100, 'Uses decimal separator from settings');
+		equals(accounting.unformat("¤1.000,00"), 1000, 'Uses decimal separator from settings');
+		accounting.settings.number.decimal = '.';
+	});
+
+	test("accounting.toFixed()", function() {
+		equals(accounting.toFixed(54321, 5), "54321.00000", 'Performs basic float zero-padding');
+		equals(accounting.toFixed(0.615, 2), "0.62", 'Rounds 0.615 to "0.62" instead of "0.61"');
+	});
+
+	test("accounting.formatNumber()", function() {
+		// Check custom precision and separators:
+		equals(accounting.formatNumber(4999.99, 2, ".", ","), "4.999,99", 'Custom precision and decimal/thousand separators are a-ok')
+		
+		// check usage with options object parameter:
+		equal(accounting.formatNumber(5318008, {
+			precision : 3,
+			thousand : "__",
+			decimal : "--"
+		}), "5__318__008--000", 'Correctly handles custom precision and separators passed in via second param options object');
+
+		
+		// check rounding:
+		equals(accounting.formatNumber(0.615, 2), "0.62", 'Rounds 0.615 up to "0.62" with precision of 2');
+		
+		// manually and recursively formatted arrays should have same values:
+		var numbers = [8008135, [1234, 5678], 1000];
+		var formattedManually = [accounting.formatNumber(8008135), [accounting.formatNumber(1234), accounting.formatNumber(5678)], accounting.formatNumber(1000)];
+		var formattedRecursively = accounting.formatNumber(numbers);
+		equals(formattedRecursively.toString(), formattedManually.toString(), 'can recursively format multi-dimensional arrays');
+	});
+
+
+	test("accounting.formatMoney()", function() {
+		equals(accounting.formatMoney(12345678), "$12,345,678.00", "Default usage with default parameters is ok");
+		equals(accounting.formatMoney(4999.99, "$ ", 2, ".", ","), "$ 4.999,99", 'custom formatting via straight params works ok');
+		equals(accounting.formatMoney(-500000, "£ ", 0), "£ -500,000", 'negative values, custom params, works ok');
+		equals(accounting.formatMoney(5318008, { symbol: "GBP",  format: "%v %s" }), "5,318,008.00 GBP", "`format` parameter is observed in string output");
+		equals(accounting.formatMoney(1000, { format: "test %v 123 %s test" }), "test 1,000.00 123 $ test", "`format` parameter is observed in string output, despite being rather strange");
+		
+		// Format param is an object:
+		var format = {
+			pos: "%s %v",
+			neg: "%s (%v)",
+			zero:"%s  --"
+		}
+		equals(accounting.formatMoney(0, { symbol: "GBP",  format:format}), "GBP  --", "`format` parameter provided given as an object with `zero` format, correctly observed in string output");
+		equals(accounting.formatMoney(-1000, { symbol: "GBP",  format:format}), "GBP (1,000.00)", "`format` parameter provided given as an object with `neg` format, correctly observed in string output");
+		equals(accounting.formatMoney(1000, { symbol: "GBP",  format:{neg:"--%v %s"}}), "GBP1,000.00", "`format` parameter provided, but only `neg` value provided - positive value should be formatted by default format (%s%v)");
+		
+		accounting.settings.currency.format = "%s%v";
+		accounting.formatMoney(0, {format:""});
+		equals(typeof accounting.settings.currency.format, "object", "`settings.currency.format` default string value should be reformatted to an object, the first time it is used");
+	});
+
+
+	test("accounting.formatColumn()", function() {
+		// standard usage:
+		var list = [123, 12345];
+		equals(accounting.formatColumn(list, "$ ", 0).toString(), (["$    123", "$ 12,345"]).toString(), "formatColumn works as expected");
+
+
+		// multi-dimensional array (formatColumn should be applied recursively):
+		var list = [[1, 100], [900, 9]];
+		equals(accounting.formatColumn(list).toString(), ([["$  1.00", "$100.00"], ["$900.00", "$  9.00"]]).toString(), "formatcolumn works on multi-dimensional array");
+
+
+		// random numbers, must come back same length:
+		var column = accounting.formatColumn([Math.random(), Math.random() * 1000, Math.random() * 10000000]);
+		ok((column[0].length === column[2].length && column[1].length === column[2].length), "formatColumn() with 3 random numbers returned strings of matching length");
+
+
+		// random numbers, must come back same length:
+		var column = accounting.formatColumn([Math.random(), Math.random() * 1000, Math.random() * 10000000], {
+			format: '(%v] --++== %s',
+			thousand: ')(',
+			decimal: ')[',
+			precision: 3
+		});
+		ok((column[0].length === column[2].length && column[1].length === column[2].length), "formatColumn() with 3 random numbers returned strings of matching length, even with a weird custom `format` parameter");
+
+
+
+	});
+	
+});

+ 76 - 0
node_modules/accounting/tests/qunit/speed.js

@@ -0,0 +1,76 @@
+(function() {
+
+	var numbers = [];
+	for (var i=0; i<1000; i++) numbers.push((Math.random() * (1000*i)));
+	var strings = $.map(numbers, function(num){ return accounting.formatMoney(num*1000, "HK$ "); });
+
+	JSLitmus.test('unformat()', function(count) {
+		var i = 0;
+		while ( count-- ) {
+			accounting.unformat(strings[i])
+			i++;
+			i > strings.length && (i = 0);
+		}
+	});
+
+	JSLitmus.test('unformat(array)', function(count) {
+		var i = 0;
+		while ( count-- ) {
+			accounting.unformat([strings[i], strings[i+1]]);
+			i += 2;
+			i > numbers.length && (i = 0);
+        }
+	});
+
+	JSLitmus.test('toFixed()', function(count) {
+		while ( count-- ) {
+			accounting.toFixed(count*1000, 2);
+		}
+	});
+
+	JSLitmus.test('formatNumber()', function(count) {
+		var i = 0;
+		while ( count-- ) {
+			accounting.formatNumber(numbers[i]);
+			i++;
+			i > numbers.length && (i = 0);
+		}
+	});
+
+	JSLitmus.test('formatNumber(array)', function(count) {
+		var i = 0;
+		while ( count-- ) {
+            accounting.formatNumber([numbers[i], numbers[i+1]]);
+			i += 2;
+			i > numbers.length && (i = 0);
+        }
+	});
+
+	JSLitmus.test('formatMoney()', function(count) {
+		var i = 0;
+		while ( count-- ) {
+			accounting.formatMoney(numbers[i]);
+			i++;
+			i > numbers.length && (i = 0);
+		}
+	});
+
+	JSLitmus.test('formatMoney(array)', function(count) {
+		var i = 0;
+		while ( count-- ) {
+			accounting.formatMoney([numbers[i], numbers[i+1]]);
+			i += 2;
+			i > numbers.length && (i = 0);
+        }
+	});
+
+	JSLitmus.test('formatColumn()', function(count) {
+		var i = 0;
+		while ( count-- ) {
+			accounting.formatColumn([numbers[i], numbers[i+1]]);
+			i += 2;
+			i > numbers.length && (i = 0);
+		}
+	});
+
+})();

+ 32 - 0
node_modules/accounting/tests/qunit/test.html

@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+<head>
+	<title>accounting.js test suite</title>
+	<link rel="stylesheet" href="vendor/qunit.css" type="text/css" media="screen" />
+	<script type="text/javascript" src="vendor/jquery.js"></script>
+	<script type="text/javascript" src="vendor/qunit.js"></script>
+	<script type="text/javascript" src="vendor/jslitmus.js"></script>
+	<script type="text/javascript" src="../../accounting.js"></script>
+	
+	<script type="text/javascript" src="methods.js"></script>
+	<script type="text/javascript" src="speed.js"></script>
+</head>
+<body>
+  <div class="accountingjs-test">
+    <h1 id="qunit-header">accounting.js tests</h1>
+    <h2 id="qunit-banner"></h2>
+    <h2 id="qunit-userAgent"></h2>
+    <ol id="qunit-tests"></ol>
+    <br />
+    <h1 class="qunit-header">accounting.js speed tests</h1>
+    <p>Each library method is represented here running on predefined random numbers/strings, with default parameters, to provide a sense of how fast they might run in different browsers.</p>
+    <br />
+
+    <script type="text/html" id="template">
+      <%
+      if (data) { data += 12345; }; %>
+      <li><%= data %></li>
+    </script>
+  </div>
+</body>
+</html>

File diff suppressed because it is too large
+ 19 - 0
node_modules/accounting/tests/qunit/vendor/jquery.js


+ 670 - 0
node_modules/accounting/tests/qunit/vendor/jslitmus.js

@@ -0,0 +1,670 @@
+// JSLitmus.js
+//
+// History:
+//   2008-10-27: Initial release
+//   2008-11-09: Account for iteration loop overhead
+//   2008-11-13: Added OS detection
+//   2009-02-25: Create tinyURL automatically, shift-click runs tests in reverse
+//
+// Copyright (c) 2008-2009, Robert Kieffer
+// All Rights Reserved
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the
+// Software), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+(function() {
+  // Private methods and state
+
+  // Get platform info but don't go crazy trying to recognize everything
+  // that's out there.  This is just for the major platforms and OSes.
+  var platform = 'unknown platform', ua = navigator.userAgent;
+
+  // Detect OS
+  var oses = ['Windows','iPhone OS','(Intel |PPC )?Mac OS X','Linux'].join('|');
+  var pOS = new RegExp('((' + oses + ') [^ \);]*)').test(ua) ? RegExp.$1 : null;
+  if (!pOS) pOS = new RegExp('((' + oses + ')[^ \);]*)').test(ua) ? RegExp.$1 : null;
+
+  // Detect browser
+  var pName = /(Chrome|MSIE|Safari|Opera|Firefox)/.test(ua) ? RegExp.$1 : null;
+
+  // Detect version
+  var vre = new RegExp('(Version|' + pName + ')[ \/]([^ ;]*)');
+  var pVersion = (pName && vre.test(ua)) ? RegExp.$2 : null;
+  var platform = (pOS && pName && pVersion) ? pName + ' '  + pVersion + ' on ' + pOS : 'unknown platform';
+
+  /**
+  * A smattering of methods that are needed to implement the JSLitmus testbed.
+  */
+  var jsl = {
+    /**
+    * Enhanced version of escape()
+    */
+    escape: function(s) {
+      s = s.replace(/,/g, '\\,');
+      s = escape(s);
+      s = s.replace(/\+/g, '%2b');
+      s = s.replace(/ /g, '+');
+      return s;
+    },
+
+    /**
+    * Get an element by ID.
+    */
+    $: function(id) {
+      return document.getElementById(id);
+    },
+
+    /**
+    * Null function
+    */
+    F: function() {},
+
+    /**
+    * Set the status shown in the UI
+    */
+    status: function(msg) {
+      var el = jsl.$('jsl_status');
+      if (el) el.innerHTML = msg || '';
+    },
+
+    /**
+    * Convert a number to an abbreviated string like, "15K" or "10M"
+    */
+    toLabel: function(n) {
+      if (n == Infinity) {
+        return 'Infinity';
+      } else if (n > 1e9) {
+        n = Math.round(n/1e8);
+        return n/10 + 'B';
+      } else if (n > 1e6) {
+        n = Math.round(n/1e5);
+        return n/10 + 'M';
+      } else if (n > 1e3) {
+        n = Math.round(n/1e2);
+        return n/10 + 'K';
+      }
+      return n;
+    },
+
+    /**
+    * Copy properties from src to dst
+    */
+    extend: function(dst, src) {
+      for (var k in src) dst[k] = src[k]; return dst;
+    },
+
+    /**
+    * Like Array.join(), but for the key-value pairs in an object
+    */
+    join: function(o, delimit1, delimit2) {
+      if (o.join) return o.join(delimit1);  // If it's an array
+      var pairs = [];
+      for (var k in o) pairs.push(k + delimit1 + o[k]);
+      return pairs.join(delimit2);
+    },
+
+    /**
+    * Array#indexOf isn't supported in IE, so we use this as a cross-browser solution
+    */
+    indexOf: function(arr, o) {
+      if (arr.indexOf) return arr.indexOf(o);
+      for (var i = 0; i < this.length; i++) if (arr[i] === o) return i;
+      return -1;
+    }
+  };
+
+  /**
+  * Test manages a single test (created with
+  * JSLitmus.test())
+  * 
+  * @private
+  */
+  var Test = function (name, f) {
+    if (!f) throw new Error('Undefined test function');
+    if (!(/function[^\(]*\(([^,\)]*)/).test(f.toString())) {
+      throw new Error('"' + name + '" test: Test is not a valid Function object');
+    }
+    this.loopArg = RegExp.$1;
+    this.name = name;
+    this.f = f;
+  };
+  
+  jsl.extend(Test, /** @lends Test */ {
+    /** Calibration tests for establishing iteration loop overhead */
+    CALIBRATIONS: [
+      new Test('calibrating loop', function(count) {while (count--);}),
+      new Test('calibrating function', jsl.F)
+    ],
+
+    /**
+    * Run calibration tests.  Returns true if calibrations are not yet
+    * complete (in which case calling code should run the tests yet again).
+    * onCalibrated - Callback to invoke when calibrations have finished
+    */
+    calibrate: function(onCalibrated) {
+      for (var i = 0; i < Test.CALIBRATIONS.length; i++) { 
+        var cal = Test.CALIBRATIONS[i];
+        if (cal.running) return true;
+        if (!cal.count) {
+          cal.isCalibration = true;
+          cal.onStop = onCalibrated;
+          //cal.MIN_TIME = .1; // Do calibrations quickly
+          cal.run(2e4);
+          return true;
+        }
+      }
+      return false;
+    }
+  });
+
+  jsl.extend(Test.prototype, {/** @lends Test.prototype */
+    /** Initial number of iterations */
+    INIT_COUNT: 10,
+    /** Max iterations allowed (i.e. used to detect bad looping functions) */
+    MAX_COUNT: 1e9,
+    /** Minimum time a test should take to get valid results (secs) */
+    MIN_TIME: .5,
+
+    /** Callback invoked when test state changes */
+    onChange: jsl.F,
+
+    /** Callback invoked when test is finished */
+    onStop: jsl.F,
+
+    /**
+     * Reset test state
+     */
+    reset: function() {
+      delete this.count;
+      delete this.time;
+      delete this.running;
+      delete this.error;
+    },
+
+    /**
+    * Run the test (in a timeout). We use a timeout to make sure the browser
+    * has a chance to finish rendering any UI changes we've made, like
+    * updating the status message.
+    */
+    run: function(count) {
+      count = count || this.INIT_COUNT;
+      jsl.status(this.name + ' x ' + count);
+      this.running = true;
+      var me = this;
+      setTimeout(function() {me._run(count);}, 200);
+    },
+
+    /**
+     * The nuts and bolts code that actually runs a test
+     */
+    _run: function(count) {
+      var me = this;
+
+      // Make sure calibration tests have run
+      if (!me.isCalibration && Test.calibrate(function() {me.run(count);})) return;
+      this.error = null;
+
+      try {
+        var start, f = this.f, now, i = count;
+
+        // Start the timer
+        start = new Date();
+
+        // Now for the money shot.  If this is a looping function ...
+        if (this.loopArg) {
+          // ... let it do the iteration itself
+          f(count);
+        } else {
+          // ... otherwise do the iteration for it
+          while (i--) f();
+        }
+
+        // Get time test took (in secs)
+        this.time = Math.max(1,new Date() - start)/1000;
+
+        // Store iteration count and per-operation time taken
+        this.count = count;
+        this.period = this.time/count;
+
+        // Do we need to do another run?
+        this.running = this.time <= this.MIN_TIME;
+
+        // ... if so, compute how many times we should iterate
+        if (this.running) {
+          // Bump the count to the nearest power of 2
+          var x = this.MIN_TIME/this.time;
+          var pow = Math.pow(2, Math.max(1, Math.ceil(Math.log(x)/Math.log(2))));
+          count *= pow;
+          if (count > this.MAX_COUNT) {
+            throw new Error('Max count exceeded.  If this test uses a looping function, make sure the iteration loop is working properly.');
+          }
+        }
+      } catch (e) {
+        // Exceptions are caught and displayed in the test UI
+        this.reset();
+        this.error = e;
+      }
+
+      // Figure out what to do next
+      if (this.running) {
+        me.run(count);
+      } else {
+        jsl.status('');
+        me.onStop(me);
+      }
+
+      // Finish up
+      this.onChange(this);
+    },
+
+    /**
+    * Get the number of operations per second for this test.
+    * 
+    * @param normalize if true, iteration loop overhead taken into account
+    */
+    getHz: function(/**Boolean*/ normalize) {
+      var p = this.period;
+
+      // Adjust period based on the calibration test time
+      if (normalize && !this.isCalibration) {
+        var cal = Test.CALIBRATIONS[this.loopArg ? 0 : 1];
+
+        // If the period is within 20% of the calibration time, then zero the
+        // it out
+        p = p < cal.period*1.2 ? 0 : p - cal.period;
+      }
+
+      return Math.round(1/p);
+    },
+
+    /**
+    * Get a friendly string describing the test
+    */
+    toString: function() {
+      return this.name + ' - '  + this.time/this.count + ' secs';
+    }
+  });
+
+  // CSS we need for the UI
+  var STYLESHEET = '<style> \
+    #jslitmus {font-family:sans-serif; font-size: 12px;} \
+    #jslitmus a {text-decoration: none;} \
+    #jslitmus a:hover {text-decoration: underline;} \
+    #jsl_status { \
+      margin-top: 10px; \
+      font-size: 10px; \
+      color: #888; \
+    } \
+    A IMG  {border:none} \
+    #test_results { \
+      margin-top: 10px; \
+      font-size: 12px; \
+      font-family: sans-serif; \
+      border-collapse: collapse; \
+      border-spacing: 0px; \
+    } \
+    #test_results th, #test_results td { \
+      border: solid 1px #ccc; \
+      vertical-align: top; \
+      padding: 3px; \
+    } \
+    #test_results th { \
+      vertical-align: bottom; \
+      background-color: #ccc; \
+      padding: 1px; \
+      font-size: 10px; \
+    } \
+    #test_results #test_platform { \
+      color: #444; \
+      text-align:center; \
+    } \
+    #test_results .test_row { \
+      color: #006; \
+      cursor: pointer; \
+    } \
+    #test_results .test_nonlooping { \
+      border-left-style: dotted; \
+      border-left-width: 2px; \
+    } \
+    #test_results .test_looping { \
+      border-left-style: solid; \
+      border-left-width: 2px; \
+    } \
+    #test_results .test_name {white-space: nowrap;} \
+    #test_results .test_pending { \
+    } \
+    #test_results .test_running { \
+      font-style: italic; \
+    } \
+    #test_results .test_done {} \
+    #test_results .test_done { \
+      text-align: right; \
+      font-family: monospace; \
+    } \
+    #test_results .test_error {color: #600;} \
+    #test_results .test_error .error_head {font-weight:bold;} \
+    #test_results .test_error .error_body {font-size:85%;} \
+    #test_results .test_row:hover td { \
+      background-color: #ffc; \
+      text-decoration: underline; \
+    } \
+    #chart { \
+      margin: 10px 0px; \
+      width: 250px; \
+    } \
+    #chart img { \
+      border: solid 1px #ccc; \
+      margin-bottom: 5px; \
+    } \
+    #chart #tiny_url { \
+      height: 40px; \
+      width: 250px; \
+    } \
+    #jslitmus_credit { \
+      font-size: 10px; \
+      color: #888; \
+      margin-top: 8px; \
+    } \
+    </style>';
+
+  // HTML markup for the UI
+  var MARKUP = '<div id="jslitmus"> \
+      <button onclick="JSLitmus.runAll(event)">Run Tests</button> \
+      <button id="stop_button" disabled="disabled" onclick="JSLitmus.stop()">Stop Tests</button> \
+      <br \> \
+      <br \> \
+      <input type="checkbox" style="vertical-align: middle" id="test_normalize" checked="checked" onchange="JSLitmus.renderAll()""> Normalize results \
+      <table id="test_results"> \
+        <colgroup> \
+          <col /> \
+          <col width="100" /> \
+        </colgroup> \
+        <tr><th id="test_platform" colspan="2">' + platform + '</th></tr> \
+        <tr><th>Test</th><th>Ops/sec</th></tr> \
+        <tr id="test_row_template" class="test_row" style="display:none"> \
+          <td class="test_name"></td> \
+          <td class="test_result">Ready</td> \
+        </tr> \
+      </table> \
+      <div id="jsl_status"></div> \
+      <div id="chart" style="display:none"> \
+      <a id="chart_link" target="_blank"><img id="chart_image"></a> \
+      TinyURL (for chart): \
+      <iframe id="tiny_url" frameBorder="0" scrolling="no" src=""></iframe> \
+      </div> \
+      <a id="jslitmus_credit" title="JSLitmus home page" href="http://code.google.com/p/jslitmus" target="_blank">Powered by JSLitmus</a> \
+    </div>';
+
+  /**
+   * The public API for creating and running tests
+   */
+  window.JSLitmus = {
+    /** The list of all tests that have been registered with JSLitmus.test */
+    _tests: [],
+    /** The queue of tests that need to be run */
+    _queue: [],
+
+    /**
+    * The parsed query parameters the current page URL.  This is provided as a
+    * convenience for test functions - it's not used by JSLitmus proper
+    */
+    params: {},
+
+    /**
+     * Initialize
+     */
+    _init: function() {
+      // Parse query params into JSLitmus.params[] hash
+      var match = (location + '').match(/([^?#]*)(#.*)?$/);
+      if (match) {
+        var pairs = match[1].split('&');
+        for (var i = 0; i < pairs.length; i++) {
+          var pair = pairs[i].split('=');
+          if (pair.length > 1) {
+            var key = pair.shift();
+            var value = pair.length > 1 ? pair.join('=') : pair[0];
+            this.params[key] = value;
+          }
+        }
+      }
+
+      // Write out the stylesheet.  We have to do this here because IE
+      // doesn't honor sheets written after the document has loaded.
+      document.write(STYLESHEET);
+
+      // Setup the rest of the UI once the document is loaded
+      if (window.addEventListener) {
+        window.addEventListener('load', this._setup, false);
+      } else if (document.addEventListener) {
+        document.addEventListener('load', this._setup, false);
+      } else if (window.attachEvent) {
+        window.attachEvent('onload', this._setup);
+      }
+
+      return this;
+    },
+
+    /**
+     * Set up the UI
+     */
+    _setup: function() {
+      var el = jsl.$('jslitmus_container');
+      if (!el) document.body.appendChild(el = document.createElement('div'));
+
+      el.innerHTML = MARKUP;
+
+      // Render the UI for all our tests
+      for (var i=0; i < JSLitmus._tests.length; i++)
+        JSLitmus.renderTest(JSLitmus._tests[i]);
+    },
+
+    /**
+     * (Re)render all the test results
+     */
+    renderAll: function() {
+      for (var i = 0; i < JSLitmus._tests.length; i++)
+        JSLitmus.renderTest(JSLitmus._tests[i]);
+      JSLitmus.renderChart();
+    },
+
+    /**
+     * (Re)render the chart graphics
+     */
+    renderChart: function() {
+      var url = JSLitmus.chartUrl();
+      jsl.$('chart_link').href = url;
+      jsl.$('chart_image').src = url;
+      jsl.$('chart').style.display = '';
+
+      // Update the tiny URL
+      jsl.$('tiny_url').src = 'http://tinyurl.com/api-create.php?url='+escape(url);
+    },
+
+    /**
+     * (Re)render the results for a specific test
+     */
+    renderTest: function(test) {
+      // Make a new row if needed
+      if (!test._row) {
+        var trow = jsl.$('test_row_template');
+        if (!trow) return;
+
+        test._row = trow.cloneNode(true);
+        test._row.style.display = '';
+        test._row.id = '';
+        test._row.onclick = function() {JSLitmus._queueTest(test);};
+        test._row.title = 'Run ' + test.name + ' test';
+        trow.parentNode.appendChild(test._row);
+        test._row.cells[0].innerHTML = test.name;
+      }
+
+      var cell = test._row.cells[1];
+      var cns = [test.loopArg ? 'test_looping' : 'test_nonlooping'];
+
+      if (test.error) {
+        cns.push('test_error');
+        cell.innerHTML = 
+        '<div class="error_head">' + test.error + '</div>' +
+        '<ul class="error_body"><li>' +
+          jsl.join(test.error, ': ', '</li><li>') +
+          '</li></ul>';
+      } else {
+        if (test.running) {
+          cns.push('test_running');
+          cell.innerHTML = 'running';
+        } else if (jsl.indexOf(JSLitmus._queue, test) >= 0) {
+          cns.push('test_pending');
+          cell.innerHTML = 'pending';
+        } else if (test.count) {
+          cns.push('test_done');
+          var hz = test.getHz(jsl.$('test_normalize').checked);
+          cell.innerHTML = hz != Infinity ? hz : '&infin;';
+        } else {
+          cell.innerHTML = 'ready';
+        }
+      }
+      cell.className = cns.join(' ');
+    },
+
+    /**
+     * Create a new test
+     */
+    test: function(name, f) {
+      // Create the Test object
+      var test = new Test(name, f);
+      JSLitmus._tests.push(test);
+
+      // Re-render if the test state changes
+      test.onChange = JSLitmus.renderTest;
+
+      // Run the next test if this one finished
+      test.onStop = function(test) {
+        if (JSLitmus.onTestFinish) JSLitmus.onTestFinish(test);
+        JSLitmus.currentTest = null;
+        JSLitmus._nextTest();
+      };
+
+      // Render the new test
+      this.renderTest(test);
+    },
+
+    /**
+     * Add all tests to the run queue
+     */
+    runAll: function(e) {
+      e = e || window.event;
+      var reverse = e && e.shiftKey, len = JSLitmus._tests.length;
+      for (var i = 0; i < len; i++) {
+        JSLitmus._queueTest(JSLitmus._tests[!reverse ? i : (len - i - 1)]);
+      }
+    },
+
+    /**
+     * Remove all tests from the run queue.  The current test has to finish on
+     * it's own though
+     */
+    stop: function() {
+      while (JSLitmus._queue.length) {
+        var test = JSLitmus._queue.shift();
+        JSLitmus.renderTest(test);
+      }
+    },
+
+    /**
+     * Run the next test in the run queue
+     */
+    _nextTest: function() {
+      if (!JSLitmus.currentTest) {
+        var test = JSLitmus._queue.shift();
+        if (test) {
+          jsl.$('stop_button').disabled = false;
+          JSLitmus.currentTest = test;
+          test.run();
+          JSLitmus.renderTest(test);
+          if (JSLitmus.onTestStart) JSLitmus.onTestStart(test);
+        } else {
+          jsl.$('stop_button').disabled = true;
+          JSLitmus.renderChart();
+        }
+      }
+    },
+
+    /**
+     * Add a test to the run queue
+     */
+    _queueTest: function(test) {
+      if (jsl.indexOf(JSLitmus._queue, test) >= 0) return;
+      JSLitmus._queue.push(test);
+      JSLitmus.renderTest(test);
+      JSLitmus._nextTest();
+    },
+
+    /**
+     * Generate a Google Chart URL that shows the data for all tests
+     */
+    chartUrl: function() {
+      var n = JSLitmus._tests.length, markers = [], data = [];
+      var d, min = 0, max = -1e10;
+      var normalize = jsl.$('test_normalize').checked;
+
+      // Gather test data
+      for (var i=0; i < JSLitmus._tests.length; i++) {
+        var test = JSLitmus._tests[i];
+        if (test.count) {
+          var hz = test.getHz(normalize);
+          var v = hz != Infinity ? hz : 0;
+          data.push(v);
+          markers.push('t' + jsl.escape(test.name + '(' + jsl.toLabel(hz)+ ')') + ',000000,0,' +
+            markers.length + ',10');
+          max = Math.max(v, max);
+        }
+      }
+      if (markers.length <= 0) return null;
+
+      // Build chart title
+      var title = document.getElementsByTagName('title');
+      title = (title && title.length) ? title[0].innerHTML : null;
+      var chart_title = [];
+      if (title) chart_title.push(title);
+      chart_title.push('Ops/sec (' + platform + ')');
+
+      // Build labels
+      var labels = [jsl.toLabel(min), jsl.toLabel(max)];
+
+      var w = 250, bw = 15;
+      var bs = 5;
+      var h = markers.length*(bw + bs) + 30 + chart_title.length*20;
+
+      var params = {
+        chtt: escape(chart_title.join('|')),
+        chts: '000000,10',
+        cht: 'bhg',                     // chart type
+        chd: 't:' + data.join(','),     // data set
+        chds: min + ',' + max,          // max/min of data
+        chxt: 'x',                      // label axes
+        chxl: '0:|' + labels.join('|'), // labels
+        chsp: '0,1',
+        chm: markers.join('|'),         // test names
+        chbh: [bw, 0, bs].join(','),    // bar widths
+        // chf: 'bg,lg,0,eeeeee,0,eeeeee,.5,ffffff,1', // gradient
+        chs: w + 'x' + h
+      };
+      return 'http://chart.apis.google.com/chart?' + jsl.join(params, '=', '&');
+    } 
+  };
+
+  JSLitmus._init();
+})();

+ 196 - 0
node_modules/accounting/tests/qunit/vendor/qunit.css

@@ -0,0 +1,196 @@
+/** Font Family and Sizes */
+
+#qunit-tests, #qunit-header, .qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
+	font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
+}
+
+#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
+#qunit-tests { font-size: smaller; }
+
+
+/** Resets */
+
+#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
+	margin: 0;
+	padding: 0;
+}
+
+
+/** Header */
+
+#qunit-header, .qunit-header {
+	padding: 0.5em 0 0.5em 1em;
+
+	color: #8699a4;
+	background-color: #0d3349;
+
+	font-size: 1.5em;
+	line-height: 1em;
+	font-weight: normal;
+
+	border-radius: 15px 15px 0 0;
+	-moz-border-radius: 15px 15px 0 0;
+	-webkit-border-top-right-radius: 15px;
+	-webkit-border-top-left-radius: 15px;
+}
+
+#qunit-header a {
+	text-decoration: none;
+	color: #c2ccd1;
+}
+
+#qunit-header a:hover,
+#qunit-header a:focus {
+	color: #fff;
+}
+
+#qunit-banner {
+	height: 5px;
+}
+
+#qunit-testrunner-toolbar {
+	padding: 0em 0 0.5em 2em;
+}
+
+#qunit-userAgent {
+	padding: 0.5em 0 0.5em 2.5em;
+	background-color: #2b81af;
+	color: #fff;
+	text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+}
+
+
+/** Tests: Pass/Fail */
+
+#qunit-tests {
+	list-style-position: inside;
+}
+
+#qunit-tests li {
+	padding: 0.4em 0.5em 0.4em 2.5em;
+	border-bottom: 1px solid #fff;
+	list-style-position: inside;
+}
+
+#qunit-tests li strong {
+	cursor: pointer;
+}
+
+#qunit-tests ol {
+	margin-top: 0.5em;
+	padding: 0.5em;
+
+	background-color: #fff;
+
+	border-radius: 15px;
+	-moz-border-radius: 15px;
+	-webkit-border-radius: 15px;
+
+	box-shadow: inset 0px 2px 13px #999;
+	-moz-box-shadow: inset 0px 2px 13px #999;
+	-webkit-box-shadow: inset 0px 2px 13px #999;
+}
+
+#qunit-tests table {
+	border-collapse: collapse;
+	margin-top: .2em;
+}
+
+#qunit-tests th {
+	text-align: right;
+	vertical-align: top;
+	padding: 0 .5em 0 0;
+}
+
+#qunit-tests td {
+	vertical-align: top;
+}
+
+#qunit-tests pre {
+	margin: 0;
+	white-space: pre-wrap;
+	word-wrap: break-word;
+}
+
+#qunit-tests del {
+	background-color: #e0f2be;
+	color: #374e0c;
+	text-decoration: none;
+}
+
+#qunit-tests ins {
+	background-color: #ffcaca;
+	color: #500;
+	text-decoration: none;
+}
+
+/*** Test Counts */
+
+#qunit-tests b.counts                       { color: black; }
+#qunit-tests b.passed                       { color: #5E740B; }
+#qunit-tests b.failed                       { color: #710909; }
+
+#qunit-tests li li {
+	margin: 0.5em;
+	padding: 0.4em 0.5em 0.4em 0.5em;
+	background-color: #fff;
+	border-bottom: none;
+	list-style-position: inside;
+}
+
+/*** Passing Styles */
+
+#qunit-tests li li.pass {
+	color: #5E740B;
+	background-color: #fff;
+	border-left: 26px solid #C6E746;
+}
+
+#qunit-tests .pass                          { color: #528CE0; background-color: #D2E0E6; }
+#qunit-tests .pass .test-name               { color: #366097; }
+
+#qunit-tests .pass .test-actual,
+#qunit-tests .pass .test-expected           { color: #999999; }
+
+#qunit-banner.qunit-pass                    { background-color: #C6E746; }
+
+/*** Failing Styles */
+
+#qunit-tests li li.fail {
+	color: #710909;
+	background-color: #fff;
+	border-left: 26px solid #EE5757;
+}
+
+#qunit-tests .fail                          { color: #000000; background-color: #EE5757; }
+#qunit-tests .fail .test-name,
+#qunit-tests .fail .module-name             { color: #000000; }
+
+#qunit-tests .fail .test-actual             { color: #EE5757; }
+#qunit-tests .fail .test-expected           { color: green;   }
+
+#qunit-banner.qunit-fail,
+#qunit-testrunner-toolbar                   { background-color: #EE5757; }
+
+
+/** Footer */
+
+#qunit-testresult {
+	padding: 0.5em 0.5em 0.5em 2.5em;
+
+	color: #2b81af;
+	background-color: #D2E0E6;
+
+	border-radius: 0 0 15px 15px;
+	-moz-border-radius: 0 0 15px 15px;
+	-webkit-border-bottom-right-radius: 15px;
+	-webkit-border-bottom-left-radius: 15px;
+}
+
+/** Fixture */
+
+#qunit-fixture {
+	position: absolute;
+	top: -10000px;
+	left: -10000px;
+}

File diff suppressed because it is too large
+ 2360 - 0
node_modules/accounting/tests/qunit/vendor/qunit.js


+ 2 - 0
node_modules/async-limiter/.eslintignore

@@ -0,0 +1,2 @@
+coverage
+.nyc_output

+ 10 - 0
node_modules/async-limiter/.nycrc

@@ -0,0 +1,10 @@
+{
+  "check-coverage": false,
+  "lines": 99,
+  "statements": 99,
+  "functions": 99,
+  "branches": 99,
+  "include": [
+     "index.js"
+  ]
+}

+ 9 - 0
node_modules/async-limiter/.travis.yml

@@ -0,0 +1,9 @@
+language: node_js
+node_js:
+  - "6"
+  - "8"
+  - "10"
+  - "node"
+script: npm run travis
+cache:
+  yarn: true

+ 8 - 0
node_modules/async-limiter/LICENSE

@@ -0,0 +1,8 @@
+The MIT License (MIT)
+Copyright (c) 2017 Samuel Reed <samuel.trace.reed@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 67 - 0
node_modules/async-limiter/index.js

@@ -0,0 +1,67 @@
+'use strict';
+
+function Queue(options) {
+  if (!(this instanceof Queue)) {
+    return new Queue(options);
+  }
+
+  options = options || {};
+  this.concurrency = options.concurrency || Infinity;
+  this.pending = 0;
+  this.jobs = [];
+  this.cbs = [];
+  this._done = done.bind(this);
+}
+
+var arrayAddMethods = [
+  'push',
+  'unshift',
+  'splice'
+];
+
+arrayAddMethods.forEach(function(method) {
+  Queue.prototype[method] = function() {
+    var methodResult = Array.prototype[method].apply(this.jobs, arguments);
+    this._run();
+    return methodResult;
+  };
+});
+
+Object.defineProperty(Queue.prototype, 'length', {
+  get: function() {
+    return this.pending + this.jobs.length;
+  }
+});
+
+Queue.prototype._run = function() {
+  if (this.pending === this.concurrency) {
+    return;
+  }
+  if (this.jobs.length) {
+    var job = this.jobs.shift();
+    this.pending++;
+    job(this._done);
+    this._run();
+  }
+
+  if (this.pending === 0) {
+    while (this.cbs.length !== 0) {
+      var cb = this.cbs.pop();
+      process.nextTick(cb);
+    }
+  }
+};
+
+Queue.prototype.onDone = function(cb) {
+  if (typeof cb === 'function') {
+    this.cbs.push(cb);
+    this._run();
+  }
+};
+
+function done() {
+  this.pending--;
+  this._run();
+}
+
+module.exports = Queue;

+ 69 - 0
node_modules/async-limiter/package.json

@@ -0,0 +1,69 @@
+{
+  "_from": "async-limiter@~1.0.0",
+  "_id": "async-limiter@1.0.1",
+  "_inBundle": false,
+  "_integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==",
+  "_location": "/async-limiter",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "async-limiter@~1.0.0",
+    "name": "async-limiter",
+    "escapedName": "async-limiter",
+    "rawSpec": "~1.0.0",
+    "saveSpec": null,
+    "fetchSpec": "~1.0.0"
+  },
+  "_requiredBy": [
+    "/ws"
+  ],
+  "_resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
+  "_shasum": "dd379e94f0db8310b08291f9d64c3209766617fd",
+  "_spec": "async-limiter@~1.0.0",
+  "_where": "/Users/bssm/Desktop/fabTest/打卡坐标/node_modules/ws",
+  "author": {
+    "name": "Samuel Reed"
+  },
+  "bugs": {
+    "url": "https://github.com/strml/async-limiter/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {},
+  "deprecated": false,
+  "description": "asynchronous function queue with adjustable concurrency",
+  "devDependencies": {
+    "coveralls": "^3.0.3",
+    "eslint": "^5.16.0",
+    "eslint-plugin-mocha": "^5.3.0",
+    "intelli-espower-loader": "^1.0.1",
+    "mocha": "^6.1.4",
+    "nyc": "^14.1.1",
+    "power-assert": "^1.6.1"
+  },
+  "homepage": "https://github.com/strml/async-limiter#readme",
+  "keywords": [
+    "throttle",
+    "async",
+    "limiter",
+    "asynchronous",
+    "job",
+    "task",
+    "concurrency",
+    "concurrent"
+  ],
+  "license": "MIT",
+  "name": "async-limiter",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/strml/async-limiter.git"
+  },
+  "scripts": {
+    "coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
+    "example": "node example",
+    "lint": "eslint .",
+    "test": "mocha --require intelli-espower-loader test/",
+    "travis": "npm run lint && npm run test"
+  },
+  "version": "1.0.1"
+}

+ 132 - 0
node_modules/async-limiter/readme.md

@@ -0,0 +1,132 @@
+# Async-Limiter
+
+A module for limiting concurrent asynchronous actions in flight. Forked from [queue](https://github.com/jessetane/queue).
+
+[![npm](http://img.shields.io/npm/v/async-limiter.svg?style=flat-square)](http://www.npmjs.org/async-limiter)
+[![tests](https://img.shields.io/travis/STRML/async-limiter.svg?style=flat-square&branch=master)](https://travis-ci.org/STRML/async-limiter)
+[![coverage](https://img.shields.io/coveralls/STRML/async-limiter.svg?style=flat-square&branch=master)](https://coveralls.io/r/STRML/async-limiter)
+
+This module exports a class `Limiter` that implements some of the `Array` API.
+Pass async functions (ones that accept a callback or return a promise) to an instance's additive array methods.
+
+## Motivation
+
+Certain functions, like `zlib`, have [undesirable behavior](https://github.com/nodejs/node/issues/8871#issuecomment-250915913) when
+run at infinite concurrency.
+
+In this case, it is actually faster, and takes far less memory, to limit concurrency.
+
+This module should do the absolute minimum work necessary to queue up functions. PRs are welcome that would
+make this module faster or lighter, but new functionality is not desired.
+
+Style should confirm to nodejs/node style.
+
+## Example
+
+``` javascript
+var Limiter = require('async-limiter')
+
+var t = new Limiter({concurrency: 2});
+var results = []
+
+// add jobs using the familiar Array API
+t.push(function (cb) {
+  results.push('two')
+  cb()
+})
+
+t.push(
+  function (cb) {
+    results.push('four')
+    cb()
+  },
+  function (cb) {
+    results.push('five')
+    cb()
+  }
+)
+
+t.unshift(function (cb) {
+  results.push('one')
+  cb()
+})
+
+t.splice(2, 0, function (cb) {
+  results.push('three')
+  cb()
+})
+
+// Jobs run automatically. If you want a callback when all are done,
+// call 'onDone()'.
+t.onDone(function () {
+  console.log('all done:', results)
+})
+```
+
+## Zlib Example
+
+```js
+const zlib = require('zlib');
+const Limiter = require('async-limiter');
+
+const message = {some: "data"};
+const payload = new Buffer(JSON.stringify(message));
+
+// Try with different concurrency values to see how this actually
+// slows significantly with higher concurrency!
+//
+// 5:        1398.607ms
+// 10:       1375.668ms
+// Infinity: 4423.300ms
+//
+const t = new Limiter({concurrency: 5});
+function deflate(payload, cb) {
+  t.push(function(done) {
+    zlib.deflate(payload, function(err, buffer) {
+      done();
+      cb(err, buffer);
+    });
+  });
+}
+
+console.time('deflate');
+for(let i = 0; i < 30000; ++i) {
+  deflate(payload, function (err, buffer) {});
+}
+t.onDone(function() {
+  console.timeEnd('deflate');
+});
+```
+
+## Install
+
+`npm install async-limiter`
+
+## Test
+
+`npm test`
+
+## API
+
+### `var t = new Limiter([opts])`
+Constructor. `opts` may contain inital values for:
+* `t.concurrency`
+
+## Instance methods
+
+### `t.onDone(fn)`
+`fn` will be called once and only once, when the queue is empty.
+
+## Instance methods mixed in from `Array`
+Mozilla has docs on how these methods work [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array).
+### `t.push(element1, ..., elementN)`
+### `t.unshift(element1, ..., elementN)`
+### `t.splice(index , howMany[, element1[, ...[, elementN]]])`
+
+## Properties
+### `t.concurrency`
+Max number of jobs the queue should process concurrently, defaults to `Infinity`.
+
+### `t.length`
+Jobs pending + jobs to process (readonly).
+

+ 5 - 0
node_modules/balanced-match/.npmignore

@@ -0,0 +1,5 @@
+test
+.gitignore
+.travis.yml
+Makefile
+example.js

+ 21 - 0
node_modules/balanced-match/LICENSE.md

@@ -0,0 +1,21 @@
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 91 - 0
node_modules/balanced-match/README.md

@@ -0,0 +1,91 @@
+# balanced-match
+
+Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
+
+[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
+[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
+
+[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match)
+
+## Example
+
+Get the first matching pair of braces:
+
+```js
+var balanced = require('balanced-match');
+
+console.log(balanced('{', '}', 'pre{in{nested}}post'));
+console.log(balanced('{', '}', 'pre{first}between{second}post'));
+console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre  {   in{nest}   }  post'));
+```
+
+The matches are:
+
+```bash
+$ node example.js
+{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' }
+{ start: 3,
+  end: 9,
+  pre: 'pre',
+  body: 'first',
+  post: 'between{second}post' }
+{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
+```
+
+## API
+
+### var m = balanced(a, b, str)
+
+For the first non-nested matching pair of `a` and `b` in `str`, return an
+object with those keys:
+
+* **start** the index of the first match of `a`
+* **end** the index of the matching `b`
+* **pre** the preamble, `a` and `b` not included
+* **body** the match, `a` and `b` not included
+* **post** the postscript, `a` and `b` not included
+
+If there's no match, `undefined` will be returned.
+
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`.
+
+### var r = balanced.range(a, b, str)
+
+For the first non-nested matching pair of `a` and `b` in `str`, return an
+array with indexes: `[ <a index>, <b index> ]`.
+
+If there's no match, `undefined` will be returned.
+
+If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`.
+
+## Installation
+
+With [npm](https://npmjs.org) do:
+
+```bash
+npm install balanced-match
+```
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 59 - 0
node_modules/balanced-match/index.js

@@ -0,0 +1,59 @@
+'use strict';
+module.exports = balanced;
+function balanced(a, b, str) {
+  if (a instanceof RegExp) a = maybeMatch(a, str);
+  if (b instanceof RegExp) b = maybeMatch(b, str);
+
+  var r = range(a, b, str);
+
+  return r && {
+    start: r[0],
+    end: r[1],
+    pre: str.slice(0, r[0]),
+    body: str.slice(r[0] + a.length, r[1]),
+    post: str.slice(r[1] + b.length)
+  };
+}
+
+function maybeMatch(reg, str) {
+  var m = str.match(reg);
+  return m ? m[0] : null;
+}
+
+balanced.range = range;
+function range(a, b, str) {
+  var begs, beg, left, right, result;
+  var ai = str.indexOf(a);
+  var bi = str.indexOf(b, ai + 1);
+  var i = ai;
+
+  if (ai >= 0 && bi > 0) {
+    begs = [];
+    left = str.length;
+
+    while (i >= 0 && !result) {
+      if (i == ai) {
+        begs.push(i);
+        ai = str.indexOf(a, i + 1);
+      } else if (begs.length == 1) {
+        result = [ begs.pop(), bi ];
+      } else {
+        beg = begs.pop();
+        if (beg < left) {
+          left = beg;
+          right = bi;
+        }
+
+        bi = str.indexOf(b, i + 1);
+      }
+
+      i = ai < bi && ai >= 0 ? ai : bi;
+    }
+
+    if (begs.length) {
+      result = [ left, right ];
+    }
+  }
+
+  return result;
+}

+ 77 - 0
node_modules/balanced-match/package.json

@@ -0,0 +1,77 @@
+{
+  "_from": "balanced-match@^1.0.0",
+  "_id": "balanced-match@1.0.0",
+  "_inBundle": false,
+  "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+  "_location": "/balanced-match",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "balanced-match@^1.0.0",
+    "name": "balanced-match",
+    "escapedName": "balanced-match",
+    "rawSpec": "^1.0.0",
+    "saveSpec": null,
+    "fetchSpec": "^1.0.0"
+  },
+  "_requiredBy": [
+    "/brace-expansion"
+  ],
+  "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+  "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
+  "_spec": "balanced-match@^1.0.0",
+  "_where": "/Users/bssm/Desktop/fabTest/打卡坐标/node_modules/brace-expansion",
+  "author": {
+    "name": "Julian Gruber",
+    "email": "mail@juliangruber.com",
+    "url": "http://juliangruber.com"
+  },
+  "bugs": {
+    "url": "https://github.com/juliangruber/balanced-match/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {},
+  "deprecated": false,
+  "description": "Match balanced character pairs, like \"{\" and \"}\"",
+  "devDependencies": {
+    "matcha": "^0.7.0",
+    "tape": "^4.6.0"
+  },
+  "homepage": "https://github.com/juliangruber/balanced-match",
+  "keywords": [
+    "match",
+    "regexp",
+    "test",
+    "balanced",
+    "parse"
+  ],
+  "license": "MIT",
+  "main": "index.js",
+  "name": "balanced-match",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/juliangruber/balanced-match.git"
+  },
+  "scripts": {
+    "bench": "make bench",
+    "test": "make test"
+  },
+  "testling": {
+    "files": "test/*.js",
+    "browsers": [
+      "ie/8..latest",
+      "firefox/20..latest",
+      "firefox/nightly",
+      "chrome/25..latest",
+      "chrome/canary",
+      "opera/12..latest",
+      "opera/next",
+      "safari/5.1..latest",
+      "ipad/6.0..latest",
+      "iphone/6.0..latest",
+      "android-browser/4.2..latest"
+    ]
+  },
+  "version": "1.0.0"
+}

+ 22 - 0
node_modules/base64-arraybuffer/LICENSE-MIT

@@ -0,0 +1,22 @@
+Copyright (c) 2012 Niklas von Hertzen
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.

+ 20 - 0
node_modules/base64-arraybuffer/README.md

@@ -0,0 +1,20 @@
+# base64-arraybuffer
+
+[![Build Status](https://travis-ci.org/niklasvh/base64-arraybuffer.png)](https://travis-ci.org/niklasvh/base64-arraybuffer)
+[![NPM Downloads](https://img.shields.io/npm/dm/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer)
+[![NPM Version](https://img.shields.io/npm/v/base64-arraybuffer.svg)](https://www.npmjs.org/package/base64-arraybuffer)
+
+Encode/decode base64 data into ArrayBuffers
+
+## Getting Started
+Install the module with: `npm install base64-arraybuffer`
+
+## API
+The library encodes and decodes base64 to and from ArrayBuffers
+
+ - __encode(buffer)__ - Encodes `ArrayBuffer` into base64 string
+ - __decode(str)__ - Decodes base64 string to `ArrayBuffer`
+
+## License
+Copyright (c) 2012 Niklas von Hertzen
+Licensed under the MIT license.

+ 4 - 0
node_modules/base64-arraybuffer/index.d.ts

@@ -0,0 +1,4 @@
+declare module 'base64-arraybuffer' {
+    export function encode(buffer: ArrayBuffer): string;
+    export function decode(str: string): ArrayBuffer;
+}

+ 67 - 0
node_modules/base64-arraybuffer/lib/base64-arraybuffer.js

@@ -0,0 +1,67 @@
+/*
+ * base64-arraybuffer
+ * https://github.com/niklasvh/base64-arraybuffer
+ *
+ * Copyright (c) 2012 Niklas von Hertzen
+ * Licensed under the MIT license.
+ */
+(function(){
+  "use strict";
+
+  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+  // Use a lookup table to find the index.
+  var lookup = new Uint8Array(256);
+  for (var i = 0; i < chars.length; i++) {
+    lookup[chars.charCodeAt(i)] = i;
+  }
+
+  exports.encode = function(arraybuffer) {
+    var bytes = new Uint8Array(arraybuffer),
+    i, len = bytes.length, base64 = "";
+
+    for (i = 0; i < len; i+=3) {
+      base64 += chars[bytes[i] >> 2];
+      base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
+      base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
+      base64 += chars[bytes[i + 2] & 63];
+    }
+
+    if ((len % 3) === 2) {
+      base64 = base64.substring(0, base64.length - 1) + "=";
+    } else if (len % 3 === 1) {
+      base64 = base64.substring(0, base64.length - 2) + "==";
+    }
+
+    return base64;
+  };
+
+  exports.decode =  function(base64) {
+    var bufferLength = base64.length * 0.75,
+    len = base64.length, i, p = 0,
+    encoded1, encoded2, encoded3, encoded4;
+
+    if (base64[base64.length - 1] === "=") {
+      bufferLength--;
+      if (base64[base64.length - 2] === "=") {
+        bufferLength--;
+      }
+    }
+
+    var arraybuffer = new ArrayBuffer(bufferLength),
+    bytes = new Uint8Array(arraybuffer);
+
+    for (i = 0; i < len; i+=4) {
+      encoded1 = lookup[base64.charCodeAt(i)];
+      encoded2 = lookup[base64.charCodeAt(i+1)];
+      encoded3 = lookup[base64.charCodeAt(i+2)];
+      encoded4 = lookup[base64.charCodeAt(i+3)];
+
+      bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
+      bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
+      bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
+    }
+
+    return arraybuffer;
+  };
+})();

+ 60 - 0
node_modules/base64-arraybuffer/package.json

@@ -0,0 +1,60 @@
+{
+  "_from": "base64-arraybuffer@^0.2.0",
+  "_id": "base64-arraybuffer@0.2.0",
+  "_inBundle": false,
+  "_integrity": "sha1-S5RPrAGRqlkHr+LYyZnMxXzoD0U=",
+  "_location": "/base64-arraybuffer",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "base64-arraybuffer@^0.2.0",
+    "name": "base64-arraybuffer",
+    "escapedName": "base64-arraybuffer",
+    "rawSpec": "^0.2.0",
+    "saveSpec": null,
+    "fetchSpec": "^0.2.0"
+  },
+  "_requiredBy": [
+    "/css-line-break"
+  ],
+  "_resolved": "https://registry.npm.taobao.org/base64-arraybuffer/download/base64-arraybuffer-0.2.0.tgz",
+  "_shasum": "4b944fac0191aa5907afe2d8c999ccc57ce80f45",
+  "_spec": "base64-arraybuffer@^0.2.0",
+  "_where": "/Users/zhengjunchao/workspace/dailyquotation/html2canvas-renderjs-demo/node_modules/css-line-break",
+  "author": {
+    "name": "Niklas von Hertzen",
+    "email": "niklasvh@gmail.com",
+    "url": "https://hertzen.com"
+  },
+  "bugs": {
+    "url": "https://github.com/niklasvh/base64-arraybuffer/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "Encode/decode base64 data into ArrayBuffers",
+  "devDependencies": {
+    "mocha": "^6.1.4"
+  },
+  "engines": {
+    "node": ">= 0.6.0"
+  },
+  "homepage": "https://github.com/niklasvh/base64-arraybuffer",
+  "keywords": [],
+  "licenses": [
+    {
+      "type": "MIT",
+      "url": "https://github.com/niklasvh/base64-arraybuffer/blob/master/LICENSE-MIT"
+    }
+  ],
+  "main": "lib/base64-arraybuffer",
+  "name": "base64-arraybuffer",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/niklasvh/base64-arraybuffer.git"
+  },
+  "scripts": {
+    "test": "mocha test"
+  },
+  "version": "0.2.0"
+}

+ 21 - 0
node_modules/base64-js/LICENSE

@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Jameson Little
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 34 - 0
node_modules/base64-js/README.md

@@ -0,0 +1,34 @@
+base64-js
+=========
+
+`base64-js` does basic base64 encoding/decoding in pure JS.
+
+[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js)
+
+Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
+
+Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
+
+## install
+
+With [npm](https://npmjs.org) do:
+
+`npm install base64-js` and `var base64js = require('base64-js')`
+
+For use in web browsers do:
+
+`<script src="base64js.min.js"></script>`
+
+[Get supported base64-js with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-base64-js?utm_source=npm-base64-js&utm_medium=referral&utm_campaign=readme)
+
+## methods
+
+`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument.
+
+* `byteLength` - Takes a base64 string and returns length of byte array
+* `toByteArray` - Takes a base64 string and returns a byte array
+* `fromByteArray` - Takes a byte array and returns a base64 string
+
+## license
+
+MIT

File diff suppressed because it is too large
+ 1 - 0
node_modules/base64-js/base64js.min.js


+ 3 - 0
node_modules/base64-js/index.d.ts

@@ -0,0 +1,3 @@
+export function byteLength(b64: string): number;
+export function toByteArray(b64: string): Uint8Array;
+export function fromByteArray(uint8: Uint8Array): string;

+ 150 - 0
node_modules/base64-js/index.js

@@ -0,0 +1,150 @@
+'use strict'
+
+exports.byteLength = byteLength
+exports.toByteArray = toByteArray
+exports.fromByteArray = fromByteArray
+
+var lookup = []
+var revLookup = []
+var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
+
+var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+for (var i = 0, len = code.length; i < len; ++i) {
+  lookup[i] = code[i]
+  revLookup[code.charCodeAt(i)] = i
+}
+
+// Support decoding URL-safe base64 strings, as Node.js does.
+// See: https://en.wikipedia.org/wiki/Base64#URL_applications
+revLookup['-'.charCodeAt(0)] = 62
+revLookup['_'.charCodeAt(0)] = 63
+
+function getLens (b64) {
+  var len = b64.length
+
+  if (len % 4 > 0) {
+    throw new Error('Invalid string. Length must be a multiple of 4')
+  }
+
+  // Trim off extra bytes after placeholder bytes are found
+  // See: https://github.com/beatgammit/base64-js/issues/42
+  var validLen = b64.indexOf('=')
+  if (validLen === -1) validLen = len
+
+  var placeHoldersLen = validLen === len
+    ? 0
+    : 4 - (validLen % 4)
+
+  return [validLen, placeHoldersLen]
+}
+
+// base64 is 4/3 + up to two characters of the original data
+function byteLength (b64) {
+  var lens = getLens(b64)
+  var validLen = lens[0]
+  var placeHoldersLen = lens[1]
+  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function _byteLength (b64, validLen, placeHoldersLen) {
+  return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
+}
+
+function toByteArray (b64) {
+  var tmp
+  var lens = getLens(b64)
+  var validLen = lens[0]
+  var placeHoldersLen = lens[1]
+
+  var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
+
+  var curByte = 0
+
+  // if there are placeholders, only get up to the last complete 4 chars
+  var len = placeHoldersLen > 0
+    ? validLen - 4
+    : validLen
+
+  var i
+  for (i = 0; i < len; i += 4) {
+    tmp =
+      (revLookup[b64.charCodeAt(i)] << 18) |
+      (revLookup[b64.charCodeAt(i + 1)] << 12) |
+      (revLookup[b64.charCodeAt(i + 2)] << 6) |
+      revLookup[b64.charCodeAt(i + 3)]
+    arr[curByte++] = (tmp >> 16) & 0xFF
+    arr[curByte++] = (tmp >> 8) & 0xFF
+    arr[curByte++] = tmp & 0xFF
+  }
+
+  if (placeHoldersLen === 2) {
+    tmp =
+      (revLookup[b64.charCodeAt(i)] << 2) |
+      (revLookup[b64.charCodeAt(i + 1)] >> 4)
+    arr[curByte++] = tmp & 0xFF
+  }
+
+  if (placeHoldersLen === 1) {
+    tmp =
+      (revLookup[b64.charCodeAt(i)] << 10) |
+      (revLookup[b64.charCodeAt(i + 1)] << 4) |
+      (revLookup[b64.charCodeAt(i + 2)] >> 2)
+    arr[curByte++] = (tmp >> 8) & 0xFF
+    arr[curByte++] = tmp & 0xFF
+  }
+
+  return arr
+}
+
+function tripletToBase64 (num) {
+  return lookup[num >> 18 & 0x3F] +
+    lookup[num >> 12 & 0x3F] +
+    lookup[num >> 6 & 0x3F] +
+    lookup[num & 0x3F]
+}
+
+function encodeChunk (uint8, start, end) {
+  var tmp
+  var output = []
+  for (var i = start; i < end; i += 3) {
+    tmp =
+      ((uint8[i] << 16) & 0xFF0000) +
+      ((uint8[i + 1] << 8) & 0xFF00) +
+      (uint8[i + 2] & 0xFF)
+    output.push(tripletToBase64(tmp))
+  }
+  return output.join('')
+}
+
+function fromByteArray (uint8) {
+  var tmp
+  var len = uint8.length
+  var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
+  var parts = []
+  var maxChunkLength = 16383 // must be multiple of 3
+
+  // go through the array every three bytes, we'll deal with trailing stuff later
+  for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
+    parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
+  }
+
+  // pad the end with zeros, but make sure to not forget the extra bytes
+  if (extraBytes === 1) {
+    tmp = uint8[len - 1]
+    parts.push(
+      lookup[tmp >> 2] +
+      lookup[(tmp << 4) & 0x3F] +
+      '=='
+    )
+  } else if (extraBytes === 2) {
+    tmp = (uint8[len - 2] << 8) + uint8[len - 1]
+    parts.push(
+      lookup[tmp >> 10] +
+      lookup[(tmp >> 4) & 0x3F] +
+      lookup[(tmp << 2) & 0x3F] +
+      '='
+    )
+  }
+
+  return parts.join('')
+}

+ 76 - 0
node_modules/base64-js/package.json

@@ -0,0 +1,76 @@
+{
+  "_from": "base64-js@^1.3.0",
+  "_id": "base64-js@1.5.1",
+  "_inBundle": false,
+  "_integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+  "_location": "/base64-js",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "base64-js@^1.3.0",
+    "name": "base64-js",
+    "escapedName": "base64-js",
+    "rawSpec": "^1.3.0",
+    "saveSpec": null,
+    "fetchSpec": "^1.3.0"
+  },
+  "_requiredBy": [
+    "/buffer",
+    "/mqtt"
+  ],
+  "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+  "_shasum": "1b1b440160a5bf7ad40b650f095963481903930a",
+  "_spec": "base64-js@^1.3.0",
+  "_where": "/Users/bssm/Desktop/fabTest/打卡坐标/node_modules/mqtt",
+  "author": {
+    "name": "T. Jameson Little",
+    "email": "t.jameson.little@gmail.com"
+  },
+  "bugs": {
+    "url": "https://github.com/beatgammit/base64-js/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "Base64 encoding/decoding in pure JS",
+  "devDependencies": {
+    "babel-minify": "^0.5.1",
+    "benchmark": "^2.1.4",
+    "browserify": "^16.3.0",
+    "standard": "*",
+    "tape": "4.x"
+  },
+  "funding": [
+    {
+      "type": "github",
+      "url": "https://github.com/sponsors/feross"
+    },
+    {
+      "type": "patreon",
+      "url": "https://www.patreon.com/feross"
+    },
+    {
+      "type": "consulting",
+      "url": "https://feross.org/support"
+    }
+  ],
+  "homepage": "https://github.com/beatgammit/base64-js",
+  "keywords": [
+    "base64"
+  ],
+  "license": "MIT",
+  "main": "index.js",
+  "name": "base64-js",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/beatgammit/base64-js.git"
+  },
+  "scripts": {
+    "build": "browserify -s base64js -r ./ | minify > base64js.min.js",
+    "lint": "standard",
+    "test": "npm run lint && npm run unit",
+    "unit": "tape test/*.js"
+  },
+  "typings": "index.d.ts",
+  "version": "1.5.1"
+}

+ 17 - 0
node_modules/bl/.travis.yml

@@ -0,0 +1,17 @@
+sudo: false
+arch:
+ - amd64
+ - ppc64le
+language: node_js
+node_js:
+  - '6'
+  - '8'
+  - '10'
+  - '12'
+  - '14'
+  - '15'
+  - lts/*
+notifications:
+  email:
+    - rod@vagg.org
+    - matteo.collina@gmail.com

+ 396 - 0
node_modules/bl/BufferList.js

@@ -0,0 +1,396 @@
+'use strict'
+
+const { Buffer } = require('buffer')
+const symbol = Symbol.for('BufferList')
+
+function BufferList (buf) {
+  if (!(this instanceof BufferList)) {
+    return new BufferList(buf)
+  }
+
+  BufferList._init.call(this, buf)
+}
+
+BufferList._init = function _init (buf) {
+  Object.defineProperty(this, symbol, { value: true })
+
+  this._bufs = []
+  this.length = 0
+
+  if (buf) {
+    this.append(buf)
+  }
+}
+
+BufferList.prototype._new = function _new (buf) {
+  return new BufferList(buf)
+}
+
+BufferList.prototype._offset = function _offset (offset) {
+  if (offset === 0) {
+    return [0, 0]
+  }
+
+  let tot = 0
+
+  for (let i = 0; i < this._bufs.length; i++) {
+    const _t = tot + this._bufs[i].length
+    if (offset < _t || i === this._bufs.length - 1) {
+      return [i, offset - tot]
+    }
+    tot = _t
+  }
+}
+
+BufferList.prototype._reverseOffset = function (blOffset) {
+  const bufferId = blOffset[0]
+  let offset = blOffset[1]
+
+  for (let i = 0; i < bufferId; i++) {
+    offset += this._bufs[i].length
+  }
+
+  return offset
+}
+
+BufferList.prototype.get = function get (index) {
+  if (index > this.length || index < 0) {
+    return undefined
+  }
+
+  const offset = this._offset(index)
+
+  return this._bufs[offset[0]][offset[1]]
+}
+
+BufferList.prototype.slice = function slice (start, end) {
+  if (typeof start === 'number' && start < 0) {
+    start += this.length
+  }
+
+  if (typeof end === 'number' && end < 0) {
+    end += this.length
+  }
+
+  return this.copy(null, 0, start, end)
+}
+
+BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) {
+  if (typeof srcStart !== 'number' || srcStart < 0) {
+    srcStart = 0
+  }
+
+  if (typeof srcEnd !== 'number' || srcEnd > this.length) {
+    srcEnd = this.length
+  }
+
+  if (srcStart >= this.length) {
+    return dst || Buffer.alloc(0)
+  }
+
+  if (srcEnd <= 0) {
+    return dst || Buffer.alloc(0)
+  }
+
+  const copy = !!dst
+  const off = this._offset(srcStart)
+  const len = srcEnd - srcStart
+  let bytes = len
+  let bufoff = (copy && dstStart) || 0
+  let start = off[1]
+
+  // copy/slice everything
+  if (srcStart === 0 && srcEnd === this.length) {
+    if (!copy) {
+      // slice, but full concat if multiple buffers
+      return this._bufs.length === 1
+        ? this._bufs[0]
+        : Buffer.concat(this._bufs, this.length)
+    }
+
+    // copy, need to copy individual buffers
+    for (let i = 0; i < this._bufs.length; i++) {
+      this._bufs[i].copy(dst, bufoff)
+      bufoff += this._bufs[i].length
+    }
+
+    return dst
+  }
+
+  // easy, cheap case where it's a subset of one of the buffers
+  if (bytes <= this._bufs[off[0]].length - start) {
+    return copy
+      ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes)
+      : this._bufs[off[0]].slice(start, start + bytes)
+  }
+
+  if (!copy) {
+    // a slice, we need something to copy in to
+    dst = Buffer.allocUnsafe(len)
+  }
+
+  for (let i = off[0]; i < this._bufs.length; i++) {
+    const l = this._bufs[i].length - start
+
+    if (bytes > l) {
+      this._bufs[i].copy(dst, bufoff, start)
+      bufoff += l
+    } else {
+      this._bufs[i].copy(dst, bufoff, start, start + bytes)
+      bufoff += l
+      break
+    }
+
+    bytes -= l
+
+    if (start) {
+      start = 0
+    }
+  }
+
+  // safeguard so that we don't return uninitialized memory
+  if (dst.length > bufoff) return dst.slice(0, bufoff)
+
+  return dst
+}
+
+BufferList.prototype.shallowSlice = function shallowSlice (start, end) {
+  start = start || 0
+  end = typeof end !== 'number' ? this.length : end
+
+  if (start < 0) {
+    start += this.length
+  }
+
+  if (end < 0) {
+    end += this.length
+  }
+
+  if (start === end) {
+    return this._new()
+  }
+
+  const startOffset = this._offset(start)
+  const endOffset = this._offset(end)
+  const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1)
+
+  if (endOffset[1] === 0) {
+    buffers.pop()
+  } else {
+    buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1])
+  }
+
+  if (startOffset[1] !== 0) {
+    buffers[0] = buffers[0].slice(startOffset[1])
+  }
+
+  return this._new(buffers)
+}
+
+BufferList.prototype.toString = function toString (encoding, start, end) {
+  return this.slice(start, end).toString(encoding)
+}
+
+BufferList.prototype.consume = function consume (bytes) {
+  // first, normalize the argument, in accordance with how Buffer does it
+  bytes = Math.trunc(bytes)
+  // do nothing if not a positive number
+  if (Number.isNaN(bytes) || bytes <= 0) return this
+
+  while (this._bufs.length) {
+    if (bytes >= this._bufs[0].length) {
+      bytes -= this._bufs[0].length
+      this.length -= this._bufs[0].length
+      this._bufs.shift()
+    } else {
+      this._bufs[0] = this._bufs[0].slice(bytes)
+      this.length -= bytes
+      break
+    }
+  }
+
+  return this
+}
+
+BufferList.prototype.duplicate = function duplicate () {
+  const copy = this._new()
+
+  for (let i = 0; i < this._bufs.length; i++) {
+    copy.append(this._bufs[i])
+  }
+
+  return copy
+}
+
+BufferList.prototype.append = function append (buf) {
+  if (buf == null) {
+    return this
+  }
+
+  if (buf.buffer) {
+    // append a view of the underlying ArrayBuffer
+    this._appendBuffer(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength))
+  } else if (Array.isArray(buf)) {
+    for (let i = 0; i < buf.length; i++) {
+      this.append(buf[i])
+    }
+  } else if (this._isBufferList(buf)) {
+    // unwrap argument into individual BufferLists
+    for (let i = 0; i < buf._bufs.length; i++) {
+      this.append(buf._bufs[i])
+    }
+  } else {
+    // coerce number arguments to strings, since Buffer(number) does
+    // uninitialized memory allocation
+    if (typeof buf === 'number') {
+      buf = buf.toString()
+    }
+
+    this._appendBuffer(Buffer.from(buf))
+  }
+
+  return this
+}
+
+BufferList.prototype._appendBuffer = function appendBuffer (buf) {
+  this._bufs.push(buf)
+  this.length += buf.length
+}
+
+BufferList.prototype.indexOf = function (search, offset, encoding) {
+  if (encoding === undefined && typeof offset === 'string') {
+    encoding = offset
+    offset = undefined
+  }
+
+  if (typeof search === 'function' || Array.isArray(search)) {
+    throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.')
+  } else if (typeof search === 'number') {
+    search = Buffer.from([search])
+  } else if (typeof search === 'string') {
+    search = Buffer.from(search, encoding)
+  } else if (this._isBufferList(search)) {
+    search = search.slice()
+  } else if (Array.isArray(search.buffer)) {
+    search = Buffer.from(search.buffer, search.byteOffset, search.byteLength)
+  } else if (!Buffer.isBuffer(search)) {
+    search = Buffer.from(search)
+  }
+
+  offset = Number(offset || 0)
+
+  if (isNaN(offset)) {
+    offset = 0
+  }
+
+  if (offset < 0) {
+    offset = this.length + offset
+  }
+
+  if (offset < 0) {
+    offset = 0
+  }
+
+  if (search.length === 0) {
+    return offset > this.length ? this.length : offset
+  }
+
+  const blOffset = this._offset(offset)
+  let blIndex = blOffset[0] // index of which internal buffer we're working on
+  let buffOffset = blOffset[1] // offset of the internal buffer we're working on
+
+  // scan over each buffer
+  for (; blIndex < this._bufs.length; blIndex++) {
+    const buff = this._bufs[blIndex]
+
+    while (buffOffset < buff.length) {
+      const availableWindow = buff.length - buffOffset
+
+      if (availableWindow >= search.length) {
+        const nativeSearchResult = buff.indexOf(search, buffOffset)
+
+        if (nativeSearchResult !== -1) {
+          return this._reverseOffset([blIndex, nativeSearchResult])
+        }
+
+        buffOffset = buff.length - search.length + 1 // end of native search window
+      } else {
+        const revOffset = this._reverseOffset([blIndex, buffOffset])
+
+        if (this._match(revOffset, search)) {
+          return revOffset
+        }
+
+        buffOffset++
+      }
+    }
+
+    buffOffset = 0
+  }
+
+  return -1
+}
+
+BufferList.prototype._match = function (offset, search) {
+  if (this.length - offset < search.length) {
+    return false
+  }
+
+  for (let searchOffset = 0; searchOffset < search.length; searchOffset++) {
+    if (this.get(offset + searchOffset) !== search[searchOffset]) {
+      return false
+    }
+  }
+  return true
+}
+
+;(function () {
+  const methods = {
+    readDoubleBE: 8,
+    readDoubleLE: 8,
+    readFloatBE: 4,
+    readFloatLE: 4,
+    readInt32BE: 4,
+    readInt32LE: 4,
+    readUInt32BE: 4,
+    readUInt32LE: 4,
+    readInt16BE: 2,
+    readInt16LE: 2,
+    readUInt16BE: 2,
+    readUInt16LE: 2,
+    readInt8: 1,
+    readUInt8: 1,
+    readIntBE: null,
+    readIntLE: null,
+    readUIntBE: null,
+    readUIntLE: null
+  }
+
+  for (const m in methods) {
+    (function (m) {
+      if (methods[m] === null) {
+        BufferList.prototype[m] = function (offset, byteLength) {
+          return this.slice(offset, offset + byteLength)[m](0, byteLength)
+        }
+      } else {
+        BufferList.prototype[m] = function (offset = 0) {
+          return this.slice(offset, offset + methods[m])[m](0)
+        }
+      }
+    }(m))
+  }
+}())
+
+// Used internally by the class and also as an indicator of this object being
+// a `BufferList`. It's not possible to use `instanceof BufferList` in a browser
+// environment because there could be multiple different copies of the
+// BufferList class and some `BufferList`s might be `BufferList`s.
+BufferList.prototype._isBufferList = function _isBufferList (b) {
+  return b instanceof BufferList || BufferList.isBufferList(b)
+}
+
+BufferList.isBufferList = function isBufferList (b) {
+  return b != null && b[symbol]
+}
+
+module.exports = BufferList

+ 13 - 0
node_modules/bl/LICENSE.md

@@ -0,0 +1,13 @@
+The MIT License (MIT)
+=====================
+
+Copyright (c) 2013-2019 bl contributors
+----------------------------------
+
+*bl contributors listed at <https://github.com/rvagg/bl#contributors>*
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large
+ 247 - 0
node_modules/bl/README.md


+ 84 - 0
node_modules/bl/bl.js

@@ -0,0 +1,84 @@
+'use strict'
+
+const DuplexStream = require('readable-stream').Duplex
+const inherits = require('inherits')
+const BufferList = require('./BufferList')
+
+function BufferListStream (callback) {
+  if (!(this instanceof BufferListStream)) {
+    return new BufferListStream(callback)
+  }
+
+  if (typeof callback === 'function') {
+    this._callback = callback
+
+    const piper = function piper (err) {
+      if (this._callback) {
+        this._callback(err)
+        this._callback = null
+      }
+    }.bind(this)
+
+    this.on('pipe', function onPipe (src) {
+      src.on('error', piper)
+    })
+    this.on('unpipe', function onUnpipe (src) {
+      src.removeListener('error', piper)
+    })
+
+    callback = null
+  }
+
+  BufferList._init.call(this, callback)
+  DuplexStream.call(this)
+}
+
+inherits(BufferListStream, DuplexStream)
+Object.assign(BufferListStream.prototype, BufferList.prototype)
+
+BufferListStream.prototype._new = function _new (callback) {
+  return new BufferListStream(callback)
+}
+
+BufferListStream.prototype._write = function _write (buf, encoding, callback) {
+  this._appendBuffer(buf)
+
+  if (typeof callback === 'function') {
+    callback()
+  }
+}
+
+BufferListStream.prototype._read = function _read (size) {
+  if (!this.length) {
+    return this.push(null)
+  }
+
+  size = Math.min(size, this.length)
+  this.push(this.slice(0, size))
+  this.consume(size)
+}
+
+BufferListStream.prototype.end = function end (chunk) {
+  DuplexStream.prototype.end.call(this, chunk)
+
+  if (this._callback) {
+    this._callback(null, this.slice())
+    this._callback = null
+  }
+}
+
+BufferListStream.prototype._destroy = function _destroy (err, cb) {
+  this._bufs.length = 0
+  this.length = 0
+  cb(err)
+}
+
+BufferListStream.prototype._isBufferList = function _isBufferList (b) {
+  return b instanceof BufferListStream || b instanceof BufferList || BufferListStream.isBufferList(b)
+}
+
+BufferListStream.isBufferList = BufferList.isBufferList
+
+module.exports = BufferListStream
+module.exports.BufferListStream = BufferListStream
+module.exports.BufferList = BufferList

+ 38 - 0
node_modules/bl/node_modules/readable-stream/CONTRIBUTING.md

@@ -0,0 +1,38 @@
+# Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+* (a) The contribution was created in whole or in part by me and I
+  have the right to submit it under the open source license
+  indicated in the file; or
+
+* (b) The contribution is based upon previous work that, to the best
+  of my knowledge, is covered under an appropriate open source
+  license and I have the right under that license to submit that
+  work with modifications, whether created in whole or in part
+  by me, under the same open source license (unless I am
+  permitted to submit under a different license), as indicated
+  in the file; or
+
+* (c) The contribution was provided directly to me by some other
+  person who certified (a), (b) or (c) and I have not modified
+  it.
+
+* (d) I understand and agree that this project and the contribution
+  are public and that a record of the contribution (including all
+  personal information I submit with it, including my sign-off) is
+  maintained indefinitely and may be redistributed consistent with
+  this project or the open source license(s) involved.
+
+## Moderation Policy
+
+The [Node.js Moderation Policy] applies to this WG.
+
+## Code of Conduct
+
+The [Node.js Code of Conduct][] applies to this WG.
+
+[Node.js Code of Conduct]:
+https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md
+[Node.js Moderation Policy]:
+https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md

+ 136 - 0
node_modules/bl/node_modules/readable-stream/GOVERNANCE.md

@@ -0,0 +1,136 @@
+### Streams Working Group
+
+The Node.js Streams is jointly governed by a Working Group
+(WG)
+that is responsible for high-level guidance of the project.
+
+The WG has final authority over this project including:
+
+* Technical direction
+* Project governance and process (including this policy)
+* Contribution policy
+* GitHub repository hosting
+* Conduct guidelines
+* Maintaining the list of additional Collaborators
+
+For the current list of WG members, see the project
+[README.md](./README.md#current-project-team-members).
+
+### Collaborators
+
+The readable-stream GitHub repository is
+maintained by the WG and additional Collaborators who are added by the
+WG on an ongoing basis.
+
+Individuals making significant and valuable contributions are made
+Collaborators and given commit-access to the project. These
+individuals are identified by the WG and their addition as
+Collaborators is discussed during the WG meeting.
+
+_Note:_ If you make a significant contribution and are not considered
+for commit-access log an issue or contact a WG member directly and it
+will be brought up in the next WG meeting.
+
+Modifications of the contents of the readable-stream repository are
+made on
+a collaborative basis. Anybody with a GitHub account may propose a
+modification via pull request and it will be considered by the project
+Collaborators. All pull requests must be reviewed and accepted by a
+Collaborator with sufficient expertise who is able to take full
+responsibility for the change. In the case of pull requests proposed
+by an existing Collaborator, an additional Collaborator is required
+for sign-off. Consensus should be sought if additional Collaborators
+participate and there is disagreement around a particular
+modification. See _Consensus Seeking Process_ below for further detail
+on the consensus model used for governance.
+
+Collaborators may opt to elevate significant or controversial
+modifications, or modifications that have not found consensus to the
+WG for discussion by assigning the ***WG-agenda*** tag to a pull
+request or issue. The WG should serve as the final arbiter where
+required.
+
+For the current list of Collaborators, see the project
+[README.md](./README.md#members).
+
+### WG Membership
+
+WG seats are not time-limited.  There is no fixed size of the WG.
+However, the expected target is between 6 and 12, to ensure adequate
+coverage of important areas of expertise, balanced with the ability to
+make decisions efficiently.
+
+There is no specific set of requirements or qualifications for WG
+membership beyond these rules.
+
+The WG may add additional members to the WG by unanimous consensus.
+
+A WG member may be removed from the WG by voluntary resignation, or by
+unanimous consensus of all other WG members.
+
+Changes to WG membership should be posted in the agenda, and may be
+suggested as any other agenda item (see "WG Meetings" below).
+
+If an addition or removal is proposed during a meeting, and the full
+WG is not in attendance to participate, then the addition or removal
+is added to the agenda for the subsequent meeting.  This is to ensure
+that all members are given the opportunity to participate in all
+membership decisions.  If a WG member is unable to attend a meeting
+where a planned membership decision is being made, then their consent
+is assumed.
+
+No more than 1/3 of the WG members may be affiliated with the same
+employer.  If removal or resignation of a WG member, or a change of
+employment by a WG member, creates a situation where more than 1/3 of
+the WG membership shares an employer, then the situation must be
+immediately remedied by the resignation or removal of one or more WG
+members affiliated with the over-represented employer(s).
+
+### WG Meetings
+
+The WG meets occasionally on a Google Hangout On Air. A designated moderator
+approved by the WG runs the meeting. Each meeting should be
+published to YouTube.
+
+Items are added to the WG agenda that are considered contentious or
+are modifications of governance, contribution policy, WG membership,
+or release process.
+
+The intention of the agenda is not to approve or review all patches;
+that should happen continuously on GitHub and be handled by the larger
+group of Collaborators.
+
+Any community member or contributor can ask that something be added to
+the next meeting's agenda by logging a GitHub Issue. Any Collaborator,
+WG member or the moderator can add the item to the agenda by adding
+the ***WG-agenda*** tag to the issue.
+
+Prior to each WG meeting the moderator will share the Agenda with
+members of the WG. WG members can add any items they like to the
+agenda at the beginning of each meeting. The moderator and the WG
+cannot veto or remove items.
+
+The WG may invite persons or representatives from certain projects to
+participate in a non-voting capacity.
+
+The moderator is responsible for summarizing the discussion of each
+agenda item and sends it as a pull request after the meeting.
+
+### Consensus Seeking Process
+
+The WG follows a
+[Consensus
+Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making)
+decision-making model.
+
+When an agenda item has appeared to reach a consensus the moderator
+will ask "Does anyone object?" as a final call for dissent from the
+consensus.
+
+If an agenda item cannot reach a consensus a WG member can call for
+either a closing vote or a vote to table the issue to the next
+meeting. The call for a vote must be seconded by a majority of the WG
+or else the discussion will continue. Simple majority wins.
+
+Note that changes to WG membership require a majority consensus.  See
+"WG Membership" above.

+ 47 - 0
node_modules/bl/node_modules/readable-stream/LICENSE

@@ -0,0 +1,47 @@
+Node.js is licensed for use as follows:
+
+"""
+Copyright Node.js contributors. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+"""
+
+This license applies to parts of Node.js originating from the
+https://github.com/joyent/node repository:
+
+"""
+Copyright Joyent, Inc. and other Node contributors. All rights reserved.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+"""

+ 106 - 0
node_modules/bl/node_modules/readable-stream/README.md

@@ -0,0 +1,106 @@
+# readable-stream
+
+***Node.js core streams for userland*** [![Build Status](https://travis-ci.com/nodejs/readable-stream.svg?branch=master)](https://travis-ci.com/nodejs/readable-stream)
+
+
+[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
+[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
+
+
+[![Sauce Test Status](https://saucelabs.com/browser-matrix/readabe-stream.svg)](https://saucelabs.com/u/readabe-stream)
+
+```bash
+npm install --save readable-stream
+```
+
+This package is a mirror of the streams implementations in Node.js.
+
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.19.0/docs/api/stream.html).
+
+If you want to guarantee a stable streams base, regardless of what version of
+Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
+
+As of version 2.0.0 **readable-stream** uses semantic versioning.
+
+## Version 3.x.x
+
+v3.x.x of `readable-stream` is a cut from Node 10. This version supports Node 6, 8, and 10, as well as evergreen browsers, IE 11 and latest Safari. The breaking changes introduced by v3 are composed by the combined breaking changes in [Node v9](https://nodejs.org/en/blog/release/v9.0.0/) and [Node v10](https://nodejs.org/en/blog/release/v10.0.0/), as follows:
+
+1. Error codes: https://github.com/nodejs/node/pull/13310,
+   https://github.com/nodejs/node/pull/13291,
+   https://github.com/nodejs/node/pull/16589,
+   https://github.com/nodejs/node/pull/15042,
+   https://github.com/nodejs/node/pull/15665,
+   https://github.com/nodejs/readable-stream/pull/344
+2. 'readable' have precedence over flowing
+   https://github.com/nodejs/node/pull/18994
+3. make virtual methods errors consistent
+   https://github.com/nodejs/node/pull/18813
+4. updated streams error handling
+   https://github.com/nodejs/node/pull/18438
+5. writable.end should return this.
+   https://github.com/nodejs/node/pull/18780
+6. readable continues to read when push('')
+   https://github.com/nodejs/node/pull/18211
+7. add custom inspect to BufferList
+   https://github.com/nodejs/node/pull/17907
+8. always defer 'readable' with nextTick
+   https://github.com/nodejs/node/pull/17979
+
+## Version 2.x.x
+v2.x.x of `readable-stream` is a cut of the stream module from Node 8 (there have been no semver-major changes from Node 4 to 8). This version supports all Node.js versions from 0.8, as well as evergreen browsers and IE 10 & 11.
+
+### Big Thanks
+
+Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs][sauce]
+
+# Usage
+
+You can swap your `require('stream')` with `require('readable-stream')`
+without any changes, if you are just using one of the main classes and
+functions.
+
+```js
+const {
+  Readable,
+  Writable,
+  Transform,
+  Duplex,
+  pipeline,
+  finished
+} = require('readable-stream')
+````
+
+Note that `require('stream')` will return `Stream`, while
+`require('readable-stream')` will return `Readable`. We discourage using
+whatever is exported directly, but rather use one of the properties as
+shown in the example above.
+
+# Streams Working Group
+
+`readable-stream` is maintained by the Streams Working Group, which
+oversees the development and maintenance of the Streams API within
+Node.js. The responsibilities of the Streams Working Group include:
+
+* Addressing stream issues on the Node.js issue tracker.
+* Authoring and editing stream documentation within the Node.js project.
+* Reviewing changes to stream subclasses within the Node.js project.
+* Redirecting changes to streams from the Node.js project to this
+  project.
+* Assisting in the implementation of stream providers within Node.js.
+* Recommending versions of `readable-stream` to be included in Node.js.
+* Messaging about the future of streams to give the community advance
+  notice of changes.
+
+<a name="members"></a>
+## Team Members
+
+* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;
+  - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242
+* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;
+* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;
+  - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E
+* **Irina Shestak** ([@lrlna](https://github.com/lrlna)) &lt;shestak.irina@gmail.com&gt;
+* **Yoshua Wyuts** ([@yoshuawuyts](https://github.com/yoshuawuyts)) &lt;yoshuawuyts@gmail.com&gt;
+
+[sauce]: https://saucelabs.com

+ 127 - 0
node_modules/bl/node_modules/readable-stream/errors-browser.js

@@ -0,0 +1,127 @@
+'use strict';
+
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
+
+var codes = {};
+
+function createErrorType(code, message, Base) {
+  if (!Base) {
+    Base = Error;
+  }
+
+  function getMessage(arg1, arg2, arg3) {
+    if (typeof message === 'string') {
+      return message;
+    } else {
+      return message(arg1, arg2, arg3);
+    }
+  }
+
+  var NodeError =
+  /*#__PURE__*/
+  function (_Base) {
+    _inheritsLoose(NodeError, _Base);
+
+    function NodeError(arg1, arg2, arg3) {
+      return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;
+    }
+
+    return NodeError;
+  }(Base);
+
+  NodeError.prototype.name = Base.name;
+  NodeError.prototype.code = code;
+  codes[code] = NodeError;
+} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
+
+
+function oneOf(expected, thing) {
+  if (Array.isArray(expected)) {
+    var len = expected.length;
+    expected = expected.map(function (i) {
+      return String(i);
+    });
+
+    if (len > 2) {
+      return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1];
+    } else if (len === 2) {
+      return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
+    } else {
+      return "of ".concat(thing, " ").concat(expected[0]);
+    }
+  } else {
+    return "of ".concat(thing, " ").concat(String(expected));
+  }
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
+
+
+function startsWith(str, search, pos) {
+  return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
+
+
+function endsWith(str, search, this_len) {
+  if (this_len === undefined || this_len > str.length) {
+    this_len = str.length;
+  }
+
+  return str.substring(this_len - search.length, this_len) === search;
+} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
+
+
+function includes(str, search, start) {
+  if (typeof start !== 'number') {
+    start = 0;
+  }
+
+  if (start + search.length > str.length) {
+    return false;
+  } else {
+    return str.indexOf(search, start) !== -1;
+  }
+}
+
+createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
+  return 'The value "' + value + '" is invalid for option "' + name + '"';
+}, TypeError);
+createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
+  // determiner: 'must be' or 'must not be'
+  var determiner;
+
+  if (typeof expected === 'string' && startsWith(expected, 'not ')) {
+    determiner = 'must not be';
+    expected = expected.replace(/^not /, '');
+  } else {
+    determiner = 'must be';
+  }
+
+  var msg;
+
+  if (endsWith(name, ' argument')) {
+    // For cases like 'first argument'
+    msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
+  } else {
+    var type = includes(name, '.') ? 'property' : 'argument';
+    msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
+  }
+
+  msg += ". Received type ".concat(typeof actual);
+  return msg;
+}, TypeError);
+createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
+createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
+  return 'The ' + name + ' method is not implemented';
+});
+createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
+createErrorType('ERR_STREAM_DESTROYED', function (name) {
+  return 'Cannot call ' + name + ' after a stream was destroyed';
+});
+createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
+createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
+createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
+createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
+createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
+  return 'Unknown encoding: ' + arg;
+}, TypeError);
+createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
+module.exports.codes = codes;

+ 116 - 0
node_modules/bl/node_modules/readable-stream/errors.js

@@ -0,0 +1,116 @@
+'use strict';
+
+const codes = {};
+
+function createErrorType(code, message, Base) {
+  if (!Base) {
+    Base = Error
+  }
+
+  function getMessage (arg1, arg2, arg3) {
+    if (typeof message === 'string') {
+      return message
+    } else {
+      return message(arg1, arg2, arg3)
+    }
+  }
+
+  class NodeError extends Base {
+    constructor (arg1, arg2, arg3) {
+      super(getMessage(arg1, arg2, arg3));
+    }
+  }
+
+  NodeError.prototype.name = Base.name;
+  NodeError.prototype.code = code;
+
+  codes[code] = NodeError;
+}
+
+// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
+function oneOf(expected, thing) {
+  if (Array.isArray(expected)) {
+    const len = expected.length;
+    expected = expected.map((i) => String(i));
+    if (len > 2) {
+      return `one of ${thing} ${expected.slice(0, len - 1).join(', ')}, or ` +
+             expected[len - 1];
+    } else if (len === 2) {
+      return `one of ${thing} ${expected[0]} or ${expected[1]}`;
+    } else {
+      return `of ${thing} ${expected[0]}`;
+    }
+  } else {
+    return `of ${thing} ${String(expected)}`;
+  }
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
+function startsWith(str, search, pos) {
+	return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
+function endsWith(str, search, this_len) {
+	if (this_len === undefined || this_len > str.length) {
+		this_len = str.length;
+	}
+	return str.substring(this_len - search.length, this_len) === search;
+}
+
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
+function includes(str, search, start) {
+  if (typeof start !== 'number') {
+    start = 0;
+  }
+
+  if (start + search.length > str.length) {
+    return false;
+  } else {
+    return str.indexOf(search, start) !== -1;
+  }
+}
+
+createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
+  return 'The value "' + value + '" is invalid for option "' + name + '"'
+}, TypeError);
+createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
+  // determiner: 'must be' or 'must not be'
+  let determiner;
+  if (typeof expected === 'string' && startsWith(expected, 'not ')) {
+    determiner = 'must not be';
+    expected = expected.replace(/^not /, '');
+  } else {
+    determiner = 'must be';
+  }
+
+  let msg;
+  if (endsWith(name, ' argument')) {
+    // For cases like 'first argument'
+    msg = `The ${name} ${determiner} ${oneOf(expected, 'type')}`;
+  } else {
+    const type = includes(name, '.') ? 'property' : 'argument';
+    msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, 'type')}`;
+  }
+
+  msg += `. Received type ${typeof actual}`;
+  return msg;
+}, TypeError);
+createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
+createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
+  return 'The ' + name + ' method is not implemented'
+});
+createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
+createErrorType('ERR_STREAM_DESTROYED', function (name) {
+  return 'Cannot call ' + name + ' after a stream was destroyed';
+});
+createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
+createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
+createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
+createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
+createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
+  return 'Unknown encoding: ' + arg
+}, TypeError);
+createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
+
+module.exports.codes = codes;

+ 17 - 0
node_modules/bl/node_modules/readable-stream/experimentalWarning.js

@@ -0,0 +1,17 @@
+'use strict'
+
+var experimentalWarnings = new Set();
+
+function emitExperimentalWarning(feature) {
+  if (experimentalWarnings.has(feature)) return;
+  var msg = feature + ' is an experimental feature. This feature could ' +
+       'change at any time';
+  experimentalWarnings.add(feature);
+  process.emitWarning(msg, 'ExperimentalWarning');
+}
+
+function noop() {}
+
+module.exports.emitExperimentalWarning = process.emitWarning
+  ? emitExperimentalWarning
+  : noop;

+ 139 - 0
node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js

@@ -0,0 +1,139 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+'use strict';
+/*<replacement>*/
+
+var objectKeys = Object.keys || function (obj) {
+  var keys = [];
+
+  for (var key in obj) {
+    keys.push(key);
+  }
+
+  return keys;
+};
+/*</replacement>*/
+
+
+module.exports = Duplex;
+
+var Readable = require('./_stream_readable');
+
+var Writable = require('./_stream_writable');
+
+require('inherits')(Duplex, Readable);
+
+{
+  // Allow the keys array to be GC'ed.
+  var keys = objectKeys(Writable.prototype);
+
+  for (var v = 0; v < keys.length; v++) {
+    var method = keys[v];
+    if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+  }
+}
+
+function Duplex(options) {
+  if (!(this instanceof Duplex)) return new Duplex(options);
+  Readable.call(this, options);
+  Writable.call(this, options);
+  this.allowHalfOpen = true;
+
+  if (options) {
+    if (options.readable === false) this.readable = false;
+    if (options.writable === false) this.writable = false;
+
+    if (options.allowHalfOpen === false) {
+      this.allowHalfOpen = false;
+      this.once('end', onend);
+    }
+  }
+}
+
+Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function get() {
+    return this._writableState.highWaterMark;
+  }
+});
+Object.defineProperty(Duplex.prototype, 'writableBuffer', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function get() {
+    return this._writableState && this._writableState.getBuffer();
+  }
+});
+Object.defineProperty(Duplex.prototype, 'writableLength', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function get() {
+    return this._writableState.length;
+  }
+}); // the no-half-open enforcer
+
+function onend() {
+  // If the writable side ended, then we're ok.
+  if (this._writableState.ended) return; // no more data can be written.
+  // But allow more writes to happen in this tick.
+
+  process.nextTick(onEndNT, this);
+}
+
+function onEndNT(self) {
+  self.end();
+}
+
+Object.defineProperty(Duplex.prototype, 'destroyed', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function get() {
+    if (this._readableState === undefined || this._writableState === undefined) {
+      return false;
+    }
+
+    return this._readableState.destroyed && this._writableState.destroyed;
+  },
+  set: function set(value) {
+    // we ignore the value if the stream
+    // has not been initialized yet
+    if (this._readableState === undefined || this._writableState === undefined) {
+      return;
+    } // backward compatibility, the user is explicitly
+    // managing destroyed
+
+
+    this._readableState.destroyed = value;
+    this._writableState.destroyed = value;
+  }
+});

+ 39 - 0
node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js

@@ -0,0 +1,39 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+'use strict';
+
+module.exports = PassThrough;
+
+var Transform = require('./_stream_transform');
+
+require('inherits')(PassThrough, Transform);
+
+function PassThrough(options) {
+  if (!(this instanceof PassThrough)) return new PassThrough(options);
+  Transform.call(this, options);
+}
+
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+  cb(null, chunk);
+};

File diff suppressed because it is too large
+ 1124 - 0
node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js


+ 201 - 0
node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js

@@ -0,0 +1,201 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+// a transform stream is a readable/writable stream where you do
+// something with the data.  Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored.  (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation.  For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes.  When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up.  When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer.  When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks.  If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk.  However,
+// a pathological inflate type of transform can cause excessive buffering
+// here.  For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output.  Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output.  In this case, you could write a very small
+// amount of input, and end up with a very large amount of output.  In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform.  A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+'use strict';
+
+module.exports = Transform;
+
+var _require$codes = require('../errors').codes,
+    ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+    ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
+    ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,
+    ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
+
+var Duplex = require('./_stream_duplex');
+
+require('inherits')(Transform, Duplex);
+
+function afterTransform(er, data) {
+  var ts = this._transformState;
+  ts.transforming = false;
+  var cb = ts.writecb;
+
+  if (cb === null) {
+    return this.emit('error', new ERR_MULTIPLE_CALLBACK());
+  }
+
+  ts.writechunk = null;
+  ts.writecb = null;
+  if (data != null) // single equals check for both `null` and `undefined`
+    this.push(data);
+  cb(er);
+  var rs = this._readableState;
+  rs.reading = false;
+
+  if (rs.needReadable || rs.length < rs.highWaterMark) {
+    this._read(rs.highWaterMark);
+  }
+}
+
+function Transform(options) {
+  if (!(this instanceof Transform)) return new Transform(options);
+  Duplex.call(this, options);
+  this._transformState = {
+    afterTransform: afterTransform.bind(this),
+    needTransform: false,
+    transforming: false,
+    writecb: null,
+    writechunk: null,
+    writeencoding: null
+  }; // start out asking for a readable event once data is transformed.
+
+  this._readableState.needReadable = true; // we have implemented the _read method, and done the other things
+  // that Readable wants before the first _read call, so unset the
+  // sync guard flag.
+
+  this._readableState.sync = false;
+
+  if (options) {
+    if (typeof options.transform === 'function') this._transform = options.transform;
+    if (typeof options.flush === 'function') this._flush = options.flush;
+  } // When the writable side finishes, then flush out anything remaining.
+
+
+  this.on('prefinish', prefinish);
+}
+
+function prefinish() {
+  var _this = this;
+
+  if (typeof this._flush === 'function' && !this._readableState.destroyed) {
+    this._flush(function (er, data) {
+      done(_this, er, data);
+    });
+  } else {
+    done(this, null, null);
+  }
+}
+
+Transform.prototype.push = function (chunk, encoding) {
+  this._transformState.needTransform = false;
+  return Duplex.prototype.push.call(this, chunk, encoding);
+}; // This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side.  You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk.  If you pass
+// an error, then that'll put the hurt on the whole operation.  If you
+// never call cb(), then you'll never get another chunk.
+
+
+Transform.prototype._transform = function (chunk, encoding, cb) {
+  cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));
+};
+
+Transform.prototype._write = function (chunk, encoding, cb) {
+  var ts = this._transformState;
+  ts.writecb = cb;
+  ts.writechunk = chunk;
+  ts.writeencoding = encoding;
+
+  if (!ts.transforming) {
+    var rs = this._readableState;
+    if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
+  }
+}; // Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+
+
+Transform.prototype._read = function (n) {
+  var ts = this._transformState;
+
+  if (ts.writechunk !== null && !ts.transforming) {
+    ts.transforming = true;
+
+    this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+  } else {
+    // mark that we need a transform, so that any data that comes in
+    // will get processed, now that we've asked for it.
+    ts.needTransform = true;
+  }
+};
+
+Transform.prototype._destroy = function (err, cb) {
+  Duplex.prototype._destroy.call(this, err, function (err2) {
+    cb(err2);
+  });
+};
+
+function done(stream, er, data) {
+  if (er) return stream.emit('error', er);
+  if (data != null) // single equals check for both `null` and `undefined`
+    stream.push(data); // TODO(BridgeAR): Write a test for these two error cases
+  // if there's nothing in the write buffer, then that means
+  // that nothing more will ever be provided
+
+  if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();
+  if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
+  return stream.push(null);
+}

+ 697 - 0
node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js

@@ -0,0 +1,697 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+'use strict';
+
+module.exports = Writable;
+/* <replacement> */
+
+function WriteReq(chunk, encoding, cb) {
+  this.chunk = chunk;
+  this.encoding = encoding;
+  this.callback = cb;
+  this.next = null;
+} // It seems a linked list but it is not
+// there will be only 2 of these for each stream
+
+
+function CorkedRequest(state) {
+  var _this = this;
+
+  this.next = null;
+  this.entry = null;
+
+  this.finish = function () {
+    onCorkedFinish(_this, state);
+  };
+}
+/* </replacement> */
+
+/*<replacement>*/
+
+
+var Duplex;
+/*</replacement>*/
+
+Writable.WritableState = WritableState;
+/*<replacement>*/
+
+var internalUtil = {
+  deprecate: require('util-deprecate')
+};
+/*</replacement>*/
+
+/*<replacement>*/
+
+var Stream = require('./internal/streams/stream');
+/*</replacement>*/
+
+
+var Buffer = require('buffer').Buffer;
+
+var OurUint8Array = global.Uint8Array || function () {};
+
+function _uint8ArrayToBuffer(chunk) {
+  return Buffer.from(chunk);
+}
+
+function _isUint8Array(obj) {
+  return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
+}
+
+var destroyImpl = require('./internal/streams/destroy');
+
+var _require = require('./internal/streams/state'),
+    getHighWaterMark = _require.getHighWaterMark;
+
+var _require$codes = require('../errors').codes,
+    ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
+    ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
+    ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
+    ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,
+    ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,
+    ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,
+    ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,
+    ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
+
+var errorOrDestroy = destroyImpl.errorOrDestroy;
+
+require('inherits')(Writable, Stream);
+
+function nop() {}
+
+function WritableState(options, stream, isDuplex) {
+  Duplex = Duplex || require('./_stream_duplex');
+  options = options || {}; // Duplex streams are both readable and writable, but share
+  // the same options object.
+  // However, some cases require setting options to different
+  // values for the readable and the writable sides of the duplex stream,
+  // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.
+
+  if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream
+  // contains buffers or objects.
+
+  this.objectMode = !!options.objectMode;
+  if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false
+  // Note: 0 is a valid value, means that we always return false if
+  // the entire buffer is not flushed immediately on write()
+
+  this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called
+
+  this.finalCalled = false; // drain event flag.
+
+  this.needDrain = false; // at the start of calling end()
+
+  this.ending = false; // when end() has been called, and returned
+
+  this.ended = false; // when 'finish' is emitted
+
+  this.finished = false; // has it been destroyed
+
+  this.destroyed = false; // should we decode strings into buffers before passing to _write?
+  // this is here so that some node-core streams can optimize string
+  // handling at a lower level.
+
+  var noDecode = options.decodeStrings === false;
+  this.decodeStrings = !noDecode; // Crypto is kind of old and crusty.  Historically, its default string
+  // encoding is 'binary' so we have to make this configurable.
+  // Everything else in the universe uses 'utf8', though.
+
+  this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement
+  // of how much we're waiting to get pushed to some underlying
+  // socket or file.
+
+  this.length = 0; // a flag to see when we're in the middle of a write.
+
+  this.writing = false; // when true all writes will be buffered until .uncork() call
+
+  this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,
+  // or on a later tick.  We set this to true at first, because any
+  // actions that shouldn't happen until "later" should generally also
+  // not happen before the first write call.
+
+  this.sync = true; // a flag to know if we're processing previously buffered items, which
+  // may call the _write() callback in the same tick, so that we don't
+  // end up in an overlapped onwrite situation.
+
+  this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)
+
+  this.onwrite = function (er) {
+    onwrite(stream, er);
+  }; // the callback that the user supplies to write(chunk,encoding,cb)
+
+
+  this.writecb = null; // the amount that is being written when _write is called.
+
+  this.writelen = 0;
+  this.bufferedRequest = null;
+  this.lastBufferedRequest = null; // number of pending user-supplied write callbacks
+  // this must be 0 before 'finish' can be emitted
+
+  this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs
+  // This is relevant for synchronous Transform streams
+
+  this.prefinished = false; // True if the error was already emitted and should not be thrown again
+
+  this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.
+
+  this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')
+
+  this.autoDestroy = !!options.autoDestroy; // count buffered requests
+
+  this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always
+  // one allocated and free to use, and we maintain at most two
+
+  this.corkedRequestsFree = new CorkedRequest(this);
+}
+
+WritableState.prototype.getBuffer = function getBuffer() {
+  var current = this.bufferedRequest;
+  var out = [];
+
+  while (current) {
+    out.push(current);
+    current = current.next;
+  }
+
+  return out;
+};
+
+(function () {
+  try {
+    Object.defineProperty(WritableState.prototype, 'buffer', {
+      get: internalUtil.deprecate(function writableStateBufferGetter() {
+        return this.getBuffer();
+      }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
+    });
+  } catch (_) {}
+})(); // Test _writableState for inheritance to account for Duplex streams,
+// whose prototype chain only points to Readable.
+
+
+var realHasInstance;
+
+if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
+  realHasInstance = Function.prototype[Symbol.hasInstance];
+  Object.defineProperty(Writable, Symbol.hasInstance, {
+    value: function value(object) {
+      if (realHasInstance.call(this, object)) return true;
+      if (this !== Writable) return false;
+      return object && object._writableState instanceof WritableState;
+    }
+  });
+} else {
+  realHasInstance = function realHasInstance(object) {
+    return object instanceof this;
+  };
+}
+
+function Writable(options) {
+  Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too.
+  // `realHasInstance` is necessary because using plain `instanceof`
+  // would return false, as no `_writableState` property is attached.
+  // Trying to use the custom `instanceof` for Writable here will also break the
+  // Node.js LazyTransform implementation, which has a non-trivial getter for
+  // `_writableState` that would lead to infinite recursion.
+  // Checking for a Stream.Duplex instance is faster here instead of inside
+  // the WritableState constructor, at least with V8 6.5
+
+  var isDuplex = this instanceof Duplex;
+  if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);
+  this._writableState = new WritableState(options, this, isDuplex); // legacy.
+
+  this.writable = true;
+
+  if (options) {
+    if (typeof options.write === 'function') this._write = options.write;
+    if (typeof options.writev === 'function') this._writev = options.writev;
+    if (typeof options.destroy === 'function') this._destroy = options.destroy;
+    if (typeof options.final === 'function') this._final = options.final;
+  }
+
+  Stream.call(this);
+} // Otherwise people can pipe Writable streams, which is just wrong.
+
+
+Writable.prototype.pipe = function () {
+  errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
+};
+
+function writeAfterEnd(stream, cb) {
+  var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb
+
+  errorOrDestroy(stream, er);
+  process.nextTick(cb, er);
+} // Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
+
+
+function validChunk(stream, state, chunk, cb) {
+  var er;
+
+  if (chunk === null) {
+    er = new ERR_STREAM_NULL_VALUES();
+  } else if (typeof chunk !== 'string' && !state.objectMode) {
+    er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);
+  }
+
+  if (er) {
+    errorOrDestroy(stream, er);
+    process.nextTick(cb, er);
+    return false;
+  }
+
+  return true;
+}
+
+Writable.prototype.write = function (chunk, encoding, cb) {
+  var state = this._writableState;
+  var ret = false;
+
+  var isBuf = !state.objectMode && _isUint8Array(chunk);
+
+  if (isBuf && !Buffer.isBuffer(chunk)) {
+    chunk = _uint8ArrayToBuffer(chunk);
+  }
+
+  if (typeof encoding === 'function') {
+    cb = encoding;
+    encoding = null;
+  }
+
+  if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+  if (typeof cb !== 'function') cb = nop;
+  if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
+    state.pendingcb++;
+    ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
+  }
+  return ret;
+};
+
+Writable.prototype.cork = function () {
+  this._writableState.corked++;
+};
+
+Writable.prototype.uncork = function () {
+  var state = this._writableState;
+
+  if (state.corked) {
+    state.corked--;
+    if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
+  }
+};
+
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+  // node::ParseEncoding() requires lower case.
+  if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+  if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);
+  this._writableState.defaultEncoding = encoding;
+  return this;
+};
+
+Object.defineProperty(Writable.prototype, 'writableBuffer', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function get() {
+    return this._writableState && this._writableState.getBuffer();
+  }
+});
+
+function decodeChunk(state, chunk, encoding) {
+  if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
+    chunk = Buffer.from(chunk, encoding);
+  }
+
+  return chunk;
+}
+
+Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function get() {
+    return this._writableState.highWaterMark;
+  }
+}); // if we're already writing something, then just put this
+// in the queue, and wait our turn.  Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+  if (!isBuf) {
+    var newChunk = decodeChunk(state, chunk, encoding);
+
+    if (chunk !== newChunk) {
+      isBuf = true;
+      encoding = 'buffer';
+      chunk = newChunk;
+    }
+  }
+
+  var len = state.objectMode ? 1 : chunk.length;
+  state.length += len;
+  var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.
+
+  if (!ret) state.needDrain = true;
+
+  if (state.writing || state.corked) {
+    var last = state.lastBufferedRequest;
+    state.lastBufferedRequest = {
+      chunk: chunk,
+      encoding: encoding,
+      isBuf: isBuf,
+      callback: cb,
+      next: null
+    };
+
+    if (last) {
+      last.next = state.lastBufferedRequest;
+    } else {
+      state.bufferedRequest = state.lastBufferedRequest;
+    }
+
+    state.bufferedRequestCount += 1;
+  } else {
+    doWrite(stream, state, false, len, chunk, encoding, cb);
+  }
+
+  return ret;
+}
+
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+  state.writelen = len;
+  state.writecb = cb;
+  state.writing = true;
+  state.sync = true;
+  if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+  state.sync = false;
+}
+
+function onwriteError(stream, state, sync, er, cb) {
+  --state.pendingcb;
+
+  if (sync) {
+    // defer the callback if we are being called synchronously
+    // to avoid piling up things on the stack
+    process.nextTick(cb, er); // this can emit finish, and it will always happen
+    // after error
+
+    process.nextTick(finishMaybe, stream, state);
+    stream._writableState.errorEmitted = true;
+    errorOrDestroy(stream, er);
+  } else {
+    // the caller expect this to happen before if
+    // it is async
+    cb(er);
+    stream._writableState.errorEmitted = true;
+    errorOrDestroy(stream, er); // this can emit finish, but finish must
+    // always follow error
+
+    finishMaybe(stream, state);
+  }
+}
+
+function onwriteStateUpdate(state) {
+  state.writing = false;
+  state.writecb = null;
+  state.length -= state.writelen;
+  state.writelen = 0;
+}
+
+function onwrite(stream, er) {
+  var state = stream._writableState;
+  var sync = state.sync;
+  var cb = state.writecb;
+  if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();
+  onwriteStateUpdate(state);
+  if (er) onwriteError(stream, state, sync, er, cb);else {
+    // Check if we're actually ready to finish, but don't emit yet
+    var finished = needFinish(state) || stream.destroyed;
+
+    if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
+      clearBuffer(stream, state);
+    }
+
+    if (sync) {
+      process.nextTick(afterWrite, stream, state, finished, cb);
+    } else {
+      afterWrite(stream, state, finished, cb);
+    }
+  }
+}
+
+function afterWrite(stream, state, finished, cb) {
+  if (!finished) onwriteDrain(stream, state);
+  state.pendingcb--;
+  cb();
+  finishMaybe(stream, state);
+} // Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+
+
+function onwriteDrain(stream, state) {
+  if (state.length === 0 && state.needDrain) {
+    state.needDrain = false;
+    stream.emit('drain');
+  }
+} // if there's something in the buffer waiting, then process it
+
+
+function clearBuffer(stream, state) {
+  state.bufferProcessing = true;
+  var entry = state.bufferedRequest;
+
+  if (stream._writev && entry && entry.next) {
+    // Fast case, write everything using _writev()
+    var l = state.bufferedRequestCount;
+    var buffer = new Array(l);
+    var holder = state.corkedRequestsFree;
+    holder.entry = entry;
+    var count = 0;
+    var allBuffers = true;
+
+    while (entry) {
+      buffer[count] = entry;
+      if (!entry.isBuf) allBuffers = false;
+      entry = entry.next;
+      count += 1;
+    }
+
+    buffer.allBuffers = allBuffers;
+    doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time
+    // as the hot path ends with doWrite
+
+    state.pendingcb++;
+    state.lastBufferedRequest = null;
+
+    if (holder.next) {
+      state.corkedRequestsFree = holder.next;
+      holder.next = null;
+    } else {
+      state.corkedRequestsFree = new CorkedRequest(state);
+    }
+
+    state.bufferedRequestCount = 0;
+  } else {
+    // Slow case, write chunks one-by-one
+    while (entry) {
+      var chunk = entry.chunk;
+      var encoding = entry.encoding;
+      var cb = entry.callback;
+      var len = state.objectMode ? 1 : chunk.length;
+      doWrite(stream, state, false, len, chunk, encoding, cb);
+      entry = entry.next;
+      state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then
+      // it means that we need to wait until it does.
+      // also, that means that the chunk and cb are currently
+      // being processed, so move the buffer counter past them.
+
+      if (state.writing) {
+        break;
+      }
+    }
+
+    if (entry === null) state.lastBufferedRequest = null;
+  }
+
+  state.bufferedRequest = entry;
+  state.bufferProcessing = false;
+}
+
+Writable.prototype._write = function (chunk, encoding, cb) {
+  cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));
+};
+
+Writable.prototype._writev = null;
+
+Writable.prototype.end = function (chunk, encoding, cb) {
+  var state = this._writableState;
+
+  if (typeof chunk === 'function') {
+    cb = chunk;
+    chunk = null;
+    encoding = null;
+  } else if (typeof encoding === 'function') {
+    cb = encoding;
+    encoding = null;
+  }
+
+  if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks
+
+  if (state.corked) {
+    state.corked = 1;
+    this.uncork();
+  } // ignore unnecessary end() calls.
+
+
+  if (!state.ending) endWritable(this, state, cb);
+  return this;
+};
+
+Object.defineProperty(Writable.prototype, 'writableLength', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function get() {
+    return this._writableState.length;
+  }
+});
+
+function needFinish(state) {
+  return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
+}
+
+function callFinal(stream, state) {
+  stream._final(function (err) {
+    state.pendingcb--;
+
+    if (err) {
+      errorOrDestroy(stream, err);
+    }
+
+    state.prefinished = true;
+    stream.emit('prefinish');
+    finishMaybe(stream, state);
+  });
+}
+
+function prefinish(stream, state) {
+  if (!state.prefinished && !state.finalCalled) {
+    if (typeof stream._final === 'function' && !state.destroyed) {
+      state.pendingcb++;
+      state.finalCalled = true;
+      process.nextTick(callFinal, stream, state);
+    } else {
+      state.prefinished = true;
+      stream.emit('prefinish');
+    }
+  }
+}
+
+function finishMaybe(stream, state) {
+  var need = needFinish(state);
+
+  if (need) {
+    prefinish(stream, state);
+
+    if (state.pendingcb === 0) {
+      state.finished = true;
+      stream.emit('finish');
+
+      if (state.autoDestroy) {
+        // In case of duplex streams we need a way to detect
+        // if the readable side is ready for autoDestroy as well
+        var rState = stream._readableState;
+
+        if (!rState || rState.autoDestroy && rState.endEmitted) {
+          stream.destroy();
+        }
+      }
+    }
+  }
+
+  return need;
+}
+
+function endWritable(stream, state, cb) {
+  state.ending = true;
+  finishMaybe(stream, state);
+
+  if (cb) {
+    if (state.finished) process.nextTick(cb);else stream.once('finish', cb);
+  }
+
+  state.ended = true;
+  stream.writable = false;
+}
+
+function onCorkedFinish(corkReq, state, err) {
+  var entry = corkReq.entry;
+  corkReq.entry = null;
+
+  while (entry) {
+    var cb = entry.callback;
+    state.pendingcb--;
+    cb(err);
+    entry = entry.next;
+  } // reuse the free corkReq.
+
+
+  state.corkedRequestsFree.next = corkReq;
+}
+
+Object.defineProperty(Writable.prototype, 'destroyed', {
+  // making it explicit this property is not enumerable
+  // because otherwise some prototype manipulation in
+  // userland will fail
+  enumerable: false,
+  get: function get() {
+    if (this._writableState === undefined) {
+      return false;
+    }
+
+    return this._writableState.destroyed;
+  },
+  set: function set(value) {
+    // we ignore the value if the stream
+    // has not been initialized yet
+    if (!this._writableState) {
+      return;
+    } // backward compatibility, the user is explicitly
+    // managing destroyed
+
+
+    this._writableState.destroyed = value;
+  }
+});
+Writable.prototype.destroy = destroyImpl.destroy;
+Writable.prototype._undestroy = destroyImpl.undestroy;
+
+Writable.prototype._destroy = function (err, cb) {
+  cb(err);
+};

+ 207 - 0
node_modules/bl/node_modules/readable-stream/lib/internal/streams/async_iterator.js

@@ -0,0 +1,207 @@
+'use strict';
+
+var _Object$setPrototypeO;
+
+function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+var finished = require('./end-of-stream');
+
+var kLastResolve = Symbol('lastResolve');
+var kLastReject = Symbol('lastReject');
+var kError = Symbol('error');
+var kEnded = Symbol('ended');
+var kLastPromise = Symbol('lastPromise');
+var kHandlePromise = Symbol('handlePromise');
+var kStream = Symbol('stream');
+
+function createIterResult(value, done) {
+  return {
+    value: value,
+    done: done
+  };
+}
+
+function readAndResolve(iter) {
+  var resolve = iter[kLastResolve];
+
+  if (resolve !== null) {
+    var data = iter[kStream].read(); // we defer if data is null
+    // we can be expecting either 'end' or
+    // 'error'
+
+    if (data !== null) {
+      iter[kLastPromise] = null;
+      iter[kLastResolve] = null;
+      iter[kLastReject] = null;
+      resolve(createIterResult(data, false));
+    }
+  }
+}
+
+function onReadable(iter) {
+  // we wait for the next tick, because it might
+  // emit an error with process.nextTick
+  process.nextTick(readAndResolve, iter);
+}
+
+function wrapForNext(lastPromise, iter) {
+  return function (resolve, reject) {
+    lastPromise.then(function () {
+      if (iter[kEnded]) {
+        resolve(createIterResult(undefined, true));
+        return;
+      }
+
+      iter[kHandlePromise](resolve, reject);
+    }, reject);
+  };
+}
+
+var AsyncIteratorPrototype = Object.getPrototypeOf(function () {});
+var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
+  get stream() {
+    return this[kStream];
+  },
+
+  next: function next() {
+    var _this = this;
+
+    // if we have detected an error in the meanwhile
+    // reject straight away
+    var error = this[kError];
+
+    if (error !== null) {
+      return Promise.reject(error);
+    }
+
+    if (this[kEnded]) {
+      return Promise.resolve(createIterResult(undefined, true));
+    }
+
+    if (this[kStream].destroyed) {
+      // We need to defer via nextTick because if .destroy(err) is
+      // called, the error will be emitted via nextTick, and
+      // we cannot guarantee that there is no error lingering around
+      // waiting to be emitted.
+      return new Promise(function (resolve, reject) {
+        process.nextTick(function () {
+          if (_this[kError]) {
+            reject(_this[kError]);
+          } else {
+            resolve(createIterResult(undefined, true));
+          }
+        });
+      });
+    } // if we have multiple next() calls
+    // we will wait for the previous Promise to finish
+    // this logic is optimized to support for await loops,
+    // where next() is only called once at a time
+
+
+    var lastPromise = this[kLastPromise];
+    var promise;
+
+    if (lastPromise) {
+      promise = new Promise(wrapForNext(lastPromise, this));
+    } else {
+      // fast path needed to support multiple this.push()
+      // without triggering the next() queue
+      var data = this[kStream].read();
+
+      if (data !== null) {
+        return Promise.resolve(createIterResult(data, false));
+      }
+
+      promise = new Promise(this[kHandlePromise]);
+    }
+
+    this[kLastPromise] = promise;
+    return promise;
+  }
+}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {
+  return this;
+}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
+  var _this2 = this;
+
+  // destroy(err, cb) is a private API
+  // we can guarantee we have that here, because we control the
+  // Readable class this is attached to
+  return new Promise(function (resolve, reject) {
+    _this2[kStream].destroy(null, function (err) {
+      if (err) {
+        reject(err);
+        return;
+      }
+
+      resolve(createIterResult(undefined, true));
+    });
+  });
+}), _Object$setPrototypeO), AsyncIteratorPrototype);
+
+var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {
+  var _Object$create;
+
+  var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
+    value: stream,
+    writable: true
+  }), _defineProperty(_Object$create, kLastResolve, {
+    value: null,
+    writable: true
+  }), _defineProperty(_Object$create, kLastReject, {
+    value: null,
+    writable: true
+  }), _defineProperty(_Object$create, kError, {
+    value: null,
+    writable: true
+  }), _defineProperty(_Object$create, kEnded, {
+    value: stream._readableState.endEmitted,
+    writable: true
+  }), _defineProperty(_Object$create, kHandlePromise, {
+    value: function value(resolve, reject) {
+      var data = iterator[kStream].read();
+
+      if (data) {
+        iterator[kLastPromise] = null;
+        iterator[kLastResolve] = null;
+        iterator[kLastReject] = null;
+        resolve(createIterResult(data, false));
+      } else {
+        iterator[kLastResolve] = resolve;
+        iterator[kLastReject] = reject;
+      }
+    },
+    writable: true
+  }), _Object$create));
+  iterator[kLastPromise] = null;
+  finished(stream, function (err) {
+    if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
+      var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise
+      // returned by next() and store the error
+
+      if (reject !== null) {
+        iterator[kLastPromise] = null;
+        iterator[kLastResolve] = null;
+        iterator[kLastReject] = null;
+        reject(err);
+      }
+
+      iterator[kError] = err;
+      return;
+    }
+
+    var resolve = iterator[kLastResolve];
+
+    if (resolve !== null) {
+      iterator[kLastPromise] = null;
+      iterator[kLastResolve] = null;
+      iterator[kLastReject] = null;
+      resolve(createIterResult(undefined, true));
+    }
+
+    iterator[kEnded] = true;
+  });
+  stream.on('readable', onReadable.bind(null, iterator));
+  return iterator;
+};
+
+module.exports = createReadableStreamAsyncIterator;

File diff suppressed because it is too large
+ 210 - 0
node_modules/bl/node_modules/readable-stream/lib/internal/streams/buffer_list.js


+ 105 - 0
node_modules/bl/node_modules/readable-stream/lib/internal/streams/destroy.js

@@ -0,0 +1,105 @@
+'use strict'; // undocumented cb() API, needed for core, not for public API
+
+function destroy(err, cb) {
+  var _this = this;
+
+  var readableDestroyed = this._readableState && this._readableState.destroyed;
+  var writableDestroyed = this._writableState && this._writableState.destroyed;
+
+  if (readableDestroyed || writableDestroyed) {
+    if (cb) {
+      cb(err);
+    } else if (err) {
+      if (!this._writableState) {
+        process.nextTick(emitErrorNT, this, err);
+      } else if (!this._writableState.errorEmitted) {
+        this._writableState.errorEmitted = true;
+        process.nextTick(emitErrorNT, this, err);
+      }
+    }
+
+    return this;
+  } // we set destroyed to true before firing error callbacks in order
+  // to make it re-entrance safe in case destroy() is called within callbacks
+
+
+  if (this._readableState) {
+    this._readableState.destroyed = true;
+  } // if this is a duplex stream mark the writable part as destroyed as well
+
+
+  if (this._writableState) {
+    this._writableState.destroyed = true;
+  }
+
+  this._destroy(err || null, function (err) {
+    if (!cb && err) {
+      if (!_this._writableState) {
+        process.nextTick(emitErrorAndCloseNT, _this, err);
+      } else if (!_this._writableState.errorEmitted) {
+        _this._writableState.errorEmitted = true;
+        process.nextTick(emitErrorAndCloseNT, _this, err);
+      } else {
+        process.nextTick(emitCloseNT, _this);
+      }
+    } else if (cb) {
+      process.nextTick(emitCloseNT, _this);
+      cb(err);
+    } else {
+      process.nextTick(emitCloseNT, _this);
+    }
+  });
+
+  return this;
+}
+
+function emitErrorAndCloseNT(self, err) {
+  emitErrorNT(self, err);
+  emitCloseNT(self);
+}
+
+function emitCloseNT(self) {
+  if (self._writableState && !self._writableState.emitClose) return;
+  if (self._readableState && !self._readableState.emitClose) return;
+  self.emit('close');
+}
+
+function undestroy() {
+  if (this._readableState) {
+    this._readableState.destroyed = false;
+    this._readableState.reading = false;
+    this._readableState.ended = false;
+    this._readableState.endEmitted = false;
+  }
+
+  if (this._writableState) {
+    this._writableState.destroyed = false;
+    this._writableState.ended = false;
+    this._writableState.ending = false;
+    this._writableState.finalCalled = false;
+    this._writableState.prefinished = false;
+    this._writableState.finished = false;
+    this._writableState.errorEmitted = false;
+  }
+}
+
+function emitErrorNT(self, err) {
+  self.emit('error', err);
+}
+
+function errorOrDestroy(stream, err) {
+  // We have tests that rely on errors being emitted
+  // in the same tick, so changing this is semver major.
+  // For now when you opt-in to autoDestroy we allow
+  // the error to be emitted nextTick. In a future
+  // semver major update we should change the default to this.
+  var rState = stream._readableState;
+  var wState = stream._writableState;
+  if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);
+}
+
+module.exports = {
+  destroy: destroy,
+  undestroy: undestroy,
+  errorOrDestroy: errorOrDestroy
+};

+ 104 - 0
node_modules/bl/node_modules/readable-stream/lib/internal/streams/end-of-stream.js

@@ -0,0 +1,104 @@
+// Ported from https://github.com/mafintosh/end-of-stream with
+// permission from the author, Mathias Buus (@mafintosh).
+'use strict';
+
+var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE;
+
+function once(callback) {
+  var called = false;
+  return function () {
+    if (called) return;
+    called = true;
+
+    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+      args[_key] = arguments[_key];
+    }
+
+    callback.apply(this, args);
+  };
+}
+
+function noop() {}
+
+function isRequest(stream) {
+  return stream.setHeader && typeof stream.abort === 'function';
+}
+
+function eos(stream, opts, callback) {
+  if (typeof opts === 'function') return eos(stream, null, opts);
+  if (!opts) opts = {};
+  callback = once(callback || noop);
+  var readable = opts.readable || opts.readable !== false && stream.readable;
+  var writable = opts.writable || opts.writable !== false && stream.writable;
+
+  var onlegacyfinish = function onlegacyfinish() {
+    if (!stream.writable) onfinish();
+  };
+
+  var writableEnded = stream._writableState && stream._writableState.finished;
+
+  var onfinish = function onfinish() {
+    writable = false;
+    writableEnded = true;
+    if (!readable) callback.call(stream);
+  };
+
+  var readableEnded = stream._readableState && stream._readableState.endEmitted;
+
+  var onend = function onend() {
+    readable = false;
+    readableEnded = true;
+    if (!writable) callback.call(stream);
+  };
+
+  var onerror = function onerror(err) {
+    callback.call(stream, err);
+  };
+
+  var onclose = function onclose() {
+    var err;
+
+    if (readable && !readableEnded) {
+      if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
+      return callback.call(stream, err);
+    }
+
+    if (writable && !writableEnded) {
+      if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
+      return callback.call(stream, err);
+    }
+  };
+
+  var onrequest = function onrequest() {
+    stream.req.on('finish', onfinish);
+  };
+
+  if (isRequest(stream)) {
+    stream.on('complete', onfinish);
+    stream.on('abort', onclose);
+    if (stream.req) onrequest();else stream.on('request', onrequest);
+  } else if (writable && !stream._writableState) {
+    // legacy streams
+    stream.on('end', onlegacyfinish);
+    stream.on('close', onlegacyfinish);
+  }
+
+  stream.on('end', onend);
+  stream.on('finish', onfinish);
+  if (opts.error !== false) stream.on('error', onerror);
+  stream.on('close', onclose);
+  return function () {
+    stream.removeListener('complete', onfinish);
+    stream.removeListener('abort', onclose);
+    stream.removeListener('request', onrequest);
+    if (stream.req) stream.req.removeListener('finish', onfinish);
+    stream.removeListener('end', onlegacyfinish);
+    stream.removeListener('close', onlegacyfinish);
+    stream.removeListener('finish', onfinish);
+    stream.removeListener('end', onend);
+    stream.removeListener('error', onerror);
+    stream.removeListener('close', onclose);
+  };
+}
+
+module.exports = eos;

+ 3 - 0
node_modules/bl/node_modules/readable-stream/lib/internal/streams/from-browser.js

@@ -0,0 +1,3 @@
+module.exports = function () {
+  throw new Error('Readable.from is not available in the browser')
+};

File diff suppressed because it is too large
+ 64 - 0
node_modules/bl/node_modules/readable-stream/lib/internal/streams/from.js


+ 97 - 0
node_modules/bl/node_modules/readable-stream/lib/internal/streams/pipeline.js

@@ -0,0 +1,97 @@
+// Ported from https://github.com/mafintosh/pump with
+// permission from the author, Mathias Buus (@mafintosh).
+'use strict';
+
+var eos;
+
+function once(callback) {
+  var called = false;
+  return function () {
+    if (called) return;
+    called = true;
+    callback.apply(void 0, arguments);
+  };
+}
+
+var _require$codes = require('../../../errors').codes,
+    ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,
+    ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
+
+function noop(err) {
+  // Rethrow the error if it exists to avoid swallowing it
+  if (err) throw err;
+}
+
+function isRequest(stream) {
+  return stream.setHeader && typeof stream.abort === 'function';
+}
+
+function destroyer(stream, reading, writing, callback) {
+  callback = once(callback);
+  var closed = false;
+  stream.on('close', function () {
+    closed = true;
+  });
+  if (eos === undefined) eos = require('./end-of-stream');
+  eos(stream, {
+    readable: reading,
+    writable: writing
+  }, function (err) {
+    if (err) return callback(err);
+    closed = true;
+    callback();
+  });
+  var destroyed = false;
+  return function (err) {
+    if (closed) return;
+    if (destroyed) return;
+    destroyed = true; // request.destroy just do .end - .abort is what we want
+
+    if (isRequest(stream)) return stream.abort();
+    if (typeof stream.destroy === 'function') return stream.destroy();
+    callback(err || new ERR_STREAM_DESTROYED('pipe'));
+  };
+}
+
+function call(fn) {
+  fn();
+}
+
+function pipe(from, to) {
+  return from.pipe(to);
+}
+
+function popCallback(streams) {
+  if (!streams.length) return noop;
+  if (typeof streams[streams.length - 1] !== 'function') return noop;
+  return streams.pop();
+}
+
+function pipeline() {
+  for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
+    streams[_key] = arguments[_key];
+  }
+
+  var callback = popCallback(streams);
+  if (Array.isArray(streams[0])) streams = streams[0];
+
+  if (streams.length < 2) {
+    throw new ERR_MISSING_ARGS('streams');
+  }
+
+  var error;
+  var destroys = streams.map(function (stream, i) {
+    var reading = i < streams.length - 1;
+    var writing = i > 0;
+    return destroyer(stream, reading, writing, function (err) {
+      if (!error) error = err;
+      if (err) destroys.forEach(call);
+      if (reading) return;
+      destroys.forEach(call);
+      callback(error);
+    });
+  });
+  return streams.reduce(pipe);
+}
+
+module.exports = pipeline;

+ 27 - 0
node_modules/bl/node_modules/readable-stream/lib/internal/streams/state.js

@@ -0,0 +1,27 @@
+'use strict';
+
+var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;
+
+function highWaterMarkFrom(options, isDuplex, duplexKey) {
+  return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
+}
+
+function getHighWaterMark(state, options, duplexKey, isDuplex) {
+  var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
+
+  if (hwm != null) {
+    if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
+      var name = isDuplex ? duplexKey : 'highWaterMark';
+      throw new ERR_INVALID_OPT_VALUE(name, hwm);
+    }
+
+    return Math.floor(hwm);
+  } // Default value
+
+
+  return state.objectMode ? 16 : 16 * 1024;
+}
+
+module.exports = {
+  getHighWaterMark: getHighWaterMark
+};

+ 1 - 0
node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream-browser.js

@@ -0,0 +1 @@
+module.exports = require('events').EventEmitter;

+ 1 - 0
node_modules/bl/node_modules/readable-stream/lib/internal/streams/stream.js

@@ -0,0 +1 @@
+module.exports = require('stream');

+ 97 - 0
node_modules/bl/node_modules/readable-stream/package.json

@@ -0,0 +1,97 @@
+{
+  "_from": "readable-stream@^3.4.0",
+  "_id": "readable-stream@3.6.0",
+  "_inBundle": false,
+  "_integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+  "_location": "/bl/readable-stream",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "readable-stream@^3.4.0",
+    "name": "readable-stream",
+    "escapedName": "readable-stream",
+    "rawSpec": "^3.4.0",
+    "saveSpec": null,
+    "fetchSpec": "^3.4.0"
+  },
+  "_requiredBy": [
+    "/bl"
+  ],
+  "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+  "_shasum": "337bbda3adc0706bd3e024426a286d4b4b2c9198",
+  "_spec": "readable-stream@^3.4.0",
+  "_where": "/Users/bssm/Desktop/fabTest/打卡坐标/node_modules/bl",
+  "browser": {
+    "util": false,
+    "worker_threads": false,
+    "./errors": "./errors-browser.js",
+    "./readable.js": "./readable-browser.js",
+    "./lib/internal/streams/from.js": "./lib/internal/streams/from-browser.js",
+    "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js"
+  },
+  "bugs": {
+    "url": "https://github.com/nodejs/readable-stream/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "inherits": "^2.0.3",
+    "string_decoder": "^1.1.1",
+    "util-deprecate": "^1.0.1"
+  },
+  "deprecated": false,
+  "description": "Streams3, a user-land copy of the stream library from Node.js",
+  "devDependencies": {
+    "@babel/cli": "^7.2.0",
+    "@babel/core": "^7.2.0",
+    "@babel/polyfill": "^7.0.0",
+    "@babel/preset-env": "^7.2.0",
+    "airtap": "0.0.9",
+    "assert": "^1.4.0",
+    "bl": "^2.0.0",
+    "deep-strict-equal": "^0.2.0",
+    "events.once": "^2.0.2",
+    "glob": "^7.1.2",
+    "gunzip-maybe": "^1.4.1",
+    "hyperquest": "^2.1.3",
+    "lolex": "^2.6.0",
+    "nyc": "^11.0.0",
+    "pump": "^3.0.0",
+    "rimraf": "^2.6.2",
+    "tap": "^12.0.0",
+    "tape": "^4.9.0",
+    "tar-fs": "^1.16.2",
+    "util-promisify": "^2.1.0"
+  },
+  "engines": {
+    "node": ">= 6"
+  },
+  "homepage": "https://github.com/nodejs/readable-stream#readme",
+  "keywords": [
+    "readable",
+    "stream",
+    "pipe"
+  ],
+  "license": "MIT",
+  "main": "readable.js",
+  "name": "readable-stream",
+  "nyc": {
+    "include": [
+      "lib/**.js"
+    ]
+  },
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/nodejs/readable-stream.git"
+  },
+  "scripts": {
+    "ci": "TAP=1 tap --no-esm test/parallel/*.js test/ours/*.js | tee test.tap",
+    "cover": "nyc npm test",
+    "report": "nyc report --reporter=lcov",
+    "test": "tap -J --no-esm test/parallel/*.js test/ours/*.js",
+    "test-browser-local": "airtap --open --local -- test/browser.js",
+    "test-browsers": "airtap --sauce-connect --loopback airtap.local -- test/browser.js",
+    "update-browser-errors": "babel -o errors-browser.js errors.js"
+  },
+  "version": "3.6.0"
+}

+ 9 - 0
node_modules/bl/node_modules/readable-stream/readable-browser.js

@@ -0,0 +1,9 @@
+exports = module.exports = require('./lib/_stream_readable.js');
+exports.Stream = exports;
+exports.Readable = exports;
+exports.Writable = require('./lib/_stream_writable.js');
+exports.Duplex = require('./lib/_stream_duplex.js');
+exports.Transform = require('./lib/_stream_transform.js');
+exports.PassThrough = require('./lib/_stream_passthrough.js');
+exports.finished = require('./lib/internal/streams/end-of-stream.js');
+exports.pipeline = require('./lib/internal/streams/pipeline.js');

+ 16 - 0
node_modules/bl/node_modules/readable-stream/readable.js

@@ -0,0 +1,16 @@
+var Stream = require('stream');
+if (process.env.READABLE_STREAM === 'disable' && Stream) {
+  module.exports = Stream.Readable;
+  Object.assign(module.exports, Stream);
+  module.exports.Stream = Stream;
+} else {
+  exports = module.exports = require('./lib/_stream_readable.js');
+  exports.Stream = Stream || exports;
+  exports.Readable = exports;
+  exports.Writable = require('./lib/_stream_writable.js');
+  exports.Duplex = require('./lib/_stream_duplex.js');
+  exports.Transform = require('./lib/_stream_transform.js');
+  exports.PassThrough = require('./lib/_stream_passthrough.js');
+  exports.finished = require('./lib/internal/streams/end-of-stream.js');
+  exports.pipeline = require('./lib/internal/streams/pipeline.js');
+}

+ 69 - 0
node_modules/bl/package.json

@@ -0,0 +1,69 @@
+{
+  "_from": "bl@^4.0.2",
+  "_id": "bl@4.1.0",
+  "_inBundle": false,
+  "_integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
+  "_location": "/bl",
+  "_phantomChildren": {
+    "inherits": "2.0.4",
+    "string_decoder": "1.1.1",
+    "util-deprecate": "1.0.2"
+  },
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "bl@^4.0.2",
+    "name": "bl",
+    "escapedName": "bl",
+    "rawSpec": "^4.0.2",
+    "saveSpec": null,
+    "fetchSpec": "^4.0.2"
+  },
+  "_requiredBy": [
+    "/mqtt-packet"
+  ],
+  "_resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
+  "_shasum": "451535264182bec2fbbc83a62ab98cf11d9f7b3a",
+  "_spec": "bl@^4.0.2",
+  "_where": "/Users/bssm/Desktop/fabTest/打卡坐标/node_modules/mqtt-packet",
+  "authors": [
+    "Rod Vagg <rod@vagg.org> (https://github.com/rvagg)",
+    "Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
+    "Jarett Cruger <jcrugzz@gmail.com> (https://github.com/jcrugzz)"
+  ],
+  "bugs": {
+    "url": "https://github.com/rvagg/bl/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "buffer": "^5.5.0",
+    "inherits": "^2.0.4",
+    "readable-stream": "^3.4.0"
+  },
+  "deprecated": false,
+  "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!",
+  "devDependencies": {
+    "faucet": "~0.0.1",
+    "standard": "^14.3.0",
+    "tape": "^4.11.0"
+  },
+  "homepage": "https://github.com/rvagg/bl",
+  "keywords": [
+    "buffer",
+    "buffers",
+    "stream",
+    "awesomesauce"
+  ],
+  "license": "MIT",
+  "main": "bl.js",
+  "name": "bl",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/rvagg/bl.git"
+  },
+  "scripts": {
+    "lint": "standard *.js test/*.js",
+    "test": "npm run lint && node test/test.js | faucet"
+  },
+  "version": "4.1.0"
+}

+ 21 - 0
node_modules/bl/test/convert.js

@@ -0,0 +1,21 @@
+'use strict'
+
+const tape = require('tape')
+const { BufferList, BufferListStream } = require('../')
+const { Buffer } = require('buffer')
+
+tape('convert from BufferList to BufferListStream', (t) => {
+  const data = Buffer.from(`TEST-${Date.now()}`)
+  const bl = new BufferList(data)
+  const bls = new BufferListStream(bl)
+  t.ok(bl.slice().equals(bls.slice()))
+  t.end()
+})
+
+tape('convert from BufferListStream to BufferList', (t) => {
+  const data = Buffer.from(`TEST-${Date.now()}`)
+  const bls = new BufferListStream(data)
+  const bl = new BufferList(bls)
+  t.ok(bl.slice().equals(bls.slice()))
+  t.end()
+})

+ 492 - 0
node_modules/bl/test/indexOf.js

@@ -0,0 +1,492 @@
+'use strict'
+
+const tape = require('tape')
+const BufferList = require('../')
+const { Buffer } = require('buffer')
+
+tape('indexOf single byte needle', (t) => {
+  const bl = new BufferList(['abcdefg', 'abcdefg', '12345'])
+
+  t.equal(bl.indexOf('e'), 4)
+  t.equal(bl.indexOf('e', 5), 11)
+  t.equal(bl.indexOf('e', 12), -1)
+  t.equal(bl.indexOf('5'), 18)
+
+  t.end()
+})
+
+tape('indexOf multiple byte needle', (t) => {
+  const bl = new BufferList(['abcdefg', 'abcdefg'])
+
+  t.equal(bl.indexOf('ef'), 4)
+  t.equal(bl.indexOf('ef', 5), 11)
+
+  t.end()
+})
+
+tape('indexOf multiple byte needles across buffer boundaries', (t) => {
+  const bl = new BufferList(['abcdefg', 'abcdefg'])
+
+  t.equal(bl.indexOf('fgabc'), 5)
+
+  t.end()
+})
+
+tape('indexOf takes a Uint8Array search', (t) => {
+  const bl = new BufferList(['abcdefg', 'abcdefg'])
+  const search = new Uint8Array([102, 103, 97, 98, 99]) // fgabc
+
+  t.equal(bl.indexOf(search), 5)
+
+  t.end()
+})
+
+tape('indexOf takes a buffer list search', (t) => {
+  const bl = new BufferList(['abcdefg', 'abcdefg'])
+  const search = new BufferList('fgabc')
+
+  t.equal(bl.indexOf(search), 5)
+
+  t.end()
+})
+
+tape('indexOf a zero byte needle', (t) => {
+  const b = new BufferList('abcdef')
+  const bufEmpty = Buffer.from('')
+
+  t.equal(b.indexOf(''), 0)
+  t.equal(b.indexOf('', 1), 1)
+  t.equal(b.indexOf('', b.length + 1), b.length)
+  t.equal(b.indexOf('', Infinity), b.length)
+  t.equal(b.indexOf(bufEmpty), 0)
+  t.equal(b.indexOf(bufEmpty, 1), 1)
+  t.equal(b.indexOf(bufEmpty, b.length + 1), b.length)
+  t.equal(b.indexOf(bufEmpty, Infinity), b.length)
+
+  t.end()
+})
+
+tape('indexOf buffers smaller and larger than the needle', (t) => {
+  const bl = new BufferList(['abcdefg', 'a', 'bcdefg', 'a', 'bcfgab'])
+
+  t.equal(bl.indexOf('fgabc'), 5)
+  t.equal(bl.indexOf('fgabc', 6), 12)
+  t.equal(bl.indexOf('fgabc', 13), -1)
+
+  t.end()
+})
+
+// only present in node 6+
+;(process.version.substr(1).split('.')[0] >= 6) && tape('indexOf latin1 and binary encoding', (t) => {
+  const b = new BufferList('abcdef')
+
+  // test latin1 encoding
+  t.equal(
+    new BufferList(Buffer.from(b.toString('latin1'), 'latin1'))
+      .indexOf('d', 0, 'latin1'),
+    3
+  )
+  t.equal(
+    new BufferList(Buffer.from(b.toString('latin1'), 'latin1'))
+      .indexOf(Buffer.from('d', 'latin1'), 0, 'latin1'),
+    3
+  )
+  t.equal(
+    new BufferList(Buffer.from('aa\u00e8aa', 'latin1'))
+      .indexOf('\u00e8', 'latin1'),
+    2
+  )
+  t.equal(
+    new BufferList(Buffer.from('\u00e8', 'latin1'))
+      .indexOf('\u00e8', 'latin1'),
+    0
+  )
+  t.equal(
+    new BufferList(Buffer.from('\u00e8', 'latin1'))
+      .indexOf(Buffer.from('\u00e8', 'latin1'), 'latin1'),
+    0
+  )
+
+  // test binary encoding
+  t.equal(
+    new BufferList(Buffer.from(b.toString('binary'), 'binary'))
+      .indexOf('d', 0, 'binary'),
+    3
+  )
+  t.equal(
+    new BufferList(Buffer.from(b.toString('binary'), 'binary'))
+      .indexOf(Buffer.from('d', 'binary'), 0, 'binary'),
+    3
+  )
+  t.equal(
+    new BufferList(Buffer.from('aa\u00e8aa', 'binary'))
+      .indexOf('\u00e8', 'binary'),
+    2
+  )
+  t.equal(
+    new BufferList(Buffer.from('\u00e8', 'binary'))
+      .indexOf('\u00e8', 'binary'),
+    0
+  )
+  t.equal(
+    new BufferList(Buffer.from('\u00e8', 'binary'))
+      .indexOf(Buffer.from('\u00e8', 'binary'), 'binary'),
+    0
+  )
+
+  t.end()
+})
+
+tape('indexOf the entire nodejs10 buffer test suite', (t) => {
+  const b = new BufferList('abcdef')
+  const bufA = Buffer.from('a')
+  const bufBc = Buffer.from('bc')
+  const bufF = Buffer.from('f')
+  const bufZ = Buffer.from('z')
+
+  const stringComparison = 'abcdef'
+
+  t.equal(b.indexOf('a'), 0)
+  t.equal(b.indexOf('a', 1), -1)
+  t.equal(b.indexOf('a', -1), -1)
+  t.equal(b.indexOf('a', -4), -1)
+  t.equal(b.indexOf('a', -b.length), 0)
+  t.equal(b.indexOf('a', NaN), 0)
+  t.equal(b.indexOf('a', -Infinity), 0)
+  t.equal(b.indexOf('a', Infinity), -1)
+  t.equal(b.indexOf('bc'), 1)
+  t.equal(b.indexOf('bc', 2), -1)
+  t.equal(b.indexOf('bc', -1), -1)
+  t.equal(b.indexOf('bc', -3), -1)
+  t.equal(b.indexOf('bc', -5), 1)
+  t.equal(b.indexOf('bc', NaN), 1)
+  t.equal(b.indexOf('bc', -Infinity), 1)
+  t.equal(b.indexOf('bc', Infinity), -1)
+  t.equal(b.indexOf('f'), b.length - 1)
+  t.equal(b.indexOf('z'), -1)
+
+  // empty search tests
+  t.equal(b.indexOf(bufA), 0)
+  t.equal(b.indexOf(bufA, 1), -1)
+  t.equal(b.indexOf(bufA, -1), -1)
+  t.equal(b.indexOf(bufA, -4), -1)
+  t.equal(b.indexOf(bufA, -b.length), 0)
+  t.equal(b.indexOf(bufA, NaN), 0)
+  t.equal(b.indexOf(bufA, -Infinity), 0)
+  t.equal(b.indexOf(bufA, Infinity), -1)
+  t.equal(b.indexOf(bufBc), 1)
+  t.equal(b.indexOf(bufBc, 2), -1)
+  t.equal(b.indexOf(bufBc, -1), -1)
+  t.equal(b.indexOf(bufBc, -3), -1)
+  t.equal(b.indexOf(bufBc, -5), 1)
+  t.equal(b.indexOf(bufBc, NaN), 1)
+  t.equal(b.indexOf(bufBc, -Infinity), 1)
+  t.equal(b.indexOf(bufBc, Infinity), -1)
+  t.equal(b.indexOf(bufF), b.length - 1)
+  t.equal(b.indexOf(bufZ), -1)
+  t.equal(b.indexOf(0x61), 0)
+  t.equal(b.indexOf(0x61, 1), -1)
+  t.equal(b.indexOf(0x61, -1), -1)
+  t.equal(b.indexOf(0x61, -4), -1)
+  t.equal(b.indexOf(0x61, -b.length), 0)
+  t.equal(b.indexOf(0x61, NaN), 0)
+  t.equal(b.indexOf(0x61, -Infinity), 0)
+  t.equal(b.indexOf(0x61, Infinity), -1)
+  t.equal(b.indexOf(0x0), -1)
+
+  // test offsets
+  t.equal(b.indexOf('d', 2), 3)
+  t.equal(b.indexOf('f', 5), 5)
+  t.equal(b.indexOf('f', -1), 5)
+  t.equal(b.indexOf('f', 6), -1)
+
+  t.equal(b.indexOf(Buffer.from('d'), 2), 3)
+  t.equal(b.indexOf(Buffer.from('f'), 5), 5)
+  t.equal(b.indexOf(Buffer.from('f'), -1), 5)
+  t.equal(b.indexOf(Buffer.from('f'), 6), -1)
+
+  t.equal(Buffer.from('ff').indexOf(Buffer.from('f'), 1, 'ucs2'), -1)
+
+  // test invalid and uppercase encoding
+  t.equal(b.indexOf('b', 'utf8'), 1)
+  t.equal(b.indexOf('b', 'UTF8'), 1)
+  t.equal(b.indexOf('62', 'HEX'), 1)
+  t.throws(() => b.indexOf('bad', 'enc'), TypeError)
+
+  // test hex encoding
+  t.equal(
+    Buffer.from(b.toString('hex'), 'hex')
+      .indexOf('64', 0, 'hex'),
+    3
+  )
+  t.equal(
+    Buffer.from(b.toString('hex'), 'hex')
+      .indexOf(Buffer.from('64', 'hex'), 0, 'hex'),
+    3
+  )
+
+  // test base64 encoding
+  t.equal(
+    Buffer.from(b.toString('base64'), 'base64')
+      .indexOf('ZA==', 0, 'base64'),
+    3
+  )
+  t.equal(
+    Buffer.from(b.toString('base64'), 'base64')
+      .indexOf(Buffer.from('ZA==', 'base64'), 0, 'base64'),
+    3
+  )
+
+  // test ascii encoding
+  t.equal(
+    Buffer.from(b.toString('ascii'), 'ascii')
+      .indexOf('d', 0, 'ascii'),
+    3
+  )
+  t.equal(
+    Buffer.from(b.toString('ascii'), 'ascii')
+      .indexOf(Buffer.from('d', 'ascii'), 0, 'ascii'),
+    3
+  )
+
+  // test optional offset with passed encoding
+  t.equal(Buffer.from('aaaa0').indexOf('30', 'hex'), 4)
+  t.equal(Buffer.from('aaaa00a').indexOf('3030', 'hex'), 4)
+
+  {
+    // test usc2 encoding
+    const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2')
+
+    t.equal(8, twoByteString.indexOf('\u0395', 4, 'ucs2'))
+    t.equal(6, twoByteString.indexOf('\u03a3', -4, 'ucs2'))
+    t.equal(4, twoByteString.indexOf('\u03a3', -6, 'ucs2'))
+    t.equal(4, twoByteString.indexOf(
+      Buffer.from('\u03a3', 'ucs2'), -6, 'ucs2'))
+    t.equal(-1, twoByteString.indexOf('\u03a3', -2, 'ucs2'))
+  }
+
+  const mixedByteStringUcs2 =
+      Buffer.from('\u039a\u0391abc\u03a3\u03a3\u0395', 'ucs2')
+
+  t.equal(6, mixedByteStringUcs2.indexOf('bc', 0, 'ucs2'))
+  t.equal(10, mixedByteStringUcs2.indexOf('\u03a3', 0, 'ucs2'))
+  t.equal(-1, mixedByteStringUcs2.indexOf('\u0396', 0, 'ucs2'))
+
+  t.equal(
+    6, mixedByteStringUcs2.indexOf(Buffer.from('bc', 'ucs2'), 0, 'ucs2'))
+  t.equal(
+    10, mixedByteStringUcs2.indexOf(Buffer.from('\u03a3', 'ucs2'), 0, 'ucs2'))
+  t.equal(
+    -1, mixedByteStringUcs2.indexOf(Buffer.from('\u0396', 'ucs2'), 0, 'ucs2'))
+
+  {
+    const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2')
+
+    // Test single char pattern
+    t.equal(0, twoByteString.indexOf('\u039a', 0, 'ucs2'))
+    let index = twoByteString.indexOf('\u0391', 0, 'ucs2')
+    t.equal(2, index, `Alpha - at index ${index}`)
+    index = twoByteString.indexOf('\u03a3', 0, 'ucs2')
+    t.equal(4, index, `First Sigma - at index ${index}`)
+    index = twoByteString.indexOf('\u03a3', 6, 'ucs2')
+    t.equal(6, index, `Second Sigma - at index ${index}`)
+    index = twoByteString.indexOf('\u0395', 0, 'ucs2')
+    t.equal(8, index, `Epsilon - at index ${index}`)
+    index = twoByteString.indexOf('\u0392', 0, 'ucs2')
+    t.equal(-1, index, `Not beta - at index ${index}`)
+
+    // Test multi-char pattern
+    index = twoByteString.indexOf('\u039a\u0391', 0, 'ucs2')
+    t.equal(0, index, `Lambda Alpha - at index ${index}`)
+    index = twoByteString.indexOf('\u0391\u03a3', 0, 'ucs2')
+    t.equal(2, index, `Alpha Sigma - at index ${index}`)
+    index = twoByteString.indexOf('\u03a3\u03a3', 0, 'ucs2')
+    t.equal(4, index, `Sigma Sigma - at index ${index}`)
+    index = twoByteString.indexOf('\u03a3\u0395', 0, 'ucs2')
+    t.equal(6, index, `Sigma Epsilon - at index ${index}`)
+  }
+
+  const mixedByteStringUtf8 = Buffer.from('\u039a\u0391abc\u03a3\u03a3\u0395')
+
+  t.equal(5, mixedByteStringUtf8.indexOf('bc'))
+  t.equal(5, mixedByteStringUtf8.indexOf('bc', 5))
+  t.equal(5, mixedByteStringUtf8.indexOf('bc', -8))
+  t.equal(7, mixedByteStringUtf8.indexOf('\u03a3'))
+  t.equal(-1, mixedByteStringUtf8.indexOf('\u0396'))
+
+  // Test complex string indexOf algorithms. Only trigger for long strings.
+  // Long string that isn't a simple repeat of a shorter string.
+  let longString = 'A'
+  for (let i = 66; i < 76; i++) { // from 'B' to 'K'
+    longString = longString + String.fromCharCode(i) + longString
+  }
+
+  const longBufferString = Buffer.from(longString)
+
+  // pattern of 15 chars, repeated every 16 chars in long
+  let pattern = 'ABACABADABACABA'
+  for (let i = 0; i < longBufferString.length - pattern.length; i += 7) {
+    const index = longBufferString.indexOf(pattern, i)
+    t.equal((i + 15) & ~0xf, index,
+      `Long ABACABA...-string at index ${i}`)
+  }
+
+  let index = longBufferString.indexOf('AJABACA')
+  t.equal(510, index, `Long AJABACA, First J - at index ${index}`)
+  index = longBufferString.indexOf('AJABACA', 511)
+  t.equal(1534, index, `Long AJABACA, Second J - at index ${index}`)
+
+  pattern = 'JABACABADABACABA'
+  index = longBufferString.indexOf(pattern)
+  t.equal(511, index, `Long JABACABA..., First J - at index ${index}`)
+  index = longBufferString.indexOf(pattern, 512)
+  t.equal(
+    1535, index, `Long JABACABA..., Second J - at index ${index}`)
+
+  // Search for a non-ASCII string in a pure ASCII string.
+  const asciiString = Buffer.from(
+    'somethingnotatallsinisterwhichalsoworks')
+  t.equal(-1, asciiString.indexOf('\x2061'))
+  t.equal(3, asciiString.indexOf('eth', 0))
+
+  // Search in string containing many non-ASCII chars.
+  const allCodePoints = []
+  for (let i = 0; i < 65536; i++) {
+    allCodePoints[i] = i
+  }
+
+  const allCharsString = String.fromCharCode.apply(String, allCodePoints)
+  const allCharsBufferUtf8 = Buffer.from(allCharsString)
+  const allCharsBufferUcs2 = Buffer.from(allCharsString, 'ucs2')
+
+  // Search for string long enough to trigger complex search with ASCII pattern
+  // and UC16 subject.
+  t.equal(-1, allCharsBufferUtf8.indexOf('notfound'))
+  t.equal(-1, allCharsBufferUcs2.indexOf('notfound'))
+
+  // Needle is longer than haystack, but only because it's encoded as UTF-16
+  t.equal(Buffer.from('aaaa').indexOf('a'.repeat(4), 'ucs2'), -1)
+
+  t.equal(Buffer.from('aaaa').indexOf('a'.repeat(4), 'utf8'), 0)
+  t.equal(Buffer.from('aaaa').indexOf('你好', 'ucs2'), -1)
+
+  // Haystack has odd length, but the needle is UCS2.
+  t.equal(Buffer.from('aaaaa').indexOf('b', 'ucs2'), -1)
+
+  {
+    // Find substrings in Utf8.
+    const lengths = [1, 3, 15] // Single char, simple and complex.
+    const indices = [0x5, 0x60, 0x400, 0x680, 0x7ee, 0xFF02, 0x16610, 0x2f77b]
+    for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
+      for (let i = 0; i < indices.length; i++) {
+        const index = indices[i]
+        let length = lengths[lengthIndex]
+
+        if (index + length > 0x7F) {
+          length = 2 * length
+        }
+
+        if (index + length > 0x7FF) {
+          length = 3 * length
+        }
+
+        if (index + length > 0xFFFF) {
+          length = 4 * length
+        }
+
+        const patternBufferUtf8 = allCharsBufferUtf8.slice(index, index + length)
+        t.equal(index, allCharsBufferUtf8.indexOf(patternBufferUtf8))
+
+        const patternStringUtf8 = patternBufferUtf8.toString()
+        t.equal(index, allCharsBufferUtf8.indexOf(patternStringUtf8))
+      }
+    }
+  }
+
+  {
+    // Find substrings in Usc2.
+    const lengths = [2, 4, 16] // Single char, simple and complex.
+    const indices = [0x5, 0x65, 0x105, 0x205, 0x285, 0x2005, 0x2085, 0xfff0]
+
+    for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
+      for (let i = 0; i < indices.length; i++) {
+        const index = indices[i] * 2
+        const length = lengths[lengthIndex]
+
+        const patternBufferUcs2 =
+            allCharsBufferUcs2.slice(index, index + length)
+        t.equal(
+          index, allCharsBufferUcs2.indexOf(patternBufferUcs2, 0, 'ucs2'))
+
+        const patternStringUcs2 = patternBufferUcs2.toString('ucs2')
+        t.equal(
+          index, allCharsBufferUcs2.indexOf(patternStringUcs2, 0, 'ucs2'))
+      }
+    }
+  }
+
+  [
+    () => {},
+    {},
+    []
+  ].forEach((val) => {
+    t.throws(() => b.indexOf(val), TypeError, `"${JSON.stringify(val)}" should throw`)
+  })
+
+  // Test weird offset arguments.
+  // The following offsets coerce to NaN or 0, searching the whole Buffer
+  t.equal(b.indexOf('b', undefined), 1)
+  t.equal(b.indexOf('b', {}), 1)
+  t.equal(b.indexOf('b', 0), 1)
+  t.equal(b.indexOf('b', null), 1)
+  t.equal(b.indexOf('b', []), 1)
+
+  // The following offset coerces to 2, in other words +[2] === 2
+  t.equal(b.indexOf('b', [2]), -1)
+
+  // Behavior should match String.indexOf()
+  t.equal(
+    b.indexOf('b', undefined),
+    stringComparison.indexOf('b', undefined))
+  t.equal(
+    b.indexOf('b', {}),
+    stringComparison.indexOf('b', {}))
+  t.equal(
+    b.indexOf('b', 0),
+    stringComparison.indexOf('b', 0))
+  t.equal(
+    b.indexOf('b', null),
+    stringComparison.indexOf('b', null))
+  t.equal(
+    b.indexOf('b', []),
+    stringComparison.indexOf('b', []))
+  t.equal(
+    b.indexOf('b', [2]),
+    stringComparison.indexOf('b', [2]))
+
+  // test truncation of Number arguments to uint8
+  {
+    const buf = Buffer.from('this is a test')
+
+    t.equal(buf.indexOf(0x6973), 3)
+    t.equal(buf.indexOf(0x697320), 4)
+    t.equal(buf.indexOf(0x69732069), 2)
+    t.equal(buf.indexOf(0x697374657374), 0)
+    t.equal(buf.indexOf(0x69737374), 0)
+    t.equal(buf.indexOf(0x69737465), 11)
+    t.equal(buf.indexOf(0x69737465), 11)
+    t.equal(buf.indexOf(-140), 0)
+    t.equal(buf.indexOf(-152), 1)
+    t.equal(buf.indexOf(0xff), -1)
+    t.equal(buf.indexOf(0xffff), -1)
+  }
+
+  // Test that Uint8Array arguments are okay.
+  {
+    const needle = new Uint8Array([0x66, 0x6f, 0x6f])
+    const haystack = new BufferList(Buffer.from('a foo b foo'))
+    t.equal(haystack.indexOf(needle), 2)
+  }
+
+  t.end()
+})

+ 32 - 0
node_modules/bl/test/isBufferList.js

@@ -0,0 +1,32 @@
+'use strict'
+
+const tape = require('tape')
+const { BufferList, BufferListStream } = require('../')
+const { Buffer } = require('buffer')
+
+tape('isBufferList positives', (t) => {
+  t.ok(BufferList.isBufferList(new BufferList()))
+  t.ok(BufferList.isBufferList(new BufferListStream()))
+
+  t.end()
+})
+
+tape('isBufferList negatives', (t) => {
+  const types = [
+    null,
+    undefined,
+    NaN,
+    true,
+    false,
+    {},
+    [],
+    Buffer.alloc(0),
+    [Buffer.alloc(0)]
+  ]
+
+  for (const obj of types) {
+    t.notOk(BufferList.isBufferList(obj))
+  }
+
+  t.end()
+})

+ 869 - 0
node_modules/bl/test/test.js

@@ -0,0 +1,869 @@
+'use strict'
+
+const tape = require('tape')
+const crypto = require('crypto')
+const fs = require('fs')
+const path = require('path')
+const BufferList = require('../')
+const { Buffer } = require('buffer')
+
+const encodings =
+      ('hex utf8 utf-8 ascii binary base64' +
+          (process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ')
+
+require('./indexOf')
+require('./isBufferList')
+require('./convert')
+
+tape('single bytes from single buffer', function (t) {
+  const bl = new BufferList()
+
+  bl.append(Buffer.from('abcd'))
+
+  t.equal(bl.length, 4)
+  t.equal(bl.get(-1), undefined)
+  t.equal(bl.get(0), 97)
+  t.equal(bl.get(1), 98)
+  t.equal(bl.get(2), 99)
+  t.equal(bl.get(3), 100)
+  t.equal(bl.get(4), undefined)
+
+  t.end()
+})
+
+tape('single bytes from multiple buffers', function (t) {
+  const bl = new BufferList()
+
+  bl.append(Buffer.from('abcd'))
+  bl.append(Buffer.from('efg'))
+  bl.append(Buffer.from('hi'))
+  bl.append(Buffer.from('j'))
+
+  t.equal(bl.length, 10)
+
+  t.equal(bl.get(0), 97)
+  t.equal(bl.get(1), 98)
+  t.equal(bl.get(2), 99)
+  t.equal(bl.get(3), 100)
+  t.equal(bl.get(4), 101)
+  t.equal(bl.get(5), 102)
+  t.equal(bl.get(6), 103)
+  t.equal(bl.get(7), 104)
+  t.equal(bl.get(8), 105)
+  t.equal(bl.get(9), 106)
+
+  t.end()
+})
+
+tape('multi bytes from single buffer', function (t) {
+  const bl = new BufferList()
+
+  bl.append(Buffer.from('abcd'))
+
+  t.equal(bl.length, 4)
+
+  t.equal(bl.slice(0, 4).toString('ascii'), 'abcd')
+  t.equal(bl.slice(0, 3).toString('ascii'), 'abc')
+  t.equal(bl.slice(1, 4).toString('ascii'), 'bcd')
+  t.equal(bl.slice(-4, -1).toString('ascii'), 'abc')
+
+  t.end()
+})
+
+tape('multi bytes from single buffer (negative indexes)', function (t) {
+  const bl = new BufferList()
+
+  bl.append(Buffer.from('buffer'))
+
+  t.equal(bl.length, 6)
+
+  t.equal(bl.slice(-6, -1).toString('ascii'), 'buffe')
+  t.equal(bl.slice(-6, -2).toString('ascii'), 'buff')
+  t.equal(bl.slice(-5, -2).toString('ascii'), 'uff')
+
+  t.end()
+})
+
+tape('multiple bytes from multiple buffers', function (t) {
+  const bl = new BufferList()
+
+  bl.append(Buffer.from('abcd'))
+  bl.append(Buffer.from('efg'))
+  bl.append(Buffer.from('hi'))
+  bl.append(Buffer.from('j'))
+
+  t.equal(bl.length, 10)
+
+  t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+  t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
+  t.equal(bl.slice(3, 6).toString('ascii'), 'def')
+  t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
+  t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
+  t.equal(bl.slice(-7, -4).toString('ascii'), 'def')
+
+  t.end()
+})
+
+tape('multiple bytes from multiple buffer lists', function (t) {
+  const bl = new BufferList()
+
+  bl.append(new BufferList([Buffer.from('abcd'), Buffer.from('efg')]))
+  bl.append(new BufferList([Buffer.from('hi'), Buffer.from('j')]))
+
+  t.equal(bl.length, 10)
+
+  t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+
+  t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
+  t.equal(bl.slice(3, 6).toString('ascii'), 'def')
+  t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
+  t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
+
+  t.end()
+})
+
+// same data as previous test, just using nested constructors
+tape('multiple bytes from crazy nested buffer lists', function (t) {
+  const bl = new BufferList()
+
+  bl.append(new BufferList([
+    new BufferList([
+      new BufferList(Buffer.from('abc')),
+      Buffer.from('d'),
+      new BufferList(Buffer.from('efg'))
+    ]),
+    new BufferList([Buffer.from('hi')]),
+    new BufferList(Buffer.from('j'))
+  ]))
+
+  t.equal(bl.length, 10)
+
+  t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+
+  t.equal(bl.slice(3, 10).toString('ascii'), 'defghij')
+  t.equal(bl.slice(3, 6).toString('ascii'), 'def')
+  t.equal(bl.slice(3, 8).toString('ascii'), 'defgh')
+  t.equal(bl.slice(5, 10).toString('ascii'), 'fghij')
+
+  t.end()
+})
+
+tape('append accepts arrays of Buffers', function (t) {
+  const bl = new BufferList()
+
+  bl.append(Buffer.from('abc'))
+  bl.append([Buffer.from('def')])
+  bl.append([Buffer.from('ghi'), Buffer.from('jkl')])
+  bl.append([Buffer.from('mnop'), Buffer.from('qrstu'), Buffer.from('vwxyz')])
+  t.equal(bl.length, 26)
+  t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+  t.end()
+})
+
+tape('append accepts arrays of Uint8Arrays', function (t) {
+  const bl = new BufferList()
+
+  bl.append(new Uint8Array([97, 98, 99]))
+  bl.append([Uint8Array.from([100, 101, 102])])
+  bl.append([new Uint8Array([103, 104, 105]), new Uint8Array([106, 107, 108])])
+  bl.append([new Uint8Array([109, 110, 111, 112]), new Uint8Array([113, 114, 115, 116, 117]), new Uint8Array([118, 119, 120, 121, 122])])
+  t.equal(bl.length, 26)
+  t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+  t.end()
+})
+
+tape('append accepts arrays of BufferLists', function (t) {
+  const bl = new BufferList()
+
+  bl.append(Buffer.from('abc'))
+  bl.append([new BufferList('def')])
+  bl.append(new BufferList([Buffer.from('ghi'), new BufferList('jkl')]))
+  bl.append([Buffer.from('mnop'), new BufferList([Buffer.from('qrstu'), Buffer.from('vwxyz')])])
+  t.equal(bl.length, 26)
+  t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+  t.end()
+})
+
+tape('append chainable', function (t) {
+  const bl = new BufferList()
+
+  t.ok(bl.append(Buffer.from('abcd')) === bl)
+  t.ok(bl.append([Buffer.from('abcd')]) === bl)
+  t.ok(bl.append(new BufferList(Buffer.from('abcd'))) === bl)
+  t.ok(bl.append([new BufferList(Buffer.from('abcd'))]) === bl)
+
+  t.end()
+})
+
+tape('append chainable (test results)', function (t) {
+  const bl = new BufferList('abc')
+    .append([new BufferList('def')])
+    .append(new BufferList([Buffer.from('ghi'), new BufferList('jkl')]))
+    .append([Buffer.from('mnop'), new BufferList([Buffer.from('qrstu'), Buffer.from('vwxyz')])])
+
+  t.equal(bl.length, 26)
+  t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz')
+
+  t.end()
+})
+
+tape('consuming from multiple buffers', function (t) {
+  const bl = new BufferList()
+
+  bl.append(Buffer.from('abcd'))
+  bl.append(Buffer.from('efg'))
+  bl.append(Buffer.from('hi'))
+  bl.append(Buffer.from('j'))
+
+  t.equal(bl.length, 10)
+
+  t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij')
+
+  bl.consume(3)
+  t.equal(bl.length, 7)
+  t.equal(bl.slice(0, 7).toString('ascii'), 'defghij')
+
+  bl.consume(2)
+  t.equal(bl.length, 5)
+  t.equal(bl.slice(0, 5).toString('ascii'), 'fghij')
+
+  bl.consume(1)
+  t.equal(bl.length, 4)
+  t.equal(bl.slice(0, 4).toString('ascii'), 'ghij')
+
+  bl.consume(1)
+  t.equal(bl.length, 3)
+  t.equal(bl.slice(0, 3).toString('ascii'), 'hij')
+
+  bl.consume(2)
+  t.equal(bl.length, 1)
+  t.equal(bl.slice(0, 1).toString('ascii'), 'j')
+
+  t.end()
+})
+
+tape('complete consumption', function (t) {
+  const bl = new BufferList()
+
+  bl.append(Buffer.from('a'))
+  bl.append(Buffer.from('b'))
+
+  bl.consume(2)
+
+  t.equal(bl.length, 0)
+  t.equal(bl._bufs.length, 0)
+
+  t.end()
+})
+
+tape('test readUInt8 / readInt8', function (t) {
+  const buf1 = Buffer.alloc(1)
+  const buf2 = Buffer.alloc(3)
+  const buf3 = Buffer.alloc(3)
+  const bl = new BufferList()
+
+  buf1[0] = 0x1
+  buf2[1] = 0x3
+  buf2[2] = 0x4
+  buf3[0] = 0x23
+  buf3[1] = 0x42
+
+  bl.append(buf1)
+  bl.append(buf2)
+  bl.append(buf3)
+
+  t.equal(bl.readUInt8(), 0x1)
+  t.equal(bl.readUInt8(2), 0x3)
+  t.equal(bl.readInt8(2), 0x3)
+  t.equal(bl.readUInt8(3), 0x4)
+  t.equal(bl.readInt8(3), 0x4)
+  t.equal(bl.readUInt8(4), 0x23)
+  t.equal(bl.readInt8(4), 0x23)
+  t.equal(bl.readUInt8(5), 0x42)
+  t.equal(bl.readInt8(5), 0x42)
+
+  t.end()
+})
+
+tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) {
+  const buf1 = Buffer.alloc(1)
+  const buf2 = Buffer.alloc(3)
+  const buf3 = Buffer.alloc(3)
+  const bl = new BufferList()
+
+  buf1[0] = 0x1
+  buf2[1] = 0x3
+  buf2[2] = 0x4
+  buf3[0] = 0x23
+  buf3[1] = 0x42
+
+  bl.append(buf1)
+  bl.append(buf2)
+  bl.append(buf3)
+
+  t.equal(bl.readUInt16BE(), 0x0100)
+  t.equal(bl.readUInt16LE(), 0x0001)
+  t.equal(bl.readUInt16BE(2), 0x0304)
+  t.equal(bl.readUInt16LE(2), 0x0403)
+  t.equal(bl.readInt16BE(2), 0x0304)
+  t.equal(bl.readInt16LE(2), 0x0403)
+  t.equal(bl.readUInt16BE(3), 0x0423)
+  t.equal(bl.readUInt16LE(3), 0x2304)
+  t.equal(bl.readInt16BE(3), 0x0423)
+  t.equal(bl.readInt16LE(3), 0x2304)
+  t.equal(bl.readUInt16BE(4), 0x2342)
+  t.equal(bl.readUInt16LE(4), 0x4223)
+  t.equal(bl.readInt16BE(4), 0x2342)
+  t.equal(bl.readInt16LE(4), 0x4223)
+
+  t.end()
+})
+
+tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) {
+  const buf1 = Buffer.alloc(1)
+  const buf2 = Buffer.alloc(3)
+  const buf3 = Buffer.alloc(3)
+  const bl = new BufferList()
+
+  buf1[0] = 0x1
+  buf2[1] = 0x3
+  buf2[2] = 0x4
+  buf3[0] = 0x23
+  buf3[1] = 0x42
+
+  bl.append(buf1)
+  bl.append(buf2)
+  bl.append(buf3)
+
+  t.equal(bl.readUInt32BE(), 0x01000304)
+  t.equal(bl.readUInt32LE(), 0x04030001)
+  t.equal(bl.readUInt32BE(2), 0x03042342)
+  t.equal(bl.readUInt32LE(2), 0x42230403)
+  t.equal(bl.readInt32BE(2), 0x03042342)
+  t.equal(bl.readInt32LE(2), 0x42230403)
+
+  t.end()
+})
+
+tape('test readUIntLE / readUIntBE / readIntLE / readIntBE', function (t) {
+  const buf1 = Buffer.alloc(1)
+  const buf2 = Buffer.alloc(3)
+  const buf3 = Buffer.alloc(3)
+  const bl = new BufferList()
+
+  buf2[0] = 0x2
+  buf2[1] = 0x3
+  buf2[2] = 0x4
+  buf3[0] = 0x23
+  buf3[1] = 0x42
+  buf3[2] = 0x61
+
+  bl.append(buf1)
+  bl.append(buf2)
+  bl.append(buf3)
+
+  t.equal(bl.readUIntBE(1, 1), 0x02)
+  t.equal(bl.readUIntBE(1, 2), 0x0203)
+  t.equal(bl.readUIntBE(1, 3), 0x020304)
+  t.equal(bl.readUIntBE(1, 4), 0x02030423)
+  t.equal(bl.readUIntBE(1, 5), 0x0203042342)
+  t.equal(bl.readUIntBE(1, 6), 0x020304234261)
+  t.equal(bl.readUIntLE(1, 1), 0x02)
+  t.equal(bl.readUIntLE(1, 2), 0x0302)
+  t.equal(bl.readUIntLE(1, 3), 0x040302)
+  t.equal(bl.readUIntLE(1, 4), 0x23040302)
+  t.equal(bl.readUIntLE(1, 5), 0x4223040302)
+  t.equal(bl.readUIntLE(1, 6), 0x614223040302)
+  t.equal(bl.readIntBE(1, 1), 0x02)
+  t.equal(bl.readIntBE(1, 2), 0x0203)
+  t.equal(bl.readIntBE(1, 3), 0x020304)
+  t.equal(bl.readIntBE(1, 4), 0x02030423)
+  t.equal(bl.readIntBE(1, 5), 0x0203042342)
+  t.equal(bl.readIntBE(1, 6), 0x020304234261)
+  t.equal(bl.readIntLE(1, 1), 0x02)
+  t.equal(bl.readIntLE(1, 2), 0x0302)
+  t.equal(bl.readIntLE(1, 3), 0x040302)
+  t.equal(bl.readIntLE(1, 4), 0x23040302)
+  t.equal(bl.readIntLE(1, 5), 0x4223040302)
+  t.equal(bl.readIntLE(1, 6), 0x614223040302)
+
+  t.end()
+})
+
+tape('test readFloatLE / readFloatBE', function (t) {
+  const buf1 = Buffer.alloc(1)
+  const buf2 = Buffer.alloc(3)
+  const buf3 = Buffer.alloc(3)
+  const bl = new BufferList()
+
+  buf1[0] = 0x01
+  buf2[1] = 0x00
+  buf2[2] = 0x00
+  buf3[0] = 0x80
+  buf3[1] = 0x3f
+
+  bl.append(buf1)
+  bl.append(buf2)
+  bl.append(buf3)
+
+  const canonical = Buffer.concat([buf1, buf2, buf3])
+  t.equal(bl.readFloatLE(), canonical.readFloatLE())
+  t.equal(bl.readFloatBE(), canonical.readFloatBE())
+  t.equal(bl.readFloatLE(2), canonical.readFloatLE(2))
+  t.equal(bl.readFloatBE(2), canonical.readFloatBE(2))
+
+  t.end()
+})
+
+tape('test readDoubleLE / readDoubleBE', function (t) {
+  const buf1 = Buffer.alloc(1)
+  const buf2 = Buffer.alloc(3)
+  const buf3 = Buffer.alloc(10)
+  const bl = new BufferList()
+
+  buf1[0] = 0x01
+  buf2[1] = 0x55
+  buf2[2] = 0x55
+  buf3[0] = 0x55
+  buf3[1] = 0x55
+  buf3[2] = 0x55
+  buf3[3] = 0x55
+  buf3[4] = 0xd5
+  buf3[5] = 0x3f
+
+  bl.append(buf1)
+  bl.append(buf2)
+  bl.append(buf3)
+
+  const canonical = Buffer.concat([buf1, buf2, buf3])
+  t.equal(bl.readDoubleBE(), canonical.readDoubleBE())
+  t.equal(bl.readDoubleLE(), canonical.readDoubleLE())
+  t.equal(bl.readDoubleBE(2), canonical.readDoubleBE(2))
+  t.equal(bl.readDoubleLE(2), canonical.readDoubleLE(2))
+
+  t.end()
+})
+
+tape('test toString', function (t) {
+  const bl = new BufferList()
+
+  bl.append(Buffer.from('abcd'))
+  bl.append(Buffer.from('efg'))
+  bl.append(Buffer.from('hi'))
+  bl.append(Buffer.from('j'))
+
+  t.equal(bl.toString('ascii', 0, 10), 'abcdefghij')
+  t.equal(bl.toString('ascii', 3, 10), 'defghij')
+  t.equal(bl.toString('ascii', 3, 6), 'def')
+  t.equal(bl.toString('ascii', 3, 8), 'defgh')
+  t.equal(bl.toString('ascii', 5, 10), 'fghij')
+
+  t.end()
+})
+
+tape('test toString encoding', function (t) {
+  const bl = new BufferList()
+  const b = Buffer.from('abcdefghij\xff\x00')
+
+  bl.append(Buffer.from('abcd'))
+  bl.append(Buffer.from('efg'))
+  bl.append(Buffer.from('hi'))
+  bl.append(Buffer.from('j'))
+  bl.append(Buffer.from('\xff\x00'))
+
+  encodings.forEach(function (enc) {
+    t.equal(bl.toString(enc), b.toString(enc), enc)
+  })
+
+  t.end()
+})
+
+tape('uninitialized memory', function (t) {
+  const secret = crypto.randomBytes(256)
+  for (let i = 0; i < 1e6; i++) {
+    const clone = Buffer.from(secret)
+    const bl = new BufferList()
+    bl.append(Buffer.from('a'))
+    bl.consume(-1024)
+    const buf = bl.slice(1)
+    if (buf.indexOf(clone) !== -1) {
+      t.fail(`Match (at ${i})`)
+      break
+    }
+  }
+  t.end()
+})
+
+!process.browser && tape('test stream', function (t) {
+  const random = crypto.randomBytes(65534)
+
+  const bl = new BufferList((err, buf) => {
+    t.ok(Buffer.isBuffer(buf))
+    t.ok(err === null)
+    t.ok(random.equals(bl.slice()))
+    t.ok(random.equals(buf.slice()))
+
+    bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat'))
+      .on('close', function () {
+        const rndhash = crypto.createHash('md5').update(random).digest('hex')
+        const md5sum = crypto.createHash('md5')
+        const s = fs.createReadStream('/tmp/bl_test_rnd_out.dat')
+
+        s.on('data', md5sum.update.bind(md5sum))
+        s.on('end', function () {
+          t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!')
+          t.end()
+        })
+      })
+  })
+
+  fs.writeFileSync('/tmp/bl_test_rnd.dat', random)
+  fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl)
+})
+
+tape('instantiation with Buffer', function (t) {
+  const buf = crypto.randomBytes(1024)
+  const buf2 = crypto.randomBytes(1024)
+  let b = BufferList(buf)
+
+  t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer')
+  b = BufferList([buf, buf2])
+  t.equal(b.slice().toString('hex'), Buffer.concat([buf, buf2]).toString('hex'), 'same buffer')
+
+  t.end()
+})
+
+tape('test String appendage', function (t) {
+  const bl = new BufferList()
+  const b = Buffer.from('abcdefghij\xff\x00')
+
+  bl.append('abcd')
+  bl.append('efg')
+  bl.append('hi')
+  bl.append('j')
+  bl.append('\xff\x00')
+
+  encodings.forEach(function (enc) {
+    t.equal(bl.toString(enc), b.toString(enc))
+  })
+
+  t.end()
+})
+
+tape('test Number appendage', function (t) {
+  const bl = new BufferList()
+  const b = Buffer.from('1234567890')
+
+  bl.append(1234)
+  bl.append(567)
+  bl.append(89)
+  bl.append(0)
+
+  encodings.forEach(function (enc) {
+    t.equal(bl.toString(enc), b.toString(enc))
+  })
+
+  t.end()
+})
+
+tape('write nothing, should get empty buffer', function (t) {
+  t.plan(3)
+  BufferList(function (err, data) {
+    t.notOk(err, 'no error')
+    t.ok(Buffer.isBuffer(data), 'got a buffer')
+    t.equal(0, data.length, 'got a zero-length buffer')
+    t.end()
+  }).end()
+})
+
+tape('unicode string', function (t) {
+  t.plan(2)
+
+  const inp1 = '\u2600'
+  const inp2 = '\u2603'
+  const exp = inp1 + ' and ' + inp2
+  const bl = BufferList()
+
+  bl.write(inp1)
+  bl.write(' and ')
+  bl.write(inp2)
+  t.equal(exp, bl.toString())
+  t.equal(Buffer.from(exp).toString('hex'), bl.toString('hex'))
+})
+
+tape('should emit finish', function (t) {
+  const source = BufferList()
+  const dest = BufferList()
+
+  source.write('hello')
+  source.pipe(dest)
+
+  dest.on('finish', function () {
+    t.equal(dest.toString('utf8'), 'hello')
+    t.end()
+  })
+})
+
+tape('basic copy', function (t) {
+  const buf = crypto.randomBytes(1024)
+  const buf2 = Buffer.alloc(1024)
+  const b = BufferList(buf)
+
+  b.copy(buf2)
+  t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
+
+  t.end()
+})
+
+tape('copy after many appends', function (t) {
+  const buf = crypto.randomBytes(512)
+  const buf2 = Buffer.alloc(1024)
+  const b = BufferList(buf)
+
+  b.append(buf)
+  b.copy(buf2)
+  t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer')
+
+  t.end()
+})
+
+tape('copy at a precise position', function (t) {
+  const buf = crypto.randomBytes(1004)
+  const buf2 = Buffer.alloc(1024)
+  const b = BufferList(buf)
+
+  b.copy(buf2, 20)
+  t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer')
+
+  t.end()
+})
+
+tape('copy starting from a precise location', function (t) {
+  const buf = crypto.randomBytes(10)
+  const buf2 = Buffer.alloc(5)
+  const b = BufferList(buf)
+
+  b.copy(buf2, 0, 5)
+  t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer')
+
+  t.end()
+})
+
+tape('copy in an interval', function (t) {
+  const rnd = crypto.randomBytes(10)
+  const b = BufferList(rnd) // put the random bytes there
+  const actual = Buffer.alloc(3)
+  const expected = Buffer.alloc(3)
+
+  rnd.copy(expected, 0, 5, 8)
+  b.copy(actual, 0, 5, 8)
+
+  t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer')
+
+  t.end()
+})
+
+tape('copy an interval between two buffers', function (t) {
+  const buf = crypto.randomBytes(10)
+  const buf2 = Buffer.alloc(10)
+  const b = BufferList(buf)
+
+  b.append(buf)
+  b.copy(buf2, 0, 5, 15)
+
+  t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer')
+
+  t.end()
+})
+
+tape('shallow slice across buffer boundaries', function (t) {
+  const bl = new BufferList(['First', 'Second', 'Third'])
+
+  t.equal(bl.shallowSlice(3, 13).toString(), 'stSecondTh')
+
+  t.end()
+})
+
+tape('shallow slice within single buffer', function (t) {
+  t.plan(2)
+
+  const bl = new BufferList(['First', 'Second', 'Third'])
+
+  t.equal(bl.shallowSlice(5, 10).toString(), 'Secon')
+  t.equal(bl.shallowSlice(7, 10).toString(), 'con')
+
+  t.end()
+})
+
+tape('shallow slice single buffer', function (t) {
+  t.plan(3)
+
+  const bl = new BufferList(['First', 'Second', 'Third'])
+
+  t.equal(bl.shallowSlice(0, 5).toString(), 'First')
+  t.equal(bl.shallowSlice(5, 11).toString(), 'Second')
+  t.equal(bl.shallowSlice(11, 16).toString(), 'Third')
+})
+
+tape('shallow slice with negative or omitted indices', function (t) {
+  t.plan(4)
+
+  const bl = new BufferList(['First', 'Second', 'Third'])
+
+  t.equal(bl.shallowSlice().toString(), 'FirstSecondThird')
+  t.equal(bl.shallowSlice(5).toString(), 'SecondThird')
+  t.equal(bl.shallowSlice(5, -3).toString(), 'SecondTh')
+  t.equal(bl.shallowSlice(-8).toString(), 'ondThird')
+})
+
+tape('shallow slice does not make a copy', function (t) {
+  t.plan(1)
+
+  const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
+  const bl = (new BufferList(buffers)).shallowSlice(5, -3)
+
+  buffers[1].fill('h')
+  buffers[2].fill('h')
+
+  t.equal(bl.toString(), 'hhhhhhhh')
+})
+
+tape('shallow slice with 0 length', function (t) {
+  t.plan(1)
+
+  const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
+  const bl = (new BufferList(buffers)).shallowSlice(0, 0)
+
+  t.equal(bl.length, 0)
+})
+
+tape('shallow slice with 0 length from middle', function (t) {
+  t.plan(1)
+
+  const buffers = [Buffer.from('First'), Buffer.from('Second'), Buffer.from('Third')]
+  const bl = (new BufferList(buffers)).shallowSlice(10, 10)
+
+  t.equal(bl.length, 0)
+})
+
+tape('duplicate', function (t) {
+  t.plan(2)
+
+  const bl = new BufferList('abcdefghij\xff\x00')
+  const dup = bl.duplicate()
+
+  t.equal(bl.prototype, dup.prototype)
+  t.equal(bl.toString('hex'), dup.toString('hex'))
+})
+
+tape('destroy no pipe', function (t) {
+  t.plan(2)
+
+  const bl = new BufferList('alsdkfja;lsdkfja;lsdk')
+
+  bl.destroy()
+
+  t.equal(bl._bufs.length, 0)
+  t.equal(bl.length, 0)
+})
+
+tape('destroy with error', function (t) {
+  t.plan(3)
+
+  const bl = new BufferList('alsdkfja;lsdkfja;lsdk')
+  const err = new Error('kaboom')
+
+  bl.destroy(err)
+  bl.on('error', function (_err) {
+    t.equal(_err, err)
+  })
+
+  t.equal(bl._bufs.length, 0)
+  t.equal(bl.length, 0)
+})
+
+!process.browser && tape('destroy with pipe before read end', function (t) {
+  t.plan(2)
+
+  const bl = new BufferList()
+  fs.createReadStream(path.join(__dirname, '/test.js'))
+    .pipe(bl)
+
+  bl.destroy()
+
+  t.equal(bl._bufs.length, 0)
+  t.equal(bl.length, 0)
+})
+
+!process.browser && tape('destroy with pipe before read end with race', function (t) {
+  t.plan(2)
+
+  const bl = new BufferList()
+
+  fs.createReadStream(path.join(__dirname, '/test.js'))
+    .pipe(bl)
+
+  setTimeout(function () {
+    bl.destroy()
+    setTimeout(function () {
+      t.equal(bl._bufs.length, 0)
+      t.equal(bl.length, 0)
+    }, 500)
+  }, 500)
+})
+
+!process.browser && tape('destroy with pipe after read end', function (t) {
+  t.plan(2)
+
+  const bl = new BufferList()
+
+  fs.createReadStream(path.join(__dirname, '/test.js'))
+    .on('end', onEnd)
+    .pipe(bl)
+
+  function onEnd () {
+    bl.destroy()
+
+    t.equal(bl._bufs.length, 0)
+    t.equal(bl.length, 0)
+  }
+})
+
+!process.browser && tape('destroy with pipe while writing to a destination', function (t) {
+  t.plan(4)
+
+  const bl = new BufferList()
+  const ds = new BufferList()
+
+  fs.createReadStream(path.join(__dirname, '/test.js'))
+    .on('end', onEnd)
+    .pipe(bl)
+
+  function onEnd () {
+    bl.pipe(ds)
+
+    setTimeout(function () {
+      bl.destroy()
+
+      t.equals(bl._bufs.length, 0)
+      t.equals(bl.length, 0)
+
+      ds.destroy()
+
+      t.equals(bl._bufs.length, 0)
+      t.equals(bl.length, 0)
+    }, 100)
+  }
+})
+
+!process.browser && tape('handle error', function (t) {
+  t.plan(2)
+
+  fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) {
+    t.ok(err instanceof Error, 'has error')
+    t.notOk(data, 'no data')
+  }))
+})

+ 21 - 0
node_modules/brace-expansion/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 129 - 0
node_modules/brace-expansion/README.md

@@ -0,0 +1,129 @@
+# brace-expansion
+
+[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), 
+as known from sh/bash, in JavaScript.
+
+[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
+[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
+[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
+
+[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
+
+## Example
+
+```js
+var expand = require('brace-expansion');
+
+expand('file-{a,b,c}.jpg')
+// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
+
+expand('-v{,,}')
+// => ['-v', '-v', '-v']
+
+expand('file{0..2}.jpg')
+// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
+
+expand('file-{a..c}.jpg')
+// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
+
+expand('file{2..0}.jpg')
+// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
+
+expand('file{0..4..2}.jpg')
+// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
+
+expand('file-{a..e..2}.jpg')
+// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
+
+expand('file{00..10..5}.jpg')
+// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
+
+expand('{{A..C},{a..c}}')
+// => ['A', 'B', 'C', 'a', 'b', 'c']
+
+expand('ppp{,config,oe{,conf}}')
+// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
+```
+
+## API
+
+```js
+var expand = require('brace-expansion');
+```
+
+### var expanded = expand(str)
+
+Return an array of all possible and valid expansions of `str`. If none are
+found, `[str]` is returned.
+
+Valid expansions are:
+
+```js
+/^(.*,)+(.+)?$/
+// {a,b,...}
+```
+
+A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
+
+```js
+/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
+// {x..y[..incr]}
+```
+
+A numeric sequence from `x` to `y` inclusive, with optional increment.
+If `x` or `y` start with a leading `0`, all the numbers will be padded
+to have equal length. Negative numbers and backwards iteration work too.
+
+```js
+/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
+// {x..y[..incr]}
+```
+
+An alphabetic sequence from `x` to `y` inclusive, with optional increment.
+`x` and `y` must be exactly one character, and if given, `incr` must be a
+number.
+
+For compatibility reasons, the string `${` is not eligible for brace expansion.
+
+## Installation
+
+With [npm](https://npmjs.org) do:
+
+```bash
+npm install brace-expansion
+```
+
+## Contributors
+
+- [Julian Gruber](https://github.com/juliangruber)
+- [Isaac Z. Schlueter](https://github.com/isaacs)
+
+## Sponsors
+
+This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
+
+Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
+
+## License
+
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 201 - 0
node_modules/brace-expansion/index.js

@@ -0,0 +1,201 @@
+var concatMap = require('concat-map');
+var balanced = require('balanced-match');
+
+module.exports = expandTop;
+
+var escSlash = '\0SLASH'+Math.random()+'\0';
+var escOpen = '\0OPEN'+Math.random()+'\0';
+var escClose = '\0CLOSE'+Math.random()+'\0';
+var escComma = '\0COMMA'+Math.random()+'\0';
+var escPeriod = '\0PERIOD'+Math.random()+'\0';
+
+function numeric(str) {
+  return parseInt(str, 10) == str
+    ? parseInt(str, 10)
+    : str.charCodeAt(0);
+}
+
+function escapeBraces(str) {
+  return str.split('\\\\').join(escSlash)
+            .split('\\{').join(escOpen)
+            .split('\\}').join(escClose)
+            .split('\\,').join(escComma)
+            .split('\\.').join(escPeriod);
+}
+
+function unescapeBraces(str) {
+  return str.split(escSlash).join('\\')
+            .split(escOpen).join('{')
+            .split(escClose).join('}')
+            .split(escComma).join(',')
+            .split(escPeriod).join('.');
+}
+
+
+// Basically just str.split(","), but handling cases
+// where we have nested braced sections, which should be
+// treated as individual members, like {a,{b,c},d}
+function parseCommaParts(str) {
+  if (!str)
+    return [''];
+
+  var parts = [];
+  var m = balanced('{', '}', str);
+
+  if (!m)
+    return str.split(',');
+
+  var pre = m.pre;
+  var body = m.body;
+  var post = m.post;
+  var p = pre.split(',');
+
+  p[p.length-1] += '{' + body + '}';
+  var postParts = parseCommaParts(post);
+  if (post.length) {
+    p[p.length-1] += postParts.shift();
+    p.push.apply(p, postParts);
+  }
+
+  parts.push.apply(parts, p);
+
+  return parts;
+}
+
+function expandTop(str) {
+  if (!str)
+    return [];
+
+  // I don't know why Bash 4.3 does this, but it does.
+  // Anything starting with {} will have the first two bytes preserved
+  // but *only* at the top level, so {},a}b will not expand to anything,
+  // but a{},b}c will be expanded to [a}c,abc].
+  // One could argue that this is a bug in Bash, but since the goal of
+  // this module is to match Bash's rules, we escape a leading {}
+  if (str.substr(0, 2) === '{}') {
+    str = '\\{\\}' + str.substr(2);
+  }
+
+  return expand(escapeBraces(str), true).map(unescapeBraces);
+}
+
+function identity(e) {
+  return e;
+}
+
+function embrace(str) {
+  return '{' + str + '}';
+}
+function isPadded(el) {
+  return /^-?0\d/.test(el);
+}
+
+function lte(i, y) {
+  return i <= y;
+}
+function gte(i, y) {
+  return i >= y;
+}
+
+function expand(str, isTop) {
+  var expansions = [];
+
+  var m = balanced('{', '}', str);
+  if (!m || /\$$/.test(m.pre)) return [str];
+
+  var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
+  var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
+  var isSequence = isNumericSequence || isAlphaSequence;
+  var isOptions = m.body.indexOf(',') >= 0;
+  if (!isSequence && !isOptions) {
+    // {a},b}
+    if (m.post.match(/,.*\}/)) {
+      str = m.pre + '{' + m.body + escClose + m.post;
+      return expand(str);
+    }
+    return [str];
+  }
+
+  var n;
+  if (isSequence) {
+    n = m.body.split(/\.\./);
+  } else {
+    n = parseCommaParts(m.body);
+    if (n.length === 1) {
+      // x{{a,b}}y ==> x{a}y x{b}y
+      n = expand(n[0], false).map(embrace);
+      if (n.length === 1) {
+        var post = m.post.length
+          ? expand(m.post, false)
+          : [''];
+        return post.map(function(p) {
+          return m.pre + n[0] + p;
+        });
+      }
+    }
+  }
+
+  // at this point, n is the parts, and we know it's not a comma set
+  // with a single entry.
+
+  // no need to expand pre, since it is guaranteed to be free of brace-sets
+  var pre = m.pre;
+  var post = m.post.length
+    ? expand(m.post, false)
+    : [''];
+
+  var N;
+
+  if (isSequence) {
+    var x = numeric(n[0]);
+    var y = numeric(n[1]);
+    var width = Math.max(n[0].length, n[1].length)
+    var incr = n.length == 3
+      ? Math.abs(numeric(n[2]))
+      : 1;
+    var test = lte;
+    var reverse = y < x;
+    if (reverse) {
+      incr *= -1;
+      test = gte;
+    }
+    var pad = n.some(isPadded);
+
+    N = [];
+
+    for (var i = x; test(i, y); i += incr) {
+      var c;
+      if (isAlphaSequence) {
+        c = String.fromCharCode(i);
+        if (c === '\\')
+          c = '';
+      } else {
+        c = String(i);
+        if (pad) {
+          var need = width - c.length;
+          if (need > 0) {
+            var z = new Array(need + 1).join('0');
+            if (i < 0)
+              c = '-' + z + c.slice(1);
+            else
+              c = z + c;
+          }
+        }
+      }
+      N.push(c);
+    }
+  } else {
+    N = concatMap(n, function(el) { return expand(el, false) });
+  }
+
+  for (var j = 0; j < N.length; j++) {
+    for (var k = 0; k < post.length; k++) {
+      var expansion = pre + N[j] + post[k];
+      if (!isTop || isSequence || expansion)
+        expansions.push(expansion);
+    }
+  }
+
+  return expansions;
+}
+

+ 75 - 0
node_modules/brace-expansion/package.json

@@ -0,0 +1,75 @@
+{
+  "_from": "brace-expansion@^1.1.7",
+  "_id": "brace-expansion@1.1.11",
+  "_inBundle": false,
+  "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+  "_location": "/brace-expansion",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "brace-expansion@^1.1.7",
+    "name": "brace-expansion",
+    "escapedName": "brace-expansion",
+    "rawSpec": "^1.1.7",
+    "saveSpec": null,
+    "fetchSpec": "^1.1.7"
+  },
+  "_requiredBy": [
+    "/minimatch"
+  ],
+  "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+  "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd",
+  "_spec": "brace-expansion@^1.1.7",
+  "_where": "/Users/bssm/Desktop/fabTest/打卡坐标/node_modules/minimatch",
+  "author": {
+    "name": "Julian Gruber",
+    "email": "mail@juliangruber.com",
+    "url": "http://juliangruber.com"
+  },
+  "bugs": {
+    "url": "https://github.com/juliangruber/brace-expansion/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "balanced-match": "^1.0.0",
+    "concat-map": "0.0.1"
+  },
+  "deprecated": false,
+  "description": "Brace expansion as known from sh/bash",
+  "devDependencies": {
+    "matcha": "^0.7.0",
+    "tape": "^4.6.0"
+  },
+  "homepage": "https://github.com/juliangruber/brace-expansion",
+  "keywords": [],
+  "license": "MIT",
+  "main": "index.js",
+  "name": "brace-expansion",
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/juliangruber/brace-expansion.git"
+  },
+  "scripts": {
+    "bench": "matcha test/perf/bench.js",
+    "gentest": "bash test/generate.sh",
+    "test": "tape test/*.js"
+  },
+  "testling": {
+    "files": "test/*.js",
+    "browsers": [
+      "ie/8..latest",
+      "firefox/20..latest",
+      "firefox/nightly",
+      "chrome/25..latest",
+      "chrome/canary",
+      "opera/12..latest",
+      "opera/next",
+      "safari/5.1..latest",
+      "ipad/6.0..latest",
+      "iphone/6.0..latest",
+      "android-browser/4.2..latest"
+    ]
+  },
+  "version": "1.1.11"
+}

+ 21 - 0
node_modules/buffer-from/LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2016, 2018 Linus Unnebäck
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 69 - 0
node_modules/buffer-from/index.js

@@ -0,0 +1,69 @@
+var toString = Object.prototype.toString
+
+var isModern = (
+  typeof Buffer.alloc === 'function' &&
+  typeof Buffer.allocUnsafe === 'function' &&
+  typeof Buffer.from === 'function'
+)
+
+function isArrayBuffer (input) {
+  return toString.call(input).slice(8, -1) === 'ArrayBuffer'
+}
+
+function fromArrayBuffer (obj, byteOffset, length) {
+  byteOffset >>>= 0
+
+  var maxLength = obj.byteLength - byteOffset
+
+  if (maxLength < 0) {
+    throw new RangeError("'offset' is out of bounds")
+  }
+
+  if (length === undefined) {
+    length = maxLength
+  } else {
+    length >>>= 0
+
+    if (length > maxLength) {
+      throw new RangeError("'length' is out of bounds")
+    }
+  }
+
+  return isModern
+    ? Buffer.from(obj.slice(byteOffset, byteOffset + length))
+    : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length)))
+}
+
+function fromString (string, encoding) {
+  if (typeof encoding !== 'string' || encoding === '') {
+    encoding = 'utf8'
+  }
+
+  if (!Buffer.isEncoding(encoding)) {
+    throw new TypeError('"encoding" must be a valid string encoding')
+  }
+
+  return isModern
+    ? Buffer.from(string, encoding)
+    : new Buffer(string, encoding)
+}
+
+function bufferFrom (value, encodingOrOffset, length) {
+  if (typeof value === 'number') {
+    throw new TypeError('"value" argument must not be a number')
+  }
+
+  if (isArrayBuffer(value)) {
+    return fromArrayBuffer(value, encodingOrOffset, length)
+  }
+
+  if (typeof value === 'string') {
+    return fromString(value, encodingOrOffset)
+  }
+
+  return isModern
+    ? Buffer.from(value)
+    : new Buffer(value)
+}
+
+module.exports = bufferFrom

+ 52 - 0
node_modules/buffer-from/package.json

@@ -0,0 +1,52 @@
+{
+  "_from": "buffer-from@^1.0.0",
+  "_id": "buffer-from@1.1.1",
+  "_inBundle": false,
+  "_integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
+  "_location": "/buffer-from",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "range",
+    "registry": true,
+    "raw": "buffer-from@^1.0.0",
+    "name": "buffer-from",
+    "escapedName": "buffer-from",
+    "rawSpec": "^1.0.0",
+    "saveSpec": null,
+    "fetchSpec": "^1.0.0"
+  },
+  "_requiredBy": [
+    "/concat-stream"
+  ],
+  "_resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+  "_shasum": "32713bc028f75c02fdb710d7c7bcec1f2c6070ef",
+  "_spec": "buffer-from@^1.0.0",
+  "_where": "/Users/bssm/Desktop/fabTest/打卡坐标/node_modules/concat-stream",
+  "bugs": {
+    "url": "https://github.com/LinusU/buffer-from/issues"
+  },
+  "bundleDependencies": false,
+  "deprecated": false,
+  "description": "A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.",
+  "devDependencies": {
+    "standard": "^7.1.2"
+  },
+  "files": [
+    "index.js"
+  ],
+  "homepage": "https://github.com/LinusU/buffer-from#readme",
+  "keywords": [
+    "buffer",
+    "buffer from"
+  ],
+  "license": "MIT",
+  "name": "buffer-from",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/LinusU/buffer-from.git"
+  },
+  "scripts": {
+    "test": "standard && node test"
+  },
+  "version": "1.1.1"
+}

+ 69 - 0
node_modules/buffer-from/readme.md

@@ -0,0 +1,69 @@
+# Buffer From
+
+A [ponyfill](https://ponyfill.com) for `Buffer.from`, uses native implementation if available.
+
+## Installation
+
+```sh
+npm install --save buffer-from
+```
+
+## Usage
+
+```js
+const bufferFrom = require('buffer-from')
+
+console.log(bufferFrom([1, 2, 3, 4]))
+//=> <Buffer 01 02 03 04>
+
+const arr = new Uint8Array([1, 2, 3, 4])
+console.log(bufferFrom(arr.buffer, 1, 2))
+//=> <Buffer 02 03>
+
+console.log(bufferFrom('test', 'utf8'))
+//=> <Buffer 74 65 73 74>
+
+const buf = bufferFrom('test')
+console.log(bufferFrom(buf))
+//=> <Buffer 74 65 73 74>
+```
+
+## API
+
+### bufferFrom(array)
+
+- `array` &lt;Array&gt;
+
+Allocates a new `Buffer` using an `array` of octets.
+
+### bufferFrom(arrayBuffer[, byteOffset[, length]])
+
+- `arrayBuffer` &lt;ArrayBuffer&gt; The `.buffer` property of a TypedArray or ArrayBuffer
+- `byteOffset` &lt;Integer&gt; Where to start copying from `arrayBuffer`. **Default:** `0`
+- `length` &lt;Integer&gt; How many bytes to copy from `arrayBuffer`. **Default:** `arrayBuffer.length - byteOffset`
+
+When passed a reference to the `.buffer` property of a TypedArray instance, the
+newly created `Buffer` will share the same allocated memory as the TypedArray.
+
+The optional `byteOffset` and `length` arguments specify a memory range within
+the `arrayBuffer` that will be shared by the `Buffer`.
+
+### bufferFrom(buffer)
+
+- `buffer` &lt;Buffer&gt; An existing `Buffer` to copy data from
+
+Copies the passed `buffer` data onto a new `Buffer` instance.
+
+### bufferFrom(string[, encoding])
+
+- `string` &lt;String&gt; A string to encode.
+- `encoding` &lt;String&gt; The encoding of `string`. **Default:** `'utf8'`
+
+Creates a new `Buffer` containing the given JavaScript string `string`. If
+provided, the `encoding` parameter identifies the character encoding of
+`string`.
+
+## See also
+
+- [buffer-alloc](https://github.com/LinusU/buffer-alloc) A ponyfill for `Buffer.alloc`
+- [buffer-alloc-unsafe](https://github.com/LinusU/buffer-alloc-unsafe) A ponyfill for `Buffer.allocUnsafe`

+ 0 - 0
node_modules/buffer/AUTHORS.md


Some files were not shown because too many files changed in this diff