From e053de23a3f5383f8c48dcfe848e2d32757f4a94 Mon Sep 17 00:00:00 2001 From: PEM-- Date: Mon, 10 Aug 2015 14:27:30 +0200 Subject: [PATCH 1/8] Linting & Hoisting & package bumped --- packages/accounts/package.js | 4 +- packages/attributes/attributes.js | 24 +- packages/attributes/created-at/created-at.js | 6 +- packages/attributes/created-by/created-by.js | 6 +- packages/attributes/package.js | 4 +- packages/attributes/updated-at/updated-at.js | 6 +- packages/base/helpers.js | 6 +- packages/base/helpers_client.js | 2 +- packages/base/links.js | 10 +- packages/base/package.js | 11 +- packages/bootstrap/package.js | 2 +- packages/bootstrap/views/collections/index.js | 2 +- packages/bootstrap/views/config/update.js | 4 +- packages/bootstrap/views/dictionary/update.js | 4 +- packages/bootstrap/views/sidebar/sidebar.js | 6 +- packages/dictionary/dictionary_client.js | 2 +- packages/froala/froala.js | 4 +- packages/image-attribute/colibri.js | 26 +- packages/image-attribute/helper.js | 6 +- packages/image-attribute/image.js | 2 +- packages/image-attribute/images.js | 2 +- packages/lang-en/init.js | 8 +- packages/lang-en/package.js | 2 +- .../.npm/package/node_modules/.bin/bunyan | 1 + .../.npm/package/node_modules/.node_version | 1 + .../node_modules/bunyan-format/.npmignore | 1 + .../node_modules/bunyan-format/.travis.yml | 3 + .../node_modules/bunyan-format/LICENSE | 23 + .../node_modules/bunyan-format/README.md | 65 + .../example/bunyan-string-level.js | 14 + .../bunyan-format/example/inspect.js | 14 + .../bunyan-format/example/json.js | 14 + .../bunyan-format/example/long.js | 14 + .../bunyan-format/example/short.js | 14 + .../bunyan-format/example/simple.js | 14 + .../node_modules/bunyan-format/index.js | 58 + .../bunyan-format/lib/format-record.js | 418 +++ .../node_modules/ansicolors/.npmignore | 15 + .../node_modules/ansicolors/.travis.yml | 4 + .../node_modules/ansicolors/LICENSE | 23 + .../node_modules/ansicolors/README.md | 42 + .../node_modules/ansicolors/ansicolors.js | 55 + .../node_modules/ansicolors/package.json | 52 + .../ansicolors/test/ansicolors.js | 55 + .../node_modules/ansistyles/LICENSE | 23 + .../node_modules/ansistyles/README.md | 71 + .../node_modules/ansistyles/ansistyles.js | 38 + .../node_modules/ansistyles/package.json | 52 + .../ansistyles/test/ansistyles.js | 15 + .../node_modules/xtend/.npmignore | 1 + .../bunyan-format/node_modules/xtend/LICENCE | 19 + .../bunyan-format/node_modules/xtend/Makefile | 4 + .../node_modules/xtend/README.md | 27 + .../node_modules/xtend/has-keys.js | 7 + .../bunyan-format/node_modules/xtend/index.js | 25 + .../node_modules/xtend/mutable.js | 25 + .../xtend/node_modules/object-keys/.npmignore | 1 + .../node_modules/object-keys/.travis.yml | 5 + .../xtend/node_modules/object-keys/README.md | 39 + .../xtend/node_modules/object-keys/foreach.js | 40 + .../xtend/node_modules/object-keys/index.js | 2 + .../node_modules/object-keys/isArguments.js | 16 + .../node_modules/object-keys/package.json | 74 + .../xtend/node_modules/object-keys/shim.js | 62 + .../node_modules/object-keys/test/foreach.js | 156 ++ .../node_modules/object-keys/test/index.js | 6 + .../object-keys/test/isArguments.js | 10 + .../node_modules/object-keys/test/shim.js | 134 + .../node_modules/xtend/package.json | 89 + .../bunyan-format/node_modules/xtend/test.js | 63 + .../node_modules/bunyan-format/package.json | 70 + .../node_modules/bunyan-format/test/short.js | 42 + .../node_modules/bunyan-format/test/simple.js | 38 + .../package/node_modules/bunyan/.npmignore | 7 + .../.npm/package/node_modules/bunyan/AUTHORS | 22 + .../package/node_modules/bunyan/CHANGES.md | 1147 ++++++++ .../package/node_modules/bunyan/LICENSE.txt | 23 + .../.npm/package/node_modules/bunyan/Makefile | 136 + .../package/node_modules/bunyan/README.md | 1056 ++++++++ .../.npm/package/node_modules/bunyan/TODO.md | 72 + .../package/node_modules/bunyan/bin/bunyan | 1639 ++++++++++++ .../package/node_modules/bunyan/docs/bunyan.1 | 235 ++ .../node_modules/bunyan/docs/bunyan.1.html | 281 ++ .../node_modules/bunyan/docs/bunyan.1.ronn | 195 ++ .../bunyan/docs/img/bunyan.browserify.png | Bin 0 -> 198704 bytes .../node_modules/bunyan/docs/index.html | 1 + .../package/node_modules/bunyan/lib/bunyan.js | 1434 ++++++++++ .../node_modules/dtrace-provider/.gitmodules | 3 + .../node_modules/dtrace-provider/.npmignore | 7 + .../node_modules/dtrace-provider/CHANGES.md | 79 + .../node_modules/dtrace-provider/LICENCE | 21 + .../node_modules/dtrace-provider/README.md | 140 + .../node_modules/dtrace-provider/TODO.md | 13 + .../build/DTraceProviderBindings.target.mk | 164 ++ .../dtrace-provider/build/Makefile | 355 +++ .../dtrace-provider/build/Release/.deps/..d | 1 + .../Release/DTraceProviderBindings.node.d | 1 + .../dtrace_argument.o.d | 31 + .../DTraceProviderBindings/dtrace_probe.o.d | 31 + .../dtrace_provider.o.d | 31 + .../.deps/Release/obj.target/libusdt.stamp.d | 1 + .../build/Release/DTraceProviderBindings.node | Bin 0 -> 45448 bytes .../dtrace-provider/build/Release/linker.lock | 0 .../build/Release/obj.target/libusdt.stamp | 0 .../dtrace-provider/build/binding.Makefile | 6 + .../dtrace-provider/build/config.gypi | 124 + .../dtrace-provider/build/gyp-mac-tool | 512 ++++ .../dtrace-provider/build/libusdt.target.mk | 46 + .../node_modules/dtrace-provider/compile.py | 58 + .../dtrace-provider/dtrace-provider.js | 40 + .../dtrace-provider/dtrace_argument.cc | 92 + .../dtrace-provider/dtrace_probe.cc | 95 + .../dtrace-provider/dtrace_provider.cc | 200 ++ .../dtrace-provider/dtrace_provider.h | 100 + .../dtrace-provider/libusdt-arch.js | 13 + .../dtrace-provider/libusdt-build.sh | 34 + .../dtrace-provider/libusdt/.npmignore | 10 + .../dtrace-provider/libusdt/LICENCE | 21 + .../dtrace-provider/libusdt/Makefile | 156 ++ .../dtrace-provider/libusdt/README.md | 77 + .../dtrace-provider/libusdt/libusdt.a | Bin 0 -> 18936 bytes .../dtrace-provider/libusdt/test.pl | 116 + .../dtrace-provider/libusdt/test_mem_usage.c | 77 + .../dtrace-provider/libusdt/test_usdt.c | 87 + .../dtrace-provider/libusdt/usdt.c | 321 +++ .../dtrace-provider/libusdt/usdt.h | 61 + .../dtrace-provider/libusdt/usdt_dof.c | 126 + .../dtrace-provider/libusdt/usdt_dof_file.c | 288 ++ .../libusdt/usdt_dof_sections.c | 180 ++ .../dtrace-provider/libusdt/usdt_internal.h | 103 + .../dtrace-provider/libusdt/usdt_probe.c | 133 + .../libusdt/usdt_tracepoints_i386.s | 69 + .../libusdt/usdt_tracepoints_x86_64.s | 123 + .../dtrace-provider/node_modules/nan/.dntrc | 30 + .../node_modules/nan/CHANGELOG.md | 294 +++ .../node_modules/nan/LICENSE.md | 13 + .../node_modules/nan/README.md | 1402 ++++++++++ .../node_modules/nan/appveyor.yml | 38 + .../node_modules/nan/include_dirs.js | 1 + .../dtrace-provider/node_modules/nan/nan.h | 2322 +++++++++++++++++ .../nan/nan_implementation_12_inl.h | 261 ++ .../nan/nan_implementation_pre_12_inl.h | 267 ++ .../node_modules/nan/nan_new.h | 328 +++ .../node_modules/nan/nan_string_bytes.h | 312 +++ .../node_modules/nan/package.json | 90 + .../node_modules/dtrace-provider/package.json | 64 + .../dtrace-provider/scripts/install.js | 68 + .../dtrace-provider/test/32probe-char.test.js | 49 + .../dtrace-provider/test/32probe-char_fire.js | 22 + .../dtrace-provider/test/32probe.test.js | 40 + .../dtrace-provider/test/32probe_fire.js | 21 + .../dtrace-provider/test/add-probes.test.js | 27 + .../dtrace-provider/test/add-probes_fire.js | 14 + .../dtrace-provider/test/basic.test.js | 21 + .../dtrace-provider/test/basic_fire.js | 8 + .../test/create-destroy.test.js | 23 + .../test/create-destroy_fire.js | 12 + .../test/disambiguation.test.js | 23 + .../test/disambiguation_fire.js | 37 + .../dtrace-provider/test/dtrace-test.js | 30 + .../test/enabled-disabled.test.js | 23 + .../test/enabled-disabled_fire.js | 14 + .../dtrace-provider/test/enabledagain.test.js | 35 + .../dtrace-provider/test/enabledagain_fire.js | 7 + .../test/fewer-args-json.test.js | 21 + .../test/fewer-args-json_fire.js | 8 + .../dtrace-provider/test/fewer-args.test.js | 22 + .../dtrace-provider/test/fewer-args_fire.js | 8 + .../node_modules/dtrace-provider/test/gc.js | 22 + .../dtrace-provider/test/gc.test.js | 20 + .../node_modules/dtrace-provider/test/gc2.js | 27 + .../node_modules/dtrace-provider/test/gc3.js | 12 + .../dtrace-provider/test/gc_fire.js | 14 + .../dtrace-provider/test/json-args.test.js | 27 + .../dtrace-provider/test/json-args_fire.js | 12 + .../dtrace-provider/test/more-args.test.js | 21 + .../dtrace-provider/test/more-args_fire.js | 8 + .../test/multiple-json-args.test.js | 25 + .../test/multiple-json-args_fire.js | 11 + .../dtrace-provider/test/notenabled.test.js | 18 + .../node_modules/dtrace-provider/wscript | 30 + .../bunyan/node_modules/mv/.npmignore | 1 + .../bunyan/node_modules/mv/.travis.yml | 4 + .../bunyan/node_modules/mv/LICENSE | 21 + .../bunyan/node_modules/mv/README.md | 33 + .../bunyan/node_modules/mv/index.js | 105 + .../node_modules/mv/node_modules/.bin/mkdirp | 1 + .../node_modules/mv/node_modules/.bin/ncp | 1 + .../node_modules/mv/node_modules/.bin/rimraf | 1 + .../mv/node_modules/mkdirp/.travis.yml | 8 + .../mv/node_modules/mkdirp/LICENSE | 21 + .../mv/node_modules/mkdirp/bin/cmd.js | 33 + .../mv/node_modules/mkdirp/bin/usage.txt | 12 + .../mv/node_modules/mkdirp/examples/pow.js | 6 + .../mv/node_modules/mkdirp/index.js | 98 + .../mkdirp/node_modules/minimist/.travis.yml | 4 + .../mkdirp/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../mkdirp/node_modules/minimist/index.js | 187 ++ .../mkdirp/node_modules/minimist/package.json | 67 + .../node_modules/minimist/readme.markdown | 73 + .../mkdirp/node_modules/minimist/test/dash.js | 24 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 16 + .../mkdirp/node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/parse.js | 318 +++ .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/whitespace.js | 8 + .../mv/node_modules/mkdirp/package.json | 60 + .../mv/node_modules/mkdirp/readme.markdown | 100 + .../mv/node_modules/mkdirp/test/chmod.js | 41 + .../mv/node_modules/mkdirp/test/clobber.js | 38 + .../mv/node_modules/mkdirp/test/mkdirp.js | 28 + .../mv/node_modules/mkdirp/test/opts_fs.js | 29 + .../node_modules/mkdirp/test/opts_fs_sync.js | 27 + .../mv/node_modules/mkdirp/test/perm.js | 32 + .../mv/node_modules/mkdirp/test/perm_sync.js | 36 + .../mv/node_modules/mkdirp/test/race.js | 37 + .../mv/node_modules/mkdirp/test/rel.js | 32 + .../mv/node_modules/mkdirp/test/return.js | 25 + .../node_modules/mkdirp/test/return_sync.js | 24 + .../mv/node_modules/mkdirp/test/root.js | 19 + .../mv/node_modules/mkdirp/test/sync.js | 32 + .../mv/node_modules/mkdirp/test/umask.js | 28 + .../mv/node_modules/mkdirp/test/umask_sync.js | 32 + .../mv/node_modules/ncp/.npmignore | 4 + .../mv/node_modules/ncp/.travis.yml | 6 + .../mv/node_modules/ncp/LICENSE.md | 21 + .../mv/node_modules/ncp/README.md | 63 + .../node_modules/mv/node_modules/ncp/bin/ncp | 48 + .../mv/node_modules/ncp/lib/ncp.js | 261 ++ .../mv/node_modules/ncp/package.json | 64 + .../ncp/test/modified-files/out/a | 1 + .../ncp/test/modified-files/src/a | 1 + .../mv/node_modules/ncp/test/ncp.js | 197 ++ .../ncp/test/regular-fixtures/src/a | 1 + .../ncp/test/regular-fixtures/src/b | 1 + .../ncp/test/regular-fixtures/src/c | 0 .../ncp/test/regular-fixtures/src/d | 0 .../ncp/test/regular-fixtures/src/e | 0 .../ncp/test/regular-fixtures/src/f | 0 .../ncp/test/regular-fixtures/src/sub/a | 1 + .../ncp/test/regular-fixtures/src/sub/b | 0 .../ncp/test/symlink-fixtures/src/dir/bar | 1 + .../ncp/test/symlink-fixtures/src/foo | 1 + .../mv/node_modules/rimraf/LICENSE | 15 + .../mv/node_modules/rimraf/README.md | 38 + .../mv/node_modules/rimraf/bin.js | 40 + .../rimraf/node_modules/glob/LICENSE | 15 + .../rimraf/node_modules/glob/README.md | 377 +++ .../rimraf/node_modules/glob/common.js | 245 ++ .../rimraf/node_modules/glob/glob.js | 752 ++++++ .../glob/node_modules/inflight/.eslintrc | 17 + .../glob/node_modules/inflight/LICENSE | 15 + .../glob/node_modules/inflight/README.md | 37 + .../glob/node_modules/inflight/inflight.js | 44 + .../inflight/node_modules/wrappy/LICENSE | 15 + .../inflight/node_modules/wrappy/README.md | 36 + .../inflight/node_modules/wrappy/package.json | 52 + .../node_modules/wrappy/test/basic.js | 51 + .../inflight/node_modules/wrappy/wrappy.js | 33 + .../glob/node_modules/inflight/package.json | 61 + .../glob/node_modules/inflight/test.js | 97 + .../glob/node_modules/inherits/LICENSE | 16 + .../glob/node_modules/inherits/README.md | 42 + .../glob/node_modules/inherits/inherits.js | 1 + .../node_modules/inherits/inherits_browser.js | 23 + .../glob/node_modules/inherits/package.json | 50 + .../glob/node_modules/inherits/test.js | 25 + .../glob/node_modules/minimatch/LICENSE | 15 + .../glob/node_modules/minimatch/README.md | 216 ++ .../glob/node_modules/minimatch/browser.js | 1159 ++++++++ .../glob/node_modules/minimatch/minimatch.js | 912 +++++++ .../node_modules/brace-expansion/.npmignore | 2 + .../node_modules/brace-expansion/.travis.yml | 3 + .../node_modules/brace-expansion/README.md | 121 + .../node_modules/brace-expansion/example.js | 8 + .../node_modules/brace-expansion/index.js | 191 ++ .../node_modules/balanced-match/.npmignore | 2 + .../node_modules/balanced-match/.travis.yml | 4 + .../node_modules/balanced-match/Makefile | 6 + .../node_modules/balanced-match/README.md | 80 + .../node_modules/balanced-match/example.js | 5 + .../node_modules/balanced-match/index.js | 38 + .../node_modules/balanced-match/package.json | 73 + .../balanced-match/test/balanced.js | 56 + .../node_modules/concat-map/.travis.yml | 4 + .../node_modules/concat-map/LICENSE | 18 + .../node_modules/concat-map/README.markdown | 62 + .../node_modules/concat-map/example/map.js | 6 + .../node_modules/concat-map/index.js | 13 + .../node_modules/concat-map/package.json | 83 + .../node_modules/concat-map/test/map.js | 39 + .../node_modules/brace-expansion/package.json | 75 + .../brace-expansion/test/bash-comparison.js | 32 + .../brace-expansion/test/bash-results.txt | 1075 ++++++++ .../brace-expansion/test/cases.txt | 182 ++ .../brace-expansion/test/dollar.js | 9 + .../brace-expansion/test/empty-option.js | 10 + .../brace-expansion/test/generate.sh | 24 + .../test/negative-increment.js | 15 + .../brace-expansion/test/nested.js | 16 + .../brace-expansion/test/order.js | 10 + .../node_modules/brace-expansion/test/pad.js | 13 + .../brace-expansion/test/same-type.js | 7 + .../brace-expansion/test/sequence.js | 50 + .../glob/node_modules/minimatch/package.json | 63 + .../glob/node_modules/once/LICENSE | 15 + .../glob/node_modules/once/README.md | 51 + .../once/node_modules/wrappy/LICENSE | 15 + .../once/node_modules/wrappy/README.md | 36 + .../once/node_modules/wrappy/package.json | 52 + .../once/node_modules/wrappy/test/basic.js | 51 + .../once/node_modules/wrappy/wrappy.js | 33 + .../glob/node_modules/once/once.js | 21 + .../glob/node_modules/once/package.json | 60 + .../glob/node_modules/once/test/once.js | 23 + .../node_modules/path-is-absolute/index.js | 20 + .../node_modules/path-is-absolute/license | 21 + .../path-is-absolute/package.json | 70 + .../node_modules/path-is-absolute/readme.md | 51 + .../rimraf/node_modules/glob/package.json | 73 + .../rimraf/node_modules/glob/sync.js | 460 ++++ .../mv/node_modules/rimraf/package.json | 62 + .../mv/node_modules/rimraf/rimraf.js | 333 +++ .../bunyan/node_modules/mv/package.json | 65 + .../bunyan/node_modules/mv/test/a-file | 1 + .../mv/test/a-folder/another-file | 1 + .../mv/test/a-folder/another-folder/file3 | 1 + .../bunyan/node_modules/mv/test/test.js | 151 ++ .../safe-json-stringify/.npmignore | 1 + .../safe-json-stringify/README.md | 99 + .../node_modules/safe-json-stringify/index.js | 59 + .../safe-json-stringify/package.json | 70 + .../package/node_modules/bunyan/package.json | 165 ++ .../node_modules/log-with-style/.npmignore | 1 + .../log-with-style/Gruntfile.coffee | 28 + .../node_modules/log-with-style/LICENSE | 19 + .../node_modules/log-with-style/README.md | 31 + .../node_modules/log-with-style/bower.json | 28 + .../log-with-style/component.json | 11 + .../node_modules/log-with-style/log.coffee | 114 + .../node_modules/log-with-style/log.js | 160 ++ .../node_modules/log-with-style/log.min.js | 2 + .../node_modules/log-with-style/package.json | 48 + .../node_modules/log-with-style/test.html | 72 + .../.npm/package/node_modules/process/LICENSE | 22 + .../package/node_modules/process/README.md | 24 + .../package/node_modules/process/browser.js | 90 + .../package/node_modules/process/index.js | 2 + .../package/node_modules/process/package.json | 58 + .../.npm/package/node_modules/process/test.js | 66 + packages/materialize/init.js | 2 +- packages/materialize/views/layout/layout.js | 4 +- packages/materialize/views/misc/misc.js | 2 +- packages/materialize/views/sidebar/sidebar.js | 4 +- packages/pages/pages_client.js | 4 +- packages/pages/pages_server.js | 2 +- packages/relationships/package.js | 2 +- packages/relationships/relationships.js | 28 +- packages/s3/s3.js | 10 +- packages/summernote/summernote.js | 4 +- 363 files changed, 30875 insertions(+), 96 deletions(-) create mode 120000 packages/logging/.npm/package/node_modules/.bin/bunyan create mode 100644 packages/logging/.npm/package/node_modules/.node_version create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/.travis.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/example/bunyan-string-level.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/example/inspect.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/example/json.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/example/long.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/example/short.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/example/simple.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/lib/format-record.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/.travis.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/ansicolors.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/test/ansicolors.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/ansistyles.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/test/ansistyles.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/LICENCE create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/Makefile create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/has-keys.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/mutable.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/.travis.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/foreach.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/isArguments.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/shim.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/foreach.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/isArguments.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/shim.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/test/short.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan-format/test/simple.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan/AUTHORS create mode 100644 packages/logging/.npm/package/node_modules/bunyan/CHANGES.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/LICENSE.txt create mode 100644 packages/logging/.npm/package/node_modules/bunyan/Makefile create mode 100644 packages/logging/.npm/package/node_modules/bunyan/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/TODO.md create mode 100755 packages/logging/.npm/package/node_modules/bunyan/bin/bunyan create mode 100644 packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1 create mode 100644 packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1.html create mode 100644 packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1.ronn create mode 100644 packages/logging/.npm/package/node_modules/bunyan/docs/img/bunyan.browserify.png create mode 100644 packages/logging/.npm/package/node_modules/bunyan/docs/index.html create mode 100644 packages/logging/.npm/package/node_modules/bunyan/lib/bunyan.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/.gitmodules create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/CHANGES.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/LICENCE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/TODO.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/DTraceProviderBindings.target.mk create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Makefile create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/..d create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/DTraceProviderBindings.node.d create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/libusdt.stamp.d create mode 100755 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/linker.lock create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/obj.target/libusdt.stamp create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/binding.Makefile create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/config.gypi create mode 100755 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/gyp-mac-tool create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/libusdt.target.mk create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/compile.py create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace-provider.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_argument.cc create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_probe.cc create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.cc create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.h create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt-arch.js create mode 100755 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt-build.sh create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/LICENCE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/Makefile create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/libusdt.a create mode 100755 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/test.pl create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/test_mem_usage.c create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/test_usdt.c create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt.c create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt.h create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof.c create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof_file.c create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof_sections.c create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_internal.h create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_probe.c create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_i386.s create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_x86_64.s create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/.dntrc create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/CHANGELOG.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/LICENSE.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/appveyor.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/include_dirs.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan.h create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_12_inl.h create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_pre_12_inl.h create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_new.h create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_string_bytes.h create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/package.json create mode 100755 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/scripts/install.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe-char.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe-char_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/add-probes.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/add-probes_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/basic.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/basic_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/create-destroy.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/create-destroy_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/disambiguation.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/disambiguation_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/dtrace-test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabled-disabled.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabled-disabled_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabledagain.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabledagain_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args-json.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args-json_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc2.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc3.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/json-args.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/json-args_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/more-args.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/more-args_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/multiple-json-args.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/multiple-json-args_fire.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/notenabled.test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/wscript create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/.travis.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/index.js create mode 120000 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/mkdirp create mode 120000 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/ncp create mode 120000 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/rimraf create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/.travis.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/LICENSE create mode 100755 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/bin/cmd.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/bin/usage.txt create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/examples/pow.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/.travis.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/example/parse.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/readme.markdown create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/dash.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/default_bool.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/dotted.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/long.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/parse.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/short.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/whitespace.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/readme.markdown create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/chmod.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/clobber.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/mkdirp.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/opts_fs.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/perm.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/perm_sync.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/race.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/rel.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/return.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/return_sync.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/root.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/sync.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/umask.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/umask_sync.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/.travis.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/LICENSE.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/README.md create mode 100755 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/bin/ncp create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/lib/ncp.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/modified-files/out/a create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/modified-files/src/a create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/ncp.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/a create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/b create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/c create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/d create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/e create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/f create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/sub/a create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/sub/b create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/symlink-fixtures/src/dir/bar create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/symlink-fixtures/src/foo create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/README.md create mode 100755 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/bin.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/common.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/glob.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/once.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/sync.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/rimraf.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-file create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-folder/another-file create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-folder/another-folder/file3 create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/test.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/README.md create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/index.js create mode 100644 packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/package.json create mode 100644 packages/logging/.npm/package/node_modules/bunyan/package.json create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/.npmignore create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/Gruntfile.coffee create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/README.md create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/bower.json create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/component.json create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/log.coffee create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/log.js create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/log.min.js create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/package.json create mode 100644 packages/logging/.npm/package/node_modules/log-with-style/test.html create mode 100644 packages/logging/.npm/package/node_modules/process/LICENSE create mode 100644 packages/logging/.npm/package/node_modules/process/README.md create mode 100644 packages/logging/.npm/package/node_modules/process/browser.js create mode 100644 packages/logging/.npm/package/node_modules/process/index.js create mode 100644 packages/logging/.npm/package/node_modules/process/package.json create mode 100644 packages/logging/.npm/package/node_modules/process/test.js diff --git a/packages/accounts/package.js b/packages/accounts/package.js index 2a7496a..2fe6eaa 100644 --- a/packages/accounts/package.js +++ b/packages/accounts/package.js @@ -14,8 +14,8 @@ Package.onUse(function(api) { 'accounts-base', 'accounts-password', 'useraccounts:core@1.12.0', - 'aldeed:simple-schema@1.3.2', - 'matb33:collection-hooks@0.7.11', + 'aldeed:simple-schema@1.3.3', + 'matb33:collection-hooks@0.7.13', 'meteorhacks:inject-initial@1.0.2', ]); diff --git a/packages/attributes/attributes.js b/packages/attributes/attributes.js index 2eff2b5..0a806e3 100644 --- a/packages/attributes/attributes.js +++ b/packages/attributes/attributes.js @@ -18,18 +18,18 @@ orion.attribute = function(name, schema, options) { if (!_.has(orion.attributes, name)) { throw 'The attribute "' + name + '" does not exist'; } - var schema = schema || {}; - var options = options || {}; - var attributeSchema = orion.attributes[name].getSchema.call(this, options); + var _schema = schema || {}; + var _options = options || {}; + var attributeSchema = orion.attributes[name].getSchema.call(this, _options); var override = { orionAttribute: name, autoform: { type: 'orion.' + name } - } - var attribute = orion.helpers.deepExtend(orion.helpers.deepExtend(schema, attributeSchema), override); + }; + var attribute = orion.helpers.deepExtend(orion.helpers.deepExtend(_schema, attributeSchema), override); return attribute; -} +}; /** * Returns proper tabular column for the attribute @@ -52,12 +52,12 @@ orion.attributeColumn = function(name, key, title) { item: rowData, collection: collection, schema: schema, - } + }; var template = ReactiveTemplates.get('attributePreview.' + name); Blaze.renderWithData(Template[template], data, cell); } - } -} + }; +}; /** * Helper function to use arrays of attributes (Ex: array of images) @@ -73,7 +73,7 @@ orion.arrayOfAttribute = function(name, schema, options) { return orion.helpers.deepExtend(schema, { type: [subSchema] }); -} +}; /** * Creates a new attribute @@ -112,4 +112,8 @@ orion.attributes.registerAttribute = function(name, attribute) { }); }); } +<<<<<<< d7b5207b4790c1b09545c50e7a26a40156fec7a3 } +======= +}; +>>>>>>> Linting & Hoisting & package bumped diff --git a/packages/attributes/created-at/created-at.js b/packages/attributes/created-at/created-at.js index 149ec8f..87c5e97 100644 --- a/packages/attributes/created-at/created-at.js +++ b/packages/attributes/created-at/created-at.js @@ -8,9 +8,9 @@ orion.attributes.registerAttribute('createdAt', { }, autoValue: function() { if (this.isInsert) { - return new Date; + return new Date(); } else if (this.isUpsert) { - return {$setOnInsert: new Date}; + return {$setOnInsert: new Date()}; } else { this.unset(); } @@ -25,4 +25,4 @@ if (Meteor.isClient) { return this.value && moment(this.value).format('LLL'); } }); -} \ No newline at end of file +} diff --git a/packages/attributes/created-by/created-by.js b/packages/attributes/created-by/created-by.js index e6428d1..bc67853 100644 --- a/packages/attributes/created-by/created-by.js +++ b/packages/attributes/created-by/created-by.js @@ -28,12 +28,12 @@ if (Meteor.isServer) { } if (Meteor.isClient) { ReactiveTemplates.onRendered('attributePreview.createdBy', function() { - this.subscribe('userProfileForCreatedByAttributeColumn', this.data.value) + this.subscribe('userProfileForCreatedByAttributeColumn', this.data.value); }); ReactiveTemplates.helpers('attributePreview.createdBy', { name: function() { - var user = Meteor.users.findOne(this.value) + var user = Meteor.users.findOne(this.value); return user && user.profile.name; } }); -} \ No newline at end of file +} diff --git a/packages/attributes/package.js b/packages/attributes/package.js index 100c268..adaf660 100644 --- a/packages/attributes/package.js +++ b/packages/attributes/package.js @@ -10,9 +10,9 @@ Package.onUse(function(api) { api.use([ 'orionjs:base@1.4.0', - 'aldeed:collection2@2.0.0', + 'aldeed:collection2@2.3.3', 'aldeed:autoform@5.4.0', - 'momentjs:moment@2.10.3' + 'momentjs:moment@2.10.6' ]); api.imply([ diff --git a/packages/attributes/updated-at/updated-at.js b/packages/attributes/updated-at/updated-at.js index 2ad9d75..0ba208f 100644 --- a/packages/attributes/updated-at/updated-at.js +++ b/packages/attributes/updated-at/updated-at.js @@ -8,9 +8,9 @@ orion.attributes.registerAttribute('updatedAt', { }, autoValue: function() { if (this.isUpdate || this.isInsert) { - return new Date; + return new Date(); } else if (this.isUpsert) { - return {$setOnInsert: new Date}; + return {$setOnInsert: new Date()}; } else { this.unset(); } @@ -25,4 +25,4 @@ if (Meteor.isClient) { return this.value && moment(this.value).format('LLL'); } }); -} \ No newline at end of file +} diff --git a/packages/base/helpers.js b/packages/base/helpers.js index 3d03a87..5d924ca 100644 --- a/packages/base/helpers.js +++ b/packages/base/helpers.js @@ -1,7 +1,7 @@ /** * Orion Helpers */ -orion.helpers = {} +orion.helpers = {}; /** * Searchs a object with a givin string @@ -48,5 +48,5 @@ orion.helpers.deepExtend = function(target, source) { orion.helpers.getTranslation = function(key) { return function() { return i18n(key); - } -} + }; +}; diff --git a/packages/base/helpers_client.js b/packages/base/helpers_client.js index 70f8b1d..f1dc857 100644 --- a/packages/base/helpers_client.js +++ b/packages/base/helpers_client.js @@ -7,4 +7,4 @@ orion.helpers.getBase64Image = function(file, callback) { callback(e.target.result); }; FR.readAsDataURL(file); -} +}; diff --git a/packages/base/links.js b/packages/base/links.js index 4d99e40..725484f 100644 --- a/packages/base/links.js +++ b/packages/base/links.js @@ -40,7 +40,7 @@ orion.links.add = function(options) { } self._collection.upsert({ identifier: options.identifier }, { $set: options }); }); -} +}; orion.links.get = function() { var links = this._collection.find({ index: { $exists: true }, parent: { $exists: false } }, { sort: { index: 1 } }).fetch(); @@ -50,11 +50,11 @@ orion.links.get = function() { } return true; }); -} +}; orion.links.getLink = function(identifier) { return this._collection.findOne({ identifier: identifier }); -} +}; orion.links._collection.helpers({ childs: function() { @@ -70,8 +70,8 @@ orion.links._collection.helpers({ Template.registerHelper('adminLinks', function() { return orion.links.get(); -}) +}); Template.registerHelper('getAdminLink', function(identifier) { return orion.links.getLink(identifier); -}) +}); diff --git a/packages/base/package.js b/packages/base/package.js index d52b844..87c1664 100644 --- a/packages/base/package.js +++ b/packages/base/package.js @@ -1,7 +1,11 @@ Package.describe({ name: 'orionjs:base', summary: 'Orion', +<<<<<<< d7b5207b4790c1b09545c50e7a26a40156fec7a3 version: '1.4.1', +======= + version: '1.3.1', +>>>>>>> Linting & Hoisting & package bumped git: 'https://github.com/orionjs/orion' }); @@ -16,7 +20,12 @@ Package.onUse(function(api) { 'nicolaslopezj:roles@1.2.0', 'nicolaslopezj:router-layer@0.0.8', 'aldeed:simple-schema@1.3.3', +<<<<<<< d7b5207b4790c1b09545c50e7a26a40156fec7a3 'orionjs:lang-en@1.4.0' +======= + 'zimme:active-route@2.3.0', + 'orionjs:lang-en@1.3.1' +>>>>>>> Linting & Hoisting & package bumped ]); api.imply([ @@ -39,7 +48,7 @@ Package.onUse(function(api) { api.addFiles([ 'helpers_client.js', 'links.js' - ], 'client') + ], 'client'); api.export('orion'); }); diff --git a/packages/bootstrap/package.js b/packages/bootstrap/package.js index f866dad..e2b06a0 100644 --- a/packages/bootstrap/package.js +++ b/packages/bootstrap/package.js @@ -13,7 +13,7 @@ Package.onUse(function(api) { 'orionjs:core@1.4.0', 'less', 'aldeed:autoform@5.4.0', - 'aldeed:tabular@1.1.0', + 'aldeed:tabular@1.2.0', 'useraccounts:bootstrap@1.11.1' ]); diff --git a/packages/bootstrap/views/collections/index.js b/packages/bootstrap/views/collections/index.js index e578c56..c3e6fa2 100644 --- a/packages/bootstrap/views/collections/index.js +++ b/packages/bootstrap/views/collections/index.js @@ -21,7 +21,7 @@ Template.orionBootstrapCollectionsIndex.onRendered(function() { Session.set('orionBootstrapCollectionsIndex_showTable', true); }); }); -}) +}); Template.orionBootstrapCollectionsIndex.helpers({ showTable: function () { diff --git a/packages/bootstrap/views/config/update.js b/packages/bootstrap/views/config/update.js index b7a49cc..c7dd0fa 100644 --- a/packages/bootstrap/views/config/update.js +++ b/packages/bootstrap/views/config/update.js @@ -10,7 +10,7 @@ Template.orionBootstrapConfigUpdate.helpers({ class: function() { return Session.get('configUpdateCurrentCategory') == category ? 'btn-default disabled': 'btn-primary'; } - } + }; }); } -}); \ No newline at end of file +}); diff --git a/packages/bootstrap/views/dictionary/update.js b/packages/bootstrap/views/dictionary/update.js index a353efb..c1509ec 100644 --- a/packages/bootstrap/views/dictionary/update.js +++ b/packages/bootstrap/views/dictionary/update.js @@ -10,7 +10,7 @@ Template.orionBootstrapDictionaryUpdate.helpers({ class: function() { return Session.get('dictionaryUpdateCurrentCategory') == category ? 'btn-default disabled': 'btn-primary'; } - } + }; }); } -}); \ No newline at end of file +}); diff --git a/packages/bootstrap/views/sidebar/sidebar.js b/packages/bootstrap/views/sidebar/sidebar.js index 94bc60c..bd321fa 100644 --- a/packages/bootstrap/views/sidebar/sidebar.js +++ b/packages/bootstrap/views/sidebar/sidebar.js @@ -1,6 +1,6 @@ Template.orionBootstrapSidebar.onRendered(function() { this.autorun(function() { var depend = orion.links._collection.find().fetch(); - $('.orion-links a[data-toggle="collapse"]').collapse() - }) -}) + $('.orion-links a[data-toggle="collapse"]').collapse(); + }); +}); diff --git a/packages/dictionary/dictionary_client.js b/packages/dictionary/dictionary_client.js index f6622cc..7a71aee 100644 --- a/packages/dictionary/dictionary_client.js +++ b/packages/dictionary/dictionary_client.js @@ -12,7 +12,7 @@ Template.registerHelper('dict', function(name, defaultValue) { */ orion.dictionary.isReady = function() { return subscription.ready(); -} +}; /** * Is the dictionary subscription ready for templates diff --git a/packages/froala/froala.js b/packages/froala/froala.js index 5ba2ffd..1b123f1 100644 --- a/packages/froala/froala.js +++ b/packages/froala/froala.js @@ -1,6 +1,6 @@ ReactiveTemplates.onRendered('attribute.froala', function () { var name = this.data.name; - var parent = $('[data-schema-key="' + name + '"]') + var parent = $('[data-schema-key="' + name + '"]'); // Find the element var element = parent.find('.editor'); // initialize froala @@ -24,7 +24,7 @@ ReactiveTemplates.onRendered('attribute.froala', function () { Tracker.autorun(function () { if (upload.ready()) { if (upload.error) { - console.log(upload.error, "error uploading file") + console.log(upload.error, "error uploading file"); } else { element.editable("insertHTML", "", true); } diff --git a/packages/image-attribute/colibri.js b/packages/image-attribute/colibri.js index 27aaf8e..d405916 100644 --- a/packages/image-attribute/colibri.js +++ b/packages/image-attribute/colibri.js @@ -36,20 +36,20 @@ Colibri = ( function ( ) { }; var rgbToYuv = function ( rgb ) { - return [ rgb[ 0 ] * 0.299 + rgb[ 1 ] * 0.587 + rgb[ 2 ] * 0.114 - , rgb[ 0 ] * -0.147 + rgb[ 1 ] * 0.289 + rgb[ 2 ] * 0.436 - , rgb[ 0 ] * 0.615 + rgb[ 1 ] * 0.515 + rgb[ 2 ] * 0.100 ]; }; + return [ rgb[ 0 ] * 0.299 + rgb[ 1 ] * 0.587 + rgb[ 2 ] * 0.114, + rgb[ 0 ] * -0.147 + rgb[ 1 ] * 0.289 + rgb[ 2 ] * 0.436, + rgb[ 0 ] * 0.615 + rgb[ 1 ] * 0.515 + rgb[ 2 ] * 0.100 ]; }; var colorDistance = function ( rgb1, rgb2 ) { var yuv1 = rgbToYuv( rgb1 ), yuv2 = rgbToYuv( rgb2 ); - return sqrt( pow( yuv1[ 0 ] - yuv2[ 0 ] ) - + pow( yuv1[ 1 ] - yuv2[ 1 ] ) - + pow( yuv1[ 2 ] - yuv2[ 2 ] ) ); }; + return sqrt( pow( yuv1[ 0 ] - yuv2[ 0 ] ) + + pow( yuv1[ 1 ] - yuv2[ 1 ] ) + + pow( yuv1[ 2 ] - yuv2[ 2 ] ) ); }; var colorBrightness = function ( rgb ) { - return sqrt( pow( rgb[ 0 ] ) * 0.241 - + pow( rgb[ 1 ] ) * 0.691 - + pow( rgb[ 2 ] ) * 0.068 ); }; + return sqrt( pow( rgb[ 0 ] ) * 0.241 + + pow( rgb[ 1 ] ) * 0.691 + + pow( rgb[ 2 ] ) * 0.068 ); }; var gatherSimilarElements = function ( list, comparator ) { @@ -163,12 +163,12 @@ Colibri = ( function ( ) { var fullImageData = [ ]; loadDataFromContext( fullImageData, context, 0, 0, canvas.width, canvas.height ); - var backgroundColor = dominantColor( borderImageData, .1 ); - var contentColors = dominantColor( fullImageData, .1, - 1 ).filter( function ( color ) { - return abs( colorBrightness( backgroundColor ) - colorBrightness( color ) ) > .4; + var backgroundColor = dominantColor( borderImageData, 0.1 ); + var contentColors = dominantColor( fullImageData, 0.1, - 1 ).filter( function ( color ) { + return abs( colorBrightness( backgroundColor ) - colorBrightness( color ) ) > 0.4; } ).reduce( function ( filteredContentColors, currentColor ) { var previous = filteredContentColors[ filteredContentColors.length - 1 ]; - if ( ! previous || colorDistance( previous, currentColor ) > .3 ) + if ( ! previous || colorDistance( previous, currentColor ) > 0.3 ) filteredContentColors.push( currentColor ); return filteredContentColors; }, [ ] ); diff --git a/packages/image-attribute/helper.js b/packages/image-attribute/helper.js index 7e6b8de..fe2e27c 100644 --- a/packages/image-attribute/helper.js +++ b/packages/image-attribute/helper.js @@ -1,5 +1,5 @@ orion.helpers.analizeColorFromBase64 = function(base64) { - var image = new Image; + var image = new Image(); image.src = base64; var colorInfo = Colibri.extractImageColors(image, 'hex'); var width = image.naturalWidth; @@ -11,5 +11,5 @@ orion.helpers.analizeColorFromBase64 = function(base64) { backgroundColor: colorInfo.background, primaryColor: colorInfo.content[0] || '#ffffff', secondaryColor: colorInfo.content[1] || colorInfo.content[0] || '#ffffff', - } -} \ No newline at end of file + }; +}; diff --git a/packages/image-attribute/image.js b/packages/image-attribute/image.js index 9db2a43..ceb0f28 100644 --- a/packages/image-attribute/image.js +++ b/packages/image-attribute/image.js @@ -68,6 +68,6 @@ ReactiveTemplates.events('attribute.image', { Tracker.autorun(function () { Session.set('uploadProgress' + self.name, upload.progress()); }); - }) + }); } }); diff --git a/packages/image-attribute/images.js b/packages/image-attribute/images.js index bef06df..0e2e34b 100644 --- a/packages/image-attribute/images.js +++ b/packages/image-attribute/images.js @@ -63,6 +63,6 @@ ReactiveTemplates.events('attribute.images', { event.currentTarget.value = ''; } }); - }) + }); } }); diff --git a/packages/lang-en/init.js b/packages/lang-en/init.js index bd34745..0195098 100644 --- a/packages/lang-en/init.js +++ b/packages/lang-en/init.js @@ -1,5 +1,5 @@ -i18n.setDefaultLanguage('en') -i18n.showMissing('[no translation for "<%= label %>" in <%= language %>]') +i18n.setDefaultLanguage('en'); +i18n.showMissing('[no translation for "<%= label %>" in <%= language %>]'); if (Meteor.isClient) { /** @@ -10,7 +10,7 @@ if (Meteor.isClient) { language = language.split('-')[0]; i18n.setLanguage(language); T9n.setLanguage(language); - } + }; /** * Detects and set the language on startup @@ -18,4 +18,4 @@ if (Meteor.isClient) { Meteor.startup(function () { detectLanguage(); }); -} \ No newline at end of file +} diff --git a/packages/lang-en/package.js b/packages/lang-en/package.js index b386fbe..8e51c97 100644 --- a/packages/lang-en/package.js +++ b/packages/lang-en/package.js @@ -11,7 +11,7 @@ Package.onUse(function(api) { api.use('anti:i18n@0.4.3'); api.use('softwarerero:accounts-t9n@1.1.3'); - api.imply('anti:i18n@0.4.3'); + api.imply('anti:i18n'); api.addFiles('init.js'); api.addFiles('en.js'); diff --git a/packages/logging/.npm/package/node_modules/.bin/bunyan b/packages/logging/.npm/package/node_modules/.bin/bunyan new file mode 120000 index 0000000..3555ac7 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/.bin/bunyan @@ -0,0 +1 @@ +../bunyan/bin/bunyan \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/.node_version b/packages/logging/.npm/package/node_modules/.node_version new file mode 100644 index 0000000..ca7baf6 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/.node_version @@ -0,0 +1 @@ +v0.10.* diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/.npmignore b/packages/logging/.npm/package/node_modules/bunyan-format/.npmignore new file mode 100644 index 0000000..d93aea1 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/.npmignore @@ -0,0 +1 @@ +/assets diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/.travis.yml b/packages/logging/.npm/package/node_modules/bunyan-format/.travis.yml new file mode 100644 index 0000000..6e5919d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/LICENSE b/packages/logging/.npm/package/node_modules/bunyan-format/LICENSE new file mode 100644 index 0000000..41702c5 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/README.md b/packages/logging/.npm/package/node_modules/bunyan-format/README.md new file mode 100644 index 0000000..c5b6cd7 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/README.md @@ -0,0 +1,65 @@ +# bunyan-format [![build status](https://secure.travis-ci.org/thlorenz/bunyan-format.png)](http://travis-ci.org/thlorenz/bunyan-format) + +Writable stream that formats bunyan records that are piped into it + +```js +var bunyan = require('bunyan') + , bformat = require('bunyan-format') + , formatOut = bformat({ outputMode: 'short' }) + ; + +var log = bunyan.createLogger({ name: 'app', stream: formatOut, level: 'debug' } ); + +log.info('starting up'); +log.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } }); +log.warn('getting a bit hot', { temperature: 120 }); +log.error('OOOOHHH it burns!', new Error('temperature: 200')); +log.fatal('I died! Do you know what that means???'); +``` + +* Printing the level in String representation for Json objects + +```js +var bunyan = require('bunyan') + , bformat = require('../') + , formatOut = bformat({ outputMode: 'bunyan', levelInString: true }) + ; +``` + +The output would use the string levels: + +``` +$ node example/json-string-level.js +{"name":"app","hostname":"ubuntu","pid":28081,"level":"INFO","msg":"starting up","time":"2014-12-01T19:41:29.136Z","v":0} +{"name":"app","hostname":"ubuntu","pid":28081,"level":"DEBUG","msg":"things are heating up { temperature: 80,\n status: { started: 'yes', overheated: 'no' } }","time":"2014-12-01T19:41:29.142Z","v":0} +{"name":"app","hostname":"ubuntu","pid":28081,"level":"WARN","msg":"getting a bit hot { temperature: 120 }","time":"2014-12-01T19:41:29.143Z","v":0} +{"name":"app","hostname":"ubuntu","pid":28081,"level":"ERROR","msg":"OOOOHHH it burns! [Error: temperature: 200]","time":"2014-12-01T19:41:29.144Z","v":0} +{"name":"app","hostname":"ubuntu","pid":28081,"level":"FATAL","msg":"I died! Do you know what that means???","time":"2014-12-01T19:41:29.144Z","v":0} +``` + +![demo](https://github.com/thlorenz/bunyan-format/raw/master/assets/bunyan-format-demo.gif) + +## Installation + + npm install bunyan-format + +## API + +``` +/** + * Creates a writable stream that formats bunyan records written to it. + * + * @name BunyanFormatWritable + * @function + * @param opts {Options} passed to bunyan format function + * - outputMode: short|long|simple|json|bunyan + * - color (true): toggles colors in output + * - colorFromLevel: allows overriding log level colors + * @param out {Stream} (process.stdout) writable stream to write + * @return {WritableStream} that you can pipe bunyan output into + */ +``` + +## License + +MIT diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/example/bunyan-string-level.js b/packages/logging/.npm/package/node_modules/bunyan-format/example/bunyan-string-level.js new file mode 100644 index 0000000..7caa790 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/example/bunyan-string-level.js @@ -0,0 +1,14 @@ +'use strict'; + +var bunyan = require('bunyan') + , bformat = require('../') + , formatOut = bformat({ outputMode: 'bunyan', levelInString: true }) + ; + +var log = bunyan.createLogger({ name: 'app', stream: formatOut, level: 'debug' } ); + +log.info('starting up'); +log.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } }); +log.warn('getting a bit hot', { temperature: 120 }); +log.error('OOOOHHH it burns!', new Error('temperature: 200')); +log.fatal('I died! Do you know what that means???'); diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/example/inspect.js b/packages/logging/.npm/package/node_modules/bunyan-format/example/inspect.js new file mode 100644 index 0000000..7d145ae --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/example/inspect.js @@ -0,0 +1,14 @@ +'use strict'; + +var bunyan = require('bunyan') + , bformat = require('../') + , formatOut = bformat({ outputMode: 'inspect' }) + ; + +var log = bunyan.createLogger({ name: 'app', stream: formatOut, level: 'debug' } ); + +log.info('starting up'); +log.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } }); +log.warn('getting a bit hot', { temperature: 120 }); +log.error('OOOOHHH it burns!', new Error('temperature: 200')); +log.fatal('I died! Do you know what that means???'); diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/example/json.js b/packages/logging/.npm/package/node_modules/bunyan-format/example/json.js new file mode 100644 index 0000000..35fc1c8 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/example/json.js @@ -0,0 +1,14 @@ +'use strict'; + +var bunyan = require('bunyan') + , bformat = require('../') + , formatOut = bformat({ outputMode: 'json', jsonIndent: 2}) + ; + +var log = bunyan.createLogger({ name: 'app', stream: formatOut, level: 'debug' } ); + +log.info('starting up'); +log.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } }); +log.warn('getting a bit hot', { temperature: 120 }); +log.error('OOOOHHH it burns!', new Error('temperature: 200')); +log.fatal('I died! Do you know what that means???'); diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/example/long.js b/packages/logging/.npm/package/node_modules/bunyan-format/example/long.js new file mode 100644 index 0000000..2557e70 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/example/long.js @@ -0,0 +1,14 @@ +'use strict'; + +var bunyan = require('bunyan') + , bformat = require('../') + , formatOut = bformat({ outputMode: 'long' }) + ; + +var log = bunyan.createLogger({ name: 'app', stream: formatOut, level: 'debug' } ); + +log.info('starting up'); +log.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } }); +log.warn('getting a bit hot', { temperature: 120 }); +log.error('OOOOHHH it burns!', new Error('temperature: 200')); +log.fatal('I died! Do you know what that means???'); diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/example/short.js b/packages/logging/.npm/package/node_modules/bunyan-format/example/short.js new file mode 100644 index 0000000..c06c392 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/example/short.js @@ -0,0 +1,14 @@ +'use strict'; + +var bunyan = require('bunyan') + , bformat = require('../') + , formatOut = bformat({ outputMode: 'short' }) + ; + +var log = bunyan.createLogger({ name: 'app', stream: formatOut, level: 'debug' } ); + +log.info('starting up'); +log.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } }); +log.warn('getting a bit hot', { temperature: 120 }); +log.error('OOOOHHH it burns!', new Error('temperature: 200')); +log.fatal('I died! Do you know what that means???'); diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/example/simple.js b/packages/logging/.npm/package/node_modules/bunyan-format/example/simple.js new file mode 100644 index 0000000..242ddd8 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/example/simple.js @@ -0,0 +1,14 @@ +'use strict'; + +var bunyan = require('bunyan') + , bformat = require('../') + , formatOut = bformat({ outputMode: 'simple' }) + ; + +var log = bunyan.createLogger({ name: 'app', stream: formatOut, level: 'debug' } ); + +log.info('starting up'); +log.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } }); +log.warn('getting a bit hot', { temperature: 120 }); +log.error('OOOOHHH it burns!', new Error('temperature: 200')); +log.fatal('I died! Do you know what that means???'); diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/index.js b/packages/logging/.npm/package/node_modules/bunyan-format/index.js new file mode 100644 index 0000000..4ca637e --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/index.js @@ -0,0 +1,58 @@ +'use strict'; + +var stream = require('stream'); +var util = require('util'); +var formatRecord = require('./lib/format-record'); +var xtend = require('xtend'); + + +var Writable = stream.Writable; + +module.exports = BunyanFormatWritable; + +util.inherits(BunyanFormatWritable, Writable); + +/** + * Creates a writable stream that formats bunyan records written to it. + * + * @name BunyanFormatWritable + * @function + * @param opts {Options} passed to bunyan format function + * - outputMode: short|long|simple|json|bunyan + * - color (true): toggles colors in output + * - colorFromLevel: allows overriding log level colors + * @param out {Stream} (process.stdout) writable stream to write + * @return {WritableStream} that you can pipe bunyan output into + */ +function BunyanFormatWritable (opts, out) { + if (!(this instanceof BunyanFormatWritable)) return new BunyanFormatWritable(opts, out); + + opts = opts || {}; + opts.objectMode = true; + Writable.call(this, opts); + + this.opts = xtend({ + outputMode: 'short', + color: true, + colorFromLevel: { + 10: 'brightBlack', // TRACE + 20: 'brightBlack', // DEBUG + 30: 'green', // INFO + 40: 'magenta', // WARN + 50: 'red', // ERROR + 60: 'brightRed', // FATAL + } + }, opts); + this.out = out || process.stdout; +} + +BunyanFormatWritable.prototype._write = function (chunk, encoding, cb) { + var rec; + try { + rec = JSON.parse(chunk); + this.out.write(formatRecord(rec, this.opts)); + } catch (e) { + this.out.write(chunk); + } + cb(); +}; diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/lib/format-record.js b/packages/logging/.npm/package/node_modules/bunyan-format/lib/format-record.js new file mode 100644 index 0000000..12a94d6 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/lib/format-record.js @@ -0,0 +1,418 @@ +'use strict'; + +var util = require('util'); +var format = util.format; +var http = require('http'); +var xtend = require('xtend'); +var ansicolors = require('ansicolors'); +var ansistyles = require('ansistyles'); + +var styles = xtend(ansistyles, ansicolors); + +// Most of this code is lifted directly from the bunyan ./bin file and should be cleaned up once there is more time +var OM_LONG = 1; +var OM_JSON = 2; +var OM_INSPECT = 3; +var OM_SIMPLE = 4; +var OM_SHORT = 5; +var OM_BUNYAN = 6; +var OM_FROM_NAME = { + 'long': OM_LONG, + 'json': OM_JSON, + 'inspect': OM_INSPECT, + 'simple': OM_SIMPLE, + 'short': OM_SHORT, + 'bunyan': OM_BUNYAN +}; + +// Levels +var TRACE = 10; +var DEBUG = 20; +var INFO = 30; +var WARN = 40; +var ERROR = 50; +var FATAL = 60; + +var levelFromName = { + 'trace': TRACE, + 'debug': DEBUG, + 'info': INFO, + 'warn': WARN, + 'error': ERROR, + 'fatal': FATAL +}; +var nameFromLevel = {}; +var upperNameFromLevel = {}; +var upperPaddedNameFromLevel = {}; +Object.keys(levelFromName).forEach(function (name) { + var lvl = levelFromName[name]; + nameFromLevel[lvl] = name; + upperNameFromLevel[lvl] = name.toUpperCase(); + upperPaddedNameFromLevel[lvl] = ( + name.length === 4 ? ' ' : '') + name.toUpperCase(); +}); + + +/** + * Is this a valid Bunyan log record. + */ +function isValidRecord(rec) { + if (rec.v === null || + rec.level === null || + rec.name === null || + rec.hostname === null || + rec.pid === null || + rec.time === null || + rec.msg === null) { + // Not valid Bunyan log. + return false; + } else { + return true; + } +} + +function indent(s) { + return ' ' + s.split(/\r?\n/).join('\n '); +} + +function stylizeWithColor(s, color) { + if (!s) return ''; + var fn = styles[color]; + return fn ? fn(s) : s; +} + +function stylizeWithoutColor(str, color) { + return str; +} + +/** + * @param {int} level is the level of the record. + * @return The level value to its String representation. + * This is only used on json-related formats output and first suggested at + * https://github.com/trentm/node-bunyan/issues/194#issuecomment-64858117 + */ +function mapLevelToName(level) { + switch (level) { + case TRACE: + return 'TRACE'; + case DEBUG: + return 'DEBUG'; + case INFO: + return 'INFO'; + case WARN: + return 'WARN'; + case ERROR: + return 'ERROR'; + case FATAL: + return 'FATAL'; + } +} + +/** + * Print out a single result, considering input options. + */ +module.exports = function formatRecord(rec, opts) { + + function _res(res) { + var s = ''; + if (res.header) { + s += res.header.trimRight(); + } else if (res.headers) { + if (res.statusCode) { + s += format('HTTP/1.1 %s %s\n', res.statusCode, + http.STATUS_CODES[res.statusCode]); + } + var headers = res.headers; + s += Object.keys(headers).map( + function (h) { return h + ': ' + headers[h]; }).join('\n'); + } + delete res.header; + delete res.headers; + delete res.statusCode; + if (res.body) { + s += '\n\n' + (typeof (res.body) === 'object' + ? JSON.stringify(res.body, null, 2) : res.body); + delete res.body; + } + if (res.trailer) { + s += '\n' + res.trailer; + } + delete res.trailer; + if (s) { + details.push(indent(s)); + } + // E.g. for extra 'foo' field on 'res', add 'res.foo' at + // top-level. This *does* have the potential to stomp on a + // literal 'res.foo' key. + Object.keys(res).forEach(function (k) { + rec['res.' + k] = res[k]; + }); + } + + var short = false; + var time; + var line = rec.line; + var stylize = opts.color ? stylizeWithColor : stylizeWithoutColor; + var outputMode = isNaN(opts.outputMode) ? OM_FROM_NAME[opts.outputMode] : opts.outputMode; + + switch (outputMode) { + case OM_SHORT: + short = true; + /* falls through */ + case OM_LONG: + // [time] LEVEL: name[/comp]/pid on hostname (src): msg* (extras...) + // msg* + // -- + // long and multi-line extras + // ... + // If 'msg' is single-line, then it goes in the top line. + // If 'req', show the request. + // If 'res', show the response. + // If 'err' and 'err.stack' then show that. + if (!isValidRecord(rec)) { + return line + '\n'; + } + + delete rec.v; + + /* + * We assume the Date is formatted according to ISO8601, in which + * case we can safely chop off the date information. + */ + if (short && rec.time[10] == 'T') { + time = rec.time.substr(11); + time = stylize(time, 'brightBlack'); + } else { + time = stylize('[' + rec.time + ']', 'brightBlack'); + } + + delete rec.time; + + var nameStr = rec.name; + delete rec.name; + + if (rec.component) { + nameStr += '/' + rec.component; + } + delete rec.component; + + if (!short) + nameStr += '/' + rec.pid; + delete rec.pid; + + var level = (upperPaddedNameFromLevel[rec.level] || 'LVL' + rec.level); + if (opts.color) { + var colorFromLevel = opts.colorFromLevel || { + 10: 'brightBlack', // TRACE + 20: 'brightBlack', // DEBUG + 30: 'cyan', // INFO + 40: 'magenta', // WARN + 50: 'red', // ERROR + 60: 'inverse', // FATAL + }; + level = stylize(level, colorFromLevel[rec.level]); + } + delete rec.level; + + var src = ''; + var s; + var headers; + var hostHeaderLine = ''; + if (rec.src && rec.src.file) { + s = rec.src; + if (s.func) { + src = format(' (%s:%d in %s)', s.file, s.line, s.func); + } else { + src = format(' (%s:%d)', s.file, s.line); + } + src = stylize(src, 'green'); + } + delete rec.src; + + var hostname = rec.hostname; + delete rec.hostname; + + var extras = []; + var details = []; + + if (rec.req_id) { + extras.push('req_id=' + rec.req_id); + } + delete rec.req_id; + + var onelineMsg; + if (rec.msg.indexOf('\n') !== -1) { + onelineMsg = ''; + details.push(indent(stylize(rec.msg, 'cyan'))); + } else { + onelineMsg = ' ' + stylize(rec.msg, 'cyan'); + } + delete rec.msg; + + if (rec.req && typeof (rec.req) === 'object') { + var req = rec.req; + delete rec.req; + headers = req.headers; + s = format('%s %s HTTP/%s%s', req.method, + req.url, + req.httpVersion || '1.1', + (headers ? + '\n' + Object.keys(headers).map(function (h) { + return h + ': ' + headers[h]; + }).join('\n') : + '') + ); + delete req.url; + delete req.method; + delete req.httpVersion; + delete req.headers; + if (req.body) { + s += '\n\n' + (typeof (req.body) === 'object' + ? JSON.stringify(req.body, null, 2) : req.body); + delete req.body; + } + if (req.trailers && Object.keys(req.trailers) > 0) { + s += '\n' + Object.keys(req.trailers).map(function (t) { + return t + ': ' + req.trailers[t]; + }).join('\n'); + } + delete req.trailers; + details.push(indent(s)); + // E.g. for extra 'foo' field on 'req', add 'req.foo' at + // top-level. This *does* have the potential to stomp on a + // literal 'req.foo' key. + Object.keys(req).forEach(function (k) { + rec['req.' + k] = req[k]; + }) + } + + if (rec.client_req && typeof (rec.client_req) === 'object') { + var client_req = rec.client_req; + delete rec.client_req; + headers = client_req.headers; + s = ''; + if (client_req.address) { + hostHeaderLine = 'Host: ' + client_req.address; + if (client_req.port) + hostHeaderLine += ':' + client_req.port; + hostHeaderLine += '\n'; + } + delete client_req.headers; + delete client_req.address; + delete client_req.port; + s += format('%s %s HTTP/%s\n%s%s', client_req.method, + client_req.url, + client_req.httpVersion || '1.1', + hostHeaderLine, + (headers ? + Object.keys(headers).map( + function (h) { + return h + ': ' + headers[h]; + }).join('\n') : + '')); + delete client_req.method; + delete client_req.url; + delete client_req.httpVersion; + if (client_req.body) { + s += '\n\n' + (typeof (client_req.body) === 'object' ? + JSON.stringify(client_req.body, null, 2) : + client_req.body); + delete client_req.body; + } + // E.g. for extra 'foo' field on 'client_req', add + // 'client_req.foo' at top-level. This *does* have the potential + // to stomp on a literal 'client_req.foo' key. + Object.keys(client_req).forEach(function (k) { + rec['client_req.' + k] = client_req[k]; + }) + details.push(indent(s)); + } + + + if (rec.res && typeof (rec.res) === 'object') { + _res(rec.res); + delete rec.res; + } + if (rec.client_res && typeof (rec.client_res) === 'object') { + _res(rec.client_res); + delete rec.res; + } + + if (rec.err && rec.err.stack) { + details.push(indent(rec.err.stack)); + delete rec.err; + } + + var leftover = Object.keys(rec); + for (var i = 0; i < leftover.length; i++) { + var key = leftover[i]; + var value = rec[key]; + var stringified = false; + if (typeof (value) !== 'string') { + value = JSON.stringify(value, null, 2); + stringified = true; + } + if (value.indexOf('\n') !== -1 || value.length > 50) { + details.push(indent(key + ': ' + value)); + } else if (!stringified && (value.indexOf(' ') != -1 || + value.length === 0)) + { + extras.push(key + '=' + JSON.stringify(value)); + } else { + extras.push(key + '=' + value); + } + } + + extras = stylize( + (extras.length ? ' (' + extras.join(', ') + ')' : ''), 'brightBlack'); + details = stylize( + (details.length ? details.join('\n --\n') + '\n' : ''), 'brightBlack'); + if (!short) + return format('%s %s: %s on %s%s:%s%s\n%s', + time, + level, + nameStr, + hostname || '', + src, + onelineMsg, + extras, + details); + else + return format('%s %s %s:%s%s\n%s', + time, + level, + nameStr, + onelineMsg, + extras, + details); + break; + + case OM_INSPECT: + return util.inspect(rec, false, Infinity, true) + '\n'; + + case OM_BUNYAN: + if (opts.levelInString) { + rec.level = mapLevelToName(rec.level); + } + return JSON.stringify(rec, null, 0) + '\n'; + + case OM_JSON: + if (opts.levelInString) { + rec.level = mapLevelToName(rec.level); + } + return JSON.stringify(rec, null, opts.jsonIndent) + '\n'; + + case OM_SIMPLE: + /* JSSTYLED */ + // + if (!isValidRecord(rec)) { + return line + '\n'; + } + return format('%s - %s\n', + upperNameFromLevel[rec.level] || 'LVL' + rec.level, + rec.msg); + default: + throw new Error('unknown output mode: '+opts.outputMode); + } +} + diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/.npmignore b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/.npmignore new file mode 100644 index 0000000..a72b52e --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/.npmignore @@ -0,0 +1,15 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log +node_modules diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/.travis.yml b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/.travis.yml new file mode 100644 index 0000000..895dbd3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/LICENSE b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/LICENSE new file mode 100644 index 0000000..41702c5 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/README.md b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/README.md new file mode 100644 index 0000000..30b6a52 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/README.md @@ -0,0 +1,42 @@ +# ansicolors [![build status](https://secure.travis-ci.org/thlorenz/ansicolors.png)](http://next.travis-ci.org/thlorenz/ansicolors) + +Functions that surround a string with ansicolor codes so it prints in color. + +## Installation + + npm install ansicolors + +## Usage + +```js +var colors = require('ansicolors'); + +// foreground colors +var redHerring = colors.red('herring'); +var blueMoon = colors.blue('moon'); +var brighBlueMoon = colors.brightBlue('moon'); + +console.log(redHerring); // this will print 'herring' in red +console.log(blueMoon); // this 'moon' in blue +console.log(brightBlueMoon); // I think you got the idea + +// background colors +console.log(colors.bgYellow('printed on yellow background')); +console.log(colors.bgBrightBlue('printed on bright blue background')); + +// mixing background and foreground colors +// below two lines have same result (order in which bg and fg are combined doesn't matter) +console.log(colors.bgYellow(colors.blue('printed on yellow background in blue'))); +console.log(colors.blue(colors.bgYellow('printed on yellow background in blue'))); +``` + +## Tests + +Look at the [tests](https://github.com/thlorenz/ansicolors/blob/master/test/ansicolors.js) to see more examples and/or run them via: + + npm explore ansicolors && npm test + +## Alternatives + +**ansicolors** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, +I'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js). diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/ansicolors.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/ansicolors.js new file mode 100644 index 0000000..b0e18f6 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/ansicolors.js @@ -0,0 +1,55 @@ +// ColorCodes explained: http://www.termsys.demon.co.uk/vtansi.htm +'use strict'; + +var colorNums = { + white : 37 + , black : 30 + , blue : 34 + , cyan : 36 + , green : 32 + , magenta : 35 + , red : 31 + , yellow : 33 + , brightBlack : 90 + , brightRed : 91 + , brightGreen : 92 + , brightYellow : 93 + , brightBlue : 94 + , brightMagenta : 95 + , brightCyan : 96 + , brightWhite : 97 + } + , backgroundColorNums = { + bgBlack : 40 + , bgRed : 41 + , bgGreen : 42 + , bgYellow : 43 + , bgBlue : 44 + , bgMagenta : 45 + , bgCyan : 46 + , bgWhite : 47 + , bgBrightBlack : 100 + , bgBrightRed : 101 + , bgBrightGreen : 102 + , bgBrightYellow : 103 + , bgBrightBlue : 104 + , bgBrightMagenta : 105 + , bgBrightCyan : 106 + , bgBrightWhite : 107 + } + , colors = {}; + + +Object.keys(colorNums).forEach(function (k) { + colors[k] = function (s) { + return '\u001b[' + colorNums[k] + 'm' + s + '\u001b[39m'; + }; +}); + +Object.keys(backgroundColorNums).forEach(function (k) { + colors[k] = function (s) { + return '\u001b[' + backgroundColorNums[k] + 'm' + s + '\u001b[49m'; + }; +}); + +module.exports = colors; diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/package.json b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/package.json new file mode 100644 index 0000000..03f6d3a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/package.json @@ -0,0 +1,52 @@ +{ + "name": "ansicolors", + "version": "0.2.1", + "description": "Functions that surround a string with ansicolor codes so it prints in color.", + "main": "ansicolors.js", + "scripts": { + "test": "node test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/ansicolors.git" + }, + "keywords": [ + "ansi", + "colors", + "highlight", + "string" + ], + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "thlorenz.com" + }, + "license": "MIT", + "readmeFilename": "README.md", + "gitHead": "858847ca28e8b360d9b70eee0592700fa2ab087d", + "readme": "# ansicolors [![build status](https://secure.travis-ci.org/thlorenz/ansicolors.png)](http://next.travis-ci.org/thlorenz/ansicolors)\n\nFunctions that surround a string with ansicolor codes so it prints in color.\n\n## Installation\n\n npm install ansicolors\n\n## Usage\n\n```js\nvar colors = require('ansicolors');\n\n// foreground colors\nvar redHerring = colors.red('herring');\nvar blueMoon = colors.blue('moon');\nvar brighBlueMoon = colors.brightBlue('moon');\n\nconsole.log(redHerring); // this will print 'herring' in red\nconsole.log(blueMoon); // this 'moon' in blue\nconsole.log(brightBlueMoon); // I think you got the idea\n\n// background colors\nconsole.log(colors.bgYellow('printed on yellow background'));\nconsole.log(colors.bgBrightBlue('printed on bright blue background'));\n\n// mixing background and foreground colors\n// below two lines have same result (order in which bg and fg are combined doesn't matter)\nconsole.log(colors.bgYellow(colors.blue('printed on yellow background in blue')));\nconsole.log(colors.blue(colors.bgYellow('printed on yellow background in blue')));\n```\n\n## Tests\n\nLook at the [tests](https://github.com/thlorenz/ansicolors/blob/master/test/ansicolors.js) to see more examples and/or run them via: \n\n npm explore ansicolors && npm test\n\n## Alternatives\n\n**ansicolors** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, \nI'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js).\n", + "_id": "ansicolors@0.2.1", + "dist": { + "shasum": "be089599097b74a5c9c4a84a0cdbcdb62bd87aef", + "tarball": "http://registry.npmjs.org/ansicolors/-/ansicolors-0.2.1.tgz" + }, + "_npmVersion": "1.1.69", + "_npmUser": { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + }, + "maintainers": [ + { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + } + ], + "directories": {}, + "_shasum": "be089599097b74a5c9c4a84a0cdbcdb62bd87aef", + "_resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.2.1.tgz", + "_from": "ansicolors@~0.2.1", + "bugs": { + "url": "https://github.com/thlorenz/ansicolors/issues" + }, + "homepage": "https://github.com/thlorenz/ansicolors" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/test/ansicolors.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/test/ansicolors.js new file mode 100644 index 0000000..46aec3e --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/test/ansicolors.js @@ -0,0 +1,55 @@ +'use strict'; + +var assert = require('assert') + , colors = require('..'); + +console.log('Foreground colors ..'); + +assert.equal(colors.white('printed in white'), '\u001b[37mprinted in white\u001b[39m'); + +assert.equal(colors.black('printed in black'), '\u001b[30mprinted in black\u001b[39m'); +assert.equal(colors.brightBlack('printed in bright black'), '\u001b[90mprinted in bright black\u001b[39m'); + +assert.equal(colors.green('printed in green'), '\u001b[32mprinted in green\u001b[39m'); +assert.equal(colors.brightGreen('printed in bright green'), '\u001b[92mprinted in bright green\u001b[39m'); + +assert.equal(colors.red('printed in red'), '\u001b[31mprinted in red\u001b[39m'); +assert.equal(colors.brightRed('printed in bright red'), '\u001b[91mprinted in bright red\u001b[39m'); + +console.log('OK'); + +console.log('Background colors ..'); + +assert.equal( + colors.bgBlack('printed with black background') + , '\u001b[40mprinted with black background\u001b[49m' +); + +assert.equal( + colors.bgYellow('printed with yellow background') + , '\u001b[43mprinted with yellow background\u001b[49m' +); +assert.equal( + colors.bgBrightYellow('printed with bright yellow background') + , '\u001b[103mprinted with bright yellow background\u001b[49m' +); + +assert.equal( + colors.bgWhite('printed with white background') + , '\u001b[47mprinted with white background\u001b[49m' +); + +console.log('OK'); + +console.log('Mixing background and foreground colors ..'); + +assert.equal( + colors.blue(colors.bgYellow('printed in blue with yellow background')) + , '\u001b[34m\u001b[43mprinted in blue with yellow background\u001b[49m\u001b[39m' +); +assert.equal( + colors.bgYellow(colors.blue('printed in blue with yellow background again')) + , '\u001b[43m\u001b[34mprinted in blue with yellow background again\u001b[39m\u001b[49m' +); + +console.log('OK'); diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/LICENSE b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/LICENSE new file mode 100644 index 0000000..41702c5 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/README.md b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/README.md new file mode 100644 index 0000000..e39b8df --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/README.md @@ -0,0 +1,71 @@ +# ansistyles [![build status](https://secure.travis-ci.org/thlorenz/ansistyles.png)](http://next.travis-ci.org/thlorenz/ansistyles) + +Functions that surround a string with ansistyle codes so it prints in style. + +In case you need colors, like `red`, have a look at [ansicolors](https://github.com/thlorenz/ansicolors). + +## Installation + + npm install ansistyles + +## Usage + +```js +var styles = require('ansistyles'); + +console.log(styles.bright('hello world')); // prints hello world in 'bright' white +console.log(styles.underline('hello world')); // prints hello world underlined +console.log(styles.inverse('hello world')); // prints hello world black on white +``` + +## Combining with ansicolors + +Get the ansicolors module: + + npm install ansicolors + +```js +var styles = require('ansistyles') + , colors = require('ansicolors'); + + console.log( + // prints hello world underlined in blue on a green background + colors.bgGreen(colors.blue(styles.underline('hello world'))) + ); +``` + +## Tests + +Look at the [tests](https://github.com/thlorenz/ansistyles/blob/master/test/ansistyles.js) to see more examples and/or run them via: + + npm explore ansistyles && npm test + +## More Styles + +As you can see from [here](https://github.com/thlorenz/ansistyles/blob/master/ansistyles.js#L4-L15), more styles are available, +but didn't have any effect on the terminals that I tested on Mac Lion and Ubuntu Linux. + +I included them for completeness, but didn't show them in the examples because they seem to have no effect. + +### reset + +A style reset function is also included, please note however that this is not nestable. + +Therefore the below only underlines `hell` only, but not `world`. + +```js +console.log(styles.underline('hell' + styles.reset('o') + ' world')); +``` + +It is essentially the same as: + +```js +console.log(styles.underline('hell') + styles.reset('') + 'o world'); +``` + + + +## Alternatives + +**ansistyles** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, +I'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js). diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/ansistyles.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/ansistyles.js new file mode 100644 index 0000000..5b8788c --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/ansistyles.js @@ -0,0 +1,38 @@ +'use strict'; + +/* + * Info: http://www.termsys.demon.co.uk/vtansi.htm#colors + * Following caveats + * bright - brightens the color (bold-blue is same as brigthtBlue) + * dim - nothing on Mac or Linux + * italic - nothing on Mac or Linux + * underline - underlines string + * blink - nothing on Mac or linux + * inverse - background becomes foreground and vice versa + * + * In summary, the only styles that work are: + * - bright, underline and inverse + * - the others are only included for completeness + */ + +var styleNums = { + reset : [0, 22] + , bright : [1, 22] + , dim : [2, 22] + , italic : [3, 23] + , underline : [4, 24] + , blink : [5, 25] + , inverse : [7, 27] + } + , styles = {} + ; + +Object.keys(styleNums).forEach(function (k) { + styles[k] = function (s) { + var open = styleNums[k][0] + , close = styleNums[k][1]; + return '\u001b[' + open + 'm' + s + '\u001b[' + close + 'm'; + }; +}); + +module.exports = styles; diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/package.json b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/package.json new file mode 100644 index 0000000..af77053 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/package.json @@ -0,0 +1,52 @@ +{ + "name": "ansistyles", + "version": "0.1.3", + "description": "Functions that surround a string with ansistyle codes so it prints in style.", + "main": "ansistyles.js", + "scripts": { + "test": "node test/ansistyles.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/ansistyles.git" + }, + "keywords": [ + "ansi", + "style", + "terminal", + "console" + ], + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "thlorenz.com" + }, + "license": "MIT", + "readmeFilename": "README.md", + "gitHead": "27bf1bc65231bcc7fd109bf13b13601b51f8cd04", + "readme": "# ansistyles [![build status](https://secure.travis-ci.org/thlorenz/ansistyles.png)](http://next.travis-ci.org/thlorenz/ansistyles)\n\nFunctions that surround a string with ansistyle codes so it prints in style.\n\nIn case you need colors, like `red`, have a look at [ansicolors](https://github.com/thlorenz/ansicolors).\n\n## Installation\n\n npm install ansistyles\n\n## Usage\n\n```js\nvar styles = require('ansistyles');\n\nconsole.log(styles.bright('hello world')); // prints hello world in 'bright' white\nconsole.log(styles.underline('hello world')); // prints hello world underlined\nconsole.log(styles.inverse('hello world')); // prints hello world black on white\n```\n\n## Combining with ansicolors\n\nGet the ansicolors module:\n\n npm install ansicolors\n\n```js\nvar styles = require('ansistyles')\n , colors = require('ansicolors');\n\n console.log(\n // prints hello world underlined in blue on a green background\n colors.bgGreen(colors.blue(styles.underline('hello world'))) \n );\n```\n\n## Tests\n\nLook at the [tests](https://github.com/thlorenz/ansistyles/blob/master/test/ansistyles.js) to see more examples and/or run them via: \n\n npm explore ansistyles && npm test\n\n## More Styles\n\nAs you can see from [here](https://github.com/thlorenz/ansistyles/blob/master/ansistyles.js#L4-L15), more styles are available,\nbut didn't have any effect on the terminals that I tested on Mac Lion and Ubuntu Linux.\n\nI included them for completeness, but didn't show them in the examples because they seem to have no effect.\n\n### reset\n\nA style reset function is also included, please note however that this is not nestable.\n\nTherefore the below only underlines `hell` only, but not `world`.\n\n```js\nconsole.log(styles.underline('hell' + styles.reset('o') + ' world'));\n```\n\nIt is essentially the same as:\n\n```js\nconsole.log(styles.underline('hell') + styles.reset('') + 'o world');\n```\n\n\n\n## Alternatives\n\n**ansistyles** tries to meet simple use cases with a very simple API. However, if you need a more powerful ansi formatting tool, \nI'd suggest to look at the [features](https://github.com/TooTallNate/ansi.js#features) of the [ansi module](https://github.com/TooTallNate/ansi.js).\n", + "bugs": { + "url": "https://github.com/thlorenz/ansistyles/issues" + }, + "_id": "ansistyles@0.1.3", + "dist": { + "shasum": "5de60415bda071bb37127854c864f41b23254539", + "tarball": "http://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz" + }, + "_from": "ansistyles@~0.1.1", + "_npmVersion": "1.3.11", + "_npmUser": { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + }, + "maintainers": [ + { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + } + ], + "directories": {}, + "_shasum": "5de60415bda071bb37127854c864f41b23254539", + "_resolved": "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz", + "homepage": "https://github.com/thlorenz/ansistyles" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/test/ansistyles.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/test/ansistyles.js new file mode 100644 index 0000000..f769bf8 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/test/ansistyles.js @@ -0,0 +1,15 @@ +'use strict'; +/*jshint asi: true */ +var assert = require('assert') + , styles = require('../') + +function inspect(obj, depth) { + console.log(require('util').inspect(obj, false, depth || 5, true)); +} + +assert.equal(styles.reset('reset'), '\u001b[0mreset\u001b[22m', 'reset') +assert.equal(styles.underline('underlined'), '\u001b[4munderlined\u001b[24m', 'underline') +assert.equal(styles.bright('bright'), '\u001b[1mbright\u001b[22m', 'bright') +assert.equal(styles.inverse('inversed'), '\u001b[7minversed\u001b[27m', 'inverse') + +console.log('OK'); diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/.npmignore b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/LICENCE b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/LICENCE new file mode 100644 index 0000000..a23e08a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Raynos. + +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. \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/Makefile b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/Makefile new file mode 100644 index 0000000..d583fcf --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/Makefile @@ -0,0 +1,4 @@ +browser: + node ./support/compile + +.PHONY: browser \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/README.md b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/README.md new file mode 100644 index 0000000..389adae --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/README.md @@ -0,0 +1,27 @@ +# xtend + +[![browser support][3]][4] + +Extend like a boss + +xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes presedence. + +## Examples + +```js +var extend = require("xtend") + +var combination = extend({ + a: "a" +}, { + b: "b" +}) +// { a: "a", b: "b" } +``` + + +## MIT Licenced + + + [3]: http://ci.testling.com/Raynos/xtend.png + [4]: http://ci.testling.com/Raynos/xtend diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/has-keys.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/has-keys.js new file mode 100644 index 0000000..62391e7 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/has-keys.js @@ -0,0 +1,7 @@ +module.exports = hasKeys + +function hasKeys(source) { + return source !== null && + (typeof source === "object" || + typeof source === "function") +} diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/index.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/index.js new file mode 100644 index 0000000..20937d1 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/index.js @@ -0,0 +1,25 @@ +var Keys = require("object-keys") +var hasKeys = require("./has-keys") + +module.exports = extend + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + if (!hasKeys(source)) { + continue + } + + var keys = Keys(source) + + for (var j = 0; j < keys.length; j++) { + var name = keys[j] + target[name] = source[name] + } + } + + return target +} diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/mutable.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/mutable.js new file mode 100644 index 0000000..17454ae --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/mutable.js @@ -0,0 +1,25 @@ +var Keys = require("object-keys") +var hasKeys = require("./has-keys") + +module.exports = extend + +function extend(target) { + var sources = [].slice.call(arguments, 1) + + for (var i = 0; i < sources.length; i++) { + var source = sources[i] + + if (!hasKeys(source)) { + continue + } + + var keys = Keys(source) + + for (var j = 0; j < keys.length; j++) { + var name = keys[j] + target[name] = source[name] + } + } + + return target +} diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/.npmignore b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/.npmignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/.travis.yml b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/.travis.yml new file mode 100644 index 0000000..60d00ce --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - "0.10" + - "0.8" + - "0.6" diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/README.md b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/README.md new file mode 100644 index 0000000..ab32d0a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/README.md @@ -0,0 +1,39 @@ +#object-keys [![Version Badge][2]][1] + +[![Build Status][3]][4] [![dependency status][5]][6] + +[![browser support][7]][8] + +An Object.keys shim. Uses Object.keys if available. + +## Example + +```js +var keys = require('object-keys'); +var assert = require('assert'); +var obj = { + a: true, + b: true, + c: true +}; + +assert.equal(keys(obj), ['a', 'b', 'c']); +``` + +## Source +Implementation taken directly from [es5-shim]([9]), with modifications, including from [lodash]([10]). + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/object-keys +[2]: http://vb.teelaun.ch/ljharb/object-keys.svg +[3]: https://travis-ci.org/ljharb/object-keys.png +[4]: https://travis-ci.org/ljharb/object-keys +[5]: https://david-dm.org/ljharb/object-keys.png +[6]: https://david-dm.org/ljharb/object-keys +[7]: https://ci.testling.com/ljharb/object-keys.png +[8]: https://ci.testling.com/ljharb/object-keys +[9]: https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js#L542-589 +[10]: https://github.com/bestiejs/lodash + diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/foreach.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/foreach.js new file mode 100644 index 0000000..db32d45 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/foreach.js @@ -0,0 +1,40 @@ +var hasOwn = Object.prototype.hasOwnProperty; +var toString = Object.prototype.toString; + +var isFunction = function (fn) { + var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; + if (!isFunc && typeof window !== 'undefined') { + isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; + } + return isFunc; +}; + +module.exports = function forEach(obj, fn) { + if (!isFunction(fn)) { + throw new TypeError('iterator must be a function'); + } + var i, k, + isString = typeof obj === 'string', + l = obj.length, + context = arguments.length > 2 ? arguments[2] : null; + if (l === +l) { + for (i = 0; i < l; i++) { + if (context === null) { + fn(isString ? obj.charAt(i) : obj[i], i, obj); + } else { + fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); + } + } + } else { + for (k in obj) { + if (hasOwn.call(obj, k)) { + if (context === null) { + fn(obj[k], k, obj); + } else { + fn.call(context, obj[k], k, obj); + } + } + } + } +}; + diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/index.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/index.js new file mode 100644 index 0000000..f5b24b6 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/index.js @@ -0,0 +1,2 @@ +module.exports = Object.keys || require('./shim'); + diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/isArguments.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/isArguments.js new file mode 100644 index 0000000..74a0989 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/isArguments.js @@ -0,0 +1,16 @@ +var toString = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toString.call(value); + var isArguments = str === '[object Arguments]'; + if (!isArguments) { + isArguments = str !== '[object Array]' + && value !== null + && typeof value === 'object' + && typeof value.length === 'number' + && value.length >= 0 + && toString.call(value.callee) === '[object Function]'; + } + return isArguments; +}; + diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/package.json b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/package.json new file mode 100644 index 0000000..023bdd1 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/package.json @@ -0,0 +1,74 @@ +{ + "name": "object-keys", + "version": "0.4.0", + "author": { + "name": "Jordan Harband" + }, + "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/kriskowal/es5-shim", + "license": "MIT", + "main": "index.js", + "scripts": { + "test": "node test/index.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/ljharb/object-keys.git" + }, + "keywords": [ + "Object.keys", + "keys", + "ES5", + "shim" + ], + "dependencies": {}, + "devDependencies": { + "foreach": "~2.0.3", + "is": "~0.2.6", + "tape": "~1.0.4", + "indexof": "~0.0.1" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "bugs": { + "url": "https://github.com/ljharb/object-keys/issues" + }, + "_id": "object-keys@0.4.0", + "dist": { + "shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336", + "tarball": "http://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz" + }, + "_from": "object-keys@~0.4.0", + "_npmVersion": "1.3.5", + "_npmUser": { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + "maintainers": [ + { + "name": "ljharb", + "email": "ljharb@gmail.com" + } + ], + "directories": {}, + "deprecated": "", + "_shasum": "28a6aae7428dd2c3a92f3d95f21335dd204e0336", + "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/ljharb/object-keys#readme" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/shim.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/shim.js new file mode 100644 index 0000000..b88421b --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/shim.js @@ -0,0 +1,62 @@ +(function () { + "use strict"; + + // modified from https://github.com/kriskowal/es5-shim + var has = Object.prototype.hasOwnProperty, + toString = Object.prototype.toString, + forEach = require('./foreach'), + isArgs = require('./isArguments'), + hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), + hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ], + keysShim; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object', + isFunction = toString.call(object) === '[object Function]', + isArguments = isArgs(object), + theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + + if (isArguments) { + forEach(object, function (value) { + theKeys.push(value); + }); + } else { + var name, + skipProto = hasProtoEnumBug && isFunction; + + for (name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(name); + } + } + } + + if (hasDontEnumBug) { + var ctor = object.constructor, + skipConstructor = ctor && ctor.prototype === object; + + forEach(dontEnums, function (dontEnum) { + if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { + theKeys.push(dontEnum); + } + }); + } + return theKeys; + }; + + module.exports = keysShim; +}()); + diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/foreach.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/foreach.js new file mode 100644 index 0000000..f29f065 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/foreach.js @@ -0,0 +1,156 @@ +var test = require('tape'); +var forEach = require('../foreach.js'); + +test('second argument: iterator', function (t) { + var arr = []; + t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); + t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); + t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); + t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); + t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); + t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); + t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); + t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); + t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); + t.doesNotThrow(function () { forEach(arr, setTimeout); }, 'setTimeout is a function'); + if (typeof window !== 'undefined') { + t.doesNotThrow(function () { forEach(arr, window.alert); }, 'alert is a function'); + } + t.end(); +}); + +test('array', function (t) { + var arr = [1, 2, 3]; + + t.test('iterates over every item', function (st) { + var index = 0; + forEach(arr, function () { index += 1; }); + st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(arr.length); + forEach(arr, function (item) { + st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(arr.length); + forEach(arr, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(arr.length); + forEach(arr, function (item, index, array) { + st.deepEqual(arr, array, 'array is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + st.plan(arr.length); + forEach(arr, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + +test('object', function (t) { + var obj = { + a: 1, + b: 2, + c: 3 + }; + var keys = ['a', 'b', 'c']; + + var F = function () { + this.a = 1; + this.b = 2; + }; + F.prototype.c = 3; + var fKeys = ['a', 'b']; + + t.test('iterates over every object literal key', function (st) { + var counter = 0; + forEach(obj, function () { counter += 1; }); + st.equal(counter, keys.length, 'iterated ' + counter + ' times'); + st.end(); + }); + + t.test('iterates only over own keys', function (st) { + var counter = 0; + forEach(new F(), function () { counter += 1; }); + st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(keys.length); + forEach(obj, function (item) { + st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(keys.length); + forEach(obj, function (item, key) { + st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(keys.length); + forEach(obj, function (item, key, object) { + st.deepEqual(obj, object, 'object is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + st.plan(1); + forEach({foo: 'bar'}, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + + +test('string', function (t) { + var str = 'str'; + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(str.length * 2 + 1); + forEach(str, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + st.equal(str.charAt(index), item); + counter += 1; + }); + st.equal(counter, str.length, 'iterates ' + str.length + ' times'); + }); + t.end(); +}); + diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/index.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/index.js new file mode 100644 index 0000000..8b77b1f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/index.js @@ -0,0 +1,6 @@ + +require('./foreach'); +require('./isArguments'); + +require('./shim'); + diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/isArguments.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/isArguments.js new file mode 100644 index 0000000..62a07c2 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/isArguments.js @@ -0,0 +1,10 @@ +var test = require('tape'); +var isArguments = require('../isArguments'); + +test('is.arguments', function (t) { + t.notOk(isArguments([]), 'array is not arguments'); + (function () { t.ok(isArguments(arguments), 'arguments is arguments'); }()); + (function () { t.notOk(isArguments(Array.prototype.slice.call(arguments)), 'sliced arguments is not arguments'); }()); + t.end(); +}); + diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/shim.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/shim.js new file mode 100644 index 0000000..9d93271 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/test/shim.js @@ -0,0 +1,134 @@ +var test = require('tape'); +var shimmedKeys = require('../index.js'); +var is = require('is'); +var keys = require('../shim.js'); +var forEach = require('foreach'); +var indexOf = require('indexof'); + +var obj = { + "str": "boz", + "obj": {}, + "arr": [], + "bool": true, + "num": 42, + "aNull": null, + "undef": undefined +}; +var objKeys = ['str', 'obj', 'arr', 'bool', 'num', 'aNull', 'undef']; + +test('exports a function', function (t) { + if (Object.keys) { + t.equal(Object.keys, shimmedKeys, 'Object.keys is supported and exported'); + } else { + t.equal(keys, shimmedKeys, 'Object.keys is not supported; shim is exported'); + } + t.end(); +}); + +test('working with actual shim', function (t) { + t.notEqual(Object.keys, keys, 'keys shim is not native Object.keys'); + t.end(); +}); + +test('works with an object literal', function (t) { + var theKeys = keys(obj); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, objKeys, 'Object has expected keys'); + t.end(); +}); + +test('works with an array', function (t) { + var arr = [1, 2, 3]; + var theKeys = keys(arr); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, ['0', '1', '2'], 'Array has expected keys'); + t.end(); +}); + +test('works with a function', function (t) { + var foo = function () {}; + foo.a = true; + + t.doesNotThrow(function () { return keys(foo); }, 'does not throw an error'); + t.deepEqual(keys(foo), ['a'], 'returns expected keys'); + t.end(); +}); + +test('returns names which are own properties', function (t) { + forEach(keys(obj), function (name) { + t.equal(obj.hasOwnProperty(name), true, name + ' should be returned'); + }); + t.end(); +}); + +test('returns names which are enumerable', function (t) { + var k, loopedValues = []; + for (k in obj) { + loopedValues.push(k); + } + forEach(keys(obj), function (name) { + t.notEqual(indexOf(loopedValues, name), -1, name + ' is not enumerable'); + }); + t.end(); +}); + +test('throws an error for a non-object', function (t) { + t.throws( + function () { return keys(42); }, + new TypeError('Object.keys called on a non-object'), + 'throws on a non-object' + ); + t.end(); +}); + +test('works with an object instance', function (t) { + var Prototype = function () {}; + Prototype.prototype.foo = true; + var obj = new Prototype(); + obj.bar = true; + var theKeys = keys(obj); + t.equal(is.array(theKeys), true, 'returns an array'); + t.deepEqual(theKeys, ['bar'], 'Instance has expected keys'); + t.end(); +}); + +test('works in iOS 5 mobile Safari', function (t) { + var Foo = function () {}; + Foo.a = function () {}; + + // the bug is keys(Foo) => ['a', 'prototype'] instead of ['a'] + t.deepEqual(keys(Foo), ['a'], 'has expected keys'); + t.end(); +}); + +test('works in environments with the dontEnum bug (IE < 9)', function (t) { + var Foo = function () {}; + Foo.prototype.a = function () {}; + + // the bug is keys(Foo.prototype) => ['a', 'constructor'] instead of ['a'] + t.deepEqual(keys(Foo.prototype), ['a'], 'has expected keys'); + t.end(); +}); + +test('shadowed properties', function (t) { + var shadowedProps = [ + 'dummyControlProp', /* just to be sure */ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' + ]; + shadowedProps.sort(); + var shadowedObject = {}; + forEach(shadowedProps, function (value, index) { + shadowedObject[value] = index; + }); + var shadowedObjectKeys = keys(shadowedObject); + shadowedObjectKeys.sort(); + t.deepEqual(shadowedObjectKeys, shadowedProps, 'troublesome shadowed properties are keys of object literals'); + t.end(); +}); + diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/package.json b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/package.json new file mode 100644 index 0000000..fe74554 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/package.json @@ -0,0 +1,89 @@ +{ + "name": "xtend", + "version": "2.1.2", + "description": "extend like a boss", + "keywords": [ + "extend", + "merge", + "options", + "opts", + "object", + "array" + ], + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "repository": { + "type": "git", + "url": "git://github.com/Raynos/xtend.git" + }, + "main": "index", + "scripts": { + "test": "node test" + }, + "dependencies": { + "object-keys": "~0.4.0" + }, + "devDependencies": { + "tape": "~1.1.0" + }, + "homepage": "https://github.com/Raynos/xtend", + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Matt Esch" + } + ], + "bugs": { + "url": "https://github.com/Raynos/xtend/issues", + "email": "raynos2@gmail.com" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/raynos/xtend/raw/master/LICENSE" + } + ], + "testling": { + "files": "test.js", + "browsers": [ + "ie/7..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest" + ] + }, + "engines": { + "node": ">=0.4" + }, + "_id": "xtend@2.1.2", + "dist": { + "shasum": "6efecc2a4dad8e6962c4901b337ce7ba87b5d28b", + "tarball": "http://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz" + }, + "_from": "xtend@~2.1.1", + "_npmVersion": "1.3.14", + "_npmUser": { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + "maintainers": [ + { + "name": "raynos", + "email": "raynos2@gmail.com" + } + ], + "directories": {}, + "_shasum": "6efecc2a4dad8e6962c4901b337ce7ba87b5d28b", + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/test.js b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/test.js new file mode 100644 index 0000000..3369d79 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/test.js @@ -0,0 +1,63 @@ +var test = require("tape") +var extend = require("./") +var mutableExtend = require("./mutable") + +test("merge", function(assert) { + var a = { a: "foo" } + var b = { b: "bar" } + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("replace", function(assert) { + var a = { a: "foo" } + var b = { a: "bar" } + + assert.deepEqual(extend(a, b), { a: "bar" }) + assert.end() +}) + +test("undefined", function(assert) { + var a = { a: undefined } + var b = { b: "foo" } + + assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) + assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) + assert.end() +}) + +test("handle 0", function(assert) { + var a = { a: "default" } + var b = { a: 0 } + + assert.deepEqual(extend(a, b), { a: 0 }) + assert.deepEqual(extend(b, a), { a: "default" }) + assert.end() +}) + +test("is immutable", function (assert) { + var record = {} + + extend(record, { foo: "bar" }) + assert.equal(record.foo, undefined) + assert.end() +}) + +test("null as argument", function (assert) { + var a = { foo: "bar" } + var b = null + var c = void 0 + + assert.deepEqual(extend(b, a, c), { foo: "bar" }) + assert.end() +}) + +test("mutable", function (assert) { + var a = { foo: "bar" } + + mutableExtend(a, { bar: "baz" }) + + assert.equal(a.bar, "baz") + assert.end() +}) diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/package.json b/packages/logging/.npm/package/node_modules/bunyan-format/package.json new file mode 100644 index 0000000..bb1f592 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/package.json @@ -0,0 +1,70 @@ +{ + "name": "bunyan-format", + "version": "0.2.1", + "description": "Writable stream that formats bunyan records that are piped into it.", + "main": "index.js", + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/bunyan-format.git" + }, + "homepage": "https://github.com/thlorenz/bunyan-format", + "dependencies": { + "ansistyles": "~0.1.1", + "ansicolors": "~0.2.1", + "xtend": "~2.1.1" + }, + "devDependencies": { + "tap": "~0.4.3", + "bunyan": "~0.22.0" + }, + "keywords": [ + "bunyan", + "stream", + "log", + "logger", + "format", + "pretty", + "color", + "style" + ], + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "license": { + "type": "MIT", + "url": "https://github.com/thlorenz/bunyan-format/blob/master/LICENSE" + }, + "engine": { + "node": ">=0.10" + }, + "gitHead": "da4ea06a283e650acfc7a595ce65c5095ab3e4d1", + "bugs": { + "url": "https://github.com/thlorenz/bunyan-format/issues" + }, + "_id": "bunyan-format@0.2.1", + "_shasum": "a4b3b0d80070a865279417269e3f00ff02fbcb47", + "_from": "bunyan-format@0.2.1", + "_npmVersion": "2.0.0", + "_npmUser": { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + }, + "maintainers": [ + { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + } + ], + "dist": { + "shasum": "a4b3b0d80070a865279417269e3f00ff02fbcb47", + "tarball": "http://registry.npmjs.org/bunyan-format/-/bunyan-format-0.2.1.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/bunyan-format/-/bunyan-format-0.2.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/test/short.js b/packages/logging/.npm/package/node_modules/bunyan-format/test/short.js new file mode 100644 index 0000000..0b6282f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/test/short.js @@ -0,0 +1,42 @@ +'use strict'; + +var bunyan = require('bunyan') + , bformat = require('../') + , test = require('tap').test + ; + +function inspect(obj, depth) { + console.error(require('util').inspect(obj, false, depth || 5, true)); +} + +function removeTime(s) { + return s.substring(29); +} + +test('\nshort mode', function (t) { + var formatOut = bformat({ outputMode: 'short'}, { write: onwrite }) + var log = bunyan.createLogger({ name: 'app', stream: formatOut, level: 'debug' } ); + + var writes = []; + function onwrite (c) { + process.stdout.write(c) + writes.push(c) + } + + log.info('starting up'); + log.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } }); + log.warn('getting a bit hot', { temperature: 120 }); + log.error('OOOOHHH it burns!', new Error('temperature: 200')); + log.fatal('I died! Do you know what that means???'); + + t.deepEqual( + writes.map(removeTime) + , [ ' INFO\u001b[39m app: \u001b[36mstarting up\u001b[39m\n', + 'DEBUG\u001b[39m app:\n\u001b[90m \u001b[36mthings are heating up { temperature: 80,\n status: { started: \'yes\', overheated: \'no\' } }\u001b[39m\n\u001b[39m', + ' WARN\u001b[39m app: \u001b[36mgetting a bit hot { temperature: 120 }\u001b[39m\n', + 'ERROR\u001b[39m app: \u001b[36mOOOOHHH it burns! [Error: temperature: 200]\u001b[39m\n', + 'FATAL\u001b[39m app: \u001b[36mI died! Do you know what that means???\u001b[39m\n' ] + , 'writes colorized messages in "short" format' + ) + t.end(); +}) diff --git a/packages/logging/.npm/package/node_modules/bunyan-format/test/simple.js b/packages/logging/.npm/package/node_modules/bunyan-format/test/simple.js new file mode 100644 index 0000000..abad81b --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan-format/test/simple.js @@ -0,0 +1,38 @@ +'use strict'; + +var bunyan = require('bunyan') + , bformat = require('../') + , test = require('tap').test + ; + +function inspect(obj, depth) { + console.error(require('util').inspect(obj, false, depth || 5, true)); +} + +test('\nsimple mode', function (t) { + var formatOut = bformat({ outputMode: 'simple'}, { write: onwrite }) + var log = bunyan.createLogger({ name: 'app', stream: formatOut, level: 'debug' } ); + + var writes = []; + function onwrite (c) { + process.stdout.write(c) + writes.push(c) + } + + log.info('starting up'); + log.debug('things are heating up', { temperature: 80, status: { started: 'yes', overheated: 'no' } }); + log.warn('getting a bit hot', { temperature: 120 }); + log.error('OOOOHHH it burns!', new Error('temperature: 200')); + log.fatal('I died! Do you know what that means???'); + + t.deepEqual( + writes + , [ 'INFO - starting up\n', + 'DEBUG - things are heating up { temperature: 80,\n status: { started: \'yes\', overheated: \'no\' } }\n', + 'WARN - getting a bit hot { temperature: 120 }\n', + 'ERROR - OOOOHHH it burns! [Error: temperature: 200]\n', + 'FATAL - I died! Do you know what that means???\n' ] + , 'writes colorized messages in "simple" format' + ) + t.end(); +}) diff --git a/packages/logging/.npm/package/node_modules/bunyan/.npmignore b/packages/logging/.npm/package/node_modules/bunyan/.npmignore new file mode 100644 index 0000000..84d129f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/.npmignore @@ -0,0 +1,7 @@ +/tmp +/node_modules +*.log +/examples +/test +/*.tgz +/tools diff --git a/packages/logging/.npm/package/node_modules/bunyan/AUTHORS b/packages/logging/.npm/package/node_modules/bunyan/AUTHORS new file mode 100644 index 0000000..bc8fc52 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/AUTHORS @@ -0,0 +1,22 @@ +Trent Mick (http://trentm.com) +Mark Cavage (https://github.com/mcavage) +Dave Pacheco (https://github.com/davepacheco) +Michael Hart (https://github.com/mhart) +Isaac Schlueter (https://github.com/isaacs) +Rob Gulewich (https://github.com/rgulewich) +Bryan Cantrill (https://github.com/bcantrill) +Michael Hart (https://github.com/mhart) +Simon Wade (https://github.com/aexmachina) +https://github.com/glenn-murray-bse +Chakrit Wichian (https://github.com/chakrit) +Patrick Mooney (https://github.com/pfmooney) +Johan Nordberg (https://github.com/jnordberg) +https://github.com/timborodin +Ryan Graham (https://github.com/rmg) +Alex Kocharin (https://github.com/rlidwka) +Andrei Neculau (https://github.com/andreineculau) +Mihai Tomescu (https://github.com/matomesc) +Daniel Juhl (https://github.com/danieljuhl) +Chris Barber (https://github.com/cb1kenobi) +Manuel Schneider (https://github.com/manuelschneider) +Martin Gausby (https://github.com/gausby) diff --git a/packages/logging/.npm/package/node_modules/bunyan/CHANGES.md b/packages/logging/.npm/package/node_modules/bunyan/CHANGES.md new file mode 100644 index 0000000..d44edbd --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/CHANGES.md @@ -0,0 +1,1147 @@ +# bunyan Changelog + +Known issues: + +- [issue #58] Can't install to a dir with spaces. This is [this node-gyp + bug](https://github.com/TooTallNate/node-gyp/issues/65). + + +## bunyan 1.4.0 + +(Bumping minor ver b/c I'm wary of dtrace-provider changes. :) + +- [issue #258, pull #259] Update to dtrace-provider 0.5 to fix + install and tests on recent io.js versions. +- safe-json-stringify@1.0.3 changed output, breaking some tests. Fix those. + + +## bunyan 1.3.6 + +- [issue #244] Make `bunyan` defensive on `res.header=null`. + + +## bunyan 1.3.5 + +- [issue #233] Make `bunyan` defensive on res.header as a boolean. +- [issue #242] Make `bunyan` defensive on err.stack not being a string. + + +## bunyan 1.3.4 + +- Allow `log.child(...)` to work even if the logger is a *sub-class* + of Bunyan's Logger class. +- [issue #219] Hide 'source-map-support' require from browserify. +- [issue #218] Reset `haveNonRawStreams` on `.addStream`. + + +## bunyan 1.3.3 + +- [pull #127] Update to dtrace-provider 0.4.0, which gives io.js 1.x support + for dtrace-y parts of Bunyan. + + +## bunyan 1.3.2 + +- [pull #182] Fallback to using the optional 'safe-json-stringify' module + if `JSON.stringify` throws -- possibly with an enumerable property + getter than throws. By Martin Gausby. + + +## bunyan 1.3.1 + +- Export `bunyan.RotatingFileStream` which is needed if one wants to + customize it. E.g. see issue #194. + +- [pull #122] Source Map support for caller line position for [the "src" + field](https://github.com/trentm/node-bunyan#src). This could be interesting + for [CoffeeScript](http://coffeescript.org/documentation/docs/sourcemap.html) + users of Bunyan. By Manuel Schneider. + +- [issue #164] Ensure a top-level `level` given in `bunyan.createLogger` + is *used* for given `streams`. For example, ensure that the following + results in the stream having a DEBUG level: + + var log = bunyan.createLogger({ + name: 'foo', + level: 'debug', + streams: [ + { + path: '/var/tmp/foo.log' + } + ] + }); + + This was broken in the 1.0.1 release. Between that release and 1.3.0 + the "/var/tmp/foo.log" stream would be at the INFO level (Bunyan's + default level). + + +## bunyan 1.3.0 + +- [issue #103] `bunyan -L` (or `bunyan --time local`) to show local time. + Bunyan log records store `time` in UTC time. Sometimes it is convenient + to display in local time. + +- [issue #205] Fix the "The Bunyan CLI crashed!" checking to properly warn of + the common failure case when `-c CONDITION` is being used. + + +## bunyan 1.2.4 + +- [issue #210] Export `bunyan.nameFromLevel` and `bunyan.levelFromName`. It can + be a pain for custom streams to have to reproduce that. + +- [issue #100] Gracefully handle the case of an unbound + `Logger.{info,debug,...}` being used for logging, e.g.: + + myEmittingThing.on('data', log.info) + + Before this change, bunyan would throw. Now it emits a warning to stderr + *once*, and then silently ignores those log attempts, e.g.: + + bunyan usage error: /Users/trentm/tm/node-bunyan/foo.js:12: attempt to log with an unbound log method: `this` is: { _events: { data: [Function] } } + + +## bunyan 1.2.3 + +- [issue #184] Fix log rotation for rotation periods > ~25 days. Before this + change, a rotation period longer than this could hit [the maximum setTimeout + delay in node.js](https://github.com/joyent/node/issues/8656). By Daniel Juhl. + + +## bunyan 1.2.2 + +- Drop the guard that a bunyan Logger level must be between TRACE (10) + and FATAL (60), inclusive. This allows a trick of setting the level + to `FATAL + 1` to turn logging off. While the standard named log levels are + the golden path, then intention was not to get in the way of using + other level numbers. + + +## bunyan 1.2.1 + +- [issue #178, #181] Get at least dtrace-provider 0.3.1 for + optionalDependencies to get a fix for install with decoupled npm (e.g. with + homebrew's node and npm). + + +## bunyan 1.2.0 + +- [issue #157] Restore dtrace-provider as a dependency (in + "optionalDependencies"). + + Dtrace-provider version 0.3.0 add build sugar that should eliminate the + problems from older versions: + The build is not attempted on Linux and Windows. The build spew is + *not* emitted by default (use `V=1 npm install` to see it); instead a + short warning is emitted if the build fails. + + Also, importantly, the new dtrace-provider fixes working with node + v0.11/0.12. + + +## bunyan 1.1.3 + +- [issue #165] Include extra `err` fields in `bunyan` CLI output. Before + this change only the fields part of the typical node.js error stack + (err.stack, err.message, err.name) would be emitted, even though + the Bunyan *library* would typically include err.code and err.signal + in the raw JSON log record. + + +## bunyan 1.1.2 + +- Fix a breakage in `log.info(err)` on a logger with no serializers. + + +## bunyan 1.1.1 + +Note: *Bad release.* It breaks `log.info(err)` on a logger with no serializers. +Use version 1.1.2. + +- [pull #168] Fix handling of `log.info(err)` to use the `log` Logger's `err` + serializer if it has one, instead of always using the core Bunyan err + serializer. (By Mihai Tomescu.) + + +## bunyan 1.1.0 + +- [issue #162] Preliminary support for [browserify](http://browserify.org/). + See [the section in the README](../README.md#browserify). + + +## bunyan 1.0.1 + +- [issues #105, #138, #151] Export `.addStream(...)` and + `.addSerializers(...)` to be able to add them after Logger creation. + Thanks @andreineculau! + +- [issue #159] Fix bad handling in construtor guard intending to allow + creation without "new": `var log = Logger(...)`. Thanks @rmg! + +- [issue #156] Smaller install size via .npmignore file. + +- [issue #126, #161] Ignore SIGINT (Ctrl+C) when processing stdin. `...| bunyan` + should expect the preceding process in the pipeline to handle SIGINT. While + it is doing so, `bunyan` should continue to process any remaining output. + Thanks @timborodin and @jnordberg! + +- [issue #160] Stop using ANSI 'grey' in `bunyan` CLI output, because of the + problems that causes with Solarized Dark themes (see + ). + + +## bunyan 1.0.0 + +- [issue #87] **Backward incompatible change to `-c CODE`** improving + performance by over 10x (good!), with a backward incompatible change to + semantics (unfortunate), and adding some sugar (good!). + + The `-c CODE` implementation was changed to use a JS function for processing + rather than `vm.runInNewContext`. The latter was specatularly slow, so + won't be missed. Unfortunately this does mean a few semantic differences in + the `CODE`, the most noticeable of which is that **`this` is required to + access the object fields:** + + # Bad. Works with bunyan 0.x but not 1.x. + $ bunyan -c 'pid === 123' foo.log + ... + + # Good. Works with all versions of bunyan + $ bunyan -c 'this.pid === 123' foo.log + ... + + The old behaviour of `-c` can be restored with the `BUNYAN_EXEC=vm` + environment variable: + + $ BUNYAN_EXEC=vm bunyan -c 'pid === 123' foo.log + ... + + Some sugar was also added: the TRACE, DEBUG, ... constants are defined, so + one can: + + $ bunyan -c 'this.level >= ERROR && this.component === "http"' foo.log + ... + + And example of the speed improvement on a 10 MiB log example: + + $ time BUNYAN_EXEC=vm bunyan -c 'this.level === ERROR' big.log | cat >slow + + real 0m6.349s + user 0m6.292s + sys 0m0.110s + + $ time bunyan -c 'this.level === ERROR' big.log | cat >fast + + real 0m0.333s + user 0m0.303s + sys 0m0.028s + + The change was courtesy Patrick Mooney (https://github.com/pfmooney). Thanks! + +- Add `bunyan -0 ...` shortcut for `bunyan -o bunyan ...`. + +- [issue #135] **Backward incompatible.** Drop dtrace-provider even from + `optionalDependencies`. Dtrace-provider has proven a consistent barrier to + installing bunyan, because it is a binary dep. Even as an *optional* dep it + still caused confusion and install noise. + + Users of Bunyan on dtrace-y platforms (SmartOS, Mac, Illumos, Solaris) will + need to manually `npm install dtrace-provider` themselves to get [Bunyan's + dtrace support](https://github.com/trentm/node-bunyan#runtime-log-snooping-via-dtrace) + to work. If not installed, bunyan should stub it out properly. + + + +## bunyan 0.23.1 + +- [pull #125, pull #97, issue #73] Unref rotating-file timeout which was + preventing processes from exiting (by https://github.com/chakrit and + https://github.com/glenn-murray-bse). Note: this only fixes the issue + for node 0.10 and above. + + +## bunyan 0.23.0 + +- [issue #139] Fix `bunyan` crash on a log record with `res.header` that is an + object. A side effect of this improvement is that a record with `res.statusCode` + but no header info will render a response block, for example: + + [2012-08-08T10:25:47.637Z] INFO: my-service/12859 on my-host: some message (...) + ... + -- + HTTP/1.1 200 OK + -- + ... + +- [pull #42] Fix `bunyan` crash on a log record with `req.headers` that is a *string* + (by https://github.com/aexmachina). + +- Drop node 0.6 support. I can't effectively `npm install` with a node 0.6 + anymore. + +- [issue #85] Ensure logging a non-object/non-string doesn't throw (by + https://github.com/mhart). This changes fixes: + + log.info() # TypeError: Object.keys called on non-object + log.info() # "msg":"" (instead of wanted "msg":"[Function]") + log.info() # "msg":"" (instead of wanted "msg":util.format()) + + +## bunyan 0.22.3 + +- Republish the same code to npm. + + +## bunyan 0.22.2 + +Note: Bad release. The published package in the npm registry got corrupted. Use 0.22.3 or later. + +- [issue #131] Allow `log.info()` and, most importantly, don't crash on that. + +- Update 'mv' optional dep to latest. + + +## bunyan 0.22.1 + +- [issue #111] Fix a crash when attempting to use `bunyan -p` on a platform without + dtrace. + +- [issue #101] Fix a crash in `bunyan` rendering a record with unexpected "res.headers". + + +## bunyan 0.22.0 + +- [issue #104] `log.reopenFileStreams()` convenience method to be used with external log + rotation. + + +## bunyan 0.21.4 + +- [issue #96] Fix `bunyan` to default to paging (with `less`) by default in node 0.10.0. + The intention has always been to default to paging for node >=0.8. + + +## bunyan 0.21.3 + +- [issue #90] Fix `bunyan -p '*'` breakage in version 0.21.2. + + +## bunyan 0.21.2 + +**Note: Bad release. The switchrate change below broke `bunyan -p '*'` usage +(see issue #90). Use 0.21.3 or later.** + +- [issue #88] Should be able to efficiently combine "-l" with "-p *". + +- Avoid DTrace buffer filling up, e.g. like this: + + $ bunyan -p 42241 > /tmp/all.log + dtrace: error on enabled probe ID 3 (ID 75795: bunyan42241:mod-87ea640:log-trace:log-trace): out of scratch space in action #1 at DIF offset 12 + dtrace: error on enabled probe ID 3 (ID 75795: bunyan42241:mod-87ea640:log-trace:log-trace): out of scratch space in action #1 at DIF offset 12 + dtrace: 138 drops on CPU 4 + ... + + From Bryan: "the DTrace buffer is filling up because the string size is so + large... by increasing the switchrate, you're increasing the rate at + which that buffer is emptied." + + +## bunyan 0.21.1 + +- [pull #83] Support rendering 'client_res' key in bunyan CLI (by + github.com/mcavage). + + +## bunyan 0.21.0 + +- 'make check' clean, 4-space indenting. No functional change here, just + lots of code change. +- [issue #80, #82] Drop assert that broke using 'rotating-file' with + a default `period` (by github.com/ricardograca). + + +## bunyan 0.20.0 + +- [Slight backward incompatibility] Fix serializer bug introduced in 0.18.3 + (see below) to only apply serializers to log records when appropriate. + + This also makes a semantic change to custom serializers. Before this change + a serializer function was called for a log record key when that value was + truth-y. The semantic change is to call the serializer function as long + as the value is not `undefined`. That means that a serializer function + should handle falsey values such as `false` and `null`. + +- Update to latest 'mv' dep (required for rotating-file support) to support + node v0.10.0. + + +## bunyan 0.19.0 + +**WARNING**: This release includes a bug introduced in bunyan 0.18.3 (see +below). Please upgrade to bunyan 0.20.0. + +- [Slight backward incompatibility] Change the default error serialization + (a.k.a. `bunyan.stdSerializers.err`) to *not* serialize all additional + attributes of the given error object. This is an open door to unsafe logging + and logging should always be safe. With this change, error serialization + will log these attributes: message, name, stack, code, signal. The latter + two are added because some core node APIs include those fields (e.g. + `child_process.exec`). + + Concrete examples where this has hurt have been the "domain" change + necessitating 0.18.3 and a case where + [node-restify](https://github.com/mcavage/node-restify) uses an error object + as the response object. When logging the `err` and `res` in the same log + statement (common for restify audit logging), the `res.body` would be JSON + stringified as '[Circular]' as it had already been emitted for the `err` key. + This results in a WTF with the bunyan CLI because the `err.body` is not + rendered. + + If you need the old behaviour back you will need to do this: + + var bunyan = require('bunyan'); + var errSkips = { + // Skip domain keys. `domain` especially can have huge objects that can + // OOM your app when trying to JSON.stringify. + domain: true, + domain_emitter: true, + domain_bound: true, + domain_thrown: true + }; + bunyan.stdSerializers.err = function err(err) { + if (!err || !err.stack) + return err; + var obj = { + message: err.message, + name: err.name, + stack: getFullErrorStack(err) + } + Object.keys(err).forEach(function (k) { + if (err[k] !== undefined && !errSkips[k]) { + obj[k] = err[k]; + } + }); + return obj; + }; + +- "long" and "bunyan" output formats for the CLI. `bunyan -o long` is the default + format, the same as before, just called "long" now instead of the cheesy "paul" + name. The "bunyan" output format is the same as "json-0", just with a more + convenient name. + + +## bunyan 0.18.3 + +**WARNING**: This release introduced a bug such that all serializers are +applied to all log records even if the log record did not contain the key +for that serializer. If a logger serializer function does not handle +being given `undefined`, then you'll get warnings like this on stderr: + + bunyan: ERROR: This should never happen. This is a bug in or in this application. Exception from "foo" Logger serializer: Error: ... + at Object.bunyan.createLogger.serializers.foo (.../myapp.js:20:15) + at Logger._applySerializers (.../lib/bunyan.js:644:46) + at Array.forEach (native) + at Logger._applySerializers (.../lib/bunyan.js:640:33) + ... + +and the following junk in written log records: + + "foo":"(Error in Bunyan log "foo" serializer broke field. See stderr for details.)" + +Please upgrade to bunyan 0.20.0. + + +- Change the `bunyan.stdSerializers.err` serializer for errors to *exclude* + [the "domain*" keys](http://nodejs.org/docs/latest/api/all.html#all_additions_to_error_objects). + `err.domain` will include its assigned members which can arbitrarily large + objects that are not intended for logging. + +- Make the "dtrace-provider" dependency optional. I hate to do this, but + installing bunyan on Windows is made very difficult with this as a required + dep. Even though "dtrace-provider" stubs out for non-dtrace-y platforms, + without a compiler and Python around, node-gyp just falls over. + + +## bunyan 0.18.2 + +- [pull #67] Remove debugging prints in rotating-file support. + (by github.com/chad3814). +- Update to dtrace-provider@0.2.7. + + +## bunyan 0.18.1 + +- Get the `bunyan` CLI to **not** automatically page (i.e. pipe to `less`) + if stdin isn't a TTY, or if following dtrace probe output (via `-p PID`), + or if not given log file arguments. + + +## bunyan 0.18.0 + +- Automatic paging support in the `bunyan` CLI (similar to `git log` et al). + IOW, `bunyan` will open your pager (by default `less`) and pipe rendered + log output through it. A main benefit of this is getting colored logs with + a pager without the pain. Before you had to explicit use `--color` to tell + bunyan to color output when the output was not a TTY: + + bunyan foo.log --color | less -R # before + bunyan foo.log # now + + Disable with the `--no-pager` option or the `BUNYAN_NO_PAGER=1` environment + variable. + + Limitations: Only supported for node >=0.8. Windows is not supported (at + least not yet). + +- Switch test suite to nodeunit (still using a node-tap'ish API via + a helper). + + +## bunyan 0.17.0 + +- [issue #33] Log rotation support: + + var bunyan = require('bunyan'); + var log = bunyan.createLogger({ + name: 'myapp', + streams: [{ + type: 'rotating-file', + path: '/var/log/myapp.log', + count: 7, + period: 'daily' + }] + }); + + +- Tweak to CLI default pretty output: don't special case "latency" field. + The special casing was perhaps nice, but less self-explanatory. + Before: + + [2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (15ms, audit=true, bar=baz) + GET /foo + ... + + After: + + [2012-12-27T21:17:38.218Z] INFO: audit/45769 on myserver: handled: 200 (audit=true, bar=baz, latency=15) + GET /foo + ... + +- *Exit* CLI on EPIPE, otherwise we sit there useless processing a huge log + file with, e.g. `bunyan huge.log | head`. + + +## bunyan 0.16.8 + +- Guards on `-c CONDITION` usage to attempt to be more user friendly. + Bogus JS code will result in this: + + $ bunyan portal.log -c 'this.req.username==boo@foo' + bunyan: error: illegal CONDITION code: SyntaxError: Unexpected token ILLEGAL + CONDITION script: + Object.prototype.TRACE = 10; + Object.prototype.DEBUG = 20; + Object.prototype.INFO = 30; + Object.prototype.WARN = 40; + Object.prototype.ERROR = 50; + Object.prototype.FATAL = 60; + this.req.username==boo@foo + Error: + SyntaxError: Unexpected token ILLEGAL + at new Script (vm.js:32:12) + at Function.Script.createScript (vm.js:48:10) + at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:465:27) + at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16) + at Object. (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3) + at Module._compile (module.js:449:26) + at Object.Module._extensions..js (module.js:467:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Module.runMain (module.js:492:10) + + And all CONDITION scripts will be run against a minimal valid Bunyan + log record to ensure they properly guard against undefined values + (at least as much as can reasonably be checked). For example: + + $ bunyan portal.log -c 'this.req.username=="bob"' + bunyan: error: CONDITION code cannot safely filter a minimal Bunyan log record + CONDITION script: + Object.prototype.TRACE = 10; + Object.prototype.DEBUG = 20; + Object.prototype.INFO = 30; + Object.prototype.WARN = 40; + Object.prototype.ERROR = 50; + Object.prototype.FATAL = 60; + this.req.username=="bob" + Minimal Bunyan log record: + { + "v": 0, + "level": 30, + "name": "name", + "hostname": "hostname", + "pid": 123, + "time": 1355514346206, + "msg": "msg" + } + Filter error: + TypeError: Cannot read property 'username' of undefined + at bunyan-condition-0:7:9 + at Script.Object.keys.forEach.(anonymous function) [as runInNewContext] (vm.js:41:22) + at parseArgv (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:477:18) + at main (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1252:16) + at Object. (/Users/trentm/tm/node-bunyan-0.x/bin/bunyan:1330:3) + at Module._compile (module.js:449:26) + at Object.Module._extensions..js (module.js:467:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Module.runMain (module.js:492:10) + + A proper way to do that condition would be: + + $ bunyan portal.log -c 'this.req && this.req.username=="bob"' + + + +## bunyan 0.16.7 + +- [issue #59] Clear a possibly interrupted ANSI color code on signal + termination. + + +## bunyan 0.16.6 + +- [issue #56] Support `bunyan -p NAME` to dtrace all PIDs matching 'NAME' in + their command and args (using `ps -A -o pid,command | grep NAME` or, on SunOS + `pgrep -lf NAME`). E.g.: + + bunyan -p myappname + + This is useful for usage of node's [cluster + module](http://nodejs.org/docs/latest/api/all.html#all_cluster) where you'll + have multiple worker processes. + + +## bunyan 0.16.5 + +- Allow `bunyan -p '*'` to capture bunyan dtrace probes from **all** processes. +- issue #55: Add support for `BUNYAN_NO_COLOR` environment variable to + turn off all output coloring. This is still overridden by the `--color` + and `--no-color` options. + + +## bunyan 0.16.4 + +- issue #54: Ensure (again, see 0.16.2) that stderr from the dtrace child + process (when using `bunyan -p PID`) gets through. There had been a race + between exiting bunyan and the flushing of the dtrace process' stderr. + + +## bunyan 0.16.3 + +- Drop 'trentm-dtrace-provider' fork dep now that + has been resolved. + Back to dtrace-provider. + + +## bunyan 0.16.2 + +- Ensure that stderr from the dtrace child process (when using `bunyan -p PID`) + gets through. The `pipe` usage wasn't working on SmartOS. This is important + to show the user if they need to 'sudo'. + + +## bunyan 0.16.1 + +- Ensure that a possible dtrace child process (with using `bunyan -p PID`) is + terminated on signal termination of the bunyan CLI (at least for SIGINT, + SIGQUIT, SIGTERM, SIGHUP). + + +## bunyan 0.16.0 + +- Add `bunyan -p PID` support. This is a convenience wrapper that effectively + calls: + + dtrace -x strsize=4k -qn 'bunyan$PID:::log-*{printf("%s", copyinstr(arg0))}' | bunyan + + +## bunyan 0.15.0 + +- issue #48: Dtrace support! The elevator pitch is you can watch all logging + from all Bunyan-using process with something like this: + + dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%d: %s: %s", pid, probefunc, copyinstr(arg0))}' + + And this can include log levels *below* what the service is actually configured + to log. E.g. if the service is only logging at INFO level and you need to see + DEBUG log messages, with this you can. Obviously this only works on dtrace-y + platforms: Illumos derivatives of SunOS (e.g. SmartOS, OmniOS), Mac, FreeBSD. + + Or get the bunyan CLI to render logs nicely: + + dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%s", copyinstr(arg0))}' | bunyan + + See for details. By + Bryan Cantrill. + + +## bunyan 0.14.6 + +- Export `bunyan.safeCycles()`. This may be useful for custom `type == "raw"` + streams that may do JSON stringification of log records themselves. Usage: + + var str = JSON.stringify(rec, bunyan.safeCycles()); + +- [issue #49] Allow a `log.child()` to specify the level of inherited streams. + For example: + + # Before + var childLog = log.child({...}); + childLog.level('debug'); + + # After + var childLog = log.child({..., level: 'debug'}); + +- Improve the Bunyan CLI crash message to make it easier to provide relevant + details in a bug report. + + +## bunyan 0.14.5 + +- Fix a bug in the long-stack-trace error serialization added in 0.14.4. The + symptom: + + bunyan@0.14.4: .../node_modules/bunyan/lib/bunyan.js:1002 + var ret = ex.stack || ex.toString(); + ^ + TypeError: Cannot read property 'stack' of undefined + at getFullErrorStack (.../node_modules/bunyan/lib/bunyan.js:1002:15) + ... + + +## bunyan 0.14.4 + +- **Bad release. Use 0.14.5 instead.** +- Improve error serialization to walk the chain of `.cause()` errors + from the likes of `WError` or `VError` error classes from + [verror](https://github.com/davepacheco/node-verror) and + [restify v2.0](https://github.com/mcavage/node-restify). Example: + + [2012-10-11T00:30:21.871Z] ERROR: imgapi/99612 on 0525989e-2086-4270-b960-41dd661ebd7d: my-message + ValidationFailedError: my-message; caused by TypeError: cause-error-message + at Server.apiPing (/opt/smartdc/imgapi/lib/app.js:45:23) + at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50) + at Server.setupReq (/opt/smartdc/imgapi/lib/app.js:178:9) + at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50) + at Server.parseBody (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/body_parser.js:15:33) + at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50) + at Server.parseQueryString (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/query.js:40:25) + at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50) + at Server._run (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:579:17) + at Server._handle.log.trace.req (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:480:38) + Caused by: TypeError: cause-error-message + at Server.apiPing (/opt/smartdc/imgapi/lib/app.js:40:25) + at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50) + at Server.setupReq (/opt/smartdc/imgapi/lib/app.js:178:9) + at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50) + at Server.parseBody (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/body_parser.js:15:33) + at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50) + at Server.parseQueryString (/opt/smartdc/imgapi/node_modules/restify/lib/plugins/query.js:40:25) + at next (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:550:50) + at Server._run (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:579:17) + at Server._handle.log.trace.req (/opt/smartdc/imgapi/node_modules/restify/lib/server.js:480:38) + + +## bunyan 0.14.2 + +- [issue #45] Fix bunyan CLI (default output mode) to not crash on a 'res' + field that isn't a response object, but a string. + + +## bunyan 0.14.1 + +- [issue #44] Fix the default `bunyan` CLI output of a `res.body` that is an + object instead of a string. See issue#38 for the same with `req.body`. + + +## bunyan 0.14.0 + +- [pull #41] Safe `JSON.stringify`ing of emitted log records to avoid blowing + up on circular objects (by Isaac Schlueter). + + +## bunyan 0.13.5 + +- [issue #39] Fix a bug with `client_req` handling in the default output + of the `bunyan` CLI. + + +## bunyan 0.13.4 + +- [issue #38] Fix the default `bunyan` CLI output of a `req.body` that is an + object instead of a string. + + +## bunyan 0.13.3 + +- Export `bunyan.resolveLevel(NAME-OR-NUM)` to resolve a level name or number + to its log level number value: + + > bunyan.resolveLevel('INFO') + 30 + > bunyan.resolveLevel('debug') + 20 + + A side-effect of this change is that the uppercase level name is now allowed + in the logger constructor. + + +## bunyan 0.13.2 + +- [issue #35] Ensure that an accidental `log.info(BUFFER)`, where BUFFER is + a node.js Buffer object, doesn't blow up. + + +## bunyan 0.13.1 + +- [issue #34] Ensure `req.body`, `res.body` and other request/response fields + are emitted by the `bunyan` CLI (mostly by Rob Gulewich). + + + +## bunyan 0.13.0 + +- [issue #31] Re-instate defines for the (uppercase) log level names (TRACE, + DEBUG, etc.) in `bunyan -c "..."` filtering condition code. E.g.: + + $ ... | bunyan -c 'level >= ERROR' + + +## bunyan 0.12.0 + +- [pull #32] `bunyan -o short` for more concise output (by Dave Pacheco). E.g.: + + 22:56:52.856Z INFO myservice: My message + + instead of: + + [2012-02-08T22:56:52.856Z] INFO: myservice/123 on example.com: My message + + +## bunyan 0.11.3 + +- Add '--strict' option to `bunyan` CLI to suppress all but legal Bunyan JSON + log lines. By default non-JSON, and non-Bunyan lines are passed through. + + +## bunyan 0.11.2 + +- [issue #30] Robust handling of 'req' field without a 'headers' subfield + in `bunyan` CLI. +- [issue #31] Pull the TRACE, DEBUG, et al defines from `bunyan -c "..."` + filtering code. This was added in v0.11.1, but has a significant adverse + affect. + + +## bunyan 0.11.1 + +- **Bad release. The TRACE et al names are bleeding into the log records + when using '-c'.** +- Add defines for the (uppercase) log level names (TRACE, DEBUG, etc.) in + `bunyan -c "..."` filtering condition code. E.g.: + + $ ... | bunyan -c 'level >= ERROR' + + +## bunyan 0.11.0 + +- [pull #29] Add -l/--level for level filtering, and -c/--condition for + arbitrary conditional filtering (by github.com/isaacs): + + $ ... | bunyan -l error # filter out log records below error + $ ... | bunyan -l 50 # numeric value works too + $ ... | bunyan -c 'level===50' # equiv with -c filtering + $ ... | bunyan -c 'pid===123' # filter on any field + $ ... | bunyan -c 'pid===123' -c '_audit' # multiple filters + + +## bunyan 0.10.0 + +- [pull #24] Support for gzip'ed log files in the bunyan CLI (by + github.com/mhart): + + $ bunyan foo.log.gz + ... + + +## bunyan 0.9.0 + +- [pull #16] Bullet proof the `bunyan.stdSerializers` (by github.com/rlidwka). + +- [pull #15] The `bunyan` CLI will now chronologically merge multiple log + streams when it is given multiple file arguments. (by github.com/davepacheco) + + $ bunyan foo.log bar.log + ... merged log records ... + +- [pull #15] A new `bunyan.RingBuffer` stream class that is useful for + keeping the last N log messages in memory. This can be a fast way to keep + recent, and thus hopefully relevant, log messages. (by @dapsays, + github.com/davepacheco) + + Potential uses: Live debugging if a running process could inspect those + messages. One could dump recent log messages at a finer log level than is + typically logged on + [`uncaughtException`](http://nodejs.org/docs/latest/api/all.html#all_event_uncaughtexception). + + var ringbuffer = new bunyan.RingBuffer({ limit: 100 }); + var log = new bunyan({ + name: 'foo', + streams: [{ + type: 'raw', + stream: ringbuffer, + level: 'debug' + }] + }); + + log.info('hello world'); + console.log(ringbuffer.records); + +- Add support for "raw" streams. This is a logging stream that is given + raw log record objects instead of a JSON-stringified string. + + function Collector() { + this.records = []; + } + Collector.prototype.write = function (rec) { + this.records.push(rec); + } + var log = new Logger({ + name: 'mylog', + streams: [{ + type: 'raw', + stream: new Collector() + }] + }); + + See "examples/raw-stream.js". I expect raw streams to be useful for + piping Bunyan logging to separate services (e.g. , + ) or to separate in-process handling. + +- Add test/corpus/*.log files (accidentally excluded) so the test suite + actually works(!). + + +## bunyan 0.8.0 + +- [pull #21] Bunyan loggers now re-emit `fs.createWriteStream` error events. + By github.com/EvanOxfeld. See "examples/handle-fs-error.js" and + "test/error-event.js" for details. + + var log = new Logger({name: 'mylog', streams: [{path: FILENAME}]}); + log.on('error', function (err, stream) { + // Handle error writing to or creating FILENAME. + }); + +- jsstyle'ing (via `make check`) + + +## bunyan 0.7.0 + +- [issue #12] Add `bunyan.createLogger(OPTIONS)` form, as is more typical in + node.js APIs. This'll eventually become the preferred form. + + +## bunyan 0.6.9 + +- Change `bunyan` CLI default output to color "src" info red. Before the "src" + information was uncolored. The "src" info is the filename, line number and + function name resulting from using `src: true` in `Logger` creation. I.e., + the `(/Users/trentm/tm/node-bunyan/examples/hi.js:10)` in: + + [2012-04-10T22:28:58.237Z] INFO: myapp/39339 on banana.local (/Users/trentm/tm/node-bunyan/examples/hi.js:10): hi + +- Tweak `bunyan` CLI default output to still show an "err" field if it doesn't + have a "stack" attribute. + + +## bunyan 0.6.8 + +- Fix bad bug in `log.child({...}, true);` where the added child fields **would + be added to the parent's fields**. This bug only existed for the "fast child" + path (that second `true` argument). A side-effect of fixing this is that + the "fast child" path is only 5 times as fast as the regular `log.child`, + instead of 10 times faster. + + +## bunyan 0.6.7 + +- [issue #6] Fix bleeding 'type' var to global namespace. (Thanks Mike!) + + +## bunyan 0.6.6 + +- Add support to the `bunyan` CLI taking log file path args, `bunyan foo.log`, + in addition to the usual `cat foo.log | bunyan`. +- Improve reliability of the default output formatting of the `bunyan` CLI. + Before it could blow up processing log records missing some expected + fields. + + +## bunyan 0.6.5 + +- ANSI coloring output from `bunyan` CLI tool (for the default output mode/style). + Also add the '--color' option to force coloring if the output stream is not + a TTY, e.g. `cat my.log | bunyan --color | less -R`. Use `--no-color` to + disable coloring, e.g. if your terminal doesn't support ANSI codes. +- Add 'level' field to log record before custom fields for that record. This + just means that the raw record JSON will show the 'level' field earlier, + which is a bit nicer for raw reading. + + +## bunyan 0.6.4 + +- [issue #5] Fix `log.info() -> boolean` to work properly. Previous all were + returning false. Ditto all trace/debug/.../fatal methods. + + +## bunyan 0.6.3 + +- Allow an optional `msg` and arguments to the `log.info( err)` logging + form. For example, before: + + log.debug(my_error_instance) // good + log.debug(my_error_instance, "boom!") // wasn't allowed + + Now the latter is allowed if you want to expliciting set the log msg. Of course + this applies to all the `log.{trace|debug|info...}()` methods. + +- `bunyan` cli output: clarify extra fields with quoting if empty or have + spaces. E.g. 'cmd' and 'stderr' in the following: + + [2012-02-12T00:30:43.736Z] INFO: mo-docs/43194 on banana.local: buildDocs results (req_id=185edca2-2886-43dc-911c-fe41c09ec0f5, route=PutDocset, error=null, stderr="", cmd="make docs") + + +## bunyan 0.6.2 + +- Fix/guard against unintended inclusion of some files in npm published package + due to + + +## bunyan 0.6.1 + +- Internal: starting jsstyle usage. +- Internal: add .npmignore. Previous packages had reams of bunyan crud in them. + + +## bunyan 0.6.0 + +- Add 'pid' automatic log record field. + + +## bunyan 0.5.3 + +- Add 'client_req' (HTTP client request) standard formatting in `bunyan` CLI + default output. +- Improve `bunyan` CLI default output to include *all* log record keys. Unknown keys + are either included in the first line parenthetical (if short) or in the indented + subsequent block (if long or multiline). + + +## bunyan 0.5.2 + +- [issue #3] More type checking of `new Logger(...)` and `log.child(...)` + options. +- Start a test suite. + + +## bunyan 0.5.1 + +- [issue #2] Add guard on `JSON.stringify`ing of log records before emission. + This will prevent `log.info` et al throwing on record fields that cannot be + represented as JSON. An error will be printed on stderr and a clipped log + record emitted with a 'bunyanMsg' key including error details. E.g.: + + bunyan: ERROR: could not stringify log record from /Users/trentm/tm/node-bunyan/examples/unstringifyable.js:12: TypeError: Converting circular structure to JSON + { + "name": "foo", + "hostname": "banana.local", + "bunyanMsg": "bunyan: ERROR: could not stringify log record from /Users/trentm/tm/node-bunyan/examples/unstringifyable.js:12: TypeError: Converting circular structure to JSON", + ... + + Some timing shows this does effect log speed: + + $ node tools/timeguard.js # before + Time try/catch-guard on JSON.stringify: + - log.info: 0.07365ms per iteration + $ node tools/timeguard.js # after + Time try/catch-guard on JSON.stringify: + - log.info: 0.07368ms per iteration + + +## bunyan 0.5.0 + +- Use 10/20/... instead of 1/2/... for level constant values. Ostensibly this + allows for intermediary levels from the defined "trace/debug/..." set. + However, that is discouraged. I'd need a strong user argument to add + support for easily using alternative levels. Consider using a separate + JSON field instead. +- s/service/name/ for Logger name field. "service" is unnecessarily tied + to usage for a service. No need to differ from log4j Logger "name". +- Add `log.level(...)` and `log.levels(...)` API for changing logger stream + levels. +- Add `TRACE|DEBUG|INFO|WARN|ERROR|FATAL` level constants to exports. +- Add `log.info(err)` special case for logging an `Error` instance. For + example `log.info(new TypeError("boom")` will produce: + + ... + "err": { + "message": "boom", + "name": "TypeError", + "stack": "TypeError: boom\n at Object. ..." + }, + "msg": "boom", + ... + + +## bunyan 0.4.0 + +- Add `new Logger({src: true})` config option to have a 'src' attribute be + automatically added to log records with the log call source info. Example: + + "src": { + "file": "/Users/trentm/tm/node-bunyan/examples/src.js", + "line": 20, + "func": "Wuzzle.woos" + }, + + +## bunyan 0.3.0 + +- `log.child(options[, simple])` Added `simple` boolean arg. Set `true` to + assert that options only add fields (no config changes). Results in a 10x + speed increase in child creation. See "tools/timechild.js". On my Mac, + "fast child" creation takes about 0.001ms. IOW, if your app is dishing + 10,000 req/s, then creating a log child for each request will take + about 1% of the request time. +- `log.clone` -> `log.child` to better reflect the relationship: streams and + serializers are inherited. Streams can't be removed as part of the child + creation. The child doesn't own the parent's streams (so can't close them). +- Clean up Logger creation. The goal here was to ensure `log.child` usage + is fast. TODO: measure that. +- Add `Logger.stdSerializers.err` serializer which is necessary to get good + Error object logging with node 0.6 (where core Error object properties + are non-enumerable). + + +## bunyan 0.2.0 + +- Spec'ing core/recommended log record fields. +- Add `LOG_VERSION` to exports. +- Improvements to request/response serializations. + + +## bunyan 0.1.0 + +First release. diff --git a/packages/logging/.npm/package/node_modules/bunyan/LICENSE.txt b/packages/logging/.npm/package/node_modules/bunyan/LICENSE.txt new file mode 100644 index 0000000..964efc1 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/LICENSE.txt @@ -0,0 +1,23 @@ +# This is the MIT license + +Copyright (c) 2011-2012 Joyent Inc. + +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. + diff --git a/packages/logging/.npm/package/node_modules/bunyan/Makefile b/packages/logging/.npm/package/node_modules/bunyan/Makefile new file mode 100644 index 0000000..082f3ca --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/Makefile @@ -0,0 +1,136 @@ + +#---- Tools + +NODEUNIT := ./node_modules/.bin/nodeunit +SUDO := sudo +ifeq ($(shell uname -s),SunOS) + # On SunOS (e.g. SmartOS) we expect to run the test suite as the + # root user -- necessary to run dtrace. Therefore `pfexec` isn't + # necessary. + SUDO := +endif +DTRACE_UP_IN_HERE= +ifeq ($(shell uname -s),SunOS) + DTRACE_UP_IN_HERE=1 +endif +ifeq ($(shell uname -s),Darwin) + DTRACE_UP_IN_HERE=1 +endif +NODEOPT ?= $(HOME)/opt + + + +#---- Files + +JSSTYLE_FILES := $(shell find lib test tools examples -name "*.js") bin/bunyan +# All test files *except* dtrace.test.js. +NON_DTRACE_TEST_FILES := $(shell ls -1 test/*.test.js | grep -v dtrace | xargs) + + + +#---- Targets + +all $(NODEUNIT): + npm install + +# Ensure all version-carrying files have the same version. +.PHONY: versioncheck +versioncheck: + @echo version is: $(shell cat package.json | json version) + [[ `cat package.json | json version` == `grep '^## ' CHANGES.md | head -1 | awk '{print $$3}'` ]] + [[ `cat package.json | json version` == `grep '^var VERSION' bin/bunyan | awk -F"'" '{print $$2}'` ]] + [[ `cat package.json | json version` == `grep '^var VERSION' lib/bunyan.js | awk -F"'" '{print $$2}'` ]] + @echo Version check ok. + +.PHONY: cutarelease +cutarelease: versioncheck check + [[ `git status | tail -n1 | cut -c1-17` == "nothing to commit" ]] + ./tools/cutarelease.py -p bunyan -f package.json -f lib/bunyan.js -f bin/bunyan + +.PHONY: docs +docs: + @[[ `which ronn` ]] || (echo "No 'ronn' on your PATH. Install with 'gem install ronn'" && exit 2) + mkdir -p man/man1 + ronn --style=toc --manual="bunyan manual" --date=$(shell git log -1 --pretty=format:%cd --date=short) --roff --html docs/bunyan.1.ronn + python -c 'import sys; h = open("docs/bunyan.1.html").read(); h = h.replace(".mp dt.flush {float:left;width:8ex}", ""); open("docs/bunyan.1.html", "w").write(h)' + python -c 'import sys; h = open("docs/bunyan.1.html").read(); h = h.replace("", """Fork me on GitHub"""); open("docs/bunyan.1.html", "w").write(h)' + @echo "# test with 'man ./docs/bunyan.1' and 'open ./docs/bunyan.1.html'" + +.PHONY: publish +publish: + mkdir -p tmp + [[ -d tmp/bunyan-gh-pages ]] || git clone git@github.com:trentm/node-bunyan.git tmp/bunyan-gh-pages + cd tmp/bunyan-gh-pages && git checkout gh-pages && git pull --rebase origin gh-pages + cp docs/index.html tmp/bunyan-gh-pages/index.html + cp docs/bunyan.1.html tmp/bunyan-gh-pages/bunyan.1.html + (cd tmp/bunyan-gh-pages \ + && git commit -a -m "publish latest docs" \ + && git push origin gh-pages || true) + +.PHONY: distclean +distclean: + rm -rf node_modules + + +#---- test + +.PHONY: test +test: $(NODEUNIT) + test -z "$(DTRACE_UP_IN_HERE)" || test -n "$(SKIP_DTRACE)" || \ + (node -e 'require("dtrace-provider").createDTraceProvider("isthisthingon")' && \ + echo "\nNote: Use 'SKIP_DTRACE=1 make test' to skip parts of the test suite that require root." && \ + $(SUDO) $(NODEUNIT) test/dtrace.test.js) + $(NODEUNIT) $(NON_DTRACE_TEST_FILES) + +# Test will all node supported versions (presumes install locations I use on +# my machine). +# Note: 'test10' is last so (if all is well) I end up with a binary +# dtrace-provider build for node 0.10 (my current version). +.PHONY: testall +testall: test22 test20 test18 test012 test08 test010 + +.PHONY: test22 +test22: + @echo "# Test iojs 2.2.x (with node `$(NODEOPT)/iojs-v2.2/bin/node --version`)" + @$(NODEOPT)/iojs-v2.2/bin/node --version | grep '^v2\.2\.' + #PATH="$(NODEOPT)/iojs-v2.2/bin:$(PATH)" make distclean all test +.PHONY: test20 +test20: + @echo "# Test iojs 2.0.x (with node `$(NODEOPT)/iojs-v2.0/bin/node --version`)" + @$(NODEOPT)/iojs-v2.0/bin/node --version | grep '^v2\.0\.' + PATH="$(NODEOPT)/iojs-v2.0/bin:$(PATH)" make distclean all test +.PHONY: test18 +test18: + @echo "# Test iojs 1.8.x (with node `$(NODEOPT)/iojs-v1.8/bin/node --version`)" + @$(NODEOPT)/iojs-v1.8/bin/node --version | grep '^v1\.8\.' + PATH="$(NODEOPT)/iojs-v1.8/bin:$(PATH)" make distclean all test +.PHONY: test012 +test012: + @echo "# Test node 0.12.x (with node `$(NODEOPT)/node-0.12/bin/node --version`)" + @$(NODEOPT)/node-0.12/bin/node --version | grep '^v0\.12\.' + PATH="$(NODEOPT)/node-0.12/bin:$(PATH)" make distclean all test +.PHONY: test010 +test010: + @echo "# Test node 0.10.x (with node `$(NODEOPT)/node-0.10/bin/node --version`)" + @$(NODEOPT)/node-0.10/bin/node --version | grep '^v0\.10\.' + PATH="$(NODEOPT)/node-0.10/bin:$(PATH)" make distclean all test +.PHONY: test08 +test08: + @echo "# Test node 0.8.x (with node `$(NODEOPT)/node-0.8/bin/node --version`)" + @$(NODEOPT)/node-0.8/bin/node --version | grep '^v0\.8\.' + PATH="$(NODEOPT)/node-0.8/bin:$(PATH)" make distclean all test + + +#---- check + +.PHONY: check-jsstyle +check-jsstyle: $(JSSTYLE_FILES) + ./tools/jsstyle -o indent=4,doxygen,unparenthesized-return=0,blank-after-start-comment=0,leading-right-paren-ok=1 $(JSSTYLE_FILES) + +.PHONY: check +check: check-jsstyle + @echo "Check ok." + +.PHONY: prepush +prepush: check testall + @echo "Okay to push." diff --git a/packages/logging/.npm/package/node_modules/bunyan/README.md b/packages/logging/.npm/package/node_modules/bunyan/README.md new file mode 100644 index 0000000..698d430 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/README.md @@ -0,0 +1,1056 @@ +Bunyan is **a simple and fast JSON logging library** for node.js services: + + var bunyan = require('bunyan'); + var log = bunyan.createLogger({name: "myapp"}); + log.info("hi"); + +and **a `bunyan` CLI tool** for nicely viewing those logs: + +![bunyan CLI screenshot](https://raw.github.com/trentm/node-bunyan/master/tools/screenshot1.png) + +Manifesto: Server logs should be structured. JSON's a good format. Let's do +that. A log record is one line of `JSON.stringify`'d output. Let's also +specify some common names for the requisite and common fields for a log +record (see below). + +Also: log4j is way more than you need. + + +# Current Status + +Solid core functionality is there. Joyent is using this for a number of +production services. Bunyan supports node 0.6 and greater. Follow +@trentmick +for updates to Bunyan. + +There is an email discussion list +[bunyan-logging@googlegroups.com](mailto:bunyan-logging@googlegroups.com), +also [as a forum in the +browser](https://groups.google.com/forum/?fromgroups#!forum/bunyan-logging). + + +# Installation + + npm install bunyan + +**Tip**: The `bunyan` CLI tool is written to be compatible (within reason) with +all versions of Bunyan logs. Therefore you might want to `npm install -g bunyan` +to get the bunyan CLI on your PATH, then use local bunyan installs for +node.js library usage of bunyan in your apps. + + +# Features + +- elegant [log method API](#log-method-api) +- extensible [streams](#streams) system for controlling where log records + go (to a stream, to a file, [log file rotation](#stream-type-rotating-file), + etc.) +- [`bunyan` CLI](#cli-usage) for pretty-printing and filtering of Bunyan logs +- simple include of log call source location (file, line, function) with + [`src: true`](#src) +- lightweight specialization of Logger instances with [`log.child`](#logchild) +- custom rendering of logged objects with ["serializers"](#serializers) +- [Runtime log snooping via Dtrace support](#runtime-log-snooping-via-dtrace) +- Support for [browserify](http://browserify.org/). See [Browserify + section](#browserify) below. + + +# Introduction + +Like most logging libraries you create a Logger instance and call methods +named after the logging levels: + + $ cat hi.js + var bunyan = require('bunyan'); + var log = bunyan.createLogger({name: 'myapp'}); + log.info('hi'); + log.warn({lang: 'fr'}, 'au revoir'); + +All loggers must provide a "name". This is somewhat akin to the log4j logger +"name", but Bunyan doesn't do hierarchical logger names. + +**Bunyan log records are JSON.** A few fields are added automatically: +"pid", "hostname", "time" and "v". + + $ node hi.js + {"name":"myapp","hostname":"banana.local","pid":40161,"level":30,"msg":"hi","time":"2013-01-04T18:46:23.851Z","v":0} + {"name":"myapp","hostname":"banana.local","pid":40161,"level":40,"lang":"fr","msg":"au revoir","time":"2013-01-04T18:46:23.853Z","v":0} + + +## Log Method API + +The example above shows two different ways to call `log.info(...)`. The +full API is: + + log.info(); // Returns a boolean: is the "info" level enabled? + // This is equivalent to `log.isInfoEnabled()` or + // `log.isEnabledFor(INFO)` in log4j. + + log.info('hi'); // Log a simple string message (or number). + log.info('hi %s', bob, anotherVar); // Uses `util.format` for msg formatting. + + log.info({foo: 'bar'}, 'hi'); + // Adds "foo" field to log record. You can add any number + // of additional fields here. + + log.info(err); // Special case to log an `Error` instance to the record. + // This adds an "err" field with exception details + // (including the stack) and sets "msg" to the exception + // message. + log.info(err, 'more on this: %s', more); + // ... or you can specify the "msg". + +Note that this implies **you cannot pass any object as the first argument +to log it**. IOW, `log.info(mywidget)` may not be what you expect. Instead +of a string representation of `mywidget` that other logging libraries may +give you, Bunyan will try to JSON-ify your object. It is a Bunyan best +practice to always give a field name to included objects, e.g.: + + log.info({widget: mywidget}, ...) + +This will dove-tail with [Bunyan serializer support](#serializers), discussed +later. + +The same goes for all of Bunyan's log levels: `log.trace`, `log.debug`, +`log.info`, `log.warn`, `log.error`, and `log.fatal`. See the [levels section](#levels) +below for details and suggestions. + + +## CLI Usage + +Bunyan log output is a stream of JSON objects. This is great for processing, +but not for reading directly. A **`bunyan` tool** is provided **for +pretty-printing bunyan logs** and for **filtering** (e.g. +`| bunyan -c 'this.foo == "bar"'`). Using our example above: + + $ node hi.js | ./bin/bunyan + [2013-01-04T19:01:18.241Z] INFO: myapp/40208 on banana.local: hi + [2013-01-04T19:01:18.242Z] WARN: myapp/40208 on banana.local: au revoir (lang=fr) + +See the screenshot above for an example of the default coloring of rendered +log output. That example also shows the nice formatting automatically done for +some well-known log record fields (e.g. `req` is formatted like an HTTP request, +`res` like an HTTP response, `err` like an error stack trace). + +One interesting feature is **filtering** of log content, which can be useful +for digging through large log files or for analysis. We can filter only +records above a certain level: + + $ node hi.js | bunyan -l warn + [2013-01-04T19:08:37.182Z] WARN: myapp/40353 on banana.local: au revoir (lang=fr) + +Or filter on the JSON fields in the records (e.g. only showing the French +records in our contrived example): + + $ node hi.js | bunyan -c 'this.lang == "fr"' + [2013-01-04T19:08:26.411Z] WARN: myapp/40342 on banana.local: au revoir (lang=fr) + +See `bunyan --help` for other facilities. + + +## Streams Introduction + +By default, log output is to stdout and at the "info" level. Explicitly that +looks like: + + var log = bunyan.createLogger({ + name: 'myapp', + stream: process.stdout, + level: 'info' + }); + +That is an abbreviated form for a single stream. **You can define multiple +streams at different levels**. + + var log = bunyan.createLogger({ + name: 'myapp', + streams: [ + { + level: 'info', + stream: process.stdout // log INFO and above to stdout + }, + { + level: 'error', + path: '/var/tmp/myapp-error.log' // log ERROR and above to a file + } + ] + }); + +More on streams in the [Streams section](#streams) below. + + +## log.child + +Bunyan has a concept of a child logger to **specialize a logger for a +sub-component of your application**, i.e. to create a new logger with +additional bound fields that will be included in its log records. A child +logger is created with `log.child(...)`. + +In the following example, logging on a "Wuzzle" instance's `this.log` will +be exactly as on the parent logger with the addition of the `widget_type` +field: + + var bunyan = require('bunyan'); + var log = bunyan.createLogger({name: 'myapp'}); + + function Wuzzle(options) { + this.log = options.log.child({widget_type: 'wuzzle'}); + this.log.info('creating a wuzzle') + } + Wuzzle.prototype.woos = function () { + this.log.warn('This wuzzle is woosey.') + } + + log.info('start'); + var wuzzle = new Wuzzle({log: log}); + wuzzle.woos(); + log.info('done'); + +Running that looks like (raw): + + $ node myapp.js + {"name":"myapp","hostname":"myhost","pid":34572,"level":30,"msg":"start","time":"2013-01-04T07:47:25.814Z","v":0} + {"name":"myapp","hostname":"myhost","pid":34572,"widget_type":"wuzzle","level":30,"msg":"creating a wuzzle","time":"2013-01-04T07:47:25.815Z","v":0} + {"name":"myapp","hostname":"myhost","pid":34572,"widget_type":"wuzzle","level":40,"msg":"This wuzzle is woosey.","time":"2013-01-04T07:47:25.815Z","v":0} + {"name":"myapp","hostname":"myhost","pid":34572,"level":30,"msg":"done","time":"2013-01-04T07:47:25.816Z","v":0} + +And with the `bunyan` CLI (using the "short" output mode): + + $ node myapp.js | bunyan -o short + 07:46:42.707Z INFO myapp: start + 07:46:42.709Z INFO myapp: creating a wuzzle (widget_type=wuzzle) + 07:46:42.709Z WARN myapp: This wuzzle is woosey. (widget_type=wuzzle) + 07:46:42.709Z INFO myapp: done + + +A more practical example is in the +[node-restify](https://github.com/mcavage/node-restify) web framework. +Restify uses Bunyan for its logging. One feature of its integration, is that +if `server.use(restify.requestLogger())` is used, each restify request handler +includes a `req.log` logger that is: + + log.child({req_id: }, true) + +Apps using restify can then use `req.log` and have all such log records +include the unique request id (as "req\_id"). Handy. + + +## Serializers + +Bunyan has a concept of **"serializers" to produce a JSON-able object from a +JavaScript object**, so you can easily do the following: + + log.info({req: }, 'something about handling this request'); + +Serializers is a mapping of log record field name, "req" in this example, to +a serializer function. That looks like this: + + function reqSerializer(req) { + return { + method: req.method, + url: req.url, + headers: req.headers + } + } + var log = bunyan.createLogger({ + name: 'myapp', + serializers: { + req: reqSerializer + } + }); + +Or this: + + var log = bunyan.createLogger({ + name: 'myapp', + serializers: {req: bunyan.stdSerializers.req} + }); + +because Bunyan includes a small set of standard serializers. To use all the +standard serializers you can use: + + var log = bunyan.createLogger({ + ... + serializers: bunyan.stdSerializers + }); + +**Note**: Your own serializers should never throw, otherwise you'll get an +ugly message on stderr from Bunyan (along with the traceback) and the field +in your log record will be replaced with a short error message. + + +## src + +The **source file, line and function of the log call site** can be added to +log records by using the `src: true` config option: + + var log = bunyan.createLogger({src: true, ...}); + +This adds the call source info with the 'src' field, like this: + + { + "name": "src-example", + "hostname": "banana.local", + "pid": 123, + "component": "wuzzle", + "level": 4, + "msg": "This wuzzle is woosey.", + "time": "2012-02-06T04:19:35.605Z", + "src": { + "file": "/Users/trentm/tm/node-bunyan/examples/src.js", + "line": 20, + "func": "Wuzzle.woos" + }, + "v": 0 + } + +**WARNING: Determining the call source info is slow. Never use this option +in production.** + + +# Levels + +The log levels in bunyan are as follows. The level descriptions are best +practice *opinions*. + +- "fatal" (60): The service/app is going to stop or become unusable now. + An operator should definitely look into this soon. +- "error" (50): Fatal for a particular request, but the service/app continues + servicing other requests. An operator should look at this soon(ish). +- "warn" (40): A note on something that should probably be looked at by an + operator eventually. +- "info" (30): Detail on regular operation. +- "debug" (20): Anything else, i.e. too verbose to be included in "info" level. +- "trace" (10): Logging from external libraries used by your app or *very* + detailed application logging. + +Suggestions: Use "debug" sparingly. Information that will be useful to debug +errors *post mortem* should usually be included in "info" messages if it's +generally relevant or else with the corresponding "error" event. Don't rely +on spewing mostly irrelevant debug messages all the time and sifting through +them when an error occurs. + +Integers are used for the actual level values (10 for "trace", ..., 60 for +"fatal") and constants are defined for the (bunyan.TRACE ... bunyan.DEBUG). +The lowercase level names are aliases supported in the API. + +Here is the API for changing levels in an existing logger: + + log.level() -> INFO // gets current level (lowest level of all streams) + + log.level(INFO) // set all streams to level INFO + log.level("info") // set all streams to level INFO + + log.levels() -> [DEBUG, INFO] // get array of levels of all streams + log.levels(0) -> DEBUG // get level of stream at index 0 + log.levels("foo") // get level of stream with name "foo" + + log.levels(0, INFO) // set level of stream 0 to INFO + log.levels(0, "info") // can use "info" et al aliases + log.levels("foo", WARN) // set stream named "foo" to WARN + + + +# Log Record Fields + +This section will describe *rules* for the Bunyan log format: field names, +field meanings, required fields, etc. However, a Bunyan library doesn't +strictly enforce all these rules while records are being emitted. For example, +Bunyan will add a `time` field with the correct format to your log records, +but you can specify your own. It is the caller's responsibility to specify +the appropriate format. + +The reason for the above leniency is because IMO logging a message should +never break your app. This leads to this rule of logging: **a thrown +exception from `log.info(...)` or equivalent (other than for calling with the +incorrect signature) is always a bug in Bunyan.** + + +A typical Bunyan log record looks like this: + + {"name":"myserver","hostname":"banana.local","pid":123,"req":{"method":"GET","url":"/path?q=1#anchor","headers":{"x-hi":"Mom","connection":"close"}},"level":3,"msg":"start request","time":"2012-02-03T19:02:46.178Z","v":0} + +Pretty-printed: + + { + "name": "myserver", + "hostname": "banana.local", + "pid": 123, + "req": { + "method": "GET", + "url": "/path?q=1#anchor", + "headers": { + "x-hi": "Mom", + "connection": "close" + }, + "remoteAddress": "120.0.0.1", + "remotePort": 51244 + }, + "level": 3, + "msg": "start request", + "time": "2012-02-03T19:02:57.534Z", + "v": 0 + } + + +Core fields: + +- `v`: Required. Integer. Added by Bunyan. Cannot be overriden. + This is the Bunyan log format version (`require('bunyan').LOG_VERSION`). + The log version is a single integer. `0` is until I release a version + "1.0.0" of node-bunyan. Thereafter, starting with `1`, this will be + incremented if there is any backward incompatible change to the log record + format. Details will be in "CHANGES.md" (the change log). +- `level`: Required. Integer. Added by Bunyan. Cannot be overriden. + See the "Levels" section. +- `name`: Required. String. Provided at Logger creation. + You must specify a name for your logger when creating it. Typically this + is the name of the service/app using Bunyan for logging. +- `hostname`: Required. String. Provided or determined at Logger creation. + You can specify your hostname at Logger creation or it will be retrieved + vi `os.hostname()`. +- `pid`: Required. Integer. Filled in automatically at Logger creation. +- `time`: Required. String. Added by Bunyan. Can be overriden. + The date and time of the event in [ISO 8601 + Extended Format](http://en.wikipedia.org/wiki/ISO_8601) format and in UTC, + as from + [`Date.toISOString()`](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/toISOString). +- `msg`: Required. String. + Every `log.debug(...)` et al call must provide a log message. +- `src`: Optional. Object giving log call source info. This is added + automatically by Bunyan if the "src: true" config option is given to the + Logger. Never use in production as this is really slow. + + +Go ahead and add more fields, and nested ones are fine (and recommended) as +well. This is why we're using JSON. Some suggestions and best practices +follow (feedback from actual users welcome). + + +Recommended/Best Practice Fields: + +- `err`: Object. A caught JS exception. Log that thing with `log.info(err)` + to get: + + ... + "err": { + "message": "boom", + "name": "TypeError", + "stack": "TypeError: boom\n at Object. ..." + }, + "msg": "boom", + ... + + Or use the `bunyan.stdSerializers.err` serializer in your Logger and + do this `log.error({err: err}, "oops")`. See "examples/err.js". + +- `req_id`: String. A request identifier. Including this field in all logging + tied to handling a particular request to your server is strongly suggested. + This allows post analysis of logs to easily collate all related logging + for a request. This really shines when you have a SOA with multiple services + and you carry a single request ID from the top API down through all APIs + (as [node-restify](https://github.com/mcavage/node-restify) facilitates + with its 'Request-Id' header). + +- `req`: An HTTP server request. Bunyan provides `bunyan.stdSerializers.req` + to serialize a request with a suggested set of keys. Example: + + { + "method": "GET", + "url": "/path?q=1#anchor", + "headers": { + "x-hi": "Mom", + "connection": "close" + }, + "remoteAddress": "120.0.0.1", + "remotePort": 51244 + } + +- `res`: An HTTP server response. Bunyan provides `bunyan.stdSerializers.res` + to serialize a response with a suggested set of keys. Example: + + { + "statusCode": 200, + "header": "HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nConnection: keep-alive\r\nTransfer-Encoding: chunked\r\n\r\n" + } + + +Other fields to consider: + +- `req.username`: Authenticated user (or for a 401, the user attempting to + auth). +- Some mechanism to calculate response latency. "restify" users will have + a "X-Response-Time" header. A `latency` custom field would be fine. +- `req.body`: If you know that request bodies are small (common in APIs, + for example), then logging the request body is good. + + +# Streams + +A "stream" is Bunyan's name for an output for log messages (the equivalent +to a log4j Appender). Ultimately Bunyan uses a +[Writable Stream](http://nodejs.org/docs/latest/api/all.html#writable_Stream) +interface, but there are some additional attributes used to create and +manage the stream. A Bunyan Logger instance has one or more streams. +In general streams are specified with the "streams" option: + + var bunyan = require('bunyan'); + var log = bunyan.createLogger({ + name: "foo", + streams: [ + { + stream: process.stderr, + level: "debug" + }, + ... + ] + }); + +For convenience, if there is only one stream, it can specified with the +"stream" and "level" options (internally converted to a `Logger.streams`). + + var log = bunyan.createLogger({ + name: "foo", + stream: process.stderr, + level: "debug" + }); + +Note that "file" streams do not support this shortcut (partly for historical +reasons and partly to not make it difficult to add a literal "path" field +on log records). + +If neither "streams" nor "stream" are specified, the default is a stream of +type "stream" emitting to `process.stdout` at the "info" level. + + +## stream errors + +Bunyan re-emits error events from the created `WriteStream`. So you can +do this: + + var log = bunyan.createLogger({name: 'mylog', streams: [{path: LOG_PATH}]}); + log.on('error', function (err, stream) { + // Handle stream write or create error here. + }); + +Note: This is **not** that same as a log record at the "error" level as +produced by `log.error(...)`. + + +## stream type: `stream` + +A `type === 'stream'` is a plain ol' node.js [Writable +Stream](http://nodejs.org/docs/latest/api/all.html#writable_Stream). A +"stream" (the writeable stream) field is required. E.g.: `process.stdout`, +`process.stderr`. + + var log = bunyan.createLogger({ + name: 'foo', + streams: [{ + stream: process.stderr + // `type: 'stream'` is implied + }] + }); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldRequired?DefaultDescription
streamYes-A "Writable Stream", e.g. a std handle or an open file write stream.
typeNon/a`type == 'stream'` is implied if the `stream` field is given.
levelNoinfoThe level at which logging to this stream is enabled. If not +specified it defaults to "info". If specified this can be one of the +level strings ("trace", "debug", ...) or constants (`bunyan.TRACE`, +`bunyan.DEBUG`, ...).
nameNo-A name for this stream. This may be useful for usage of `log.level(NAME, +LEVEL)`. See the [Levels section](#levels) for details. A stream "name" isn't +used for anything else.
+ + +## stream type: `file` + +A `type === 'file'` stream requires a "path" field. Bunyan will open this +file for appending. E.g.: + + var log = bunyan.createLogger({ + name: 'foo', + streams: [{ + path: '/var/log/foo.log', + // `type: 'file'` is implied + }] + }); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldRequired?DefaultDescription
pathYes-A file path to which to log.
typeNon/a`type == 'file'` is implied if the `path` field is given.
levelNoinfoThe level at which logging to this stream is enabled. If not +specified it defaults to "info". If specified this can be one of the +level strings ("trace", "debug", ...) or constants (`bunyan.TRACE`, +`bunyan.DEBUG`, ...).
nameNo-A name for this stream. This may be useful for usage of `log.level(NAME, +LEVEL)`. See the [Levels section](#levels) for details. A stream "name" isn't +used for anything else.
+ + +## stream type: `rotating-file` + +**WARNING on node 0.8 usage:** Users of Bunyan's `rotating-file` should (a) be +using at least bunyan 0.23.1 (with the fix for [this +issue](https://github.com/trentm/node-bunyan/pull/97)), and (b) should use at +least node 0.10 (node 0.8 does not support the `unref()` method on +`setTimeout(...)` needed for the mentioned fix). The symptom is that process +termination will hang for up to a full rotation period. + +**WARNING on [cluster](http://nodejs.org/docs/latest/api/all.html#all_cluster) +usage:** Using Bunyan's `rotating-file` stream with node.js's "cluster" module +can result in unexpected file rotation. You must not have multiple processes +in the cluster logging to the same file path. In other words, you must have +a separate log file path for the master and each worker in the cluster. +Alternatively, consider using a system file rotation facility such as +`logrotate` on Linux or `logadm` on SmartOS/Illumos. See +[this comment on issue #117](https://github.com/trentm/node-bunyan/issues/117#issuecomment-44804938) +for details. + +A `type === 'rotating-file'` is a file stream that handles file automatic +rotation. + + var log = bunyan.createLogger({ + name: 'foo', + streams: [{ + type: 'rotating-file', + path: '/var/log/foo.log', + period: '1d', // daily rotation + count: 3 // keep 3 back copies + }] + }); + +This will rotate '/var/log/foo.log' every day (at midnight) to: + + /var/log/foo.log.0 # yesterday + /var/log/foo.log.1 # 1 day ago + /var/log/foo.log.2 # 2 days ago + +*Currently*, there is no support for providing a template for the rotated +files, or for rotating when the log reaches a threshold size. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldRequired?DefaultDescription
typeYes-"rotating-file"
pathYes-A file path to which to log. Rotated files will be "$path.0", +"$path.1", ...
periodNo1dThe period at which to rotate. This is a string of the format +"$number$scope" where "$scope" is one of "ms" (milliseconds -- only useful for +testing), "h" (hours), "d" (days), "w" (weeks), "m" (months), "y" (years). Or +one of the following names can be used "hourly" (means 1h), "daily" (1d), +"weekly" (1w), "monthly" (1m), "yearly" (1y). Rotation is done at the start of +the scope: top of the hour (h), midnight (d), start of Sunday (w), start of the +1st of the month (m), start of Jan 1st (y).
countNo10The number of rotated files to keep.
levelNoinfoThe level at which logging to this stream is enabled. If not +specified it defaults to "info". If specified this can be one of the +level strings ("trace", "debug", ...) or constants (`bunyan.TRACE`, +`bunyan.DEBUG`, ...).
nameNo-A name for this stream. This may be useful for usage of `log.level(NAME, +LEVEL)`. See the [Levels section](#levels) for details. A stream "name" isn't +used for anything else.
+ + +**Note on log rotation**: Often you may be using external log rotation utilities +like `logrotate` on Linux or `logadm` on SmartOS/Illumos. In those cases, unless +your are ensuring "copy and truncate" sematics (via `copytruncate` with +logrotate or `-c` with logadm) then the fd for your 'file' stream will change. +You can tell bunyan to reopen the file stream with code like this in your +app: + + var log = bunyan.createLogger(...); + ... + process.on('SIGUSR2', function () { + log.reopenFileStreams(); + }); + +where you'd configure your log rotation to send SIGUSR2 (or some other signal) +to your process. Any other mechanism to signal your app to run +`log.reopenFileStreams()` would work as well. + + +## stream type: `raw` + +- `raw`: Similar to a "stream" writeable stream, except that the write method + is given raw log record *Object*s instead of a JSON-stringified string. + This can be useful for hooking on further processing to all Bunyan logging: + pushing to an external service, a RingBuffer (see below), etc. + + + +## `raw` + RingBuffer Stream + +Bunyan comes with a special stream called a RingBuffer which keeps the last N +records in memory and does *not* write the data anywhere else. One common +strategy is to log 'info' and higher to a normal log file but log all records +(including 'trace') to a ringbuffer that you can access via a debugger, or your +own HTTP interface, or a post-mortem facility like MDB or node-panic. + +To use a RingBuffer: + + /* Create a ring buffer that stores the last 100 records. */ + var bunyan = require('bunyan'); + var ringbuffer = new bunyan.RingBuffer({ limit: 100 }); + var log = bunyan.createLogger({ + name: 'foo', + streams: [ + { + level: 'info', + stream: process.stdout + }, + { + level: 'trace', + type: 'raw', // use 'raw' to get raw log record objects + stream: ringbuffer + } + ] + }); + + log.info('hello world'); + console.log(ringbuffer.records); + +This example emits: + + [ { name: 'foo', + hostname: '912d2b29', + pid: 50346, + level: 30, + msg: 'hello world', + time: '2012-06-19T21:34:19.906Z', + v: 0 } ] + + +## third-party streams + +- syslog: + [mcavage/node-bunyan-syslog](https://github.com/mcavage/node-bunyan-syslog) + provides support for directing bunyan logging to a syslog server. + +- bunyan-slack: +[qualitybath/bunyan-slack](https://github.com/qualitybath/bunyan-slack) Bunyan stream for Slack chat integration. + +- bunyan-fogbugz +[qualitybath/bunyan-fogbugz](https://github.com/qualitybath/bunyan-fogbugz) Bunyan stream for sending automated crash reports to FogBugz + +- TODO: eventually https://github.com/trentm/node-bunyan-winston + + + +# Runtime log snooping via DTrace + +**Note**: To use Bunyan's DTrace facilities you need to manually install +the "dtrace-provider" lib separately via `npm install dtrace-provider`. + +On systems that support DTrace (e.g., MacOS, FreeBSD, illumos derivatives +like SmartOS and OmniOS), Bunyan will create a DTrace provider (`bunyan`) +that makes available the following probes: + + log-trace + log-debug + log-info + log-warn + log-error + log-fatal + +Each of these probes has a single argument: the string that would be +written to the log. Note that when a probe is enabled, it will +fire whenever the corresponding function is called, even if the level of +the log message is less than that of any stream. + + +## DTrace examples + +Trace all log messages coming from any Bunyan module on the system. +(The `-x strsize=4k` is to raise dtrace's default 256 byte buffer size +because log messages are longer than typical dtrace probes.) + + dtrace -x strsize=4k -qn 'bunyan*:::log-*{printf("%d: %s: %s", pid, probefunc, copyinstr(arg0))}' + +Trace all log messages coming from the "wuzzle" component: + + dtrace -x strsize=4k -qn 'bunyan*:::log-*/strstr(this->str = copyinstr(arg0), "\"component\":\"wuzzle\"") != NULL/{printf("%s", this->str)}' + +Aggregate debug messages from process 1234, by message: + + dtrace -x strsize=4k -n 'bunyan1234:::log-debug{@[copyinstr(arg0)] = count()}' + +Have the bunyan CLI pretty-print the traced logs: + + dtrace -x strsize=4k -qn 'bunyan1234:::log-*{printf("%s", copyinstr(arg0))}' | bunyan + +A convenience handle has been made for this: + + bunyan -p 1234 + + +On systems that support the +[`jstack`](http://dtrace.org/blogs/dap/2012/04/25/profiling-node-js/) action +via a node.js helper, get a stack backtrace for any debug message that +includes the string "danger!": + + dtrace -x strsize=4k -qn 'log-debug/strstr(copyinstr(arg0), "danger!") != NULL/{printf("\n%s", copyinstr(arg0)); jstack()}' + +Output of the above might be: + + {"name":"foo","hostname":"763bf293-d65c-42d5-872b-4abe25d5c4c7.local","pid":12747,"level":20,"msg":"danger!","time":"2012-10-30T18:28:57.115Z","v":0} + + node`0x87e2010 + DTraceProviderBindings.node`usdt_fire_probe+0x32 + DTraceProviderBindings.node`_ZN4node11DTraceProbe5_fireEN2v85LocalINS1_5ValueEEE+0x32d + DTraceProviderBindings.node`_ZN4node11DTraceProbe4FireERKN2v89ArgumentsE+0x77 + << internal code >> + (anon) as (anon) at /root/node-bunyan/lib/bunyan.js position 40484 + << adaptor >> + (anon) as doit at /root/my-prog.js position 360 + (anon) as list.ontimeout at timers.js position 4960 + << adaptor >> + << internal >> + << entry >> + node`_ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_Pb+0x101 + node`_ZN2v88internal9Execution4CallENS0_6HandleINS0_6ObjectEEES4_iPS4_Pbb+0xcb + node`_ZN2v88Function4CallENS_6HandleINS_6ObjectEEEiPNS1_INS_5ValueEEE+0xf0 + node`_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_8FunctionEEEiPNS1_INS0_5ValueEEE+0x11f + node`_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_6StringEEEiPNS1_INS0_5ValueEEE+0x66 + node`_ZN4node9TimerWrap9OnTimeoutEP10uv_timer_si+0x63 + node`uv__run_timers+0x66 + node`uv__run+0x1b + node`uv_run+0x17 + node`_ZN4node5StartEiPPc+0x1d0 + node`main+0x1b + node`_start+0x83 + + node`0x87e2010 + DTraceProviderBindings.node`usdt_fire_probe+0x32 + DTraceProviderBindings.node`_ZN4node11DTraceProbe5_fireEN2v85LocalINS1_5ValueEEE+0x32d + DTraceProviderBindings.node`_ZN4node11DTraceProbe4FireERKN2v89ArgumentsE+0x77 + << internal code >> + (anon) as (anon) at /root/node-bunyan/lib/bunyan.js position 40484 + << adaptor >> + (anon) as doit at /root/my-prog.js position 360 + (anon) as list.ontimeout at timers.js position 4960 + << adaptor >> + << internal >> + << entry >> + node`_ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPS5_Pb+0x101 + node`_ZN2v88internal9Execution4CallENS0_6HandleINS0_6ObjectEEES4_iPS4_Pbb+0xcb + node`_ZN2v88Function4CallENS_6HandleINS_6ObjectEEEiPNS1_INS_5ValueEEE+0xf0 + node`_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_8FunctionEEEiPNS1_INS0_5ValueEEE+0x11f + node`_ZN4node12MakeCallbackEN2v86HandleINS0_6ObjectEEENS1_INS0_6StringEEEiPNS1_INS0_5ValueEEE+0x66 + node`_ZN4node9TimerWrap9OnTimeoutEP10uv_timer_si+0x63 + node`uv__run_timers+0x66 + node`uv__run+0x1b + node`uv_run+0x17 + node`_ZN4node5StartEiPPc+0x1d0 + node`main+0x1b + node`_start+0x83 + + +# Browserify + +As the [Browserify](http://browserify.org/) site says it "lets you +`require('modules')` in the browser by bundling up all of your dependencies." +It is a build tool to run on your node.js script to bundle up your script and +all its node.js dependencies into a single file that is runnable in the +browser via: + + + +As of version 1.1.0, node-bunyan supports being run via Browserify. The +default [stream](#streams) when running in the browser is one that emits +raw log records to `console.log/info/warn/error`. + +Here is a quick example showing you how you can get this working for your +script. + +1. Get browserify and bunyan installed in your module: + + + $ npm install browserify bunyan + +2. An example script using Bunyan, "play.js": + + ```javascript + var bunyan = require('bunyan'); + var log = bunyan.createLogger({name: 'play', level: 'debug'}); + log.trace('this one does not emit'); + log.debug('hi on debug'); // console.log + log.info('hi on info'); // console.info + log.warn('hi on warn'); // console.warn + log.error('hi on error'); // console.error + ``` + +3. Build this into a bundle to run in the browser, "play.browser.js": + + $ ./node_modules/.bin/browserify play.js -o play.browser.js + +4. Put that into an HTML file, "play.html": + + ```html + + + + + + + +
hi
+ + + ``` + +5. Open that in your browser and open your browser console: + + $ open play.html + + +Here is what it looks like in Firefox's console: ![Bunyan + Browserify in the +Firefox console](./docs/img/bunyan.browserify.png) + +For some, the raw log records might not be desired. To have a rendered log line +you'll want to add your own stream, starting with something like this: + +```javascript +var bunyan = require('./lib/bunyan'); + +function MyRawStream() {} +MyRawStream.prototype.write = function (rec) { + console.log('[%s] %s: %s', + rec.time.toISOString(), + bunyan.nameFromLevel[rec.level], + rec.msg); +} + +var log = bunyan.createLogger({ + name: 'play', + streams: [ + { + level: 'info', + stream: new MyRawStream(), + type: 'raw' + } + ] +}); + +log.info('hi on info'); +``` + + + + +# Versioning + +The scheme I follow is most succintly described by the bootstrap guys +[here](https://github.com/twitter/bootstrap#versioning). + +tl;dr: All versions are `..` which will be incremented for +breaking backward compat and major reworks, new features without breaking +change, and bug fixes, respectively. + + +# License + +MIT. See "LICENSE.txt". + + +# See Also + +- Bunyan syslog support: . +- Bunyan + Graylog2: . +- Bunyan middleware for Express: +- An example of a Bunyan shim to the Winston logging system: + . Also a [comparison of + Winston and Bunyan](http://strongloop.com/strongblog/compare-node-js-logging-winston-bunyan/). +- [Bunyan for Bash](https://github.com/trevoro/bash-bunyan). +- TODO: `RequestCaptureStream` example from restify. +- [Bunyan integration for https://logentries.com](https://www.npmjs.org/package/logentries-stream) diff --git a/packages/logging/.npm/package/node_modules/bunyan/TODO.md b/packages/logging/.npm/package/node_modules/bunyan/TODO.md new file mode 100644 index 0000000..8925c52 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/TODO.md @@ -0,0 +1,72 @@ +- `bunyan` (without redir) ^C should stop, doesn't since recent change +- man page for the bunyan CLI (refer to it in the readme) +- `tail -f`-like support +- 2.0 (?) with `v: 1` in log records. Fwd/bwd compat in `bunyan` CLI + +# docs + +- document log.addStream() and log.addSerializers() + + +# someday/maybe + +- full-on docs +- better examples/ +- better coloring +- would be exciting to have bunyan support in http://lnav.org/ if that + made sense +- "template" support for 'rotating-file' stream to get dated rolled files +- "all" or "off" levels? log4j? logging.py? + logging.py has NOTSET === 0. I think that is only needed/used for + multi-level hierarchical effective level. +- buffered writes to increase speed: + - I'd start with a tools/timeoutput.js for some numbers to compare + before/after. Sustained high output to a file. + - perhaps this would be a "buffered: true" option on the stream object + - then wrap the "stream" with a local class that handles the buffering + - to finish this, need the 'log.close' and `process.on('exit', ...)` + work that Trent has started. +- "canWrite" handling for full streams. Need to buffer a la log4js +- test file log with logadm rotation: does it handle that? +- test suite: + - test for a cloned logger double-`stream.end()` causing problems. + Perhaps the "closeOnExit" for existing streams should be false for + clones. + - test that a `log.clone(...)` adding a new field matching a serializer + works *and* that an existing field in the parent is not *re-serialized*. +- split out `bunyan` cli to a "bunyan" or "bunyan-reader" or "node-bunyan-reader" + as the basis for tools to consume bunyan logs. It can grow indep of node-bunyan + for generating the logs. + It would take a Bunyan log record object and be expected to emit it. + + node-bunyan-reader + .createReadStream(path, [options]) ? + +- coloring bug: in less the indented extra info lines only have the first + line colored. Do we need the ANSI char on *each* line? That'll be + slower. +- document "well-known" keys from bunyan CLI p.o.v.. Add "client_req". +- More `bunyan` output formats and filtering features. +- Think about a bunyan dashboard that supports organizing and viewing logs + from multiple hosts and services. +- doc the restify RequestCaptureStream usage of RingBuffer. Great example. +- A vim plugin (a la http://vim.cybermirror.org/runtime/autoload/zip.vim ?) to + allow browsing (read-only) a bunyan log in rendered form. +- Some speed comparisons with others to get a feel for Bunyan's speed. +- what about promoting 'latency' field and making that easier? +- `log.close` to close streams and shutdown and `this.closed` + process.on('exit', log.close) + -> 'end' for the name +- bunyan cli: more layouts (http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/EnhancedPatternLayout.html) + Custom log formats (in config file? in '-f' arg) using printf or hogan.js + or whatever. Dap wants field width control for lining up. Hogan.js is + probably overkill for this. +- loggly example using raw streams, hook.io?, whatever. +- serializer support: + - restify-server.js example -> restifyReq ? or have `req` detect that. + That is nicer for the "use all standard ones". *Does* restify req + have anything special? + - differential HTTP *client* req/res with *server* req/res. +- statsd stream? http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/ + Think about it. +- web ui. Ideas: http://googlecloudplatform.blogspot.ca/2014/04/a-new-logs-viewer-for-google-cloud.html diff --git a/packages/logging/.npm/package/node_modules/bunyan/bin/bunyan b/packages/logging/.npm/package/node_modules/bunyan/bin/bunyan new file mode 100755 index 0000000..8b07b42 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/bin/bunyan @@ -0,0 +1,1639 @@ +#!/usr/bin/env node +/** + * Copyright (c) 2015 Trent Mick. All rights reserved. + * Copyright (c) 2015 Joyent Inc. All rights reserved. + * + * bunyan -- filter and pretty-print Bunyan log files (line-delimited JSON) + * + * See . + * + * -*- mode: js -*- + * vim: expandtab:ts=4:sw=4 + */ + +var VERSION = '1.4.0'; + +var p = console.log; +var util = require('util'); +var pathlib = require('path'); +var vm = require('vm'); +var http = require('http'); +var fs = require('fs'); +var warn = console.warn; +var child_process = require('child_process'), + spawn = child_process.spawn, + exec = child_process.exec, + execFile = child_process.execFile; +var assert = require('assert'); + +var nodeSpawnSupportsStdio = ( + Number(process.version.split('.')[0]) >= 0 || + Number(process.version.split('.')[1]) >= 8); + + + +//---- globals and constants + +// Internal debug logging via `console.warn`. +var _DEBUG = false; + +// Output modes. +var OM_LONG = 1; +var OM_JSON = 2; +var OM_INSPECT = 3; +var OM_SIMPLE = 4; +var OM_SHORT = 5; +var OM_BUNYAN = 6; +var OM_FROM_NAME = { + 'long': OM_LONG, + 'paul': OM_LONG, /* backward compat */ + 'json': OM_JSON, + 'inspect': OM_INSPECT, + 'simple': OM_SIMPLE, + 'short': OM_SHORT, + 'bunyan': OM_BUNYAN +}; + + +// Levels +var TRACE = 10; +var DEBUG = 20; +var INFO = 30; +var WARN = 40; +var ERROR = 50; +var FATAL = 60; + +var levelFromName = { + 'trace': TRACE, + 'debug': DEBUG, + 'info': INFO, + 'warn': WARN, + 'error': ERROR, + 'fatal': FATAL +}; +var nameFromLevel = {}; +var upperNameFromLevel = {}; +var upperPaddedNameFromLevel = {}; +Object.keys(levelFromName).forEach(function (name) { + var lvl = levelFromName[name]; + nameFromLevel[lvl] = name; + upperNameFromLevel[lvl] = name.toUpperCase(); + upperPaddedNameFromLevel[lvl] = ( + name.length === 4 ? ' ' : '') + name.toUpperCase(); +}); + + +// Display time formats. +TIME_UTC = 1; // the default, bunyan's native format +TIME_LOCAL = 2; + +var timezoneOffsetMs; // used for TIME_LOCAL display + + +// The current raw input line being processed. Used for `uncaughtException`. +var currLine = null; + +// Child dtrace process, if any. Used for signal-handling. +var child = null; + +// Whether ANSI codes are being used. Used for signal-handling. +var usingAnsiCodes = false; + +// Used to tell the 'uncaughtException' handler that '-c CODE' is being used. +var gUsingConditionOpts = false; + +// Pager child process, and output stream to which to write. +var pager = null; +var stdout = process.stdout; + +// Whether we are reading from stdin. +var readingStdin = false; + + + +//---- support functions + +function getVersion() { + return VERSION; +} + + +var format = util.format; +if (!format) { + /* BEGIN JSSTYLED */ + // If not node 0.6, then use its `util.format`: + // : + var inspect = util.inspect; + var formatRegExp = /%[sdj%]/g; + format = function format(f) { + if (typeof f !== 'string') { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function (x) { + if (i >= len) + return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': return JSON.stringify(args[i++]); + case '%%': return '%'; + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (x === null || typeof x !== 'object') { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; + }; + /* END JSSTYLED */ +} + +function indent(s) { + return ' ' + s.split(/\r?\n/).join('\n '); +} + +function objCopy(obj) { + if (obj === null) { + return null; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + var copy = {}; + Object.keys(obj).forEach(function (k) { + copy[k] = obj[k]; + }); + return copy; + } +} + +function printHelp() { + /* BEGIN JSSTYLED */ + p('Usage:'); + p(' bunyan [OPTIONS] [FILE ...]'); + p(' ... | bunyan [OPTIONS]'); + p(' bunyan [OPTIONS] -p PID'); + p(''); + p('Filter and pretty-print Bunyan log file content.'); + p(''); + p('General options:'); + p(' -h, --help print this help info and exit'); + p(' --version print version of this command and exit'); + p(''); + p('Runtime log snooping (via DTrace, only on supported platforms):'); + p(' -p PID Process bunyan:log-* probes from the process'); + p(' with the given PID. Can be used multiple times,'); + p(' or specify all processes with "*", or a set of'); + p(' processes whose command & args match a pattern'); + p(' with "-p NAME".'); + p(''); + p('Filtering options:'); + p(' -l, --level LEVEL'); + p(' Only show messages at or above the specified level.'); + p(' You can specify level *names* or the internal numeric'); + p(' values.'); + p(' -c, --condition CONDITION'); + p(' Run each log message through the condition and'); + p(' only show those that return truish. E.g.:'); + p(' -c \'this.pid == 123\''); + p(' -c \'this.level == DEBUG\''); + p(' -c \'this.msg.indexOf("boom") != -1\''); + p(' "CONDITION" must be legal JS code. `this` holds'); + p(' the log record. The TRACE, DEBUG, ... FATAL values'); + p(' are defined to help with comparing `this.level`.'); + p(' --strict Suppress all but legal Bunyan JSON log lines. By default'); + p(' non-JSON, and non-Bunyan lines are passed through.'); + p(''); + p('Output options:'); + p(' --pager Pipe output into `less` (or $PAGER if set), if'); + p(' stdout is a TTY. This overrides $BUNYAN_NO_PAGER.'); + p(' Note: Paging is only supported on node >=0.8.'); + p(' --no-pager Do not pipe output into a pager.'); + p(' --color Colorize output. Defaults to try if output'); + p(' stream is a TTY.'); + p(' --no-color Force no coloring (e.g. terminal doesn\'t support it)'); + p(' -o, --output MODE'); + p(' Specify an output mode/format. One of'); + p(' long: (the default) pretty'); + p(' json: JSON output, 2-space indent'); + p(' json-N: JSON output, N-space indent, e.g. "json-4"'); + p(' bunyan: 0 indented JSON, bunyan\'s native format'); + p(' inspect: node.js `util.inspect` output'); + p(' short: like "long", but more concise'); + p(' -j shortcut for `-o json`'); + p(' -0 shortcut for `-o bunyan`'); + p(' -L, --time local'); + p(' Display time field in local time, rather than UTC.'); + p(''); + p('Environment Variables:'); + p(' BUNYAN_NO_COLOR Set to a non-empty value to force no output '); + p(' coloring. See "--no-color".'); + p(' BUNYAN_NO_PAGER Disable piping output to a pager. '); + p(' See "--no-pager".'); + p(''); + p('See for more complete docs.'); + p('Please report bugs to .'); + /* END JSSTYLED */ +} + +/* + * If the user specifies multiple input sources, we want to print out records + * from all sources in a single, chronologically ordered stream. To do this + * efficiently, we first assume that all records within each source are ordered + * already, so we need only keep track of the next record in each source and + * the time of the last record emitted. To avoid excess memory usage, we + * pause() streams that are ahead of others. + * + * 'streams' is an object indexed by source name (file name) which specifies: + * + * stream Actual stream object, so that we can pause and resume it. + * + * records Array of log records we've read, but not yet emitted. Each + * record includes 'line' (the raw line), 'rec' (the JSON + * record), and 'time' (the parsed time value). + * + * done Whether the stream has any more records to emit. + */ +var streams = {}; + +function gotRecord(file, line, rec, opts, stylize) +{ + var time = new Date(rec.time); + + streams[file]['records'].push({ line: line, rec: rec, time: time }); + emitNextRecord(opts, stylize); +} + +function filterRecord(rec, opts) +{ + if (opts.level && rec.level < opts.level) { + return false; + } + + if (opts.condFuncs) { + var recCopy = objCopy(rec); + for (var i = 0; i < opts.condFuncs.length; i++) { + var pass = opts.condFuncs[i].call(recCopy); + if (!pass) + return false; + } + } else if (opts.condVm) { + for (var i = 0; i < opts.condVm.length; i++) { + var pass = opts.condVm[i].runInNewContext(rec); + if (!pass) + return false; + } + } + + return true; +} + +function emitNextRecord(opts, stylize) +{ + var ofile, ready, minfile, rec; + + for (;;) { + /* + * Take a first pass through the input streams to see if we have a + * record from all of them. If not, we'll pause any streams for + * which we do already have a record (to avoid consuming excess + * memory) and then wait until we have records from the others + * before emitting the next record. + * + * As part of the same pass, we look for the earliest record + * we have not yet emitted. + */ + minfile = undefined; + ready = true; + for (ofile in streams) { + + if (streams[ofile].stream === null || + (!streams[ofile].done && streams[ofile].records.length === 0)) { + ready = false; + break; + } + + if (streams[ofile].records.length > 0 && + (minfile === undefined || + streams[minfile].records[0].time > + streams[ofile].records[0].time)) { + minfile = ofile; + } + } + + if (!ready || minfile === undefined) { + for (ofile in streams) { + if (!streams[ofile].stream || streams[ofile].done) + continue; + + if (streams[ofile].records.length > 0) { + if (!streams[ofile].paused) { + streams[ofile].paused = true; + streams[ofile].stream.pause(); + } + } else if (streams[ofile].paused) { + streams[ofile].paused = false; + streams[ofile].stream.resume(); + } + } + + return; + } + + /* + * Emit the next record for 'minfile', and invoke ourselves again to + * make sure we emit as many records as we can right now. + */ + rec = streams[minfile].records.shift(); + emitRecord(rec.rec, rec.line, opts, stylize); + } +} + +/** + * Return a function for the given JS code that returns. + * + * If no 'return' in the given javascript snippet, then assume we are a single + * statement and wrap in 'return (...)'. This is for convenience for short + * '-c ...' snippets. + */ +function funcWithReturnFromSnippet(js) { + // auto-"return" + if (js.indexOf('return') === -1) { + if (js.substring(js.length - 1) === ';') { + js = js.substring(0, js.length - 1); + } + js = 'return (' + js + ')'; + } + + // Expose level definitions to condition func context + var varDefs = []; + Object.keys(upperNameFromLevel).forEach(function (lvl) { + varDefs.push(format('var %s = %d;', + upperNameFromLevel[lvl], lvl)); + }); + varDefs = varDefs.join('\n') + '\n'; + + return (new Function(varDefs + js)); +} + +/** + * Parse the command-line options and arguments into an object. + * + * { + * 'args': [...] // arguments + * 'help': true, // true if '-h' option given + * // etc. + * } + * + * @return {Object} The parsed options. `.args` is the argument list. + * @throws {Error} If there is an error parsing argv. + */ +function parseArgv(argv) { + var parsed = { + args: [], + help: false, + color: null, + paginate: null, + outputMode: OM_LONG, + jsonIndent: 2, + level: null, + strict: false, + pids: null, + pidsType: null, + timeFormat: null // one of the TIME_ constants + }; + + // Turn '-iH' into '-i -H', except for argument-accepting options. + var args = argv.slice(2); // drop ['node', 'scriptname'] + var newArgs = []; + var optTakesArg = {'d': true, 'o': true, 'c': true, 'l': true, 'p': true}; + for (var i = 0; i < args.length; i++) { + if (args[i].charAt(0) === '-' && args[i].charAt(1) !== '-' && + args[i].length > 2) + { + var splitOpts = args[i].slice(1).split(''); + for (var j = 0; j < splitOpts.length; j++) { + newArgs.push('-' + splitOpts[j]); + if (optTakesArg[splitOpts[j]]) { + var optArg = splitOpts.slice(j+1).join(''); + if (optArg.length) { + newArgs.push(optArg); + } + break; + } + } + } else { + newArgs.push(args[i]); + } + } + args = newArgs; + + // Expose level definitions to condition vm context + var condDefines = []; + Object.keys(upperNameFromLevel).forEach(function (lvl) { + condDefines.push( + format('Object.prototype.%s = %s;', upperNameFromLevel[lvl], lvl)); + }); + condDefines = condDefines.join('\n') + '\n'; + + var endOfOptions = false; + while (args.length > 0) { + var arg = args.shift(); + switch (arg) { + case '--': + endOfOptions = true; + break; + case '-h': // display help and exit + case '--help': + parsed.help = true; + break; + case '--version': + parsed.version = true; + break; + case '--strict': + parsed.strict = true; + break; + case '--color': + parsed.color = true; + break; + case '--no-color': + parsed.color = false; + break; + case '--pager': + parsed.paginate = true; + break; + case '--no-pager': + parsed.paginate = false; + break; + case '-o': + case '--output': + var name = args.shift(); + var idx = name.lastIndexOf('-'); + if (idx !== -1) { + var indentation = Number(name.slice(idx+1)); + if (! isNaN(indentation)) { + parsed.jsonIndent = indentation; + name = name.slice(0, idx); + } + } + parsed.outputMode = OM_FROM_NAME[name]; + if (parsed.outputMode === undefined) { + throw new Error('unknown output mode: "'+name+'"'); + } + break; + case '-j': // output with JSON.stringify + parsed.outputMode = OM_JSON; + break; + case '-0': + parsed.outputMode = OM_BUNYAN; + break; + case '-L': + parsed.timeFormat = TIME_LOCAL; + break; + case '--time': + var timeArg = args.shift(); + switch (timeArg) { + case 'utc': + parsed.timeFormat = TIME_UTC; + break + case 'local': + parsed.timeFormat = TIME_LOCAL; + break + case undefined: + throw new Error('missing argument to "--time"'); + default: + throw new Error(format('invalid time format: "%s"', + timeArg)); + } + break; + case '-p': + if (!parsed.pids) { + parsed.pids = []; + } + var pidArg = args.shift(); + var pid = +(pidArg); + if (!isNaN(pid) || pidArg === '*') { + if (parsed.pidsType && parsed.pidsType !== 'num') { + throw new Error(format('cannot mix PID name and ' + + 'number arguments: "%s"', pidArg)); + } + parsed.pidsType = 'num'; + if (!parsed.pids) { + parsed.pids = []; + } + parsed.pids.push(isNaN(pid) ? pidArg : pid); + } else { + if (parsed.pidsType && parsed.pidsType !== 'name') { + throw new Error(format('cannot mix PID name and ' + + 'number arguments: "%s"', pidArg)); + } + parsed.pidsType = 'name'; + parsed.pids = pidArg; + } + break; + case '-l': + case '--level': + var levelArg = args.shift(); + var level = +(levelArg); + if (isNaN(level)) { + level = +levelFromName[levelArg.toLowerCase()]; + } + if (isNaN(level)) { + throw new Error('unknown level value: "'+levelArg+'"'); + } + parsed.level = level; + break; + case '-c': + case '--condition': + gUsingConditionOpts = true; + var condition = args.shift(); + if (Boolean(process.env.BUNYAN_EXEC && + process.env.BUNYAN_EXEC === 'vm')) + { + parsed.condVm = parsed.condVm || []; + var scriptName = 'bunyan-condition-'+parsed.condVm.length; + var code = condDefines + condition; + var script; + try { + script = vm.createScript(code, scriptName); + } catch (complErr) { + throw new Error(format('illegal CONDITION code: %s\n' + + ' CONDITION script:\n' + + '%s\n' + + ' Error:\n' + + '%s', + complErr, indent(code), indent(complErr.stack))); + } + + // Ensure this is a reasonably safe CONDITION. + try { + script.runInNewContext(minValidRecord); + } catch (condErr) { + throw new Error(format( + /* JSSTYLED */ + 'CONDITION code cannot safely filter a minimal Bunyan log record\n' + + ' CONDITION script:\n' + + '%s\n' + + ' Minimal Bunyan log record:\n' + + '%s\n' + + ' Filter error:\n' + + '%s', + indent(code), + indent(JSON.stringify(minValidRecord, null, 2)), + indent(condErr.stack) + )); + } + parsed.condVm.push(script); + } else { + parsed.condFuncs = parsed.condFuncs || []; + parsed.condFuncs.push(funcWithReturnFromSnippet(condition)); + } + break; + default: // arguments + if (!endOfOptions && arg.length > 0 && arg[0] === '-') { + throw new Error('unknown option "'+arg+'"'); + } + parsed.args.push(arg); + break; + } + } + //TODO: '--' handling and error on a first arg that looks like an option. + + return parsed; +} + + +function isInteger(s) { + return (s.search(/^-?[0-9]+$/) == 0); +} + + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +// Suggested colors (some are unreadable in common cases): +// - Good: cyan, yellow (limited use), bold, green, magenta, red +// - Bad: blue (not visible on cmd.exe), grey (same color as background on +// Solarized Dark theme from , see +// issue #160) +var colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +function stylizeWithColor(str, color) { + if (!str) + return ''; + var codes = colors[color]; + if (codes) { + return '\033[' + codes[0] + 'm' + str + + '\033[' + codes[1] + 'm'; + } else { + return str; + } +} + +function stylizeWithoutColor(str, color) { + return str; +} + + +/** + * Is this a valid Bunyan log record. + */ +function isValidRecord(rec) { + if (rec.v == null || + rec.level == null || + rec.name == null || + rec.hostname == null || + rec.pid == null || + rec.time == null || + rec.msg == null) { + // Not valid Bunyan log. + return false; + } else { + return true; + } +} +var minValidRecord = { + v: 0, //TODO: get this from bunyan.LOG_VERSION + level: INFO, + name: 'name', + hostname: 'hostname', + pid: 123, + time: Date.now(), + msg: 'msg' +}; + + +/** + * Parses the given log line and either emits it right away (for invalid + * records) or enqueues it for emitting later when it's the next line to show. + */ +function handleLogLine(file, line, opts, stylize) { + currLine = line; // intentionally global + + // Emit non-JSON lines immediately. + var rec; + if (!line) { + if (!opts.strict) emit(line + '\n'); + return; + } else if (line[0] !== '{') { + if (!opts.strict) emit(line + '\n'); // not JSON + return; + } else { + try { + rec = JSON.parse(line); + } catch (e) { + if (!opts.strict) emit(line + '\n'); + return; + } + } + + if (!isValidRecord(rec)) { + if (!opts.strict) emit(line + '\n'); + return; + } + + if (!filterRecord(rec, opts)) + return; + + if (file === null) + return emitRecord(rec, line, opts, stylize); + + return gotRecord(file, line, rec, opts, stylize); +} + +/** + * Print out a single result, considering input options. + */ +function emitRecord(rec, line, opts, stylize) { + var short = false; + + switch (opts.outputMode) { + case OM_SHORT: + short = true; + /* jsl:fall-thru */ + + case OM_LONG: + // [time] LEVEL: name[/comp]/pid on hostname (src): msg* (extras...) + // msg* + // -- + // long and multi-line extras + // ... + // If 'msg' is single-line, then it goes in the top line. + // If 'req', show the request. + // If 'res', show the response. + // If 'err' and 'err.stack' then show that. + if (!isValidRecord(rec)) { + return emit(line + '\n'); + } + + delete rec.v; + + var time = rec.time; + switch (opts.timeFormat) { + case TIME_UTC: + break; + case TIME_LOCAL: + if (!timezoneOffsetMs) { + timezoneOffsetMs + = (new Date(time)).getTimezoneOffset() * 60 * 1000; + } + time = new Date( + (new Date(time)).getTime() - timezoneOffsetMs).toISOString() + break; + } + if (short && rec.time[10] === 'T') { + // Presuming `time` is ISO8601 formatted, i.e. safe to drop date. + time = stylize(time.substr(11), 'XXX'); + } else { + time = stylize('[' + time + ']', 'XXX'); + } + delete rec.time; + + var nameStr = rec.name; + delete rec.name; + + if (rec.component) { + nameStr += '/' + rec.component; + } + delete rec.component; + + if (!short) + nameStr += '/' + rec.pid; + delete rec.pid; + + var level = (upperPaddedNameFromLevel[rec.level] || 'LVL' + rec.level); + if (opts.color) { + var colorFromLevel = { + 10: 'white', // TRACE + 20: 'yellow', // DEBUG + 30: 'cyan', // INFO + 40: 'magenta', // WARN + 50: 'red', // ERROR + 60: 'inverse', // FATAL + }; + level = stylize(level, colorFromLevel[rec.level]); + } + delete rec.level; + + var src = ''; + if (rec.src && rec.src.file) { + var s = rec.src; + if (s.func) { + src = format(' (%s:%d in %s)', s.file, s.line, s.func); + } else { + src = format(' (%s:%d)', s.file, s.line); + } + src = stylize(src, 'green'); + } + delete rec.src; + + var hostname = rec.hostname; + delete rec.hostname; + + var extras = []; + var details = []; + + if (rec.req_id) { + extras.push('req_id=' + rec.req_id); + } + delete rec.req_id; + + var onelineMsg; + if (rec.msg.indexOf('\n') !== -1) { + onelineMsg = ''; + details.push(indent(stylize(rec.msg, 'cyan'))); + } else { + onelineMsg = ' ' + stylize(rec.msg, 'cyan'); + } + delete rec.msg; + + if (rec.req && typeof (rec.req) === 'object') { + var req = rec.req; + delete rec.req; + var headers = req.headers; + if (!headers) { + headers = ''; + } else if (typeof (headers) === 'string') { + headers = '\n' + headers; + } else if (typeof (headers) === 'object') { + headers = '\n' + Object.keys(headers).map(function (h) { + return h + ': ' + headers[h]; + }).join('\n'); + } + var s = format('%s %s HTTP/%s%s', req.method, + req.url, + req.httpVersion || '1.1', + headers + ); + delete req.url; + delete req.method; + delete req.httpVersion; + delete req.headers; + if (req.body) { + s += '\n\n' + (typeof (req.body) === 'object' + ? JSON.stringify(req.body, null, 2) : req.body); + delete req.body; + } + if (req.trailers && Object.keys(req.trailers) > 0) { + s += '\n' + Object.keys(req.trailers).map(function (t) { + return t + ': ' + req.trailers[t]; + }).join('\n'); + } + delete req.trailers; + details.push(indent(s)); + // E.g. for extra 'foo' field on 'req', add 'req.foo' at + // top-level. This *does* have the potential to stomp on a + // literal 'req.foo' key. + Object.keys(req).forEach(function (k) { + rec['req.' + k] = req[k]; + }) + } + + if (rec.client_req && typeof (rec.client_req) === 'object') { + var client_req = rec.client_req; + delete rec.client_req; + var headers = client_req.headers; + var hostHeaderLine = ''; + var s = ''; + if (client_req.address) { + hostHeaderLine = 'Host: ' + client_req.address; + if (client_req.port) + hostHeaderLine += ':' + client_req.port; + hostHeaderLine += '\n'; + } + delete client_req.headers; + delete client_req.address; + delete client_req.port; + s += format('%s %s HTTP/%s\n%s%s', client_req.method, + client_req.url, + client_req.httpVersion || '1.1', + hostHeaderLine, + (headers ? + Object.keys(headers).map( + function (h) { + return h + ': ' + headers[h]; + }).join('\n') : + '')); + delete client_req.method; + delete client_req.url; + delete client_req.httpVersion; + if (client_req.body) { + s += '\n\n' + (typeof (client_req.body) === 'object' ? + JSON.stringify(client_req.body, null, 2) : + client_req.body); + delete client_req.body; + } + // E.g. for extra 'foo' field on 'client_req', add + // 'client_req.foo' at top-level. This *does* have the potential + // to stomp on a literal 'client_req.foo' key. + Object.keys(client_req).forEach(function (k) { + rec['client_req.' + k] = client_req[k]; + }) + details.push(indent(s)); + } + + function _res(res) { + var s = ''; + if (res.statusCode !== undefined) { + s += format('HTTP/1.1 %s %s\n', res.statusCode, + http.STATUS_CODES[res.statusCode]); + delete res.statusCode; + } + // Handle `res.header` or `res.headers` as either a string or + // and object of header key/value pairs. Prefer `res.header` if set + // (TODO: Why? I don't recall. Typical of restify serializer? + // Typical JSON.stringify of a core node HttpResponse?) + var headerTypes = {string: true, object: true}; + var headers; + if (res.header && headerTypes[typeof (res.header)]) { + headers = res.header; + delete res.header; + } else if (res.headers && headerTypes[typeof (res.headers)]) { + headers = res.headers; + delete res.headers; + } + if (headers === undefined) { + /* pass through */ + } else if (typeof (headers) === 'string') { + s += headers.trimRight(); + } else { + s += Object.keys(headers).map( + function (h) { return h + ': ' + headers[h]; }).join('\n'); + } + if (res.body !== undefined) { + s += '\n\n' + (typeof (res.body) === 'object' + ? JSON.stringify(res.body, null, 2) : res.body); + delete res.body; + } else { + s = s.trimRight(); + } + if (res.trailer) { + s += '\n' + res.trailer; + } + delete res.trailer; + if (s) { + details.push(indent(s)); + } + // E.g. for extra 'foo' field on 'res', add 'res.foo' at + // top-level. This *does* have the potential to stomp on a + // literal 'res.foo' key. + Object.keys(res).forEach(function (k) { + rec['res.' + k] = res[k]; + }); + } + + if (rec.res && typeof (rec.res) === 'object') { + _res(rec.res); + delete rec.res; + } + if (rec.client_res && typeof (rec.client_res) === 'object') { + _res(rec.client_res); + delete rec.res; + } + + if (rec.err && rec.err.stack) { + var err = rec.err + if (typeof (err.stack) !== 'string') { + details.push(indent(err.stack.toString())); + } else { + details.push(indent(err.stack)); + } + delete err.message; + delete err.name; + delete err.stack; + // E.g. for extra 'foo' field on 'err', add 'err.foo' at + // top-level. This *does* have the potential to stomp on a + // literal 'err.foo' key. + Object.keys(err).forEach(function (k) { + rec['err.' + k] = err[k]; + }) + delete rec.err; + } + + var leftover = Object.keys(rec); + for (var i = 0; i < leftover.length; i++) { + var key = leftover[i]; + var value = rec[key]; + var stringified = false; + if (typeof (value) !== 'string') { + value = JSON.stringify(value, null, 2); + stringified = true; + } + if (value.indexOf('\n') !== -1 || value.length > 50) { + details.push(indent(key + ': ' + value)); + } else if (!stringified && (value.indexOf(' ') != -1 || + value.length === 0)) + { + extras.push(key + '=' + JSON.stringify(value)); + } else { + extras.push(key + '=' + value); + } + } + + extras = stylize( + (extras.length ? ' (' + extras.join(', ') + ')' : ''), 'XXX'); + details = stylize( + (details.length ? details.join('\n --\n') + '\n' : ''), 'XXX'); + if (!short) + emit(format('%s %s: %s on %s%s:%s%s\n%s', + time, + level, + nameStr, + hostname || '', + src, + onelineMsg, + extras, + details)); + else + emit(format('%s %s %s:%s%s\n%s', + time, + level, + nameStr, + onelineMsg, + extras, + details)); + break; + + case OM_INSPECT: + emit(util.inspect(rec, false, Infinity, true) + '\n'); + break; + + case OM_BUNYAN: + emit(JSON.stringify(rec, null, 0) + '\n'); + break; + + case OM_JSON: + emit(JSON.stringify(rec, null, opts.jsonIndent) + '\n'); + break; + + case OM_SIMPLE: + /* JSSTYLED */ + // + if (!isValidRecord(rec)) { + return emit(line + '\n'); + } + emit(format('%s - %s\n', + upperNameFromLevel[rec.level] || 'LVL' + rec.level, + rec.msg)); + break; + default: + throw new Error('unknown output mode: '+opts.outputMode); + } +} + + +var stdoutFlushed = true; +function emit(s) { + try { + stdoutFlushed = stdout.write(s); + } catch (e) { + // Handle any exceptions in stdout writing in `stdout.on('error', ...)`. + } +} + + +/** + * A hacked up version of 'process.exit' that will first drain stdout + * before exiting. *WARNING: This doesn't stop event processing.* IOW, + * callers have to be careful that code following this call isn't + * accidentally executed. + * + * In node v0.6 "process.stdout and process.stderr are blocking when they + * refer to regular files or TTY file descriptors." However, this hack might + * still be necessary in a shell pipeline. + */ +function drainStdoutAndExit(code) { + if (_DEBUG) warn('(drainStdoutAndExit(%d))', code); + stdout.on('drain', function () { + cleanupAndExit(code); + }); + if (stdoutFlushed) { + cleanupAndExit(code); + } +} + + +/** + * Process all input from stdin. + * + * @params opts {Object} Bunyan options object. + * @param stylize {Function} Output stylize function to use. + * @param callback {Function} `function ()` + */ +function processStdin(opts, stylize, callback) { + readingStdin = true; + var leftover = ''; // Left-over partial line from last chunk. + var stdin = process.stdin; + stdin.resume(); + stdin.setEncoding('utf8'); + stdin.on('data', function (chunk) { + var lines = chunk.split(/\r\n|\n/); + var length = lines.length; + if (length === 1) { + leftover += lines[0]; + return; + } + + if (length > 1) { + handleLogLine(null, leftover + lines[0], opts, stylize); + } + leftover = lines.pop(); + length -= 1; + for (var i = 1; i < length; i++) { + handleLogLine(null, lines[i], opts, stylize); + } + }); + stdin.on('end', function () { + if (leftover) { + handleLogLine(null, leftover, opts, stylize); + leftover = ''; + } + callback(); + }); +} + + +/** + * Process bunyan:log-* probes from the given pid. + * + * @params opts {Object} Bunyan options object. + * @param stylize {Function} Output stylize function to use. + * @param callback {Function} `function (code)` + */ +function processPids(opts, stylize, callback) { + var leftover = ''; // Left-over partial line from last chunk. + + /** + * Get the PIDs to dtrace. + * + * @param cb {Function} `function (errCode, pids)` + */ + function getPids(cb) { + if (opts.pidsType === 'num') { + return cb(null, opts.pids); + } + if (process.platform === 'sunos') { + execFile('/bin/pgrep', ['-lf', opts.pids], + function (pidsErr, stdout, stderr) { + if (pidsErr) { + warn('bunyan: error getting PIDs for "%s": %s\n%s\n%s', + opts.pids, pidsErr.message, stdout, stderr); + return cb(1); + } + var pids = stdout.trim().split('\n') + .map(function (line) { + return line.trim().split(/\s+/)[0] + }) + .filter(function (pid) { + return Number(pid) !== process.pid + }); + if (pids.length === 0) { + warn('bunyan: error: no matching PIDs found for "%s"', + opts.pids); + return cb(2); + } + cb(null, pids); + } + ); + } else { + var regex = opts.pids; + if (regex && /[a-zA-Z0-9_]/.test(regex[0])) { + // 'foo' -> '[f]oo' trick to exclude the 'grep' PID from its + // own search. + regex = '[' + regex[0] + ']' + regex.slice(1); + } + exec(format('ps -A -o pid,command | grep \'%s\'', regex), + function (pidsErr, stdout, stderr) { + if (pidsErr) { + warn('bunyan: error getting PIDs for "%s": %s\n%s\n%s', + opts.pids, pidsErr.message, stdout, stderr); + return cb(1); + } + var pids = stdout.trim().split('\n') + .map(function (line) { + return line.trim().split(/\s+/)[0]; + }) + .filter(function (pid) { + return Number(pid) !== process.pid; + }); + if (pids.length === 0) { + warn('bunyan: error: no matching PIDs found for "%s"', + opts.pids); + return cb(2); + } + cb(null, pids); + } + ); + } + } + + getPids(function (errCode, pids) { + if (errCode) { + return callback(errCode); + } + + var probes = pids.map(function (pid) { + if (!opts.level) + return format('bunyan%s:::log-*', pid); + + var rval = [], l; + + for (l in levelFromName) { + if (levelFromName[l] >= opts.level) + rval.push(format('bunyan%s:::log-%s', pid, l)); + } + + if (rval.length != 0) + return rval.join(','); + + warn('bunyan: error: level (%d) exceeds maximum logging level', + opts.level); + return drainStdoutAndExit(1); + }).join(','); + var argv = ['dtrace', '-Z', '-x', 'strsize=4k', + '-x', 'switchrate=10hz', '-qn', + format('%s{printf("%s", copyinstr(arg0))}', probes)]; + //console.log('dtrace argv: %s', argv); + var dtrace = spawn(argv[0], argv.slice(1), + // Share the stderr handle to have error output come + // straight through. Only supported in v0.8+. + {stdio: ['pipe', 'pipe', process.stderr]}); + dtrace.on('error', function (e) { + if (e.syscall === 'spawn' && e.errno === 'ENOENT') { + console.error('bunyan: error: could not spawn "dtrace" ' + + '("bunyan -p" is only supported on platforms with dtrace)'); + } else { + console.error('bunyan: error: unexpected dtrace error: %s', e); + } + callback(1); + }) + child = dtrace; // intentionally global + + function finish(code) { + if (leftover) { + handleLogLine(null, leftover, opts, stylize); + leftover = ''; + } + callback(code); + } + + dtrace.stdout.setEncoding('utf8'); + dtrace.stdout.on('data', function (chunk) { + var lines = chunk.split(/\r\n|\n/); + var length = lines.length; + if (length === 1) { + leftover += lines[0]; + return; + } + if (length > 1) { + handleLogLine(null, leftover + lines[0], opts, stylize); + } + leftover = lines.pop(); + length -= 1; + for (var i = 1; i < length; i++) { + handleLogLine(null, lines[i], opts, stylize); + } + }); + + if (nodeSpawnSupportsStdio) { + dtrace.on('exit', finish); + } else { + // Fallback (for < v0.8) to pipe the dtrace process' stderr to + // this stderr. Wait for all of (1) process 'exit', (2) stderr + // 'end', and (2) stdout 'end' before returning to ensure all + // stderr is flushed (issue #54). + var returnCode = null; + var eventsRemaining = 3; + function countdownToFinish(code) { + returnCode = code; + eventsRemaining--; + if (eventsRemaining == 0) { + finish(returnCode); + } + } + dtrace.stderr.pipe(process.stderr); + dtrace.stderr.on('end', countdownToFinish); + dtrace.stderr.on('end', countdownToFinish); + dtrace.on('exit', countdownToFinish); + } + }); +} + + +/** + * Process all input from the given log file. + * + * @param file {String} Log file path to process. + * @params opts {Object} Bunyan options object. + * @param stylize {Function} Output stylize function to use. + * @param callback {Function} `function ()` + */ +function processFile(file, opts, stylize, callback) { + var stream = fs.createReadStream(file); + if (/\.gz$/.test(file)) { + stream = stream.pipe(require('zlib').createGunzip()); + } + // Manually decode streams - lazy load here as per node/lib/fs.js + var decoder = new (require('string_decoder').StringDecoder)('utf8'); + + streams[file].stream = stream; + + stream.on('error', function (err) { + streams[file].done = true; + callback(err); + }); + + var leftover = ''; // Left-over partial line from last chunk. + stream.on('data', function (data) { + var chunk = decoder.write(data); + if (!chunk.length) { + return; + } + var lines = chunk.split(/\r\n|\n/); + var length = lines.length; + if (length === 1) { + leftover += lines[0]; + return; + } + + if (length > 1) { + handleLogLine(file, leftover + lines[0], opts, stylize); + } + leftover = lines.pop(); + length -= 1; + for (var i = 1; i < length; i++) { + handleLogLine(file, lines[i], opts, stylize); + } + }); + + stream.on('end', function () { + streams[file].done = true; + if (leftover) { + handleLogLine(file, leftover, opts, stylize); + leftover = ''; + } else { + emitNextRecord(opts, stylize); + } + callback(); + }); +} + + +/** + * From node async module. + */ +/* BEGIN JSSTYLED */ +function asyncForEach(arr, iterator, callback) { + callback = callback || function () {}; + if (!arr.length) { + return callback(); + } + var completed = 0; + arr.forEach(function (x) { + iterator(x, function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed === arr.length) { + callback(); + } + } + }); + }); +}; +/* END JSSTYLED */ + + + +/** + * Cleanup and exit properly. + * + * Warning: this doesn't stop processing, i.e. process exit might be delayed. + * It is up to the caller to ensure that no subsequent bunyan processing + * is done after calling this. + * + * @param code {Number} exit code. + * @param signal {String} Optional signal name, if this was exitting because + * of a signal. + */ +var cleanedUp = false; +function cleanupAndExit(code, signal) { + // Guard one call. + if (cleanedUp) { + return; + } + cleanedUp = true; + if (_DEBUG) warn('(bunyan: cleanupAndExit)'); + + // Clear possibly interrupted ANSI code (issue #59). + if (usingAnsiCodes) { + stdout.write('\033[0m'); + } + + // Kill possible dtrace child. + if (child) { + child.kill(signal); + } + + if (pager) { + // Let pager know that output is done, then wait for pager to exit. + stdout.end(); + pager.on('exit', function (pagerCode) { + if (_DEBUG) + warn('(bunyan: pager exit -> process.exit(%s))', + pagerCode || code); + process.exit(pagerCode || code); + }); + } else { + if (_DEBUG) warn('(bunyan: process.exit(%s))', code); + process.exit(code); + } +} + + + +//---- mainline + +process.on('SIGINT', function () { + /** + * Ignore SIGINT (Ctrl+C) if processing stdin -- we should process + * remaining output from preceding process in the pipeline and + * except *it* to close. + */ + if (!readingStdin) { + cleanupAndExit(1, 'SIGINT'); + } +}); +process.on('SIGQUIT', function () { cleanupAndExit(1, 'SIGQUIT'); }); +process.on('SIGTERM', function () { cleanupAndExit(1, 'SIGTERM'); }); +process.on('SIGHUP', function () { cleanupAndExit(1, 'SIGHUP'); }); + +process.on('uncaughtException', function (err) { + function _indent(s) { + var lines = s.split(/\r?\n/); + for (var i = 0; i < lines.length; i++) { + lines[i] = '* ' + lines[i]; + } + return lines.join('\n'); + } + + var title = encodeURIComponent(format( + 'Bunyan %s crashed: %s', getVersion(), String(err))); + var e = console.error; + e('```'); + e('* The Bunyan CLI crashed!'); + e('*'); + if (err.name === 'ReferenceError' && gUsingConditionOpts) { + /* BEGIN JSSTYLED */ + e('* This crash was due to a "ReferenceError", which is often the result of given'); + e('* `-c CONDITION` code that doesn\'t guard against undefined values. If that is'); + /* END JSSTYLED */ + e('* not the problem:'); + e('*'); + } + e('* Please report this issue and include the details below:'); + e('*'); + e('* https://github.com/trentm/node-bunyan/issues/new?title=%s', title); + e('*'); + e('* * *'); + e('* platform:', process.platform); + e('* node version:', process.version); + e('* bunyan version:', getVersion()); + e('* argv: %j', process.argv); + e('* log line: %j', currLine); + e('* stack:'); + e(_indent(err.stack)); + e('```'); + process.exit(1); +}); + + +function main(argv) { + try { + var opts = parseArgv(argv); + } catch (e) { + warn('bunyan: error: %s', e.message); + return drainStdoutAndExit(1); + } + if (opts.help) { + printHelp(); + return; + } + if (opts.version) { + console.log('bunyan ' + getVersion()); + return; + } + if (opts.pid && opts.args.length > 0) { + warn('bunyan: error: can\'t use both "-p PID" (%s) and file (%s) args', + opts.pid, opts.args.join(' ')); + return drainStdoutAndExit(1); + } + if (opts.color === null) { + if (process.env.BUNYAN_NO_COLOR && + process.env.BUNYAN_NO_COLOR.length > 0) { + opts.color = false; + } else { + opts.color = process.stdout.isTTY; + } + } + usingAnsiCodes = opts.color; // intentionally global + var stylize = (opts.color ? stylizeWithColor : stylizeWithoutColor); + + // Pager. + var nodeVer = process.versions.node.split('.').map(Number); + var paginate = ( + process.stdout.isTTY && + process.stdin.isTTY && + !opts.pids && // Don't page if following process output. + opts.args.length > 0 && // Don't page if no file args to process. + process.platform !== 'win32' && + (nodeVer[0] > 0 || nodeVer[1] >= 8) && + (opts.paginate === true || + (opts.paginate !== false && + (!process.env.BUNYAN_NO_PAGER || + process.env.BUNYAN_NO_PAGER.length === 0)))); + if (paginate) { + var pagerCmd = process.env.PAGER || 'less'; + /* JSSTYLED */ + assert.ok(pagerCmd.indexOf('"') === -1 && pagerCmd.indexOf("'") === -1, + 'cannot parse PAGER quotes yet'); + var argv = pagerCmd.split(/\s+/g); + var env = objCopy(process.env); + if (env.LESS === undefined) { + // git's default is LESS=FRSX. I don't like the 'S' here because + // lines are *typically* wide with bunyan output and scrolling + // horizontally is a royal pain. Note a bug in Mac's `less -F`, + // such that SIGWINCH can kill it. If that rears too much then + // I'll remove 'F' from here. + env.LESS = 'FRX'; + } + if (_DEBUG) warn('(pager: argv=%j, env.LESS=%j)', argv, env.LESS); + // `pager` and `stdout` intentionally global. + pager = spawn(argv[0], argv.slice(1), + // Share the stderr handle to have error output come + // straight through. Only supported in v0.8+. + {env: env, stdio: ['pipe', 1, 2]}); + stdout = pager.stdin; + + // Early termination of the pager: just stop. + pager.on('exit', function (pagerCode) { + if (_DEBUG) warn('(bunyan: pager exit)'); + pager = null; + stdout.end() + stdout = process.stdout; + cleanupAndExit(pagerCode); + }); + } + + // Stdout error handling. (Couldn't setup until `stdout` was determined.) + stdout.on('error', function (err) { + if (_DEBUG) warn('(stdout error event: %s)', err); + if (err.code === 'EPIPE') { + drainStdoutAndExit(0); + } else if (err.toString() === 'Error: This socket is closed.') { + // Could get this if the pager closes its stdin, but hasn't + // exited yet. + drainStdoutAndExit(1); + } else { + warn(err); + drainStdoutAndExit(1); + } + }); + + var retval = 0; + if (opts.pids) { + processPids(opts, stylize, function (code) { + cleanupAndExit(code); + }); + } else if (opts.args.length > 0) { + var files = opts.args; + files.forEach(function (file) { + streams[file] = { stream: null, records: [], done: false } + }); + asyncForEach(files, + function (file, next) { + processFile(file, opts, stylize, function (err) { + if (err) { + warn('bunyan: %s', err.message); + retval += 1; + } + next(); + }); + }, + function (err) { + if (err) { + warn('bunyan: unexpected error: %s', err.stack || err); + return drainStdoutAndExit(1); + } + cleanupAndExit(retval); + } + ); + } else { + processStdin(opts, stylize, function () { + cleanupAndExit(retval); + }); + } +} + +if (require.main === module) { + // HACK guard for . + // We override the `process.stdout.end` guard that core node.js puts in + // place. The real fix is that `.end()` shouldn't be called on stdout + // in node core. Node v0.6.9 fixes that. Only guard for v0.6.0..v0.6.8. + var nodeVer = process.versions.node.split('.').map(Number); + if ([0, 6, 0] <= nodeVer && nodeVer <= [0, 6, 8]) { + var stdout = process.stdout; + stdout.end = stdout.destroy = stdout.destroySoon = function () { + /* pass */ + }; + } + + main(process.argv); +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1 b/packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1 new file mode 100644 index 0000000..41d3769 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1 @@ -0,0 +1,235 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "BUNYAN" "1" "January 2015" "" "bunyan manual" +. +.SH "NAME" +\fBbunyan\fR \- filter and pretty\-print Bunyan log file content +. +.SH "SYNOPSIS" +\fBbunyan\fR [OPTIONS] +. +.P +\&\.\.\. | \fBbunyan\fR [OPTIONS] +. +.P +\fBbunyan\fR [OPTIONS] \-p PID +. +.SH "DESCRIPTION" +"Bunyan" is \fBa simple and fast a JSON logging library\fR for node\.js services, a one\-JSON\-object\-per\-line log format, and \fBa \fBbunyan\fR CLI tool\fR for nicely viewing those logs\. This man page describes the latter\. +. +.SS "Pretty\-printing" +A bunyan log file is a stream of JSON objects, optionally interspersed with non\-JSON log lines\. The primary usage of bunyan(1) is to pretty print, for example: +. +.IP "" 4 +. +.nf + +$ bunyan foo\.log # or `cat foo\.log | bunyan +[2012\-02\-08T22:56:52\.856Z] INFO: myservice/123 on example\.com: My message + extra: multi + line +[2012\-02\-08T22:56:54\.856Z] ERROR: myservice/123 on example\.com: My message +\.\.\. +. +.fi +. +.IP "" 0 +. +.P +By default the "long" output format is used\. Use the \fB\-o FORMAT\fR option to emit other formats\. E\.g\.: +. +.IP "" 4 +. +.nf + +$ bunyan foo\.log \-o short +22:56:52\.856Z INFO myservice: My message + extra: multi + line +22:56:54\.856Z ERROR myservice: My message +\.\.\. +. +.fi +. +.IP "" 0 +. +.P +These will color the output if supported in your terminal\. See "OUTPUT FORMATS" below\. +. +.SS "Filtering" +The \fBbunyan\fR CLI can also be used to filter a bunyan log\. Use \fB\-l LEVEL\fR to filter by level: +. +.IP "" 4 +. +.nf + +$ bunyan foo\.log \-l error # show only \'error\' level records +[2012\-02\-08T22:56:54\.856Z] ERROR: myservice/123 on example\.com: My message +. +.fi +. +.IP "" 0 +. +.P +Use \fB\-c COND\fR to filter on a JavaScript expression returning true on the record data\. In the COND code, \fBthis\fR refers to the record object: +. +.IP "" 4 +. +.nf + +$ bunyan foo\.log \-c `this\.three` # show records with the \'extra\' field +[2012\-02\-08T22:56:52\.856Z] INFO: myservice/123 on example\.com: My message + extra: multi + line +. +.fi +. +.IP "" 0 +. +.SH "OPTIONS" +. +.TP +\fB\-h\fR, \fB\-\-help\fR +Print this help info and exit\. +. +.TP +\fB\-\-version\fR +Print version of this command and exit\. +. +.TP +\fB\-q\fR, \fB\-\-quiet\fR +Don\'t warn if input isn\'t valid JSON\. +. +.P +Dtrace options (only on dtrace\-supporting platforms): +. +.TP +\fB\-p PID\fR, \fB\-p NAME\fR +Process bunyan:log\-* probes from the process with the given PID\. Can be used multiple times, or specify all processes with \'*\', or a set of processes whose command & args match a pattern with \'\-p NAME\'\. +. +.P +Filtering options: +. +.TP +\fB\-l\fR, \fB\-\-level LEVEL\fR +Only show messages at or above the specified level\. You can specify level \fInames\fR or numeric values\. (See \'Log Levels\' below\.) +. +.TP +\fB\-c COND\fR, \fB\-\-condition COND\fR +Run each log message through the condition and only show those that resolve to a truish value\. E\.g\. \fB\-c \'this\.pid == 123\'\fR\. +. +.TP +\fB\-\-strict\fR +Suppress all but legal Bunyan JSON log lines\. By default non\-JSON, and non\-Bunyan lines are passed through\. +. +.P +Output options: +. +.TP +\fB\-\-color\fR +Colorize output\. Defaults to try if output stream is a TTY\. +. +.TP +\fB\-\-no\-color\fR +Force no coloring (e\.g\. terminal doesn\'t support it) +. +.TP +\fB\-o FORMAT\fR, \fB\-\-output FORMAT\fR +Specify an output format\. One of \fBlong\fR (the default), \fBshort\fR, \fBjson\fR, \fBjson\-N\fR, \fBbunyan\fR (the native bunyan 0\-indent JSON output) or \fBinspect\fR\. +. +.TP +\fB\-j\fR +Shortcut for \fB\-o json\fR\. +. +.TP +\fB\-L\fR, \fB\-\-time local\fR +Display the time field in \fIlocal\fR time, rather than the default UTC time\. +. +.SH "LOG LEVELS" +In Bunyan log records, then \fBlevel\fR field is a number\. For the \fB\-l|\-\-level\fR argument the level \fBnames\fR are supported as shortcuts\. In \fB\-c|\-\-condition\fR scripts, uppercase symbols like "DEBUG" are defined for convenience\. +. +.IP "" 4 +. +.nf + +Level Name Level Number Symbol in COND Scripts +trace 10 TRACE +debug 20 DEBUG +info 30 INFO +warn 40 WARN +error 50 ERROR +fatal 60 FATAL +. +.fi +. +.IP "" 0 +. +.SH "OUTPUT FORMATS" +. +.nf + +FORMAT NAME DESCRIPTION +long (default) The default output\. Long form\. Colored and "pretty"\. + \'req\' and \'res\' and \'err\' fields are rendered specially + as an HTTP request, HTTP response and exception + stack trace, respectively\. For backward compat, the + name "paul" also works for this\. +short Like the default output, but more concise\. Some + typically redundant fields are ellided\. +json JSON output, 2\-space indentation\. +json\-N JSON output, N\-space indentation, e\.g\. "json\-4" +bunyan Alias for "json\-0", the Bunyan "native" format\. +inspect Node\.js `util\.inspect` output\. +. +.fi +. +.SH "DTRACE SUPPORT" +On systems that support DTrace (e\.g\., MacOS, FreeBSD, illumos derivatives like SmartOS and OmniOS), Bunyan will create a DTrace provider (\fBbunyan\fR) that makes available the following probes: +. +.IP "" 4 +. +.nf + +log\-trace +log\-debug +log\-info +log\-warn +log\-error +log\-fatal +. +.fi +. +.IP "" 0 +. +.P +Each of these probes has a single argument: the string that would be written to the log\. Note that when a probe is enabled, it will fire whenever the corresponding function is called, even if the level of the log message is less than that of any stream\. +. +.P +See \fIhttps://github\.com/trentm/node\-bunyan#dtrace\-support\fR for more details and the \'\-p PID\' option above for convenience usage\. +. +.SH "ENVIRONMENT" +. +.TP +\fBBUNYAN_NO_COLOR\fR +Set to a non\-empty value to force no output coloring\. See \'\-\-no\-color\'\. +. +.SH "PROJECT & BUGS" +\fBbunyan\fR is written in JavaScript and requires node\.js (\fBnode\fR)\. The project lives at \fIhttps://github\.com/trentm/node\-bunyan\fR and is published to npm as "bunyan"\. +. +.IP "\(bu" 4 +README, Install notes: \fIhttps://github\.com/trentm/node\-bunyan#readme\fR +. +.IP "\(bu" 4 +Report bugs to \fIhttps://github\.com/trentm/node\-bunyan/issues\fR\. +. +.IP "\(bu" 4 +See the full changelog at: \fIhttps://github\.com/trentm/node\-bunyan/blob/master/CHANGES\.md\fR +. +.IP "" 0 +. +.SH "LICENSE" +MIT License (see \fIhttps://github\.com/trentm/node\-bunyan/blob/master/LICENSE\.txt\fR) +. +.SH "COPYRIGHT" +node\-bunyan is Copyright (c) 2012 Joyent, Inc\. Copyright (c) 2012 Trent Mick\. All rights reserved\. diff --git a/packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1.html b/packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1.html new file mode 100644 index 0000000..c11eaf0 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1.html @@ -0,0 +1,281 @@ + + + + + + bunyan(1) - filter and pretty-print Bunyan log file content + + + + + +
+ + + +
    +
  1. bunyan(1)
  2. +
  3. bunyan manual
  4. +
  5. bunyan(1)
  6. +
+ +

NAME

+

+ bunyan - filter and pretty-print Bunyan log file content +

+ +

SYNOPSIS

+ +

bunyan [OPTIONS]

+ +

... | bunyan [OPTIONS]

+ +

bunyan [OPTIONS] -p PID

+ +

DESCRIPTION

+ +

"Bunyan" is a simple and fast a JSON logging library for node.js services, +a one-JSON-object-per-line log format, and a bunyan CLI tool for nicely +viewing those logs. This man page describes the latter.

+ +

Pretty-printing

+ +

A bunyan log file is a stream of JSON objects, optionally interspersed with +non-JSON log lines. The primary usage of bunyan(1) is to pretty print, +for example:

+ +
$ bunyan foo.log          # or `cat foo.log | bunyan
+[2012-02-08T22:56:52.856Z]  INFO: myservice/123 on example.com: My message
+    extra: multi
+    line
+[2012-02-08T22:56:54.856Z] ERROR: myservice/123 on example.com: My message
+...
+
+ +

By default the "long" output format is used. Use the -o FORMAT option to +emit other formats. E.g.:

+ +
$ bunyan foo.log -o short
+22:56:52.856Z  INFO myservice: My message
+    extra: multi
+    line
+22:56:54.856Z ERROR myservice: My message
+...
+
+ +

These will color the output if supported in your terminal. +See "OUTPUT FORMATS" below.

+ +

Filtering

+ +

The bunyan CLI can also be used to filter a bunyan log. Use -l LEVEL +to filter by level:

+ +
$ bunyan foo.log -l error       # show only 'error' level records
+[2012-02-08T22:56:54.856Z] ERROR: myservice/123 on example.com: My message
+
+ +

Use -c COND to filter on a JavaScript expression returning true on the +record data. In the COND code, this refers to the record object:

+ +
$ bunyan foo.log -c `this.three`     # show records with the 'extra' field
+[2012-02-08T22:56:52.856Z]  INFO: myservice/123 on example.com: My message
+    extra: multi
+    line
+
+ +

OPTIONS

+ +
+
-h, --help

Print this help info and exit.

+
--version

Print version of this command and exit.

+
-q, --quiet

Don't warn if input isn't valid JSON.

+
+ + +

Dtrace options (only on dtrace-supporting platforms):

+ +
+
-p PID, -p NAME
Process bunyan:log-* probes from the process with the given PID. +Can be used multiple times, or specify all processes with '*', +or a set of processes whose command & args match a pattern with +'-p NAME'.
+
+ + +

Filtering options:

+ +
+
-l, --level LEVEL

Only show messages at or above the specified level. You can specify level +names or numeric values. (See 'Log Levels' below.)

+
-c COND, --condition COND

Run each log message through the condition and only show those that +resolve to a truish value. E.g. -c 'this.pid == 123'.

+
--strict

Suppress all but legal Bunyan JSON log lines. By default non-JSON, and +non-Bunyan lines are passed through.

+
+ + +

Output options:

+ +
+
--color

Colorize output. Defaults to try if output stream is a TTY.

+
--no-color

Force no coloring (e.g. terminal doesn't support it)

+
-o FORMAT, --output FORMAT

Specify an output format. One of long (the default), short, json, +json-N, bunyan (the native bunyan 0-indent JSON output) or inspect.

+
-j

Shortcut for -o json.

+
-L, --time local

Display the time field in local time, rather than the default UTC +time.

+
+ + +

LOG LEVELS

+ +

In Bunyan log records, then level field is a number. For the -l|--level +argument the level names are supported as shortcuts. In -c|--condition +scripts, uppercase symbols like "DEBUG" are defined for convenience.

+ +
Level Name      Level Number    Symbol in COND Scripts
+trace           10              TRACE
+debug           20              DEBUG
+info            30              INFO
+warn            40              WARN
+error           50              ERROR
+fatal           60              FATAL
+
+ +

OUTPUT FORMATS

+ +
FORMAT NAME         DESCRIPTION
+long (default)      The default output. Long form. Colored and "pretty".
+                    'req' and 'res' and 'err' fields are rendered specially
+                    as an HTTP request, HTTP response and exception
+                    stack trace, respectively. For backward compat, the
+                    name "paul" also works for this.
+short               Like the default output, but more concise. Some
+                    typically redundant fields are ellided.
+json                JSON output, 2-space indentation.
+json-N              JSON output, N-space indentation, e.g. "json-4"
+bunyan              Alias for "json-0", the Bunyan "native" format.
+inspect             Node.js `util.inspect` output.
+
+ +

DTRACE SUPPORT

+ +

On systems that support DTrace (e.g., MacOS, FreeBSD, illumos derivatives +like SmartOS and OmniOS), Bunyan will create a DTrace provider (bunyan) +that makes available the following probes:

+ +
log-trace
+log-debug
+log-info
+log-warn
+log-error
+log-fatal
+
+ +

Each of these probes has a single argument: the string that would be +written to the log. Note that when a probe is enabled, it will +fire whenever the corresponding function is called, even if the level of +the log message is less than that of any stream.

+ +

See https://github.com/trentm/node-bunyan#dtrace-support for more details +and the '-p PID' option above for convenience usage.

+ +

ENVIRONMENT

+ +
+
BUNYAN_NO_COLOR
Set to a non-empty value to force no output coloring. See '--no-color'.
+
+ + +

PROJECT & BUGS

+ +

bunyan is written in JavaScript and requires node.js (node). The project +lives at https://github.com/trentm/node-bunyan and is published to npm as +"bunyan".

+ + + + +

LICENSE

+ +

MIT License (see https://github.com/trentm/node-bunyan/blob/master/LICENSE.txt)

+ + + +

node-bunyan is Copyright (c) 2012 Joyent, Inc. Copyright (c) 2012 Trent Mick. +All rights reserved.

+ + +
    +
  1. +
  2. January 2015
  3. +
  4. bunyan(1)
  5. +
+ +
+Fork me on GitHub + diff --git a/packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1.ronn b/packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1.ronn new file mode 100644 index 0000000..c09b933 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/docs/bunyan.1.ronn @@ -0,0 +1,195 @@ +# bunyan(1) -- filter and pretty-print Bunyan log file content + + +## SYNOPSIS + +`bunyan` \[OPTIONS\] + +... | `bunyan` \[OPTIONS\] + +`bunyan` \[OPTIONS\] -p PID + + +## DESCRIPTION + +"Bunyan" is **a simple and fast a JSON logging library** for node.js services, +a one-JSON-object-per-line log format, and **a `bunyan` CLI tool** for nicely +viewing those logs. This man page describes the latter. + + +### Pretty-printing + +A bunyan log file is a stream of JSON objects, optionally interspersed with +non-JSON log lines. The primary usage of bunyan(1) is to pretty print, +for example: + + $ bunyan foo.log # or `cat foo.log | bunyan + [2012-02-08T22:56:52.856Z] INFO: myservice/123 on example.com: My message + extra: multi + line + [2012-02-08T22:56:54.856Z] ERROR: myservice/123 on example.com: My message + ... + +By default the "long" output format is used. Use the `-o FORMAT` option to +emit other formats. E.g.: + + $ bunyan foo.log -o short + 22:56:52.856Z INFO myservice: My message + extra: multi + line + 22:56:54.856Z ERROR myservice: My message + ... + +These will color the output if supported in your terminal. +See "OUTPUT FORMATS" below. + + +### Filtering + +The `bunyan` CLI can also be used to filter a bunyan log. Use `-l LEVEL` +to filter by level: + + $ bunyan foo.log -l error # show only 'error' level records + [2012-02-08T22:56:54.856Z] ERROR: myservice/123 on example.com: My message + +Use `-c COND` to filter on a JavaScript expression returning true on the +record data. In the COND code, `this` refers to the record object: + + $ bunyan foo.log -c `this.three` # show records with the 'extra' field + [2012-02-08T22:56:52.856Z] INFO: myservice/123 on example.com: My message + extra: multi + line + + +## OPTIONS + + * `-h`, `--help`: + Print this help info and exit. + + * `--version`: + Print version of this command and exit. + + * `-q`, `--quiet`: + Don't warn if input isn't valid JSON. + +Dtrace options (only on dtrace-supporting platforms): + + * `-p PID`, `-p NAME`: + Process bunyan:log-\* probes from the process with the given PID. + Can be used multiple times, or specify all processes with '\*', + or a set of processes whose command & args match a pattern with + '-p NAME'. + +Filtering options: + + * `-l`, `--level LEVEL`: + Only show messages at or above the specified level. You can specify level + *names* or numeric values. (See 'Log Levels' below.) + + * `-c COND`, `--condition COND`: + Run each log message through the condition and only show those that + resolve to a truish value. E.g. `-c 'this.pid == 123'`. + + * `--strict`: + Suppress all but legal Bunyan JSON log lines. By default non-JSON, and + non-Bunyan lines are passed through. + +Output options: + + * `--color`: + Colorize output. Defaults to try if output stream is a TTY. + + * `--no-color`: + Force no coloring (e.g. terminal doesn't support it) + + * `-o FORMAT`, `--output FORMAT`: + Specify an output format. One of `long` (the default), `short`, `json`, + `json-N`, `bunyan` (the native bunyan 0-indent JSON output) or `inspect`. + + * `-j`: + Shortcut for `-o json`. + + * `-L`, `--time local`: + Display the time field in *local* time, rather than the default UTC + time. + + +## LOG LEVELS + +In Bunyan log records, then `level` field is a number. For the `-l|--level` +argument the level **names** are supported as shortcuts. In `-c|--condition` +scripts, uppercase symbols like "DEBUG" are defined for convenience. + + Level Name Level Number Symbol in COND Scripts + trace 10 TRACE + debug 20 DEBUG + info 30 INFO + warn 40 WARN + error 50 ERROR + fatal 60 FATAL + + +## OUTPUT FORMATS + + FORMAT NAME DESCRIPTION + long (default) The default output. Long form. Colored and "pretty". + 'req' and 'res' and 'err' fields are rendered specially + as an HTTP request, HTTP response and exception + stack trace, respectively. For backward compat, the + name "paul" also works for this. + short Like the default output, but more concise. Some + typically redundant fields are ellided. + json JSON output, 2-space indentation. + json-N JSON output, N-space indentation, e.g. "json-4" + bunyan Alias for "json-0", the Bunyan "native" format. + inspect Node.js `util.inspect` output. + + +## DTRACE SUPPORT + +On systems that support DTrace (e.g., MacOS, FreeBSD, illumos derivatives +like SmartOS and OmniOS), Bunyan will create a DTrace provider (`bunyan`) +that makes available the following probes: + + log-trace + log-debug + log-info + log-warn + log-error + log-fatal + +Each of these probes has a single argument: the string that would be +written to the log. Note that when a probe is enabled, it will +fire whenever the corresponding function is called, even if the level of +the log message is less than that of any stream. + +See for more details +and the '-p PID' option above for convenience usage. + + +## ENVIRONMENT + + * `BUNYAN_NO_COLOR`: + Set to a non-empty value to force no output coloring. See '--no-color'. + + +## PROJECT & BUGS + +`bunyan` is written in JavaScript and requires node.js (`node`). The project +lives at and is published to npm as +"bunyan". + +* README, Install notes: +* Report bugs to . +* See the full changelog at: + + +## LICENSE + +MIT License (see ) + + +## COPYRIGHT + +node-bunyan is Copyright (c) 2012 Joyent, Inc. Copyright (c) 2012 Trent Mick. +All rights reserved. diff --git a/packages/logging/.npm/package/node_modules/bunyan/docs/img/bunyan.browserify.png b/packages/logging/.npm/package/node_modules/bunyan/docs/img/bunyan.browserify.png new file mode 100644 index 0000000000000000000000000000000000000000..411aa1fedae850bb3e5c550d2c7d17cb998c9429 GIT binary patch literal 198704 zcmaI71C(S6Wky8i zFCsH<+=!?sMR^H$7#tWNARu@tNl|4WAP6ELAmBYHknfhu*W@!GAUJd@5fMcx5fLIq zX9sgDTQeXaN%&d~3r&@AoII7JgoHT|u0;qfQWJG*HGF%)gJqC zmtKNx34kQgY~^#y;Ee<51dmxPEu;GyQa=|bVb|FB@;da}E z30q2pAvETOGNcLe5*Rz=MNUR|5)7Fzvsj>bA`Ycd z3#=i326k?yIIwr>?sD+5VyvNZBcNHxuynXU2z=(NnTO*Y+FUaQvhnfoQQ-AyF*-DR zZ5Cifwi4@;qd1a;zvwOCeH|NpW^hKJ!ZuPY>7tK|{0+Zh@$$|g9P&>1%He0pnfuLK z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_B3kT`J9G8IYJz7bm#r-ADVSMPILi6hvQmMb=a{CyUxiVX4VvvQhEKQNL`36ojlfla>SXTSn=UWhy_G zD`8X~zvUz@qtNcPFL`}%7I)cIK5ffo6;-Jepq~B%*uC8`J#>Pv%=G8=#@f;{5_>tU z99NG%-gM8Cp`iNrSnQX;xMlH4iRUCHPRaMj8vbQYgEYE&YgsI6sO%yo`1>$J`{;cO1s^{vxaI&AMf{Q2jhMu;z zLvTXW%5NpqZOpiZsxuc+5pttSRI(!oGYl4C3u^e&aY7Gy0$YeIULt#Crg~Fc!~SzYjct!p6j!&-2`oI=uF7 zPWq>ZvWK~%`6`_YZc`40q<=JRs)Ya5>7t#E5d;bO;e(V=HrLGrg|Qf-2=bqD`Uds= z;)U$|oZO03fcd{3{SAxqz5S0t46N<{1_1wtCBrBo;1VrVKEV9BYy8g|J`;s_Pbsew z_h0(>Z@`j-Bm;urYk{KhhyUXXeqlgzrST~W6a8td|9*WyfW;dS87>Yh{Kpvl=k*Yf z@-Rg?ENwf{ceLvs_CVqZg3S-v$cXMp0FasyZZxa7kXRq*2{#{7oy*JP> Rs1R>IDKRbunyan(1) man page diff --git a/packages/logging/.npm/package/node_modules/bunyan/lib/bunyan.js b/packages/logging/.npm/package/node_modules/bunyan/lib/bunyan.js new file mode 100644 index 0000000..bac328c --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/lib/bunyan.js @@ -0,0 +1,1434 @@ +/** + * Copyright (c) 2014 Trent Mick. All rights reserved. + * Copyright (c) 2014 Joyent Inc. All rights reserved. + * + * The bunyan logging library for node.js. + * + * -*- mode: js -*- + * vim: expandtab:ts=4:sw=4 + */ + +var VERSION = '1.4.0'; + +// Bunyan log format version. This becomes the 'v' field on all log records. +// `0` is until I release a version '1.0.0' of node-bunyan. Thereafter, +// starting with `1`, this will be incremented if there is any backward +// incompatible change to the log record format. Details will be in +// 'CHANGES.md' (the change log). +var LOG_VERSION = 0; + + +var xxx = function xxx(s) { // internal dev/debug logging + var args = ['XX' + 'X: '+s].concat( + Array.prototype.slice.call(arguments, 1)); + console.error.apply(this, args); +}; +var xxx = function xxx() {}; // comment out to turn on debug logging + + +var os = require('os'); +var fs = require('fs'); +var util = require('util'); +var assert = require('assert'); +try { + /* Use `+ ''` to hide this import from browserify. */ + var dtrace = require('dtrace-provider' + ''); +} catch (e) { + dtrace = null; +} +var EventEmitter = require('events').EventEmitter; + +try { + var safeJsonStringify = require('safe-json-stringify'); +} catch (e) { + safeJsonStringify = null; +} +if (process.env.BUNYAN_TEST_NO_SAFE_JSON_STRINGIFY) { + safeJsonStringify = null; +} + +// The 'mv' module is required for rotating-file stream support. +try { + /* Use `+ ''` to hide this import from browserify. */ + var mv = require('mv' + ''); +} catch (e) { + mv = null; +} + +// Are we in the browser (e.g. running via browserify)? +var isBrowser = function () { + return typeof (window) !== 'undefined' && this === window; }(); + +try { + /* Use `+ ''` to hide this import from browserify. */ + var sourceMapSupport = require('source-map-support' + ''); +} catch (_) { + sourceMapSupport = null; +} + + + +//---- Internal support stuff + +/** + * A shallow copy of an object. Bunyan logging attempts to never cause + * exceptions, so this function attempts to handle non-objects gracefully. + */ +function objCopy(obj) { + if (obj == null) { // null or undefined + return obj; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else if (typeof (obj) === 'object') { + var copy = {}; + Object.keys(obj).forEach(function (k) { + copy[k] = obj[k]; + }); + return copy; + } else { + return obj; + } +} + +var format = util.format; +if (!format) { + // If node < 0.6, then use its `util.format`: + // : + var inspect = util.inspect; + var formatRegExp = /%[sdj%]/g; + format = function format(f) { + if (typeof (f) !== 'string') { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function (x) { + if (i >= len) + return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': return JSON.stringify(args[i++], safeCycles()); + case '%%': return '%'; + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (x === null || typeof (x) !== 'object') { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; + }; +} + + +/** + * Gather some caller info 3 stack levels up. + * See . + */ +function getCaller3Info() { + var obj = {}; + var saveLimit = Error.stackTraceLimit; + var savePrepare = Error.prepareStackTrace; + Error.stackTraceLimit = 3; + Error.captureStackTrace(this, getCaller3Info); + + Error.prepareStackTrace = function (_, stack) { + var caller = stack[2]; + if (sourceMapSupport) { + caller = sourceMapSupport.wrapCallSite(caller); + } + obj.file = caller.getFileName(); + obj.line = caller.getLineNumber(); + var func = caller.getFunctionName(); + if (func) + obj.func = func; + }; + this.stack; + Error.stackTraceLimit = saveLimit; + Error.prepareStackTrace = savePrepare; + return obj; +} + + +function _indent(s, indent) { + if (!indent) indent = ' '; + var lines = s.split(/\r?\n/g); + return indent + lines.join('\n' + indent); +} + + +/** + * Warn about an bunyan processing error. + * + * @param msg {String} Message with which to warn. + * @param dedupKey {String} Optional. A short string key for this warning to + * have its warning only printed once. + */ +function _warn(msg, dedupKey) { + assert.ok(msg); + if (dedupKey) { + if (_warned[dedupKey]) { + return; + } + _warned[dedupKey] = true; + } + process.stderr.write(msg + '\n'); +} +function _haveWarned(dedupKey) { + return _warned[dedupKey]; +} +var _warned = {}; + + +function ConsoleRawStream() {} +ConsoleRawStream.prototype.write = function (rec) { + if (rec.level < INFO) { + console.log(rec); + } else if (rec.level < WARN) { + console.info(rec); + } else if (rec.level < ERROR) { + console.warn(rec); + } else { + console.error(rec); + } +}; + + +//---- Levels + +var TRACE = 10; +var DEBUG = 20; +var INFO = 30; +var WARN = 40; +var ERROR = 50; +var FATAL = 60; + +var levelFromName = { + 'trace': TRACE, + 'debug': DEBUG, + 'info': INFO, + 'warn': WARN, + 'error': ERROR, + 'fatal': FATAL +}; +var nameFromLevel = {}; +Object.keys(levelFromName).forEach(function (name) { + nameFromLevel[levelFromName[name]] = name; +}); + +// Dtrace probes. +var dtp = undefined; +var probes = dtrace && {}; + +/** + * Resolve a level number, name (upper or lowercase) to a level number value. + * + * @api public + */ +function resolveLevel(nameOrNum) { + var level = (typeof (nameOrNum) === 'string' + ? levelFromName[nameOrNum.toLowerCase()] + : nameOrNum); + return level; +} + + + +//---- Logger class + +/** + * Create a Logger instance. + * + * @param options {Object} See documentation for full details. At minimum + * this must include a 'name' string key. Configuration keys: + * - `streams`: specify the logger output streams. This is an array of + * objects with these fields: + * - `type`: The stream type. See README.md for full details. + * Often this is implied by the other fields. Examples are + * 'file', 'stream' and "raw". + * - `level`: Defaults to 'info'. + * - `path` or `stream`: The specify the file path or writeable + * stream to which log records are written. E.g. + * `stream: process.stdout`. + * - `closeOnExit` (boolean): Optional. Default is true for a + * 'file' stream when `path` is given, false otherwise. + * See README.md for full details. + * - `level`: set the level for a single output stream (cannot be used + * with `streams`) + * - `stream`: the output stream for a logger with just one, e.g. + * `process.stdout` (cannot be used with `streams`) + * - `serializers`: object mapping log record field names to + * serializing functions. See README.md for details. + * - `src`: Boolean (default false). Set true to enable 'src' automatic + * field with log call source info. + * All other keys are log record fields. + * + * An alternative *internal* call signature is used for creating a child: + * new Logger(, [, ]); + * + * @param _childSimple (Boolean) An assertion that the given `_childOptions` + * (a) only add fields (no config) and (b) no serialization handling is + * required for them. IOW, this is a fast path for frequent child + * creation. + */ +function Logger(options, _childOptions, _childSimple) { + xxx('Logger start:', options) + if (!(this instanceof Logger)) { + return new Logger(options, _childOptions); + } + + // Input arg validation. + var parent; + if (_childOptions !== undefined) { + parent = options; + options = _childOptions; + if (!(parent instanceof Logger)) { + throw new TypeError( + 'invalid Logger creation: do not pass a second arg'); + } + } + if (!options) { + throw new TypeError('options (object) is required'); + } + if (!parent) { + if (!options.name) { + throw new TypeError('options.name (string) is required'); + } + } else { + if (options.name) { + throw new TypeError( + 'invalid options.name: child cannot set logger name'); + } + } + if (options.stream && options.streams) { + throw new TypeError('cannot mix "streams" and "stream" options'); + } + if (options.streams && !Array.isArray(options.streams)) { + throw new TypeError('invalid options.streams: must be an array') + } + if (options.serializers && (typeof (options.serializers) !== 'object' || + Array.isArray(options.serializers))) { + throw new TypeError('invalid options.serializers: must be an object') + } + + EventEmitter.call(this); + + // Fast path for simple child creation. + if (parent && _childSimple) { + // `_isSimpleChild` is a signal to stream close handling that this child + // owns none of its streams. + this._isSimpleChild = true; + + this._level = parent._level; + this.streams = parent.streams; + this.serializers = parent.serializers; + this.src = parent.src; + var fields = this.fields = {}; + var parentFieldNames = Object.keys(parent.fields); + for (var i = 0; i < parentFieldNames.length; i++) { + var name = parentFieldNames[i]; + fields[name] = parent.fields[name]; + } + var names = Object.keys(options); + for (var i = 0; i < names.length; i++) { + var name = names[i]; + fields[name] = options[name]; + } + return; + } + + // Null values. + var self = this; + if (parent) { + this._level = parent._level; + this.streams = []; + for (var i = 0; i < parent.streams.length; i++) { + var s = objCopy(parent.streams[i]); + s.closeOnExit = false; // Don't own parent stream. + this.streams.push(s); + } + this.serializers = objCopy(parent.serializers); + this.src = parent.src; + this.fields = objCopy(parent.fields); + if (options.level) { + this.level(options.level); + } + } else { + this._level = Number.POSITIVE_INFINITY; + this.streams = []; + this.serializers = null; + this.src = false; + this.fields = {}; + } + + if (!dtp && dtrace) { + dtp = dtrace.createDTraceProvider('bunyan'); + + for (var level in levelFromName) { + var probe; + + probes[levelFromName[level]] = probe = + dtp.addProbe('log-' + level, 'char *'); + + // Explicitly add a reference to dtp to prevent it from being GC'd + probe.dtp = dtp; + } + + dtp.enable(); + } + + // Handle *config* options (i.e. options that are not just plain data + // for log records). + if (options.stream) { + self.addStream({ + type: 'stream', + stream: options.stream, + closeOnExit: false, + level: options.level + }); + } else if (options.streams) { + options.streams.forEach(function (s) { + self.addStream(s, options.level); + }); + } else if (parent && options.level) { + this.level(options.level); + } else if (!parent) { + if (isBrowser) { + /* + * In the browser we'll be emitting to console.log by default. + * Any console.log worth its salt these days can nicely render + * and introspect objects (e.g. the Firefox and Chrome console) + * so let's emit the raw log record. Are there browsers for which + * that breaks things? + */ + self.addStream({ + type: 'raw', + stream: new ConsoleRawStream(), + closeOnExit: false, + level: options.level + }); + } else { + self.addStream({ + type: 'stream', + stream: process.stdout, + closeOnExit: false, + level: options.level + }); + } + } + if (options.serializers) { + self.addSerializers(options.serializers); + } + if (options.src) { + this.src = true; + } + xxx('Logger: ', self) + + // Fields. + // These are the default fields for log records (minus the attributes + // removed in this constructor). To allow storing raw log records + // (unrendered), `this.fields` must never be mutated. Create a copy for + // any changes. + var fields = objCopy(options); + delete fields.stream; + delete fields.level; + delete fields.streams; + delete fields.serializers; + delete fields.src; + if (this.serializers) { + this._applySerializers(fields); + } + if (!fields.hostname) { + fields.hostname = os.hostname(); + } + if (!fields.pid) { + fields.pid = process.pid; + } + Object.keys(fields).forEach(function (k) { + self.fields[k] = fields[k]; + }); +} + +util.inherits(Logger, EventEmitter); + + +/** + * Add a stream + * + * @param stream {Object}. Object with these fields: + * - `type`: The stream type. See README.md for full details. + * Often this is implied by the other fields. Examples are + * 'file', 'stream' and "raw". + * - `path` or `stream`: The specify the file path or writeable + * stream to which log records are written. E.g. + * `stream: process.stdout`. + * - `level`: Optional. Falls back to `defaultLevel`. + * - `closeOnExit` (boolean): Optional. Default is true for a + * 'file' stream when `path` is given, false otherwise. + * See README.md for full details. + * @param defaultLevel {Number|String} Optional. A level to use if + * `stream.level` is not set. If neither is given, this defaults to INFO. + */ +Logger.prototype.addStream = function addStream(s, defaultLevel) { + var self = this; + if (defaultLevel === null || defaultLevel === undefined) { + defaultLevel = INFO; + } + + s = objCopy(s); + + // Implicit 'type' from other args. + var type = s.type; + if (!s.type) { + if (s.stream) { + s.type = 'stream'; + } else if (s.path) { + s.type = 'file' + } + } + s.raw = (s.type === 'raw'); // PERF: Allow for faster check in `_emit`. + + if (s.level) { + s.level = resolveLevel(s.level); + } else { + s.level = resolveLevel(defaultLevel); + } + if (s.level < self._level) { + self._level = s.level; + } + + switch (s.type) { + case 'stream': + if (!s.closeOnExit) { + s.closeOnExit = false; + } + break; + case 'file': + if (!s.stream) { + s.stream = fs.createWriteStream(s.path, + {flags: 'a', encoding: 'utf8'}); + s.stream.on('error', function (err) { + self.emit('error', err, s); + }); + if (!s.closeOnExit) { + s.closeOnExit = true; + } + } else { + if (!s.closeOnExit) { + s.closeOnExit = false; + } + } + break; + case 'rotating-file': + assert.ok(!s.stream, + '"rotating-file" stream should not give a "stream"'); + assert.ok(s.path); + assert.ok(mv, '"rotating-file" stream type is not supported: ' + + 'missing "mv" module'); + s.stream = new RotatingFileStream(s); + if (!s.closeOnExit) { + s.closeOnExit = true; + } + break; + case 'raw': + if (!s.closeOnExit) { + s.closeOnExit = false; + } + break; + default: + throw new TypeError('unknown stream type "' + s.type + '"'); + } + + self.streams.push(s); + delete self.haveNonRawStreams; // reset +} + + +/** + * Add serializers + * + * @param serializers {Object} Optional. Object mapping log record field names + * to serializing functions. See README.md for details. + */ +Logger.prototype.addSerializers = function addSerializers(serializers) { + var self = this; + + if (!self.serializers) { + self.serializers = {}; + } + Object.keys(serializers).forEach(function (field) { + var serializer = serializers[field]; + if (typeof (serializer) !== 'function') { + throw new TypeError(format( + 'invalid serializer for "%s" field: must be a function', + field)); + } else { + self.serializers[field] = serializer; + } + }); +} + + + +/** + * Create a child logger, typically to add a few log record fields. + * + * This can be useful when passing a logger to a sub-component, e.g. a + * 'wuzzle' component of your service: + * + * var wuzzleLog = log.child({component: 'wuzzle'}) + * var wuzzle = new Wuzzle({..., log: wuzzleLog}) + * + * Then log records from the wuzzle code will have the same structure as + * the app log, *plus the component='wuzzle' field*. + * + * @param options {Object} Optional. Set of options to apply to the child. + * All of the same options for a new Logger apply here. Notes: + * - The parent's streams are inherited and cannot be removed in this + * call. Any given `streams` are *added* to the set inherited from + * the parent. + * - The parent's serializers are inherited, though can effectively be + * overwritten by using duplicate keys. + * - Can use `level` to set the level of the streams inherited from + * the parent. The level for the parent is NOT affected. + * @param simple {Boolean} Optional. Set to true to assert that `options` + * (a) only add fields (no config) and (b) no serialization handling is + * required for them. IOW, this is a fast path for frequent child + * creation. See 'tools/timechild.js' for numbers. + */ +Logger.prototype.child = function (options, simple) { + return new (this.constructor)(this, options || {}, simple); +} + + +/** + * A convenience method to reopen 'file' streams on a logger. This can be + * useful with external log rotation utilities that move and re-open log files + * (e.g. logrotate on Linux, logadm on SmartOS/Illumos). Those utilities + * typically have rotation options to copy-and-truncate the log file, but + * you may not want to use that. An alternative is to do this in your + * application: + * + * var log = bunyan.createLogger(...); + * ... + * process.on('SIGUSR2', function () { + * log.reopenFileStreams(); + * }); + * ... + * + * See . + */ +Logger.prototype.reopenFileStreams = function () { + var self = this; + self.streams.forEach(function (s) { + if (s.type === 'file') { + if (s.stream) { + // Not sure if typically would want this, or more immediate + // `s.stream.destroy()`. + s.stream.end(); + s.stream.destroySoon(); + delete s.stream; + } + s.stream = fs.createWriteStream(s.path, + {flags: 'a', encoding: 'utf8'}); + s.stream.on('error', function (err) { + self.emit('error', err, s); + }); + } + }); +}; + + +/* BEGIN JSSTYLED */ +/** + * Close this logger. + * + * This closes streams (that it owns, as per 'endOnClose' attributes on + * streams), etc. Typically you **don't** need to bother calling this. +Logger.prototype.close = function () { + if (this._closed) { + return; + } + if (!this._isSimpleChild) { + self.streams.forEach(function (s) { + if (s.endOnClose) { + xxx('closing stream s:', s); + s.stream.end(); + s.endOnClose = false; + } + }); + } + this._closed = true; +} + */ +/* END JSSTYLED */ + + +/** + * Get/set the level of all streams on this logger. + * + * Get Usage: + * // Returns the current log level (lowest level of all its streams). + * log.level() -> INFO + * + * Set Usage: + * log.level(INFO) // set all streams to level INFO + * log.level('info') // can use 'info' et al aliases + */ +Logger.prototype.level = function level(value) { + if (value === undefined) { + return this._level; + } + var newLevel = resolveLevel(value); + var len = this.streams.length; + for (var i = 0; i < len; i++) { + this.streams[i].level = newLevel; + } + this._level = newLevel; +} + + +/** + * Get/set the level of a particular stream on this logger. + * + * Get Usage: + * // Returns an array of the levels of each stream. + * log.levels() -> [TRACE, INFO] + * + * // Returns a level of the identified stream. + * log.levels(0) -> TRACE // level of stream at index 0 + * log.levels('foo') // level of stream with name 'foo' + * + * Set Usage: + * log.levels(0, INFO) // set level of stream 0 to INFO + * log.levels(0, 'info') // can use 'info' et al aliases + * log.levels('foo', WARN) // set stream named 'foo' to WARN + * + * Stream names: When streams are defined, they can optionally be given + * a name. For example, + * log = new Logger({ + * streams: [ + * { + * name: 'foo', + * path: '/var/log/my-service/foo.log' + * level: 'trace' + * }, + * ... + * + * @param name {String|Number} The stream index or name. + * @param value {Number|String} The level value (INFO) or alias ('info'). + * If not given, this is a 'get' operation. + * @throws {Error} If there is no stream with the given name. + */ +Logger.prototype.levels = function levels(name, value) { + if (name === undefined) { + assert.equal(value, undefined); + return this.streams.map( + function (s) { return s.level }); + } + var stream; + if (typeof (name) === 'number') { + stream = this.streams[name]; + if (stream === undefined) { + throw new Error('invalid stream index: ' + name); + } + } else { + var len = this.streams.length; + for (var i = 0; i < len; i++) { + var s = this.streams[i]; + if (s.name === name) { + stream = s; + break; + } + } + if (!stream) { + throw new Error(format('no stream with name "%s"', name)); + } + } + if (value === undefined) { + return stream.level; + } else { + var newLevel = resolveLevel(value); + stream.level = newLevel; + if (newLevel < this._level) { + this._level = newLevel; + } + } +} + + +/** + * Apply registered serializers to the appropriate keys in the given fields. + * + * Pre-condition: This is only called if there is at least one serializer. + * + * @param fields (Object) The log record fields. + * @param excludeFields (Object) Optional mapping of keys to `true` for + * keys to NOT apply a serializer. + */ +Logger.prototype._applySerializers = function (fields, excludeFields) { + var self = this; + + xxx('_applySerializers: excludeFields', excludeFields); + + // Check each serializer against these (presuming number of serializers + // is typically less than number of fields). + Object.keys(this.serializers).forEach(function (name) { + if (fields[name] === undefined || + (excludeFields && excludeFields[name])) + { + return; + } + xxx('_applySerializers; apply to "%s" key', name) + try { + fields[name] = self.serializers[name](fields[name]); + } catch (err) { + _warn(format('bunyan: ERROR: Exception thrown from the "%s" ' + + 'Bunyan serializer. This should never happen. This is a bug' + + 'in that serializer function.\n%s', + name, err.stack || err)); + fields[name] = format('(Error in Bunyan log "%s" serializer ' + + 'broke field. See stderr for details.)', name); + } + }); +} + + +/** + * Emit a log record. + * + * @param rec {log record} + * @param noemit {Boolean} Optional. Set to true to skip emission + * and just return the JSON string. + */ +Logger.prototype._emit = function (rec, noemit) { + var i; + + // Lazily determine if this Logger has non-'raw' streams. If there are + // any, then we need to stringify the log record. + if (this.haveNonRawStreams === undefined) { + this.haveNonRawStreams = false; + for (i = 0; i < this.streams.length; i++) { + if (!this.streams[i].raw) { + this.haveNonRawStreams = true; + break; + } + } + } + + // Stringify the object. Attempt to warn/recover on error. + var str; + if (noemit || this.haveNonRawStreams) { + try { + str = JSON.stringify(rec, safeCycles()) + '\n'; + } catch (e) { + if (safeJsonStringify) { + str = safeJsonStringify(rec) + '\n'; + } else { + var dedupKey = e.stack.split(/\n/g, 2).join('\n'); + _warn('bunyan: ERROR: Exception in ' + + '`JSON.stringify(rec)`. You can install the ' + + '"safe-json-stringify" module to have Bunyan fallback ' + + 'to safer stringification. Record:\n' + + _indent(format('%s\n%s', util.inspect(rec), e.stack)), + dedupKey); + str = format('(Exception in JSON.stringify(rec): %j. ' + + 'See stderr for details.)\n', e.message); + } + } + } + + if (noemit) + return str; + + var level = rec.level; + for (i = 0; i < this.streams.length; i++) { + var s = this.streams[i]; + if (s.level <= level) { + xxx('writing log rec "%s" to "%s" stream (%d <= %d): %j', + rec.msg, s.type, s.level, level, rec); + s.stream.write(s.raw ? rec : str); + } + }; + + return str; +} + + +/** + * Build a log emitter function for level minLevel. I.e. this is the + * creator of `log.info`, `log.error`, etc. + */ +function mkLogEmitter(minLevel) { + return function () { + var log = this; + + function mkRecord(args) { + var excludeFields; + if (args[0] instanceof Error) { + // `log.(err, ...)` + fields = { + // Use this Logger's err serializer, if defined. + err: (log.serializers && log.serializers.err + ? log.serializers.err(args[0]) + : Logger.stdSerializers.err(args[0])) + }; + excludeFields = {err: true}; + if (args.length === 1) { + msgArgs = [fields.err.message]; + } else { + msgArgs = Array.prototype.slice.call(args, 1); + } + } else if (typeof (args[0]) !== 'object' && args[0] !== null || + Array.isArray(args[0])) { + // `log.(msg, ...)` + fields = null; + msgArgs = Array.prototype.slice.call(args); + } else if (Buffer.isBuffer(args[0])) { // `log.(buf, ...)` + // Almost certainly an error, show `inspect(buf)`. See bunyan + // issue #35. + fields = null; + msgArgs = Array.prototype.slice.call(args); + msgArgs[0] = util.inspect(msgArgs[0]); + } else { // `log.(fields, msg, ...)` + fields = args[0]; + msgArgs = Array.prototype.slice.call(args, 1); + } + + // Build up the record object. + var rec = objCopy(log.fields); + var level = rec.level = minLevel; + var recFields = (fields ? objCopy(fields) : null); + if (recFields) { + if (log.serializers) { + log._applySerializers(recFields, excludeFields); + } + Object.keys(recFields).forEach(function (k) { + rec[k] = recFields[k]; + }); + } + rec.msg = format.apply(log, msgArgs); + if (!rec.time) { + rec.time = (new Date()); + } + // Get call source info + if (log.src && !rec.src) { + rec.src = getCaller3Info() + } + rec.v = LOG_VERSION; + + return rec; + }; + + var fields = null; + var msgArgs = arguments; + var str = null; + var rec = null; + if (! this._emit) { + /* + * Show this invalid Bunyan usage warning *once*. + * + * See for + * an example of how this can happen. + */ + var dedupKey = 'unbound'; + if (!_haveWarned[dedupKey]) { + var caller = getCaller3Info(); + _warn(format('bunyan usage error: %s:%s: attempt to log ' + + 'with an unbound log method: `this` is: %s', + caller.file, caller.line, util.inspect(this)), + dedupKey); + } + return; + } else if (arguments.length === 0) { // `log.()` + return (this._level <= minLevel); + } else if (this._level > minLevel) { + /* pass through */ + } else { + rec = mkRecord(msgArgs); + str = this._emit(rec); + } + probes && probes[minLevel].fire(function () { + return [ str || + (rec && log._emit(rec, true)) || + log._emit(mkRecord(msgArgs), true) ]; + }); + } +} + + +/** + * The functions below log a record at a specific level. + * + * Usages: + * log.() -> boolean is-trace-enabled + * log.( err, [ msg, ...]) + * log.( msg, ...) + * log.( fields, msg, ...) + * + * where is the lowercase version of the log level. E.g.: + * + * log.info() + * + * @params fields {Object} Optional set of additional fields to log. + * @params msg {String} Log message. This can be followed by additional + * arguments that are handled like + * [util.format](http://nodejs.org/docs/latest/api/all.html#util.format). + */ +Logger.prototype.trace = mkLogEmitter(TRACE); +Logger.prototype.debug = mkLogEmitter(DEBUG); +Logger.prototype.info = mkLogEmitter(INFO); +Logger.prototype.warn = mkLogEmitter(WARN); +Logger.prototype.error = mkLogEmitter(ERROR); +Logger.prototype.fatal = mkLogEmitter(FATAL); + + + +//---- Standard serializers +// A serializer is a function that serializes a JavaScript object to a +// JSON representation for logging. There is a standard set of presumed +// interesting objects in node.js-land. + +Logger.stdSerializers = {}; + +// Serialize an HTTP request. +Logger.stdSerializers.req = function req(req) { + if (!req || !req.connection) + return req; + return { + method: req.method, + url: req.url, + headers: req.headers, + remoteAddress: req.connection.remoteAddress, + remotePort: req.connection.remotePort + }; + // Trailers: Skipping for speed. If you need trailers in your app, then + // make a custom serializer. + //if (Object.keys(trailers).length > 0) { + // obj.trailers = req.trailers; + //} +}; + +// Serialize an HTTP response. +Logger.stdSerializers.res = function res(res) { + if (!res || !res.statusCode) + return res; + return { + statusCode: res.statusCode, + header: res._header + } +}; + + +/* + * This function dumps long stack traces for exceptions having a cause() + * method. The error classes from + * [verror](https://github.com/davepacheco/node-verror) and + * [restify v2.0](https://github.com/mcavage/node-restify) are examples. + * + * Based on `dumpException` in + * https://github.com/davepacheco/node-extsprintf/blob/master/lib/extsprintf.js + */ +function getFullErrorStack(ex) +{ + var ret = ex.stack || ex.toString(); + if (ex.cause && typeof (ex.cause) === 'function') { + var cex = ex.cause(); + if (cex) { + ret += '\nCaused by: ' + getFullErrorStack(cex); + } + } + return (ret); +} + +// Serialize an Error object +// (Core error properties are enumerable in node 0.4, not in 0.6). +var errSerializer = Logger.stdSerializers.err = function err(err) { + if (!err || !err.stack) + return err; + var obj = { + message: err.message, + name: err.name, + stack: getFullErrorStack(err), + code: err.code, + signal: err.signal + } + return obj; +}; + + +// A JSON stringifier that handles cycles safely. +// Usage: JSON.stringify(obj, safeCycles()) +function safeCycles() { + var seen = []; + return function (key, val) { + if (!val || typeof (val) !== 'object') { + return val; + } + if (seen.indexOf(val) !== -1) { + return '[Circular]'; + } + seen.push(val); + return val; + }; +} + + +/** + * XXX + */ +if (mv) { + +function RotatingFileStream(options) { + this.path = options.path; + this.stream = fs.createWriteStream(this.path, + {flags: 'a', encoding: 'utf8'}); + this.count = (options.count == null ? 10 : options.count); + assert.equal(typeof (this.count), 'number', + format('rotating-file stream "count" is not a number: %j (%s) in %j', + this.count, typeof (this.count), this)); + assert.ok(this.count >= 0, + format('rotating-file stream "count" is not >= 0: %j in %j', + this.count, this)); + + // Parse `options.period`. + if (options.period) { + // where scope is: + // h hours (at the start of the hour) + // d days (at the start of the day, i.e. just after midnight) + // w weeks (at the start of Sunday) + // m months (on the first of the month) + // y years (at the start of Jan 1st) + // with special values 'hourly' (1h), 'daily' (1d), "weekly" (1w), + // 'monthly' (1m) and 'yearly' (1y) + var period = { + 'hourly': '1h', + 'daily': '1d', + 'weekly': '1w', + 'monthly': '1m', + 'yearly': '1y' + }[options.period] || options.period; + var m = /^([1-9][0-9]*)([hdwmy]|ms)$/.exec(period); + if (!m) { + throw new Error(format('invalid period: "%s"', options.period)); + } + this.periodNum = Number(m[1]); + this.periodScope = m[2]; + } else { + this.periodNum = 1; + this.periodScope = 'd'; + } + + // TODO: template support for backup files + // template: + // default is %P.%n + // '/var/log/archive/foo.log' -> foo.log.%n + // '/var/log/archive/foo.log.%n' + // codes: + // XXX support strftime codes (per node version of those) + // or whatever module. Pick non-colliding for extra + // codes + // %P `path` base value + // %n integer number of rotated log (1,2,3,...) + // %d datetime in YYYY-MM-DD_HH-MM-SS + // XXX what should default date format be? + // prior art? Want to avoid ':' in + // filenames (illegal on Windows for one). + + this.rotQueue = []; + this.rotating = false; + this._setupNextRot(); +} + +util.inherits(RotatingFileStream, EventEmitter); + +RotatingFileStream.prototype._setupNextRot = function () { + var self = this; + this.rotAt = this._nextRotTime(); + var delay = this.rotAt - Date.now(); + // Cap timeout to Node's max setTimeout, see + // . + var TIMEOUT_MAX = 2147483647; // 2^31-1 + if (delay > TIMEOUT_MAX) { + delay = TIMEOUT_MAX; + } + this.timeout = setTimeout( + function () { self.rotate(); }, + delay); + if (typeof (this.timeout.unref) === 'function') { + this.timeout.unref(); + } +} + +RotatingFileStream.prototype._nextRotTime = function _nextRotTime(first) { + var _DEBUG = false; + if (_DEBUG) + console.log('-- _nextRotTime: %s%s', this.periodNum, this.periodScope); + var d = new Date(); + + if (_DEBUG) console.log(' now local: %s', d); + if (_DEBUG) console.log(' now utc: %s', d.toISOString()); + var rotAt; + switch (this.periodScope) { + case 'ms': + // Hidden millisecond period for debugging. + if (this.rotAt) { + rotAt = this.rotAt + this.periodNum; + } else { + rotAt = Date.now() + this.periodNum; + } + break; + case 'h': + if (this.rotAt) { + rotAt = this.rotAt + this.periodNum * 60 * 60 * 1000; + } else { + // First time: top of the next hour. + rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), + d.getUTCDate(), d.getUTCHours() + 1); + } + break; + case 'd': + if (this.rotAt) { + rotAt = this.rotAt + this.periodNum * 24 * 60 * 60 * 1000; + } else { + // First time: start of tomorrow (i.e. at the coming midnight) UTC. + rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), + d.getUTCDate() + 1); + } + break; + case 'w': + // Currently, always on Sunday morning at 00:00:00 (UTC). + if (this.rotAt) { + rotAt = this.rotAt + this.periodNum * 7 * 24 * 60 * 60 * 1000; + } else { + // First time: this coming Sunday. + rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), + d.getUTCDate() + (7 - d.getUTCDay())); + } + break; + case 'm': + if (this.rotAt) { + rotAt = Date.UTC(d.getUTCFullYear(), + d.getUTCMonth() + this.periodNum, 1); + } else { + // First time: the start of the next month. + rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth() + 1, 1); + } + break; + case 'y': + if (this.rotAt) { + rotAt = Date.UTC(d.getUTCFullYear() + this.periodNum, 0, 1); + } else { + // First time: the start of the next year. + rotAt = Date.UTC(d.getUTCFullYear() + 1, 0, 1); + } + break; + default: + assert.fail(format('invalid period scope: "%s"', this.periodScope)); + } + + if (_DEBUG) { + console.log(' **rotAt**: %s (utc: %s)', rotAt, + new Date(rotAt).toUTCString()); + var now = Date.now(); + console.log(' now: %s (%sms == %smin == %sh to go)', + now, + rotAt - now, + (rotAt-now)/1000/60, + (rotAt-now)/1000/60/60); + } + return rotAt; +}; + +RotatingFileStream.prototype.rotate = function rotate() { + // XXX What about shutdown? + var self = this; + var _DEBUG = false; + + // If rotation period is > ~25 days, we have to break into multiple + // setTimeout's. See . + if (self.rotAt && self.rotAt > Date.now()) { + return self._setupNextRot(); + } + + if (_DEBUG) { + console.log('-- [%s, pid=%s] rotating %s', + new Date(), process.pid, self.path); + } + if (self.rotating) { + throw new TypeError('cannot start a rotation when already rotating'); + } + self.rotating = true; + + self.stream.end(); // XXX can do moves sync after this? test at high rate + + function del() { + var toDel = self.path + '.' + String(n - 1); + if (n === 0) { + toDel = self.path; + } + n -= 1; + if (_DEBUG) console.log('rm %s', toDel); + fs.unlink(toDel, function (delErr) { + //XXX handle err other than not exists + moves(); + }); + } + + function moves() { + if (self.count === 0 || n < 0) { + return finish(); + } + var before = self.path; + var after = self.path + '.' + String(n); + if (n > 0) { + before += '.' + String(n - 1); + } + n -= 1; + fs.exists(before, function (exists) { + if (!exists) { + moves(); + } else { + if (_DEBUG) { + console.log('[pid %s] mv %s %s', + process.pid, before, after); + } + mv(before, after, function (mvErr) { + if (mvErr) { + self.emit('error', mvErr); + finish(); // XXX finish here? + } else { + moves(); + } + }); + } + }) + } + + function finish() { + if (_DEBUG) console.log('[pid %s] open %s', process.pid, self.path); + self.stream = fs.createWriteStream(self.path, + {flags: 'a', encoding: 'utf8'}); + var q = self.rotQueue, len = q.length; + for (var i = 0; i < len; i++) { + self.stream.write(q[i]); + } + self.rotQueue = []; + self.rotating = false; + self.emit('drain'); + self._setupNextRot(); + } + + var n = this.count; + del(); +}; + +RotatingFileStream.prototype.write = function write(s) { + if (this.rotating) { + this.rotQueue.push(s); + return false; + } else { + return this.stream.write(s); + } +}; + +RotatingFileStream.prototype.end = function end(s) { + this.stream.end(); +}; + +RotatingFileStream.prototype.destroy = function destroy(s) { + this.stream.destroy(); +}; + +RotatingFileStream.prototype.destroySoon = function destroySoon(s) { + this.stream.destroySoon(); +}; + +} /* if (mv) */ + + + +/** + * RingBuffer is a Writable Stream that just stores the last N records in + * memory. + * + * @param options {Object}, with the following fields: + * + * - limit: number of records to keep in memory + */ +function RingBuffer(options) { + this.limit = options && options.limit ? options.limit : 100; + this.writable = true; + this.records = []; + EventEmitter.call(this); +} + +util.inherits(RingBuffer, EventEmitter); + +RingBuffer.prototype.write = function (record) { + if (!this.writable) + throw (new Error('RingBuffer has been ended already')); + + this.records.push(record); + + if (this.records.length > this.limit) + this.records.shift(); + + return (true); +}; + +RingBuffer.prototype.end = function () { + if (arguments.length > 0) + this.write.apply(this, Array.prototype.slice.call(arguments)); + this.writable = false; +}; + +RingBuffer.prototype.destroy = function () { + this.writable = false; + this.emit('close'); +}; + +RingBuffer.prototype.destroySoon = function () { + this.destroy(); +}; + + +//---- Exports + +module.exports = Logger; + +module.exports.TRACE = TRACE; +module.exports.DEBUG = DEBUG; +module.exports.INFO = INFO; +module.exports.WARN = WARN; +module.exports.ERROR = ERROR; +module.exports.FATAL = FATAL; +module.exports.resolveLevel = resolveLevel; +module.exports.levelFromName = levelFromName; +module.exports.nameFromLevel = nameFromLevel; + +module.exports.VERSION = VERSION; +module.exports.LOG_VERSION = LOG_VERSION; + +module.exports.createLogger = function createLogger(options) { + return new Logger(options); +}; + +module.exports.RingBuffer = RingBuffer; +module.exports.RotatingFileStream = RotatingFileStream; + +// Useful for custom `type == 'raw'` streams that may do JSON stringification +// of log records themselves. Usage: +// var str = JSON.stringify(rec, bunyan.safeCycles()); +module.exports.safeCycles = safeCycles; diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/.gitmodules b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/.gitmodules new file mode 100644 index 0000000..933bc02 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/.gitmodules @@ -0,0 +1,3 @@ +[submodule "libusdt"] + path = libusdt + url = https://github.com/chrisa/libusdt diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/.npmignore b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/.npmignore new file mode 100644 index 0000000..457994f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/.npmignore @@ -0,0 +1,7 @@ +.lock-wscript +*.node +*~ +.#* +*# +build +*.log diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/CHANGES.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/CHANGES.md new file mode 100644 index 0000000..40be6a4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/CHANGES.md @@ -0,0 +1,79 @@ +dtrace-provider - Changes +========================= + +## HISTORY + + * 0.2.8: + Add NODE_MODULE() declaration for compatibility with Node 0.9.1+ + (reported by Trent Mick) + Remove execSync dependency from tests. + + * 0.2.7: + Don't build on FreeBSD by default - DTrace is not yet built in releases. + + * 0.2.6: + Fall back to make(1) if gmake(1) is unavailable, still expected to be GNU Make + (Trent Mick) + + * 0.2.5: + Add "json" probe argument type, automatically serialising objects as JSON + Trust npm to set PATH appropriately when invoking node (reported by Dave Pacheco) + libusdt update - allow provider memory to be freed (reported by Bryan Cantrill) + Build libusdt with gmake by default (reported by Keith Wesolowski) + Turn the various scripts in test/ into a TAP-based testsuite. + + * 0.2.4: + Improve Node architecture detection to support 0.6.x, and respect + npm's prefix when choosing a node binary to use (reported by Trent Mick) + + * 0.2.3: + libusdt update - don't invoke ranlib on SunOS-derived systems + Disambiguate module name in probe tuple, and optionally allow it to be + specified when creating a provider. (Bryan Cantrill bcantrill@acm.org) + + * 0.2.2: + libusdt update for build fixes + Respect MAKE variable in build script + + * 0.2.1: + Update binding.gyp for clang on Snow Leopard - no space after -L. + + * 0.2.0: + Update libusdt, and attempt to build it correctly for various platforms. + Add support for disabling providers and removing probes. + + * 0.1.1: + Replace Node-specific implementation with wrappers for libusdt. + Extend argument support to 32 primitives. + Adds Solaris x86_64 support. + + * 0.0.9: + Force the build architecture to x86_64 for OS X. + + * 0.0.8: + Removed overridden "scripts" section from package.json, breaking Windows installs + + * 0.0.7: + Fix for multiple enable() calls breaking providers. + + * 0.0.6: + Fix for segfault trying to use non-enabled probes (Mark Cavage mcavage@gmail.com) + + * 0.0.5: + Revert changes to make probe objects available. + + * 0.0.4: + Remove unused "sys" import (Alex Whitman) + No longer builds an empty extension on non-DTrace platforms + Probe objects are made available to Javascript. + + * 0.0.3: + Builds to a stubbed-out version on non-DTrace platforms (Mark Cavage ) + + * 0.0.2: + Solaris i386 support. + Fixes memory leaks + Improved performance, enabled- and disabled-probe. + + * 0.0.1: + First working version: OSX x86_64 only. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/LICENCE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/LICENCE new file mode 100644 index 0000000..558a833 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/LICENCE @@ -0,0 +1,21 @@ +Copyright 2011 Chris Andrews. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are +permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of + conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other materials + provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY CHRIS ANDREWS ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CHRIS ANDREWS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/README.md new file mode 100644 index 0000000..e53c553 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/README.md @@ -0,0 +1,140 @@ +# dtrace-provider - Native DTrace providers for Node.js apps. + +This extension allows you to create native DTrace providers for your +Node.js applications. That is, to create providers and probes which +expose information specific to your application, rather than +information about the node runtime. + +You could use this to expose high-level information about the inner +workings of your application, or to create a specific context in which +to look at information from other runtime or system-level providers. + +The provider is not created in the usual way, by declaring it and then +changing the build process to include it, but instead dynamically at +runtime. This is done entirely in-process, and there is no background +compiler or dtrace(1) invocation. The process creating the provider +need not run as root. + +## INSTALL + + $ npm install dtrace-provider + +## EXAMPLE + +Here's a simple example of creating a provider: + + var d = require('dtrace-provider'); + + var dtp = d.createDTraceProvider("nodeapp"); + var p1 = dtp.addProbe("probe1", "int", "int"); + var p2 = dtp.addProbe("probe2", "char *"); + dtp.enable(); + +Probes may be fired via the provider object: + + dtp.fire("probe1", function(p) { + return [1, 2]; + }); + dtp.fire("probe2", function(p) { + return ["hello, dtrace via provider", "foo"]; + }); + +or via the probe objects themselves: + + p1.fire(function(p) { + return [1, 2, 3, 4, 5, 6]; + }); + p2.fire(function(p) { + return ["hello, dtrace via probe", "foo"]; + }); + +This example creates a provider called "nodeapp", and adds two +probes. It then enables the provider, at which point the provider +becomes visible to DTrace. + +The probes are then fired, which produces this output: + + $ sudo dtrace -Z -n 'nodeapp*:::probe1{ trace(arg0); trace(arg1) }' \ + -n 'nodeapp*:::probe2{ trace(copyinstr(arg0)); }' + dtrace: description 'nodeapp*:::probe1' matched 0 probes + dtrace: description 'nodeapp*:::probe2' matched 0 probes + CPU ID FUNCTION:NAME + 1 123562 func:probe1 1 2 + 1 123563 func:probe2 hello, dtrace + +Arguments are captured by a callback only executed when the probe is +enabled. This means you can do more expensive work to gather arguments. + +The maximum number of arguments supported is 32. + +Available argument types are "int", for integer numeric values, +"char *" for strings, and "json" for objects rendered into JSON strings. + +Arguments typed as "json" will be created as "char *" probes in +DTrace, but objects passed to these probe arguments will be +automatically serialized to JSON before being passed to DTrace. This +feature is best used in conjunction with the json() D subroutine, but +is available whether or not the platform supports it. + + # create a json probe: + + var dtp = d.createDTraceProvider("nodeapp"); + var p1 = dtp.addProbe("j1", "json"); + dtp.enable(); + p1.fire(function() { return { "foo": "bar" }; }); + + # on a platform supporting json(): + + $ sudo dtrace -Z -n 'nodeapp*:::j1{ this->j = copyinstr(arg0); \ + trace(json(this->j, "foo")) }' + dtrace: description 'nodeapp$target:::j1' matched 0 probes + CPU ID FUNCTION:NAME + 0 68712 j1:j1 bar + +## PLATFORM SUPPORT + +This libusdt-based Node.JS module supports 64 and 32 bit processes on +Mac OS X and Solaris-like systems such as Illumos or SmartOS. As more +platform support is added to libusdt, those platforms will be +supported by this module. See libusdt's status at: + + https://github.com/chrisa/libusdt#readme + +FreeBSD is supported in principle but is restricted to only 4 working +arguments per probe. + +Platforms not supporting DTrace (notably, Linux and Windows) may +install this module without building libusdt, with a stub no-op +implementation provided for compatibility. This allows cross-platform +npm modules to embed probes and include a dependency on this module. + +GNU Make is required to build libusdt; the build scripts will look for +gmake in PATH first, and then for make. + +## CAVEATS + +There is some overhead to probes, even when disabled. Probes are +already using the "is-enabled" feature of DTrace to control execution +of the arguments-gathering callback, but some work still needs to be +done before that's checked. This overhead should not be a problem +unless probes are placed in particularly hot code paths. + +## CONTRIBUTING + +The source is available at: + + https://github.com/chrisa/node-dtrace-provider. + +For issues, please use the Github issue tracker linked to the +repository. Github pull requests are very welcome. + +## RUNNING THE TESTS + + $ npm install + $ sudo ./node_modules/.bin/tap --tap test/*.test.js + +## OTHER IMPLEMENTATIONS + +This node extension is derived from the ruby-dtrace gem, via the Perl +module Devel::DTrace::Provider, both of which provide the same +functionality to those languages. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/TODO.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/TODO.md new file mode 100644 index 0000000..255a92f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/TODO.md @@ -0,0 +1,13 @@ +# dtrace-provider - TODO + +## FEATURES + +### Structured Arguments + +The current support for argument types is limited to "char *" and +"int", i.e. strings and integer types. Native string types in +Javascript are converted to raw C strings for use with DTrace. + +With support for dynamic types and translators from the host DTrace +implementation, it'd be possible to provide a mapping from Javascript +objects to C structs, which could then be inspected in D scripts. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/DTraceProviderBindings.target.mk b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/DTraceProviderBindings.target.mk new file mode 100644 index 0000000..ffd1491 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/DTraceProviderBindings.target.mk @@ -0,0 +1,164 @@ +# This file is generated by gyp; do not edit. + +TOOLSET := target +TARGET := DTraceProviderBindings +DEFS_Debug := \ + '-D_DARWIN_USE_64_BIT_INODE=1' \ + '-D_LARGEFILE_SOURCE' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DBUILDING_NODE_EXTENSION' \ + '-DDEBUG' \ + '-D_DEBUG' + +# Flags passed to all source files. +CFLAGS_Debug := \ + -O0 \ + -gdwarf-2 \ + -mmacosx-version-min=10.5 \ + -arch x86_64 \ + -Wall \ + -Wendif-labels \ + -W \ + -Wno-unused-parameter + +# Flags passed to only C files. +CFLAGS_C_Debug := \ + -fno-strict-aliasing + +# Flags passed to only C++ files. +CFLAGS_CC_Debug := \ + -fno-rtti \ + -fno-exceptions \ + -fno-threadsafe-statics \ + -fno-strict-aliasing + +# Flags passed to only ObjC files. +CFLAGS_OBJC_Debug := + +# Flags passed to only ObjC++ files. +CFLAGS_OBJCC_Debug := + +INCS_Debug := \ + -I/Users/PEM/.node-gyp/0.10.36/src \ + -I/Users/PEM/.node-gyp/0.10.36/deps/uv/include \ + -I/Users/PEM/.node-gyp/0.10.36/deps/v8/include \ + -I$(srcdir)/libusdt \ + -I$(srcdir)/node_modules/nan + +DEFS_Release := \ + '-D_DARWIN_USE_64_BIT_INODE=1' \ + '-D_LARGEFILE_SOURCE' \ + '-D_FILE_OFFSET_BITS=64' \ + '-DBUILDING_NODE_EXTENSION' + +# Flags passed to all source files. +CFLAGS_Release := \ + -Os \ + -gdwarf-2 \ + -mmacosx-version-min=10.5 \ + -arch x86_64 \ + -Wall \ + -Wendif-labels \ + -W \ + -Wno-unused-parameter + +# Flags passed to only C files. +CFLAGS_C_Release := \ + -fno-strict-aliasing + +# Flags passed to only C++ files. +CFLAGS_CC_Release := \ + -fno-rtti \ + -fno-exceptions \ + -fno-threadsafe-statics \ + -fno-strict-aliasing + +# Flags passed to only ObjC files. +CFLAGS_OBJC_Release := + +# Flags passed to only ObjC++ files. +CFLAGS_OBJCC_Release := + +INCS_Release := \ + -I/Users/PEM/.node-gyp/0.10.36/src \ + -I/Users/PEM/.node-gyp/0.10.36/deps/uv/include \ + -I/Users/PEM/.node-gyp/0.10.36/deps/v8/include \ + -I$(srcdir)/libusdt \ + -I$(srcdir)/node_modules/nan + +OBJS := \ + $(obj).target/$(TARGET)/dtrace_provider.o \ + $(obj).target/$(TARGET)/dtrace_probe.o \ + $(obj).target/$(TARGET)/dtrace_argument.o + +# Add to the list of files we specially track dependencies for. +all_deps += $(OBJS) + +# Make sure our dependencies are built before any of us. +$(OBJS): | $(obj).target/libusdt.stamp + +# CFLAGS et al overrides must be target-local. +# See "Target-specific Variable Values" in the GNU Make manual. +$(OBJS): TOOLSET := $(TOOLSET) +$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) +$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) +$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE)) +$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE)) + +# Suffix rules, putting all outputs into $(obj). + +$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) + +# Try building from generated source, too. + +$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) + +$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) + +# End of this set of suffix rules +### Rules for final target. +LDFLAGS_Debug := \ + -Wl,-search_paths_first \ + -mmacosx-version-min=10.5 \ + -arch x86_64 \ + -L$(builddir) + +LIBTOOLFLAGS_Debug := \ + -Wl,-search_paths_first + +LDFLAGS_Release := \ + -Wl,-search_paths_first \ + -mmacosx-version-min=10.5 \ + -arch x86_64 \ + -L$(builddir) + +LIBTOOLFLAGS_Release := \ + -Wl,-search_paths_first + +LIBS := \ + -undefined dynamic_lookup \ + -L/Users/PEM/Projects/orion/packages/logging/.npm/package-new-mx8ikp/node_modules/bunyan/node_modules/dtrace-provider/libusdt -l usdt + +$(builddir)/DTraceProviderBindings.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE)) +$(builddir)/DTraceProviderBindings.node: LIBS := $(LIBS) +$(builddir)/DTraceProviderBindings.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE)) +$(builddir)/DTraceProviderBindings.node: TOOLSET := $(TOOLSET) +$(builddir)/DTraceProviderBindings.node: $(OBJS) FORCE_DO_CMD + $(call do_cmd,solink_module) + +all_deps += $(builddir)/DTraceProviderBindings.node +# Add target alias +.PHONY: DTraceProviderBindings +DTraceProviderBindings: $(builddir)/DTraceProviderBindings.node + +# Short alias for building this executable. +.PHONY: DTraceProviderBindings.node +DTraceProviderBindings.node: $(builddir)/DTraceProviderBindings.node + +# Add executable to "all" target. +.PHONY: all +all: $(builddir)/DTraceProviderBindings.node + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Makefile b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Makefile new file mode 100644 index 0000000..aa20906 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Makefile @@ -0,0 +1,355 @@ +# We borrow heavily from the kernel build setup, though we are simpler since +# we don't have Kconfig tweaking settings on us. + +# The implicit make rules have it looking for RCS files, among other things. +# We instead explicitly write all the rules we care about. +# It's even quicker (saves ~200ms) to pass -r on the command line. +MAKEFLAGS=-r + +# The source directory tree. +srcdir := .. +abs_srcdir := $(abspath $(srcdir)) + +# The name of the builddir. +builddir_name ?= . + +# The V=1 flag on command line makes us verbosely print command lines. +ifdef V + quiet= +else + quiet=quiet_ +endif + +# Specify BUILDTYPE=Release on the command line for a release build. +BUILDTYPE ?= Release + +# Directory all our build output goes into. +# Note that this must be two directories beneath src/ for unit tests to pass, +# as they reach into the src/ directory for data with relative paths. +builddir ?= $(builddir_name)/$(BUILDTYPE) +abs_builddir := $(abspath $(builddir)) +depsdir := $(builddir)/.deps + +# Object output directory. +obj := $(builddir)/obj +abs_obj := $(abspath $(obj)) + +# We build up a list of every single one of the targets so we can slurp in the +# generated dependency rule Makefiles in one pass. +all_deps := + + + +CC.target ?= $(CC) +CFLAGS.target ?= $(CFLAGS) +CXX.target ?= $(CXX) +CXXFLAGS.target ?= $(CXXFLAGS) +LINK.target ?= $(LINK) +LDFLAGS.target ?= $(LDFLAGS) +AR.target ?= $(AR) + +# C++ apps need to be linked with g++. +# +# Note: flock is used to seralize linking. Linking is a memory-intensive +# process so running parallel links can often lead to thrashing. To disable +# the serialization, override LINK via an envrionment variable as follows: +# +# export LINK=g++ +# +# This will allow make to invoke N linker processes as specified in -jN. +LINK ?= ./gyp-mac-tool flock $(builddir)/linker.lock $(CXX.target) + +# TODO(evan): move all cross-compilation logic to gyp-time so we don't need +# to replicate this environment fallback in make as well. +CC.host ?= gcc +CFLAGS.host ?= +CXX.host ?= g++ +CXXFLAGS.host ?= +LINK.host ?= $(CXX.host) +LDFLAGS.host ?= +AR.host ?= ar + +# Define a dir function that can handle spaces. +# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions +# "leading spaces cannot appear in the text of the first argument as written. +# These characters can be put into the argument value by variable substitution." +empty := +space := $(empty) $(empty) + +# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces +replace_spaces = $(subst $(space),?,$1) +unreplace_spaces = $(subst ?,$(space),$1) +dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1))) + +# Flags to make gcc output dependency info. Note that you need to be +# careful here to use the flags that ccache and distcc can understand. +# We write to a dep file on the side first and then rename at the end +# so we can't end up with a broken dep file. +depfile = $(depsdir)/$(call replace_spaces,$@).d +DEPFLAGS = -MMD -MF $(depfile).raw + +# We have to fixup the deps output in a few ways. +# (1) the file output should mention the proper .o file. +# ccache or distcc lose the path to the target, so we convert a rule of +# the form: +# foobar.o: DEP1 DEP2 +# into +# path/to/foobar.o: DEP1 DEP2 +# (2) we want missing files not to cause us to fail to build. +# We want to rewrite +# foobar.o: DEP1 DEP2 \ +# DEP3 +# to +# DEP1: +# DEP2: +# DEP3: +# so if the files are missing, they're just considered phony rules. +# We have to do some pretty insane escaping to get those backslashes +# and dollar signs past make, the shell, and sed at the same time. +# Doesn't work with spaces, but that's fine: .d files have spaces in +# their names replaced with other characters. +define fixup_dep +# The depfile may not exist if the input file didn't have any #includes. +touch $(depfile).raw +# Fixup path as in (1). +sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile) +# Add extra rules as in (2). +# We remove slashes and replace spaces with new lines; +# remove blank lines; +# delete the first line and append a colon to the remaining lines. +sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ + grep -v '^$$' |\ + sed -e 1d -e 's|$$|:|' \ + >> $(depfile) +rm $(depfile).raw +endef + +# Command definitions: +# - cmd_foo is the actual command to run; +# - quiet_cmd_foo is the brief-output summary of the command. + +quiet_cmd_cc = CC($(TOOLSET)) $@ +cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $< + +quiet_cmd_cxx = CXX($(TOOLSET)) $@ +cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< + +quiet_cmd_objc = CXX($(TOOLSET)) $@ +cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< + +quiet_cmd_objcxx = CXX($(TOOLSET)) $@ +cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< + +# Commands for precompiled header files. +quiet_cmd_pch_c = CXX($(TOOLSET)) $@ +cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< +quiet_cmd_pch_cc = CXX($(TOOLSET)) $@ +cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< +quiet_cmd_pch_m = CXX($(TOOLSET)) $@ +cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< +quiet_cmd_pch_mm = CXX($(TOOLSET)) $@ +cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< + +# gyp-mac-tool is written next to the root Makefile by gyp. +# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd +# already. +quiet_cmd_mac_tool = MACTOOL $(4) $< +cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@" + +quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@ +cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4) + +quiet_cmd_infoplist = INFOPLIST $@ +cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@" + +quiet_cmd_touch = TOUCH $@ +cmd_touch = touch $@ + +quiet_cmd_copy = COPY $@ +# send stderr to /dev/null to ignore messages when linking directories. +cmd_copy = rm -rf "$@" && cp -af "$<" "$@" + +quiet_cmd_alink = LIBTOOL-STATIC $@ +cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^) + +quiet_cmd_link = LINK($(TOOLSET)) $@ +cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) + +quiet_cmd_solink = SOLINK($(TOOLSET)) $@ +cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) + +quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ +cmd_solink_module = $(LINK.$(TOOLSET)) -bundle $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) + + +# Define an escape_quotes function to escape single quotes. +# This allows us to handle quotes properly as long as we always use +# use single quotes and escape_quotes. +escape_quotes = $(subst ','\'',$(1)) +# This comment is here just to include a ' to unconfuse syntax highlighting. +# Define an escape_vars function to escape '$' variable syntax. +# This allows us to read/write command lines with shell variables (e.g. +# $LD_LIBRARY_PATH), without triggering make substitution. +escape_vars = $(subst $$,$$$$,$(1)) +# Helper that expands to a shell command to echo a string exactly as it is in +# make. This uses printf instead of echo because printf's behaviour with respect +# to escape sequences is more portable than echo's across different shells +# (e.g., dash, bash). +exact_echo = printf '%s\n' '$(call escape_quotes,$(1))' + +# Helper to compare the command we're about to run against the command +# we logged the last time we ran the command. Produces an empty +# string (false) when the commands match. +# Tricky point: Make has no string-equality test function. +# The kernel uses the following, but it seems like it would have false +# positives, where one string reordered its arguments. +# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ +# $(filter-out $(cmd_$@), $(cmd_$(1)))) +# We instead substitute each for the empty string into the other, and +# say they're equal if both substitutions produce the empty string. +# .d files contain ? instead of spaces, take that into account. +command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\ + $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) + +# Helper that is non-empty when a prerequisite changes. +# Normally make does this implicitly, but we force rules to always run +# so we can check their command lines. +# $? -- new prerequisites +# $| -- order-only dependencies +prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) + +# Helper that executes all postbuilds until one fails. +define do_postbuilds + @E=0;\ + for p in $(POSTBUILDS); do\ + eval $$p;\ + E=$$?;\ + if [ $$E -ne 0 ]; then\ + break;\ + fi;\ + done;\ + if [ $$E -ne 0 ]; then\ + rm -rf "$@";\ + exit $$E;\ + fi +endef + +# do_cmd: run a command via the above cmd_foo names, if necessary. +# Should always run for a given target to handle command-line changes. +# Second argument, if non-zero, makes it do asm/C/C++ dependency munging. +# Third argument, if non-zero, makes it do POSTBUILDS processing. +# Note: We intentionally do NOT call dirx for depfile, since it contains ? for +# spaces already and dirx strips the ? characters. +define do_cmd +$(if $(or $(command_changed),$(prereq_changed)), + @$(call exact_echo, $($(quiet)cmd_$(1))) + @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" + $(if $(findstring flock,$(word 2,$(cmd_$1))), + @$(cmd_$(1)) + @echo " $(quiet_cmd_$(1)): Finished", + @$(cmd_$(1)) + ) + @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) + @$(if $(2),$(fixup_dep)) + $(if $(and $(3), $(POSTBUILDS)), + $(call do_postbuilds) + ) +) +endef + +# Declare the "all" target first so it is the default, +# even though we don't have the deps yet. +.PHONY: all +all: + +# make looks for ways to re-generate included makefiles, but in our case, we +# don't have a direct way. Explicitly telling make that it has nothing to do +# for them makes it go faster. +%.d: ; + +# Use FORCE_DO_CMD to force a target to run. Should be coupled with +# do_cmd. +.PHONY: FORCE_DO_CMD +FORCE_DO_CMD: + +TOOLSET := target +# Suffix rules, putting all outputs into $(obj). +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD + @$(call do_cmd,objc,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD + @$(call do_cmd,objcxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD + @$(call do_cmd,cc,1) + +# Try building from generated source, too. +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD + @$(call do_cmd,objc,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD + @$(call do_cmd,objcxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD + @$(call do_cmd,cc,1) + +$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD + @$(call do_cmd,objc,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD + @$(call do_cmd,objcxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD + @$(call do_cmd,cc,1) + + +ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ + $(findstring $(join ^,$(prefix)),\ + $(join ^,DTraceProviderBindings.target.mk)))),) + include DTraceProviderBindings.target.mk +endif +ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ + $(findstring $(join ^,$(prefix)),\ + $(join ^,libusdt.target.mk)))),) + include libusdt.target.mk +endif + +quiet_cmd_regen_makefile = ACTION Regenerating $@ +cmd_regen_makefile = cd $(srcdir); /Users/PEM/.meteor/packages/meteor-tool/.1.1.4.1suycxo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "--toplevel-dir=." -I/Users/PEM/Projects/orion/packages/logging/.npm/package-new-mx8ikp/node_modules/bunyan/node_modules/dtrace-provider/build/config.gypi -I/Users/PEM/.meteor/packages/meteor-tool/.1.1.4.1suycxo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/PEM/.node-gyp/0.10.36/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/PEM/.node-gyp/0.10.36" "-Dmodule_root_dir=/Users/PEM/Projects/orion/packages/logging/.npm/package-new-mx8ikp/node_modules/bunyan/node_modules/dtrace-provider" binding.gyp +Makefile: $(srcdir)/../../../../../../../../../../.meteor/packages/meteor-tool/.1.1.4.1suycxo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/../../../../../../../../../../.node-gyp/0.10.36/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp + $(call do_cmd,regen_makefile) + +# "all" is a concatenation of the "all" targets from all the included +# sub-makefiles. This is just here to clarify. +all: + +# Add in dependency-tracking rules. $(all_deps) is the list of every single +# target in our tree. Only consider the ones with .d (dependency) info: +d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) +ifneq ($(d_files),) + include $(d_files) +endif diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/..d b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/..d new file mode 100644 index 0000000..9891206 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/..d @@ -0,0 +1 @@ +cmd_. := LD_LIBRARY_PATH=/Users/PEM/Projects/orion/packages/logging/.npm/package-new-mx8ikp/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.host:/Users/PEM/Projects/orion/packages/logging/.npm/package-new-mx8ikp/node_modules/bunyan/node_modules/dtrace-provider/build/Release/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../.; sh libusdt-build.sh diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/DTraceProviderBindings.node.d b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/DTraceProviderBindings.node.d new file mode 100644 index 0000000..e8b2dde --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/DTraceProviderBindings.node.d @@ -0,0 +1 @@ +cmd_Release/DTraceProviderBindings.node := ./gyp-mac-tool flock ./Release/linker.lock c++ -bundle -Wl,-search_paths_first -mmacosx-version-min=10.5 -arch x86_64 -L./Release -L/usr/local/opt/qt5/lib -o Release/DTraceProviderBindings.node Release/obj.target/DTraceProviderBindings/dtrace_provider.o Release/obj.target/DTraceProviderBindings/dtrace_probe.o Release/obj.target/DTraceProviderBindings/dtrace_argument.o -undefined dynamic_lookup -L/Users/PEM/Projects/orion/packages/logging/.npm/package-new-mx8ikp/node_modules/bunyan/node_modules/dtrace-provider/libusdt -l usdt diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d new file mode 100644 index 0000000..29e6160 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d @@ -0,0 +1,31 @@ +cmd_Release/obj.target/DTraceProviderBindings/dtrace_argument.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/PEM/.node-gyp/0.10.36/src -I/Users/PEM/.node-gyp/0.10.36/deps/uv/include -I/Users/PEM/.node-gyp/0.10.36/deps/v8/include -I../libusdt -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_argument.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_argument.o ../dtrace_argument.cc +Release/obj.target/DTraceProviderBindings/dtrace_argument.o: \ + ../dtrace_argument.cc ../dtrace_provider.h ../node_modules/nan/nan.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-unix.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/ngx-queue.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-darwin.h \ + /Users/PEM/.node-gyp/0.10.36/src/node.h \ + /Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8.h \ + /Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8stdint.h \ + /Users/PEM/.node-gyp/0.10.36/src/node_object_wrap.h \ + /Users/PEM/.node-gyp/0.10.36/src/node_buffer.h \ + /Users/PEM/.node-gyp/0.10.36/src/node_version.h \ + ../node_modules/nan/nan_new.h \ + ../node_modules/nan/nan_implementation_pre_12_inl.h ../libusdt/usdt.h +../dtrace_argument.cc: +../dtrace_provider.h: +../node_modules/nan/nan.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-unix.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/ngx-queue.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-darwin.h: +/Users/PEM/.node-gyp/0.10.36/src/node.h: +/Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8.h: +/Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8stdint.h: +/Users/PEM/.node-gyp/0.10.36/src/node_object_wrap.h: +/Users/PEM/.node-gyp/0.10.36/src/node_buffer.h: +/Users/PEM/.node-gyp/0.10.36/src/node_version.h: +../node_modules/nan/nan_new.h: +../node_modules/nan/nan_implementation_pre_12_inl.h: +../libusdt/usdt.h: diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d new file mode 100644 index 0000000..af14b99 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d @@ -0,0 +1,31 @@ +cmd_Release/obj.target/DTraceProviderBindings/dtrace_probe.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/PEM/.node-gyp/0.10.36/src -I/Users/PEM/.node-gyp/0.10.36/deps/uv/include -I/Users/PEM/.node-gyp/0.10.36/deps/v8/include -I../libusdt -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_probe.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_probe.o ../dtrace_probe.cc +Release/obj.target/DTraceProviderBindings/dtrace_probe.o: \ + ../dtrace_probe.cc ../dtrace_provider.h ../node_modules/nan/nan.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-unix.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/ngx-queue.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-darwin.h \ + /Users/PEM/.node-gyp/0.10.36/src/node.h \ + /Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8.h \ + /Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8stdint.h \ + /Users/PEM/.node-gyp/0.10.36/src/node_object_wrap.h \ + /Users/PEM/.node-gyp/0.10.36/src/node_buffer.h \ + /Users/PEM/.node-gyp/0.10.36/src/node_version.h \ + ../node_modules/nan/nan_new.h \ + ../node_modules/nan/nan_implementation_pre_12_inl.h ../libusdt/usdt.h +../dtrace_probe.cc: +../dtrace_provider.h: +../node_modules/nan/nan.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-unix.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/ngx-queue.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-darwin.h: +/Users/PEM/.node-gyp/0.10.36/src/node.h: +/Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8.h: +/Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8stdint.h: +/Users/PEM/.node-gyp/0.10.36/src/node_object_wrap.h: +/Users/PEM/.node-gyp/0.10.36/src/node_buffer.h: +/Users/PEM/.node-gyp/0.10.36/src/node_version.h: +../node_modules/nan/nan_new.h: +../node_modules/nan/nan_implementation_pre_12_inl.h: +../libusdt/usdt.h: diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d new file mode 100644 index 0000000..fed114a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d @@ -0,0 +1,31 @@ +cmd_Release/obj.target/DTraceProviderBindings/dtrace_provider.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/PEM/.node-gyp/0.10.36/src -I/Users/PEM/.node-gyp/0.10.36/deps/uv/include -I/Users/PEM/.node-gyp/0.10.36/deps/v8/include -I../libusdt -I../node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/DTraceProviderBindings/dtrace_provider.o.d.raw -c -o Release/obj.target/DTraceProviderBindings/dtrace_provider.o ../dtrace_provider.cc +Release/obj.target/DTraceProviderBindings/dtrace_provider.o: \ + ../dtrace_provider.cc ../dtrace_provider.h ../node_modules/nan/nan.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-unix.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/ngx-queue.h \ + /Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-darwin.h \ + /Users/PEM/.node-gyp/0.10.36/src/node.h \ + /Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8.h \ + /Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8stdint.h \ + /Users/PEM/.node-gyp/0.10.36/src/node_object_wrap.h \ + /Users/PEM/.node-gyp/0.10.36/src/node_buffer.h \ + /Users/PEM/.node-gyp/0.10.36/src/node_version.h \ + ../node_modules/nan/nan_new.h \ + ../node_modules/nan/nan_implementation_pre_12_inl.h ../libusdt/usdt.h +../dtrace_provider.cc: +../dtrace_provider.h: +../node_modules/nan/nan.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-unix.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/ngx-queue.h: +/Users/PEM/.node-gyp/0.10.36/deps/uv/include/uv-private/uv-darwin.h: +/Users/PEM/.node-gyp/0.10.36/src/node.h: +/Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8.h: +/Users/PEM/.node-gyp/0.10.36/deps/v8/include/v8stdint.h: +/Users/PEM/.node-gyp/0.10.36/src/node_object_wrap.h: +/Users/PEM/.node-gyp/0.10.36/src/node_buffer.h: +/Users/PEM/.node-gyp/0.10.36/src/node_version.h: +../node_modules/nan/nan_new.h: +../node_modules/nan/nan_implementation_pre_12_inl.h: +../libusdt/usdt.h: diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/libusdt.stamp.d b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/libusdt.stamp.d new file mode 100644 index 0000000..08bacb1 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/.deps/Release/obj.target/libusdt.stamp.d @@ -0,0 +1 @@ +cmd_Release/obj.target/libusdt.stamp := touch Release/obj.target/libusdt.stamp diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/DTraceProviderBindings.node new file mode 100755 index 0000000000000000000000000000000000000000..d74fe3c49136b3165d6d7fc87abb2ec9f6bd2543 GIT binary patch literal 45448 zcmeHw3w%`7wf7m4z{o4(1C7dKK+vE-GC(kh*o?`9GdO|BORC}!l7U1+k|r|{6eKpp zaypDnTlG?}Ub(&6OMBa1?3I>Mg&;HmYuiYzrJ{n0dSX!Vh4>=hf9<{Y1mU^rACmbj!7^|cI@jhbn7AwFt56bNMCTVsaENqT!bAtA~B1b>Z5I zs%6Y!*H;se5pK?;qLsn~-3SZ@ORKBux*cfO*Idl{SOL)q{!@w>27{5Rl@(QG!HTM- z)d;ie+rs*8Wv3Bsx5=t97z~vMm)4dn56MuwKGz%>ZVr-=Xm+JlO&q6smnrI9fp?xa z9;~VQrMWn4F+--QzLDPUaxGg`S;jm7!C-QIN*(Dxm0iK$vg+IdAi)dIhExVDFV*^4D}9y_0Ct9_JTu1bQjXFW;GZ_N^^FN4dK z=u_8|vXXF#l%c2Hf6b*bZj%HW(Wll|TD^REbr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jsou$Ml7hpPp_D>c16h)9buXa^_Nw~D!+MCA%t@)lB?~-$TbnL%93qAVFZh@&{ zuldY`=Bqz9z&_>o?uE!rW!wVa92)!LX37e61A?T}uq9Hb+|6pbBhle_YimnZ^@zxw zSIzIIWubM8Ack{ikC{5Jni?2(`Yr0N<{&P?Zkc!;@OV&H)!1Q?jOS>oUQ(A|5?NNx zRjaI0HukEO%h7m(7_!i!g0*4HlY>E?{{^wliOtGjY55&N`a=m6)g7`dQc{b#ODT== za-$Oy`RdXz*p`dG&j1)&URtvX5HpOhnCqh9A_dGTD)9##v|wFT4c-lemjVmdmM+JJ lDPS3GoC2~Hz$!@yuu8F13AOke6GF?1k~&r+KI74}{{y8EXN3R& literal 0 HcmV?d00001 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/linker.lock b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/linker.lock new file mode 100644 index 0000000..e69de29 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/obj.target/libusdt.stamp b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/Release/obj.target/libusdt.stamp new file mode 100644 index 0000000..e69de29 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/binding.Makefile b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/binding.Makefile new file mode 100644 index 0000000..424c12c --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/binding.Makefile @@ -0,0 +1,6 @@ +# This file is generated by gyp; do not edit. + +export builddir_name ?= ./build/. +.PHONY: all +all: + $(MAKE) libusdt DTraceProviderBindings diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/config.gypi b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/config.gypi new file mode 100644 index 0000000..21c8653 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/config.gypi @@ -0,0 +1,124 @@ +# Do not edit. File was generated by node-gyp's "configure" step +{ + "target_defaults": { + "cflags": [], + "default_configuration": "Release", + "defines": [], + "include_dirs": [], + "libraries": [] + }, + "variables": { + "clang": 1, + "host_arch": "x64", + "node_install_npm": "true", + "node_prefix": "/var/folders/b5/n7qfvqkx1w761tvrq__cqpcr0000gq/T/generate-dev-bundle-XXXXXXXX.V6uRgEcF", + "node_shared_cares": "false", + "node_shared_http_parser": "false", + "node_shared_libuv": "false", + "node_shared_openssl": "false", + "node_shared_v8": "false", + "node_shared_zlib": "false", + "node_tag": "", + "node_unsafe_optimizations": 0, + "node_use_dtrace": "true", + "node_use_etw": "false", + "node_use_openssl": "true", + "node_use_perfctr": "false", + "openssl_no_asm": 0, + "python": "/usr/bin/python", + "target_arch": "x64", + "v8_enable_gdbjit": 0, + "v8_no_strict_aliasing": 1, + "v8_use_snapshot": "true", + "want_separate_host_toolset": 0, + "nodedir": "/Users/PEM/.node-gyp/0.10.36", + "copy_dev_lib": "true", + "standalone_static_library": 1, + "save_dev": "", + "browser": "", + "viewer": "man", + "rollback": "true", + "usage": "", + "__registry_npmjs_org__email": "pemarchandet@gmail.com", + "__registry_npmjs_org__always_auth": "", + "globalignorefile": "/Users/PEM/.meteor/packages/meteor-tool/.1.1.4.1suycxo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/etc/npmignore", + "init_author_url": "", + "shell": "/usr/local/bin/fish", + "parseable": "", + "shrinkwrap": "true", + "email": "", + "init_license": "ISC", + "cache_max": "Infinity", + "init_author_email": "", + "sign_git_tag": "", + "cert": "", + "git_tag_version": "true", + "local_address": "", + "long": "", + "registry": "https://registry.npmjs.org/", + "fetch_retries": "2", + "npat": "", + "key": "", + "message": "%s", + "versions": "", + "globalconfig": "/Users/PEM/.meteor/packages/meteor-tool/.1.1.4.1suycxo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/etc/npmrc", + "always_auth": "", + "spin": "true", + "cache_lock_retries": "10", + "cafile": "", + "heading": "npm", + "fetch_retry_mintimeout": "10000", + "proprietary_attribs": "true", + "json": "", + "description": "true", + "engine_strict": "", + "https_proxy": "", + "init_module": "/Users/PEM/.npm-init.js", + "userconfig": "/Users/PEM/.npmrc", + "node_version": "0.10.36", + "user": "501", + "editor": "mvim -v", + "save": "", + "tag": "latest", + "__registry_npmjs_org__username": "pem", + "global": "", + "optional": "true", + "username": "", + "bin_links": "true", + "force": "", + "searchopts": "", + "depth": "Infinity", + "rebuild_bundle": "true", + "searchsort": "name", + "unicode": "true", + "fetch_retry_maxtimeout": "60000", + "strict_ssl": "true", + "ca": "", + "save_prefix": "^", + "dev": "", + "fetch_retry_factor": "10", + "group": "20", + "save_exact": "", + "cache_lock_stale": "60000", + "version": "", + "cache_min": "10", + "cache": "/Users/PEM/.npm", + "searchexclude": "", + "color": "true", + "save_optional": "", + "user_agent": "npm/1.4.28 node/v0.10.36 darwin x64", + "ignore_scripts": "", + "cache_lock_wait": "10000", + "production": "", + "save_bundle": "", + "umask": "18", + "git": "git", + "init_author_name": "", + "__registry_npmjs_org___password": "cGFjbWFu", + "onload_script": "", + "tmp": "/var/folders/gn/h_nj_8fj1ns_npf_y7sx7xdh0000gn/T", + "unsafe_perm": "true", + "link": "", + "prefix": "/Users/PEM/.meteor/packages/meteor-tool/.1.1.4.1suycxo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle" + } +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/gyp-mac-tool b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/gyp-mac-tool new file mode 100755 index 0000000..7abfed5 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/gyp-mac-tool @@ -0,0 +1,512 @@ +#!/usr/bin/env python +# Generated by gyp. Do not edit. +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Utility functions to perform Xcode-style build steps. + +These functions are executed via gyp-mac-tool when using the Makefile generator. +""" + +import fcntl +import fnmatch +import glob +import json +import os +import plistlib +import re +import shutil +import string +import subprocess +import sys +import tempfile + + +def main(args): + executor = MacTool() + exit_code = executor.Dispatch(args) + if exit_code is not None: + sys.exit(exit_code) + + +class MacTool(object): + """This class performs all the Mac tooling steps. The methods can either be + executed directly, or dispatched from an argument list.""" + + def Dispatch(self, args): + """Dispatches a string command to a method.""" + if len(args) < 1: + raise Exception("Not enough arguments") + + method = "Exec%s" % self._CommandifyName(args[0]) + return getattr(self, method)(*args[1:]) + + def _CommandifyName(self, name_string): + """Transforms a tool name like copy-info-plist to CopyInfoPlist""" + return name_string.title().replace('-', '') + + def ExecCopyBundleResource(self, source, dest): + """Copies a resource file to the bundle/Resources directory, performing any + necessary compilation on each resource.""" + extension = os.path.splitext(source)[1].lower() + if os.path.isdir(source): + # Copy tree. + # TODO(thakis): This copies file attributes like mtime, while the + # single-file branch below doesn't. This should probably be changed to + # be consistent with the single-file branch. + if os.path.exists(dest): + shutil.rmtree(dest) + shutil.copytree(source, dest) + elif extension == '.xib': + return self._CopyXIBFile(source, dest) + elif extension == '.storyboard': + return self._CopyXIBFile(source, dest) + elif extension == '.strings': + self._CopyStringsFile(source, dest) + else: + shutil.copy(source, dest) + + def _CopyXIBFile(self, source, dest): + """Compiles a XIB file with ibtool into a binary plist in the bundle.""" + + # ibtool sometimes crashes with relative paths. See crbug.com/314728. + base = os.path.dirname(os.path.realpath(__file__)) + if os.path.relpath(source): + source = os.path.join(base, source) + if os.path.relpath(dest): + dest = os.path.join(base, dest) + + args = ['xcrun', 'ibtool', '--errors', '--warnings', '--notices', + '--output-format', 'human-readable-text', '--compile', dest, source] + ibtool_section_re = re.compile(r'/\*.*\*/') + ibtool_re = re.compile(r'.*note:.*is clipping its content') + ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE) + current_section_header = None + for line in ibtoolout.stdout: + if ibtool_section_re.match(line): + current_section_header = line + elif not ibtool_re.match(line): + if current_section_header: + sys.stdout.write(current_section_header) + current_section_header = None + sys.stdout.write(line) + return ibtoolout.returncode + + def _CopyStringsFile(self, source, dest): + """Copies a .strings file using iconv to reconvert the input into UTF-16.""" + input_code = self._DetectInputEncoding(source) or "UTF-8" + + # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call + # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints + # CFPropertyListCreateFromXMLData(): Old-style plist parser: missing + # semicolon in dictionary. + # on invalid files. Do the same kind of validation. + import CoreFoundation + s = open(source, 'rb').read() + d = CoreFoundation.CFDataCreate(None, s, len(s)) + _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None) + if error: + return + + fp = open(dest, 'wb') + fp.write(s.decode(input_code).encode('UTF-16')) + fp.close() + + def _DetectInputEncoding(self, file_name): + """Reads the first few bytes from file_name and tries to guess the text + encoding. Returns None as a guess if it can't detect it.""" + fp = open(file_name, 'rb') + try: + header = fp.read(3) + except e: + fp.close() + return None + fp.close() + if header.startswith("\xFE\xFF"): + return "UTF-16" + elif header.startswith("\xFF\xFE"): + return "UTF-16" + elif header.startswith("\xEF\xBB\xBF"): + return "UTF-8" + else: + return None + + def ExecCopyInfoPlist(self, source, dest, *keys): + """Copies the |source| Info.plist to the destination directory |dest|.""" + # Read the source Info.plist into memory. + fd = open(source, 'r') + lines = fd.read() + fd.close() + + # Insert synthesized key/value pairs (e.g. BuildMachineOSBuild). + plist = plistlib.readPlistFromString(lines) + if keys: + plist = dict(plist.items() + json.loads(keys[0]).items()) + lines = plistlib.writePlistToString(plist) + + # Go through all the environment variables and replace them as variables in + # the file. + IDENT_RE = re.compile('[/\s]') + for key in os.environ: + if key.startswith('_'): + continue + evar = '${%s}' % key + evalue = os.environ[key] + lines = string.replace(lines, evar, evalue) + + # Xcode supports various suffices on environment variables, which are + # all undocumented. :rfc1034identifier is used in the standard project + # template these days, and :identifier was used earlier. They are used to + # convert non-url characters into things that look like valid urls -- + # except that the replacement character for :identifier, '_' isn't valid + # in a URL either -- oops, hence :rfc1034identifier was born. + evar = '${%s:identifier}' % key + evalue = IDENT_RE.sub('_', os.environ[key]) + lines = string.replace(lines, evar, evalue) + + evar = '${%s:rfc1034identifier}' % key + evalue = IDENT_RE.sub('-', os.environ[key]) + lines = string.replace(lines, evar, evalue) + + # Remove any keys with values that haven't been replaced. + lines = lines.split('\n') + for i in range(len(lines)): + if lines[i].strip().startswith("${"): + lines[i] = None + lines[i - 1] = None + lines = '\n'.join(filter(lambda x: x is not None, lines)) + + # Write out the file with variables replaced. + fd = open(dest, 'w') + fd.write(lines) + fd.close() + + # Now write out PkgInfo file now that the Info.plist file has been + # "compiled". + self._WritePkgInfo(dest) + + def _WritePkgInfo(self, info_plist): + """This writes the PkgInfo file from the data stored in Info.plist.""" + plist = plistlib.readPlist(info_plist) + if not plist: + return + + # Only create PkgInfo for executable types. + package_type = plist['CFBundlePackageType'] + if package_type != 'APPL': + return + + # The format of PkgInfo is eight characters, representing the bundle type + # and bundle signature, each four characters. If that is missing, four + # '?' characters are used instead. + signature_code = plist.get('CFBundleSignature', '????') + if len(signature_code) != 4: # Wrong length resets everything, too. + signature_code = '?' * 4 + + dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo') + fp = open(dest, 'w') + fp.write('%s%s' % (package_type, signature_code)) + fp.close() + + def ExecFlock(self, lockfile, *cmd_list): + """Emulates the most basic behavior of Linux's flock(1).""" + # Rely on exception handling to report errors. + fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666) + fcntl.flock(fd, fcntl.LOCK_EX) + return subprocess.call(cmd_list) + + def ExecFilterLibtool(self, *cmd_list): + """Calls libtool and filters out '/path/to/libtool: file: foo.o has no + symbols'.""" + libtool_re = re.compile(r'^.*libtool: file: .* has no symbols$') + libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE) + _, err = libtoolout.communicate() + for line in err.splitlines(): + if not libtool_re.match(line): + print >>sys.stderr, line + return libtoolout.returncode + + def ExecPackageFramework(self, framework, version): + """Takes a path to Something.framework and the Current version of that and + sets up all the symlinks.""" + # Find the name of the binary based on the part before the ".framework". + binary = os.path.basename(framework).split('.')[0] + + CURRENT = 'Current' + RESOURCES = 'Resources' + VERSIONS = 'Versions' + + if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)): + # Binary-less frameworks don't seem to contain symlinks (see e.g. + # chromium's out/Debug/org.chromium.Chromium.manifest/ bundle). + return + + # Move into the framework directory to set the symlinks correctly. + pwd = os.getcwd() + os.chdir(framework) + + # Set up the Current version. + self._Relink(version, os.path.join(VERSIONS, CURRENT)) + + # Set up the root symlinks. + self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary) + self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES) + + # Back to where we were before! + os.chdir(pwd) + + def _Relink(self, dest, link): + """Creates a symlink to |dest| named |link|. If |link| already exists, + it is overwritten.""" + if os.path.lexists(link): + os.remove(link) + os.symlink(dest, link) + + def ExecCodeSignBundle(self, key, resource_rules, entitlements, provisioning): + """Code sign a bundle. + + This function tries to code sign an iOS bundle, following the same + algorithm as Xcode: + 1. copy ResourceRules.plist from the user or the SDK into the bundle, + 2. pick the provisioning profile that best match the bundle identifier, + and copy it into the bundle as embedded.mobileprovision, + 3. copy Entitlements.plist from user or SDK next to the bundle, + 4. code sign the bundle. + """ + resource_rules_path = self._InstallResourceRules(resource_rules) + substitutions, overrides = self._InstallProvisioningProfile( + provisioning, self._GetCFBundleIdentifier()) + entitlements_path = self._InstallEntitlements( + entitlements, substitutions, overrides) + subprocess.check_call([ + 'codesign', '--force', '--sign', key, '--resource-rules', + resource_rules_path, '--entitlements', entitlements_path, + os.path.join( + os.environ['TARGET_BUILD_DIR'], + os.environ['FULL_PRODUCT_NAME'])]) + + def _InstallResourceRules(self, resource_rules): + """Installs ResourceRules.plist from user or SDK into the bundle. + + Args: + resource_rules: string, optional, path to the ResourceRules.plist file + to use, default to "${SDKROOT}/ResourceRules.plist" + + Returns: + Path to the copy of ResourceRules.plist into the bundle. + """ + source_path = resource_rules + target_path = os.path.join( + os.environ['BUILT_PRODUCTS_DIR'], + os.environ['CONTENTS_FOLDER_PATH'], + 'ResourceRules.plist') + if not source_path: + source_path = os.path.join( + os.environ['SDKROOT'], 'ResourceRules.plist') + shutil.copy2(source_path, target_path) + return target_path + + def _InstallProvisioningProfile(self, profile, bundle_identifier): + """Installs embedded.mobileprovision into the bundle. + + Args: + profile: string, optional, short name of the .mobileprovision file + to use, if empty or the file is missing, the best file installed + will be used + bundle_identifier: string, value of CFBundleIdentifier from Info.plist + + Returns: + A tuple containing two dictionary: variables substitutions and values + to overrides when generating the entitlements file. + """ + source_path, provisioning_data, team_id = self._FindProvisioningProfile( + profile, bundle_identifier) + target_path = os.path.join( + os.environ['BUILT_PRODUCTS_DIR'], + os.environ['CONTENTS_FOLDER_PATH'], + 'embedded.mobileprovision') + shutil.copy2(source_path, target_path) + substitutions = self._GetSubstitutions(bundle_identifier, team_id + '.') + return substitutions, provisioning_data['Entitlements'] + + def _FindProvisioningProfile(self, profile, bundle_identifier): + """Finds the .mobileprovision file to use for signing the bundle. + + Checks all the installed provisioning profiles (or if the user specified + the PROVISIONING_PROFILE variable, only consult it) and select the most + specific that correspond to the bundle identifier. + + Args: + profile: string, optional, short name of the .mobileprovision file + to use, if empty or the file is missing, the best file installed + will be used + bundle_identifier: string, value of CFBundleIdentifier from Info.plist + + Returns: + A tuple of the path to the selected provisioning profile, the data of + the embedded plist in the provisioning profile and the team identifier + to use for code signing. + + Raises: + SystemExit: if no .mobileprovision can be used to sign the bundle. + """ + profiles_dir = os.path.join( + os.environ['HOME'], 'Library', 'MobileDevice', 'Provisioning Profiles') + if not os.path.isdir(profiles_dir): + print >>sys.stderr, ( + 'cannot find mobile provisioning for %s' % bundle_identifier) + sys.exit(1) + provisioning_profiles = None + if profile: + profile_path = os.path.join(profiles_dir, profile + '.mobileprovision') + if os.path.exists(profile_path): + provisioning_profiles = [profile_path] + if not provisioning_profiles: + provisioning_profiles = glob.glob( + os.path.join(profiles_dir, '*.mobileprovision')) + valid_provisioning_profiles = {} + for profile_path in provisioning_profiles: + profile_data = self._LoadProvisioningProfile(profile_path) + app_id_pattern = profile_data.get( + 'Entitlements', {}).get('application-identifier', '') + for team_identifier in profile_data.get('TeamIdentifier', []): + app_id = '%s.%s' % (team_identifier, bundle_identifier) + if fnmatch.fnmatch(app_id, app_id_pattern): + valid_provisioning_profiles[app_id_pattern] = ( + profile_path, profile_data, team_identifier) + if not valid_provisioning_profiles: + print >>sys.stderr, ( + 'cannot find mobile provisioning for %s' % bundle_identifier) + sys.exit(1) + # If the user has multiple provisioning profiles installed that can be + # used for ${bundle_identifier}, pick the most specific one (ie. the + # provisioning profile whose pattern is the longest). + selected_key = max(valid_provisioning_profiles, key=lambda v: len(v)) + return valid_provisioning_profiles[selected_key] + + def _LoadProvisioningProfile(self, profile_path): + """Extracts the plist embedded in a provisioning profile. + + Args: + profile_path: string, path to the .mobileprovision file + + Returns: + Content of the plist embedded in the provisioning profile as a dictionary. + """ + with tempfile.NamedTemporaryFile() as temp: + subprocess.check_call([ + 'security', 'cms', '-D', '-i', profile_path, '-o', temp.name]) + return self._LoadPlistMaybeBinary(temp.name) + + def _LoadPlistMaybeBinary(self, plist_path): + """Loads into a memory a plist possibly encoded in binary format. + + This is a wrapper around plistlib.readPlist that tries to convert the + plist to the XML format if it can't be parsed (assuming that it is in + the binary format). + + Args: + plist_path: string, path to a plist file, in XML or binary format + + Returns: + Content of the plist as a dictionary. + """ + try: + # First, try to read the file using plistlib that only supports XML, + # and if an exception is raised, convert a temporary copy to XML and + # load that copy. + return plistlib.readPlist(plist_path) + except: + pass + with tempfile.NamedTemporaryFile() as temp: + shutil.copy2(plist_path, temp.name) + subprocess.check_call(['plutil', '-convert', 'xml1', temp.name]) + return plistlib.readPlist(temp.name) + + def _GetSubstitutions(self, bundle_identifier, app_identifier_prefix): + """Constructs a dictionary of variable substitutions for Entitlements.plist. + + Args: + bundle_identifier: string, value of CFBundleIdentifier from Info.plist + app_identifier_prefix: string, value for AppIdentifierPrefix + + Returns: + Dictionary of substitutions to apply when generating Entitlements.plist. + """ + return { + 'CFBundleIdentifier': bundle_identifier, + 'AppIdentifierPrefix': app_identifier_prefix, + } + + def _GetCFBundleIdentifier(self): + """Extracts CFBundleIdentifier value from Info.plist in the bundle. + + Returns: + Value of CFBundleIdentifier in the Info.plist located in the bundle. + """ + info_plist_path = os.path.join( + os.environ['TARGET_BUILD_DIR'], + os.environ['INFOPLIST_PATH']) + info_plist_data = self._LoadPlistMaybeBinary(info_plist_path) + return info_plist_data['CFBundleIdentifier'] + + def _InstallEntitlements(self, entitlements, substitutions, overrides): + """Generates and install the ${BundleName}.xcent entitlements file. + + Expands variables "$(variable)" pattern in the source entitlements file, + add extra entitlements defined in the .mobileprovision file and the copy + the generated plist to "${BundlePath}.xcent". + + Args: + entitlements: string, optional, path to the Entitlements.plist template + to use, defaults to "${SDKROOT}/Entitlements.plist" + substitutions: dictionary, variable substitutions + overrides: dictionary, values to add to the entitlements + + Returns: + Path to the generated entitlements file. + """ + source_path = entitlements + target_path = os.path.join( + os.environ['BUILT_PRODUCTS_DIR'], + os.environ['PRODUCT_NAME'] + '.xcent') + if not source_path: + source_path = os.path.join( + os.environ['SDKROOT'], + 'Entitlements.plist') + shutil.copy2(source_path, target_path) + data = self._LoadPlistMaybeBinary(target_path) + data = self._ExpandVariables(data, substitutions) + if overrides: + for key in overrides: + if key not in data: + data[key] = overrides[key] + plistlib.writePlist(data, target_path) + return target_path + + def _ExpandVariables(self, data, substitutions): + """Expands variables "$(variable)" in data. + + Args: + data: object, can be either string, list or dictionary + substitutions: dictionary, variable substitutions to perform + + Returns: + Copy of data where each references to "$(variable)" has been replaced + by the corresponding value found in substitutions, or left intact if + the key was not found. + """ + if isinstance(data, str): + for key, value in substitutions.iteritems(): + data = data.replace('$(%s)' % key, value) + return data + if isinstance(data, list): + return [self._ExpandVariables(v, substitutions) for v in data] + if isinstance(data, dict): + return dict((k, self._ExpandVariables(data[k], + substitutions)) for k in data) + return data + +if __name__ == '__main__': + sys.exit(main(sys.argv[1:])) diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/libusdt.target.mk b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/libusdt.target.mk new file mode 100644 index 0000000..a6ea771 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/build/libusdt.target.mk @@ -0,0 +1,46 @@ +# This file is generated by gyp; do not edit. + +TOOLSET := target +TARGET := libusdt +### Rules for action "build_libusdt": +quiet_cmd_binding_gyp_libusdt_target_build_libusdt = ACTION binding_gyp_libusdt_target_build_libusdt $@ +cmd_binding_gyp_libusdt_target_build_libusdt = LD_LIBRARY_PATH=$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd $(srcdir)/.; sh libusdt-build.sh + +.: obj := $(abs_obj) +.: builddir := $(abs_builddir) +.: export BUILT_PRODUCTS_DIR := ${abs_builddir} +.: export CONFIGURATION := ${BUILDTYPE} +.: export PRODUCT_NAME := libusdt +.: export SDKROOT := +.: export SRCROOT := ${abs_srcdir}/ +.: export SOURCE_ROOT := ${SRCROOT} +.: export TARGET_BUILD_DIR := ${abs_builddir} +.: export TEMP_DIR := ${TMPDIR} +.: TOOLSET := $(TOOLSET) +.: $(srcdir)/. FORCE_DO_CMD + $(call do_cmd,binding_gyp_libusdt_target_build_libusdt) + +all_deps += . +action_binding_gyp_libusdt_target_build_libusdt_outputs := . + + +### Rules for final target. +# Build our special outputs first. +$(obj).target/libusdt.stamp: | $(action_binding_gyp_libusdt_target_build_libusdt_outputs) + +# Preserve order dependency of special output on deps. +$(action_binding_gyp_libusdt_target_build_libusdt_outputs): | + +$(obj).target/libusdt.stamp: TOOLSET := $(TOOLSET) +$(obj).target/libusdt.stamp: FORCE_DO_CMD + $(call do_cmd,touch) + +all_deps += $(obj).target/libusdt.stamp +# Add target alias +.PHONY: libusdt +libusdt: $(obj).target/libusdt.stamp + +# Add target alias to "all" target. +.PHONY: all +all: libusdt + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/compile.py b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/compile.py new file mode 100644 index 0000000..3474b9d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/compile.py @@ -0,0 +1,58 @@ +{ + 'conditions': [ + ['OS=="mac" or OS=="solaris"', { + 'variables': { + 'escaped_root': ' + +namespace node { + + using namespace v8; + + // Integer Argument + +#ifdef __x86_64__ +# define INTMETHOD ToInteger() +#else +# define INTMETHOD ToInt32() +#endif + + void * DTraceIntegerArgument::ArgumentValue(Handle value) { + if (value->IsUndefined()) + return 0; + else + return (void *)(long) value->INTMETHOD->Value(); + } + + void DTraceIntegerArgument::FreeArgument(void *arg) { + } + + const char * DTraceIntegerArgument::Type() { + return "int"; + } + + // String Argument + + void * DTraceStringArgument::ArgumentValue(Handle value) { + if (value->IsUndefined()) + return (void *) strdup("undefined"); + + String::Utf8Value str(value->ToString()); + return (void *) strdup(*str); + } + + void DTraceStringArgument::FreeArgument(void *arg) { + free(arg); + } + + const char * DTraceStringArgument::Type() { + return "char *"; + } + + // JSON Argument + + DTraceJsonArgument::DTraceJsonArgument() { + NanScope(); + Handle context = NanGetCurrentContext(); + Handle global = context->Global(); + Handle l_JSON = global->Get(NanNew("JSON"))->ToObject(); + Handle l_JSON_stringify + = Handle::Cast(l_JSON->Get(NanNew("stringify"))); + NanAssignPersistent(JSON, l_JSON); + NanAssignPersistent(JSON_stringify, l_JSON_stringify); + } + + DTraceJsonArgument::~DTraceJsonArgument() { + NanDisposePersistent(JSON); + NanDisposePersistent(JSON_stringify); + } + + void * DTraceJsonArgument::ArgumentValue(Handle value) { + NanScope(); + + if (value->IsUndefined()) + return (void *) strdup("undefined"); + + Handle args[1]; + args[0] = value; + Handle j = NanNew(JSON_stringify)->Call( + NanNew(JSON), 1, args); + + if (*j == NULL) + return (void *) strdup("{ \"error\": \"stringify failed\" }"); + + String::Utf8Value json(j->ToString()); + return (void *) strdup(*json); + } + + void DTraceJsonArgument::FreeArgument(void *arg) { + free(arg); + } + + const char * DTraceJsonArgument::Type() { + return "char *"; + } + +} // namespace node diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_probe.cc b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_probe.cc new file mode 100644 index 0000000..72b15f5 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_probe.cc @@ -0,0 +1,95 @@ +#include "dtrace_provider.h" +#include + +namespace node { + + using namespace v8; + + DTraceProbe::DTraceProbe() : ObjectWrap() { + argc = 0; + probedef = NULL; + } + + DTraceProbe::~DTraceProbe() { + for (size_t i = 0; i < argc; i++) + delete(this->arguments[i]); + usdt_probe_release(probedef); + } + + Persistent DTraceProbe::constructor_template; + + void DTraceProbe::Initialize(Handle target) { + NanScope(); + + Local t = NanNew(DTraceProbe::New); + t->InstanceTemplate()->SetInternalFieldCount(1); + t->SetClassName(NanNew("DTraceProbe")); + NanAssignPersistent(constructor_template, t); + + NODE_SET_PROTOTYPE_METHOD(t, "fire", DTraceProbe::Fire); + + target->Set(NanNew("DTraceProbe"), t->GetFunction()); + } + + NAN_METHOD(DTraceProbe::New) { + NanScope(); + DTraceProbe *probe = new DTraceProbe(); + probe->Wrap(args.This()); + NanReturnValue(args.This()); + } + + NAN_METHOD(DTraceProbe::Fire) { + NanScope(); + DTraceProbe *pd = ObjectWrap::Unwrap(args.Holder()); + NanReturnValue(pd->_fire(args[0])); + } + + Handle DTraceProbe::_fire(v8::Local argsfn) { + NanScope(); + + if (usdt_is_enabled(this->probedef->probe) == 0) { + return NanUndefined(); + } + + // invoke fire callback + TryCatch try_catch; + + if (!argsfn->IsFunction()) { + NanThrowError("Must give probe value callback as argument"); + return NanUndefined(); + } + + Local cb = Local::Cast(argsfn); + Local probe_args = cb->Call(NanObjectWrapHandle(this), 0, NULL); + + // exception in args callback? + if (try_catch.HasCaught()) { + FatalException(try_catch); + return NanUndefined(); + } + + // check return + if (!probe_args->IsArray()) { + return NanUndefined(); + } + + Local a = Local::Cast(probe_args); + void *argv[USDT_ARG_MAX]; + + // convert each argument value + for (size_t i = 0; i < argc; i++) { + argv[i] = this->arguments[i]->ArgumentValue(a->Get(i)); + } + + // finally fire the probe + usdt_fire_probe(this->probedef->probe, argc, argv); + + // free argument values + for (size_t i = 0; i < argc; i++) { + this->arguments[i]->FreeArgument(argv[i]); + } + + return NanTrue(); + } + +} // namespace node diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.cc b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.cc new file mode 100644 index 0000000..9d0d86d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.cc @@ -0,0 +1,200 @@ +#include "dtrace_provider.h" +#include + +#include + +namespace node { + + using namespace v8; + + DTraceProvider::DTraceProvider() : ObjectWrap() { + provider = NULL; + } + + DTraceProvider::~DTraceProvider() { + usdt_provider_disable(provider); + usdt_provider_free(provider); + } + + Persistent DTraceProvider::constructor_template; + + void DTraceProvider::Initialize(Handle target) { + NanScope(); + + Local t = NanNew(DTraceProvider::New); + t->InstanceTemplate()->SetInternalFieldCount(1); + t->SetClassName(NanNew("DTraceProvider")); + NanAssignPersistent(constructor_template, t); + + NODE_SET_PROTOTYPE_METHOD(t, "addProbe", DTraceProvider::AddProbe); + NODE_SET_PROTOTYPE_METHOD(t, "removeProbe", DTraceProvider::RemoveProbe); + NODE_SET_PROTOTYPE_METHOD(t, "enable", DTraceProvider::Enable); + NODE_SET_PROTOTYPE_METHOD(t, "disable", DTraceProvider::Disable); + NODE_SET_PROTOTYPE_METHOD(t, "fire", DTraceProvider::Fire); + + target->Set(NanNew("DTraceProvider"), t->GetFunction()); + + DTraceProbe::Initialize(target); + } + + NAN_METHOD(DTraceProvider::New) { + NanScope(); + DTraceProvider *p = new DTraceProvider(); + char module[128]; + + p->Wrap(args.This()); + + if (args.Length() < 1 || !args[0]->IsString()) { + NanThrowTypeError("Must give provider name as argument"); + NanReturnUndefined(); + } + + String::Utf8Value name(args[0]->ToString()); + + if (args.Length() == 2) { + if (!args[1]->IsString()) { + NanThrowTypeError("Must give module name as argument"); + NanReturnUndefined(); + } + + String::Utf8Value mod(args[1]->ToString()); + (void) snprintf(module, sizeof (module), "%s", *mod); + } else if (args.Length() == 1) { + // If no module name is provided, develop a synthetic module name based + // on our address + (void) snprintf(module, sizeof (module), "mod-%p", p); + } else { + NanThrowError("Expected only provider name and module as arguments"); + NanReturnUndefined(); + } + + if ((p->provider = usdt_create_provider(*name, module)) == NULL) { + NanThrowError("usdt_create_provider failed"); + NanReturnUndefined(); + } + + NanReturnValue(args.This()); + } + + NAN_METHOD(DTraceProvider::AddProbe) { + NanScope(); + const char *types[USDT_ARG_MAX]; + + Handle obj = args.Holder(); + DTraceProvider *provider = ObjectWrap::Unwrap(obj); + + // create a DTraceProbe object + Handle klass = + NanNew(DTraceProbe::constructor_template)->GetFunction(); + Handle pd = klass->NewInstance(); + + // store in provider object + DTraceProbe *probe = ObjectWrap::Unwrap(pd->ToObject()); + obj->Set(args[0]->ToString(), pd); + + // add probe to provider + for (int i = 0; i < USDT_ARG_MAX; i++) { + if (i < args.Length() - 1) { + String::Utf8Value type(args[i + 1]->ToString()); + + if (strncmp("json", *type, 4) == 0) + probe->arguments[i] = new DTraceJsonArgument(); + else if (strncmp("char *", *type, 6) == 0) + probe->arguments[i] = new DTraceStringArgument(); + else if (strncmp("int", *type, 3) == 0) + probe->arguments[i] = new DTraceIntegerArgument(); + else + probe->arguments[i] = new DTraceStringArgument(); + + types[i] = strdup(probe->arguments[i]->Type()); + probe->argc++; + } + } + + String::Utf8Value name(args[0]->ToString()); + probe->probedef = usdt_create_probe(*name, *name, probe->argc, types); + usdt_provider_add_probe(provider->provider, probe->probedef); + + for (size_t i = 0; i < probe->argc; i++) { + free((char *)types[i]); + } + + NanReturnValue(pd); + } + + NAN_METHOD(DTraceProvider::RemoveProbe) { + NanScope(); + + Handle provider_obj = args.Holder(); + DTraceProvider *provider = ObjectWrap::Unwrap(provider_obj); + + Handle probe_obj = Local::Cast(args[0]); + DTraceProbe *probe = ObjectWrap::Unwrap(probe_obj); + + Handle name = NanNew(probe->probedef->name); + provider_obj->Delete(name); + + if (usdt_provider_remove_probe(provider->provider, probe->probedef) != 0) { + NanThrowError(usdt_errstr(provider->provider)); + NanReturnUndefined(); + } + + NanReturnValue(NanTrue()); + } + + NAN_METHOD(DTraceProvider::Enable) { + NanScope(); + DTraceProvider *provider = ObjectWrap::Unwrap(args.Holder()); + + if (usdt_provider_enable(provider->provider) != 0) { + NanThrowError(usdt_errstr(provider->provider)); + NanReturnUndefined(); + } + + NanReturnUndefined(); + } + + NAN_METHOD(DTraceProvider::Disable) { + NanScope(); + DTraceProvider *provider = ObjectWrap::Unwrap(args.Holder()); + + if (usdt_provider_disable(provider->provider) != 0) { + NanThrowError(usdt_errstr(provider->provider)); + NanReturnUndefined(); + } + + NanReturnUndefined(); + } + + NAN_METHOD(DTraceProvider::Fire) { + NanScope(); + + if (!args[0]->IsString()) { + NanThrowTypeError("Must give probe name as first argument"); + NanReturnUndefined(); + } + + if (!args[1]->IsFunction()) { + NanThrowTypeError("Must give probe value callback as second argument"); + NanReturnUndefined(); + } + + Handle provider = args.Holder(); + Handle probe = Local::Cast(provider->Get(args[0])); + + DTraceProbe *p = ObjectWrap::Unwrap(probe); + if (p == NULL) + NanReturnUndefined(); + + p->_fire(args[1]); + + NanReturnValue(NanTrue()); + } + + extern "C" void + init(Handle target) { + DTraceProvider::Initialize(target); + } + + NODE_MODULE(DTraceProviderBindings, init) +} // namespace node diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.h b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.h new file mode 100644 index 0000000..d6722bd --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/dtrace_provider.h @@ -0,0 +1,100 @@ +#include +#include + +extern "C" { +#include +} + +#include +#include +#include + +#include +#include +#include +#include + +#ifndef __APPLE__ +#include +#include +#endif + +namespace node { + + using namespace v8; + + class DTraceArgument { + public: + virtual const char *Type() = 0; + virtual void *ArgumentValue(Handle) = 0; + virtual void FreeArgument(void *) = 0; + virtual ~DTraceArgument() { }; + }; + + class DTraceIntegerArgument : public DTraceArgument { + public: + const char *Type(); + void *ArgumentValue(Handle); + void FreeArgument(void *); + }; + + class DTraceStringArgument : public DTraceArgument { + public: + const char *Type(); + void *ArgumentValue(Handle); + void FreeArgument(void *); + }; + + class DTraceJsonArgument : public DTraceArgument { + public: + const char *Type(); + void *ArgumentValue(Handle); + void FreeArgument(void *); + DTraceJsonArgument(); + ~DTraceJsonArgument(); + private: + Persistent JSON; + Persistent JSON_stringify; + }; + + class DTraceProbe : public ObjectWrap { + + public: + static void Initialize(v8::Handle target); + usdt_probedef_t *probedef; + size_t argc; + DTraceArgument *arguments[USDT_ARG_MAX]; + + static NAN_METHOD(New); + static NAN_METHOD(Fire); + + Handle _fire(v8::Local); + + static Persistent constructor_template; + + DTraceProbe(); + ~DTraceProbe(); + private: + }; + + class DTraceProvider : public ObjectWrap { + + public: + static void Initialize(v8::Handle target); + usdt_provider_t *provider; + + static NAN_METHOD(New); + static NAN_METHOD(AddProbe); + static NAN_METHOD(RemoveProbe); + static NAN_METHOD(Enable); + static NAN_METHOD(Disable); + static NAN_METHOD(Fire); + + DTraceProvider(); + ~DTraceProvider(); + private: + static Persistent constructor_template; + }; + + void InitDTraceProvider(v8::Handle target); +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt-arch.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt-arch.js new file mode 100644 index 0000000..8d2593d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt-arch.js @@ -0,0 +1,13 @@ +// Output the architecture of this node build, either 'i386' or +// 'x86_64' +// +// This copes with both node 0.6.x and 0.8.x. + +try { + // node 0.8 + console.log(process.config.variables.target_arch == 'x64' ? 'x86_64' : 'i386') +} +catch (TypeError) { + // node 0.6 + console.log(process.arch == 'x64' ? 'x86_64' : 'i386') +}; diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt-build.sh b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt-build.sh new file mode 100755 index 0000000..3cf2a84 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt-build.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +# GYP's MAKEFLAGS confuses libusdt's Makefile +# +unset MAKEFLAGS + +# Ask node what arch it's been built for, and build libusdt to match. +# +# We use node from the path; npm will have adjusted PATH for us if +# necessary, otherwise we assume the user did so when building by +# hand. +# +# (this will need to change at the point that GYP is able to build +# node extensions universal on the Mac - for now we'll go with x86_64 +# on a 64 bit Mac, because that's the default architecture in that +# situation). +# +ARCH=`node libusdt-arch.js` +echo "Building libusdt for ${ARCH}" +export ARCH + +# Respect a MAKE variable if set +if [ -z $MAKE ]; then + # Default to `gmake` first if available, because we require GNU make + # and `make` isn't GNU make on some plats. + MAKE=`which gmake` + if [ -z $MAKE ]; then + MAKE=make + fi +fi + +# Build. +# +$MAKE -C libusdt clean all diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/.npmignore b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/.npmignore new file mode 100644 index 0000000..fba1d97 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/.npmignore @@ -0,0 +1,10 @@ +*.o +*.a +*.gch +*~ +*# +.#* +test_usdt +test_usdt32 +test_usdt64 +test_mem_usage diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/LICENCE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/LICENCE new file mode 100644 index 0000000..e74a6f8 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/LICENCE @@ -0,0 +1,21 @@ +Copyright 2012 Chris Andrews. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are +permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of + conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list + of conditions and the following disclaimer in the documentation and/or other materials + provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY CHRIS ANDREWS ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CHRIS ANDREWS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/Makefile b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/Makefile new file mode 100644 index 0000000..2ea157f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/Makefile @@ -0,0 +1,156 @@ +CC = gcc +CFLAGS = -O2 -Wall + +# MAC_BUILD - set this to "universal" to build a 2-way fat library +MAC_BUILD = universal + +# if ARCH set, disable universal build on the mac +ifdef ARCH +MAC_BUILD = +else +ARCH = $(shell uname -m) +endif + +UNAME = $(shell uname -s) + +ifeq ($(UNAME), Linux) +RANLIB=ranlib +CFLAGS+=-D_GNU_SOURCE -fPIC +endif + +ifeq ($(UNAME), SunOS) +RANLIB=/bin/true +PATH +=:/usr/perl5/5.10.0/bin:/usr/perl5/5.12/bin +CFLAGS += -fPIC +ifeq ($(ARCH), i86pc) +ARCH = $(shell isainfo -k) +ifeq ($(ARCH), amd64) +ARCH = x86_64 +else +ARCH = i386 +endif +endif +ifeq ($(ARCH), x86_64) +CFLAGS += -m64 +endif +endif + +ifeq ($(UNAME), FreeBSD) +RANLIB=ranlib +CFLAGS += -Wno-error=unknown-pragmas -I/usr/src/sys/cddl/compat/opensolaris -I/usr/src/sys/cddl/contrib/opensolaris/uts/common +CFLAGS += -fPIC +ifeq ($(ARCH), i386) +CFLAGS += -m32 +endif +ifeq ($(ARCH), amd64) +ARCH = x86_64 +endif +endif + +ifeq ($(UNAME), Darwin) +RANLIB=ranlib +ifeq ($(MAC_BUILD), universal) +CFLAGS += -arch i386 -arch x86_64 +else +CFLAGS += -arch $(ARCH) +endif +endif + +# main library build +objects = usdt.o usdt_dof_file.o usdt_tracepoints.o usdt_probe.o usdt_dof.o usdt_dof_sections.o +headers = usdt.h usdt_internal.h + +.c.o: $(headers) + +all: libusdt.a + +libusdt.a: $(objects) $(headers) + rm -f libusdt.a + $(AR) cru libusdt.a $(objects) + $(RANLIB) libusdt.a + +# Tracepoints build. +# +# If on Darwin and building a universal library, manually assemble a +# two-way fat object file from both the 32 and 64 bit tracepoint asm +# files. +# +# Otherwise, just choose the appropriate asm file based on the build +# architecture. + +ifeq ($(UNAME), Darwin) +ifeq ($(MAC_BUILD), universal) + +usdt_tracepoints_i386.o: usdt_tracepoints_i386.s + $(CC) -arch i386 -o usdt_tracepoints_i386.o -c usdt_tracepoints_i386.s + +usdt_tracepoints_x86_64.o: usdt_tracepoints_x86_64.s + $(CC) -arch x86_64 -o usdt_tracepoints_x86_64.o -c usdt_tracepoints_x86_64.s + +usdt_tracepoints.o: usdt_tracepoints_i386.o usdt_tracepoints_x86_64.o + lipo -create -output usdt_tracepoints.o usdt_tracepoints_i386.o \ + usdt_tracepoints_x86_64.o + +else # Darwin, not universal +usdt_tracepoints.o: usdt_tracepoints_$(ARCH).s + $(CC) -arch $(ARCH) -o usdt_tracepoints.o -c usdt_tracepoints_$(ARCH).s +endif + +else # not Darwin; FreeBSD and Illumos + +ifeq ($(ARCH), x86_64) +usdt_tracepoints.o: usdt_tracepoints_x86_64.s + $(CC) $(CFLAGS) -o usdt_tracepoints.o -c usdt_tracepoints_x86_64.s +endif +ifeq ($(ARCH), i386) +usdt_tracepoints.o: usdt_tracepoints_i386.s + $(CC) $(CFLAGS) -o usdt_tracepoints.o -c usdt_tracepoints_i386.s +endif + +endif + +clean: + rm -f *.gch + rm -f *.o + rm -f libusdt.a + rm -f test_usdt + rm -f test_usdt32 + rm -f test_usdt64 + rm -f test_mem_usage + +.PHONY: clean test + +# testing + +test_mem_usage: libusdt.a test_mem_usage.o + $(CC) $(CFLAGS) -o test_mem_usage test_mem_usage.o libusdt.a + +ifeq ($(UNAME), Darwin) +ifeq ($(MAC_BUILD), universal) +test_usdt64: libusdt.a test_usdt.o + $(CC) -arch x86_64 -o test_usdt64 test_usdt.o libusdt.a +test_usdt32: libusdt.a test_usdt.o + $(CC) -arch i386 -o test_usdt32 test_usdt.o libusdt.a +else +test_usdt: libusdt.a test_usdt.o + $(CC) $(CFLAGS) -o test_usdt test_usdt.o libusdt.a +endif +else +test_usdt: libusdt.a test_usdt.o + $(CC) $(CFLAGS) -o test_usdt test_usdt.o libusdt.a +endif + +ifeq ($(UNAME), Darwin) +ifeq ($(MAC_BUILD), universal) +test: test_usdt32 test_usdt64 + sudo prove test.pl :: 64 + sudo prove test.pl :: 32 +else +test: test_usdt + sudo prove test.pl +endif +else +test: test_usdt + sudo prove test.pl +endif + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/README.md new file mode 100644 index 0000000..660274a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/README.md @@ -0,0 +1,77 @@ +libusdt +======= + +This is "libusdt", a library for creating DTrace USDT providers. + +The idea here is to allow the specification of a DTrace provider +dynamically in code and then create the provider at runtime. This +allows providers to be specified in dynamic languages, given suitable +bindings. + +The general approach is to create two stub functions for each probe, +one for the is-enabled check and one for the probe itself. These +contain the appropriate instruction sequences to appear to DTrace as +compiled-in tracepoints. A minimal DOF document is built describing +the provider and indicating these stub functions as the tracepoints, +then submitted to the kernel, creating the provider. The API then +exposes the stubs, through which the probes may be fired. + +Status +------ + +The implementation here works as shown in test_usdt.c on Mac OS X, +i386 and x86_64, on Solaris-like systems, i386 and x86_64 and on +FreeBSD and Oracle Linux, x86_64 only. + +Is-enabled probes are supported and exposed in the API. + +There is a "test" target which runs a number of tests of the library, +for which perl is required. + +OS X builds are Universal by default, and on Solaris, the ARCH +variable may be set to either i386 or x86_64 to force a particular +build. + +FreeBSD builds suffer from broken argument handling; this is a known +issue with the current state of DTrace generally on FreeBSD: only the +first five arguments work reliably. See: + + http://wiki.freebsd.org/DTraceTODO + +See Also +-------- + +There are various language bindings available: + +Lua: + + https://github.com/chrisa/lua-usdt + +Ruby (by Kevin Chan): + + https://github.com/kevinykchan/ruby-usdt + +Node.JS: + + https://github.com/chrisa/node-dtrace-provider + +Perl: + + https://github.com/chrisa/perl-Devel-DTrace-Provider + +To Do +----- + +Platform support: + + * add support for FreeBSD 9.0 i386 + * add support for Mac OS X PowerPC + * add support for Solaris SPARC + +Features: + + * add a "low level" API, allowing alternative provision of + tracepoints for closer integration with language VMs. + + * support structured types, with close integration with the host + DTrace system. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/libusdt.a b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/libusdt.a new file mode 100644 index 0000000000000000000000000000000000000000..fbe2cf220fe643e1092904273666f011520135ca GIT binary patch literal 18936 zcmb_k4R~BtnZ9Y#bS$MAej5brpg|H~Ak)%PEk7BXY46|!3gu6rOwwdRv$RP}W@r%# zVW-hvFVTpgRd?M!uDYLTS|Od1nrVSY!;jddY9q2zp72xt3J5m)zUO{t=FXi7 zExO;6JMaC@`ObHK@A>)8IXUILmY&v?7fk56B z!+0P3*vW=*0%V9m!HD1&1Xl~rEH{jO7Z^s3;CX_V39c0UD)iURH;f+%J}g)#@y`?d zoZuybCghl|X5r()rxE|o(+y*d@Lv@Fe!=exJ`I1y`=IcT3+@#h7yl0g?-srH3GNWw zBRDQNA$S79F&%x#XFS#0mW;RdBwCV*cy~|NibRpqO&x8C9&t_d^mG-x_vSr%liH`f zqo+_=M{hjQ*|K6)qD{nAO!1z?szgh#juCDus(4FVTR~EC9&H`HRFc=>$UCaNuI)XE zBFUb_>aLp#lh)SN9&hhhm58@=cPBdA;=PI1WJg!0Xv_J!wB_7xNOUH8P;Oq?j?Rvx z*KJi-i_Uv4e5%vs>Xb-J&kednlRYi1iSDkB&LqlChjlr2^cEJW%S-7pRL#27D&8eU ztzNghQm>Drv!J=;b?G#-l;XwC`Rb2%wYT>sbm=&WD{x}rNEN7d(AJV{ah0X^@>GX* zc9lGIJFP=$?D&$dCA89H%L?iiwc_9k$`IW>tO}JBSM=RIiB2ZB*c~5EDc91nPQsXI z1N~%ZPQIHA=zcOZzjQx2-_=jDiq7gnrvUo(UtT#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VO*ZG?Ky&41bf*vVFujXc3}&qio11fbz#G_IX`A>pXVGug-sMrCCs z+I(g!Cn6|VrOetM%JlEL`6zcA(5<;%O~^5WsH`k_5S+w$N2&Q-AEO2h<0&;C)%Ih4 z_NBt>PV~M>{5LbBps(X8HD5i{d~(0+moxo}^!&@SU(RBR;c1ZhB=e(4%YVLb{z>^; z@r;Q)^QTD5m(c$c2sF!lkoi?KiF^$_e}`vG!e?@tr zi5$lUg7G6b0Hl8>kp9;KG4upa760cUO#fjZ{Wk+S?@R$1p6Ah(e)0bu%8_!Lfb@?8 z>3_1g??NImrUic?_#Ge`bMR*2PX{twACN(s1sendf&k@zJ5bFtAxs*=qvowhKZ(wY zSDazoBfM^RuL`f*5kC=8r9xco;l2Cfy&nH(J^cM1{wxpgnzt$gbkRQnDV&L_8K`?o xIhoBYe|}jj$WMn=81G*8WdE?ldxTo0ve2@~33I9cY%-Z8(vg?RHgetline; + + my @d_cmd = ('/usr/sbin/dtrace', '-p', $t_pid, '-n', $d); + + #diag(join(' ', @d_cmd)); + my $d_pid = open3($d_wtr, $d_rdr, $d_err, @d_cmd); + my $matched = $d_err->getline; # expect "matched 1 probe" + + $t_wtr->print("go\n"); + $t_wtr->flush; + waitpid( $t_pid, 0 ); + my $t_status = $? >> 8; + + my ($header, $output) = ($d_rdr->getline, $d_rdr->getline); + chomp $header; + chomp $output; + #diag("DTrace header: $header\n"); + #diag("DTrace output: $output\n"); + waitpid( $d_pid, 0 ); + + my $d_status = $? >> 8; + while (!$d_err->eof) { + my $error = $d_err->getline; + chomp $error; + #diag "DTrace error: $error"; + } + + return ($t_status, $d_status, $output || ''); +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/test_mem_usage.c b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/test_mem_usage.c new file mode 100644 index 0000000..4296f8f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/test_mem_usage.c @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +#include "usdt.h" + +#include +#include +#include + +static void +create_and_free_provider(int argc, char **argv) +{ + usdt_provider_t *provider; + usdt_probedef_t *probedef; + + if ((provider = usdt_create_provider("testlibusdt", "modname")) == NULL) { + fprintf(stderr, "unable to create provider\n"); + exit (1); + } + if ((probedef = usdt_create_probe((const char *)argv[1], + (const char *)argv[2], + (argc-3), (const char **)&argv[3])) == NULL) + { + fprintf(stderr, "unable to create probe\n"); + exit (1); + } + usdt_provider_add_probe(provider, probedef); + + if ((usdt_provider_enable(provider)) < 0) { + fprintf(stderr, "unable to enable provider: %s\n", usdt_errstr(provider)); + exit (1); + } + + if ((usdt_provider_disable(provider)) < 0) { + fprintf(stderr, "unable to disable provider: %s\n", usdt_errstr(provider)); + exit (1); + } + + usdt_probe_release(probedef); + usdt_provider_free(provider); +} + +int +main(int argc, char **argv) +{ + char char_argv[USDT_ARG_MAX]; + int int_argv[USDT_ARG_MAX * 2]; + int i; + char buf[255]; + + for (i = 0; i < USDT_ARG_MAX; i++) + int_argv[i] = i + 1; + for (i = 0; i < USDT_ARG_MAX; i++) + char_argv[i] = (char) i + 65; + + if (argc < 3) { + fprintf(stderr, "usage: %s func name [types ...]\n", argv[0]); + return(1); + } + + for (i = 0; i < USDT_ARG_MAX; i++) { + if (argv[i+3] != NULL && i+3 < argc) { + if (strncmp("c", argv[i+3], 1) == 0) { + argv[i+3] = strdup("char *"); + } + if (strncmp("i", argv[i+3], 1) == 0) { + argv[i+3] = strdup("int"); + } + } + } + + for (i = 0; i < 100000; i++) + create_and_free_provider(argc, argv); + + return 0; +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/test_usdt.c b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/test_usdt.c new file mode 100644 index 0000000..0c5464a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/test_usdt.c @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +#include "usdt.h" + +#include +#include +#include + +static void +fire_probe(usdt_probedef_t *probedef, int argc, void **argv) +{ + if (usdt_is_enabled(probedef->probe)) + usdt_fire_probe(probedef->probe, argc, argv); +} + +int main(int argc, char **argv) { + usdt_provider_t *provider; + usdt_probedef_t *probedef; + char char_argv[USDT_ARG_MAX]; + int int_argv[USDT_ARG_MAX * 2]; + void **args = NULL; + int i; + char buf[255]; + + for (i = 0; i < USDT_ARG_MAX; i++) + int_argv[i] = i + 1; + for (i = 0; i < USDT_ARG_MAX; i++) + char_argv[i] = (char) i + 65; + + if (argc < 3) { + fprintf(stderr, "usage: %s func name [types ...]\n", argv[0]); + return(1); + } + + if (argc > 3) { + args = malloc((argc-3) * sizeof(void *)); + } + + for (i = 0; i < USDT_ARG_MAX; i++) { + if (argv[i+3] != NULL && i+3 < argc) { + if (strncmp("c", argv[i+3], 1) == 0) { + args[i] = (void *)strndup(&char_argv[i], 1); + argv[i+3] = strdup("char *"); + } + if (strncmp("i", argv[i+3], 1) == 0) { + args[i] = (void *)(long)int_argv[i]; + argv[i+3] = strdup("int"); + } + } + } + + if ((provider = usdt_create_provider("testlibusdt", "modname")) == NULL) { + fprintf(stderr, "unable to create provider\n"); + exit (1); + } + if ((probedef = usdt_create_probe((const char *)argv[1], + (const char *)argv[2], + (argc-3), (const char **)&argv[3])) == NULL) + { + fprintf(stderr, "unable to create probe\n"); + exit (1); + } + usdt_provider_add_probe(provider, probedef); + + if ((usdt_provider_enable(provider)) < 0) { + fprintf(stderr, "unable to enable provider: %s\n", usdt_errstr(provider)); + exit (1); + } + + fprintf(stdout, "enabled\n"); + fflush(stdout); + fgets(buf, 255, stdin); + + fire_probe(probedef, (argc-3), (void **)args); + usdt_probe_release(probedef); + + if ((usdt_provider_disable(provider)) < 0) { + fprintf(stderr, "unable to disable provider: %s\n", usdt_errstr(provider)); + exit (1); + } + + usdt_provider_free(provider); + + return 0; +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt.c b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt.c new file mode 100644 index 0000000..2029e83 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt.c @@ -0,0 +1,321 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +#include "usdt_internal.h" + +#include +#include +#include + +char *usdt_errors[] = { + "failed to allocate memory", + "failed to allocate page-aligned memory", + "no probes defined", + "failed to load DOF: %s", + "provider is already enabled", + "failed to unload DOF: %s", + "probe named %s:%s:%s:%s already exists", + "failed to remove probe %s:%s:%s:%s" +}; + +static void +free_probedef(usdt_probedef_t *pd) +{ + int i; + + switch (pd->refcnt) { + case 1: + free((char *)pd->function); + free((char *)pd->name); + if (pd->probe) { + usdt_free_tracepoints(pd->probe); + free(pd->probe); + } + for (i = 0; i < pd->argc; i++) + free(pd->types[i]); + free(pd); + break; + case 2: + pd->refcnt = 1; + break; + default: + break; + } +} + +usdt_provider_t * +usdt_create_provider(const char *name, const char *module) +{ + usdt_provider_t *provider; + + if ((provider = malloc(sizeof *provider)) == NULL) + return NULL; + + provider->name = strdup(name); + provider->module = strdup(module); + provider->probedefs = NULL; + provider->enabled = 0; + + return provider; +} + +usdt_probedef_t * +usdt_create_probe(const char *func, const char *name, size_t argc, const char **types) +{ + int i; + usdt_probedef_t *p; + + if (argc > USDT_ARG_MAX) + argc = USDT_ARG_MAX; + + if ((p = malloc(sizeof *p)) == NULL) + return (NULL); + + p->refcnt = 2; + p->function = strdup(func); + p->name = strdup(name); + p->argc = argc; + p->probe = NULL; + + for (i = 0; i < argc; i++) + p->types[i] = strdup(types[i]); + + return (p); +} + +void +usdt_probe_release(usdt_probedef_t *probedef) +{ + free_probedef(probedef); +} + +int +usdt_provider_add_probe(usdt_provider_t *provider, usdt_probedef_t *probedef) +{ + usdt_probedef_t *pd; + + if (provider->probedefs != NULL) { + for (pd = provider->probedefs; (pd != NULL); pd = pd->next) { + if ((strcmp(pd->name, probedef->name) == 0) && + (strcmp(pd->function, probedef->function) == 0)) { + usdt_error(provider, USDT_ERROR_DUP_PROBE, + provider->name, provider->module, + probedef->function, probedef->name); + return (-1); + } + } + } + + probedef->next = NULL; + if (provider->probedefs == NULL) + provider->probedefs = probedef; + else { + for (pd = provider->probedefs; (pd->next != NULL); pd = pd->next) ; + pd->next = probedef; + } + + return (0); +} + +int +usdt_provider_remove_probe(usdt_provider_t *provider, usdt_probedef_t *probedef) +{ + usdt_probedef_t *pd, *prev_pd = NULL; + + if (provider->probedefs == NULL) { + usdt_error(provider, USDT_ERROR_NOPROBES); + return (-1); + } + + for (pd = provider->probedefs; (pd != NULL); + prev_pd = pd, pd = pd->next) { + + if ((strcmp(pd->name, probedef->name) == 0) && + (strcmp(pd->function, probedef->function) == 0)) { + + if (prev_pd == NULL) + provider->probedefs = pd->next; + else + prev_pd->next = pd->next; + + return (0); + } + } + + usdt_error(provider, USDT_ERROR_REMOVE_PROBE, + provider->name, provider->module, + probedef->function, probedef->name); + return (-1); +} + +int +usdt_provider_enable(usdt_provider_t *provider) +{ + usdt_strtab_t strtab; + usdt_dof_file_t *file; + usdt_probedef_t *pd; + int i; + size_t size; + usdt_dof_section_t sects[5]; + + if (provider->enabled == 1) { + usdt_error(provider, USDT_ERROR_ALREADYENABLED); + return (0); /* not fatal */ + } + + if (provider->probedefs == NULL) { + usdt_error(provider, USDT_ERROR_NOPROBES); + return (-1); + } + + for (pd = provider->probedefs; pd != NULL; pd = pd->next) { + if ((pd->probe = malloc(sizeof(*pd->probe))) == NULL) { + usdt_error(provider, USDT_ERROR_MALLOC); + return (-1); + } + } + + if ((usdt_strtab_init(&strtab, 0)) < 0) { + usdt_error(provider, USDT_ERROR_MALLOC); + return (-1); + } + + if ((usdt_strtab_add(&strtab, provider->name)) == 0) { + usdt_error(provider, USDT_ERROR_MALLOC); + return (-1); + } + + if ((usdt_dof_probes_sect(§s[0], provider, &strtab)) < 0) + return (-1); + if ((usdt_dof_prargs_sect(§s[1], provider)) < 0) + return (-1); + + size = usdt_provider_dof_size(provider, &strtab); + if ((file = usdt_dof_file_init(provider, size)) == NULL) + return (-1); + + if ((usdt_dof_proffs_sect(§s[2], provider, file->dof)) < 0) + return (-1); + if ((usdt_dof_prenoffs_sect(§s[3], provider, file->dof)) < 0) + return (-1); + if ((usdt_dof_provider_sect(§s[4], provider)) < 0) + return (-1); + + for (i = 0; i < 5; i++) + usdt_dof_file_append_section(file, §s[i]); + + usdt_dof_file_generate(file, &strtab); + + usdt_dof_section_free((usdt_dof_section_t *)&strtab); + for (i = 0; i < 5; i++) + usdt_dof_section_free(§s[i]); + + if ((usdt_dof_file_load(file, provider->module)) < 0) { + usdt_error(provider, USDT_ERROR_LOADDOF, strerror(errno)); + return (-1); + } + + provider->enabled = 1; + provider->file = file; + + return (0); +} + +int +usdt_provider_disable(usdt_provider_t *provider) +{ + usdt_probedef_t *pd; + + if (provider->enabled == 0) + return (0); + + if ((usdt_dof_file_unload((usdt_dof_file_t *)provider->file)) < 0) { + usdt_error(provider, USDT_ERROR_UNLOADDOF, strerror(errno)); + return (-1); + } + + usdt_dof_file_free(provider->file); + provider->file = NULL; + + /* We would like to free the tracepoints here too, but OS X + * (and to a lesser extent Illumos) struggle with this: + * + * If a provider is repeatedly disabled and re-enabled, and is + * allowed to reuse the same memory for its tracepoints, *and* + * there's a DTrace consumer running with enablings for these + * probes, tracepoints are not always cleaned up sufficiently + * that the newly-created probes work. + * + * Here, then, we will leak the memory holding the + * tracepoints, which serves to stop us reusing the same + * memory address for new tracepoints, avoiding the bug. + */ + + for (pd = provider->probedefs; (pd != NULL); pd = pd->next) { + /* may have an as yet never-enabled probe on an + otherwise enabled provider */ + if (pd->probe) { + /* usdt_free_tracepoints(pd->probe); */ + free(pd->probe); + pd->probe = NULL; + } + } + + provider->enabled = 0; + + return (0); +} + +void +usdt_provider_free(usdt_provider_t *provider) +{ + usdt_probedef_t *pd, *next; + + for (pd = provider->probedefs; pd != NULL; pd = next) { + next = pd->next; + free_probedef(pd); + } + + free((char *)provider->name); + free((char *)provider->module); + free(provider); +} + +int +usdt_is_enabled(usdt_probe_t *probe) +{ + if (probe != NULL) + return (*probe->isenabled_addr)(); + else + return 0; +} + +void +usdt_fire_probe(usdt_probe_t *probe, size_t argc, void **nargv) +{ + if (probe != NULL) + usdt_probe_args(probe->probe_addr, argc, nargv); +} + +static void +usdt_verror(usdt_provider_t *provider, usdt_error_t error, va_list argp) +{ + vasprintf(&provider->error, usdt_errors[error], argp); +} + +void +usdt_error(usdt_provider_t *provider, usdt_error_t error, ...) +{ + va_list argp; + + va_start(argp, error); + usdt_verror(provider, error, argp); + va_end(argp); +} + +char * +usdt_errstr(usdt_provider_t *provider) +{ + return (provider->error); +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt.h b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt.h new file mode 100644 index 0000000..69b4e90 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt.h @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +#include +#include + +#define USDT_ARG_MAX 32 + +typedef enum usdt_error { + USDT_ERROR_MALLOC = 0, + USDT_ERROR_VALLOC, + USDT_ERROR_NOPROBES, + USDT_ERROR_LOADDOF, + USDT_ERROR_ALREADYENABLED, + USDT_ERROR_UNLOADDOF, + USDT_ERROR_DUP_PROBE, + USDT_ERROR_REMOVE_PROBE +} usdt_error_t; + +typedef struct usdt_probe { + int (*isenabled_addr)(void); + void *probe_addr; +} usdt_probe_t; + +int usdt_is_enabled(usdt_probe_t *probe); +void usdt_fire_probe(usdt_probe_t *probe, size_t argc, void **argv); + +typedef struct usdt_probedef { + const char *name; + const char *function; + size_t argc; + char *types[USDT_ARG_MAX]; + struct usdt_probe *probe; + struct usdt_probedef *next; + int refcnt; +} usdt_probedef_t; + +usdt_probedef_t *usdt_create_probe(const char *func, const char *name, + size_t argc, const char **types); +void usdt_probe_release(usdt_probedef_t *probedef); + +typedef struct usdt_provider { + const char *name; + const char *module; + usdt_probedef_t *probedefs; + char *error; + int enabled; + void *file; +} usdt_provider_t; + +usdt_provider_t *usdt_create_provider(const char *name, const char *module); +int usdt_provider_add_probe(usdt_provider_t *provider, usdt_probedef_t *probedef); +int usdt_provider_remove_probe(usdt_provider_t *provider, usdt_probedef_t *probedef); +int usdt_provider_enable(usdt_provider_t *provider); +int usdt_provider_disable(usdt_provider_t *provider); +void usdt_provider_free(usdt_provider_t *provider); + +void usdt_error(usdt_provider_t *provider, usdt_error_t error, ...); +char *usdt_errstr(usdt_provider_t *provider); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof.c b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof.c new file mode 100644 index 0000000..633fb69 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof.c @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +#include "usdt_internal.h" + +int +usdt_dof_section_add_data(usdt_dof_section_t *section, void *data, size_t length) +{ + int newlen = section->size + length; + + if ((section->data = realloc((char *)section->data, newlen)) == NULL) + return (-1); + + memcpy(section->data + section->size, data, length); + section->size = newlen; + return (0); +} + +size_t +usdt_provider_dof_size(usdt_provider_t *provider, usdt_strtab_t *strtab) +{ + uint8_t i, j; + int args = 0; + int probes = 0; + size_t size = 0; + usdt_probedef_t *pd; + size_t sections[8]; + + for (pd = provider->probedefs; pd != NULL; pd = pd->next) { + args += pd->argc; + probes++; + } + + sections[0] = sizeof(dof_hdr_t); + sections[1] = sizeof(dof_sec_t) * 6; + sections[2] = strtab->size; + sections[3] = sizeof(dof_probe_t) * probes; + sections[4] = sizeof(uint8_t) * args; + sections[5] = sizeof(uint32_t) * probes; + sections[6] = sizeof(uint32_t) * probes; + sections[7] = sizeof(dof_provider_t); + + for (i = 0; i < 8; i++) { + size += sections[i]; + j = size % 8; + if (j > 0) + size += (8 - j); + } + + return size; +} + +int +usdt_dof_section_init(usdt_dof_section_t *section, uint32_t type, dof_secidx_t index) +{ + section->type = type; + section->index = index; + section->flags = DOF_SECF_LOAD; + section->offset = 0; + section->size = 0; + section->entsize = 0; + section->pad = 0; + section->next = NULL; + + if ((section->data = malloc(1)) == NULL) + return (-1); + + switch(type) { + case DOF_SECT_PROBES: section->align = 8; break; + case DOF_SECT_PRARGS: section->align = 1; break; + case DOF_SECT_PROFFS: section->align = 4; break; + case DOF_SECT_PRENOFFS: section->align = 4; break; + case DOF_SECT_PROVIDER: section->align = 4; break; + } + + return (0); +} + +void +usdt_dof_section_free(usdt_dof_section_t *section) +{ + free(section->data); +} + +int +usdt_strtab_init(usdt_strtab_t *strtab, dof_secidx_t index) +{ + strtab->type = DOF_SECT_STRTAB;; + strtab->index = index; + strtab->flags = DOF_SECF_LOAD; + strtab->offset = 0; + strtab->size = 0; + strtab->entsize = 0; + strtab->pad = 0; + strtab->data = NULL; + strtab->align = 1; + strtab->strindex = 1; + + if ((strtab->data = (char *) malloc(1)) == NULL) + return (-1); + + *strtab->data = '\0'; + + return (0); +} + +dof_stridx_t +usdt_strtab_add(usdt_strtab_t *strtab, const char *string) +{ + size_t length; + int index; + + length = strlen(string); + index = strtab->strindex; + strtab->strindex += (length + 1); + + if ((strtab->data = realloc(strtab->data, strtab->strindex)) == NULL) + return (0); + + memcpy((char *) (strtab->data + index), (char *)string, length + 1); + strtab->size = index + length + 1; + + return (index); +} + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof_file.c b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof_file.c new file mode 100644 index 0000000..f229612 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof_file.c @@ -0,0 +1,288 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +#include "usdt_internal.h" + +#include + +static uint8_t +dof_version(uint8_t header_version) +{ + uint8_t dof_version; + /* DOF versioning: Apple always needs version 3, but Solaris can use + 1 or 2 depending on whether is-enabled probes are needed. */ +#ifdef __APPLE__ + dof_version = DOF_VERSION_3; +#else + switch(header_version) { + case 1: + dof_version = DOF_VERSION_1; + break; + case 2: + dof_version = DOF_VERSION_2; + break; + default: + dof_version = DOF_VERSION; + } +#endif + return dof_version; +} + +#ifdef __APPLE__ +static const char *helper = "/dev/dtracehelper"; + +static int +load_dof(int fd, dof_helper_t *dh) +{ + int ret; + uint8_t buffer[sizeof(dof_ioctl_data_t) + sizeof(dof_helper_t)]; + dof_ioctl_data_t* ioctlData = (dof_ioctl_data_t*)buffer; + user_addr_t val; + + ioctlData->dofiod_count = 1; + memcpy(&ioctlData->dofiod_helpers[0], dh, sizeof(dof_helper_t)); + + val = (user_addr_t)(unsigned long)ioctlData; + ret = ioctl(fd, DTRACEHIOC_ADDDOF, &val); + + if (ret < 0) + return ret; + + return (int)(ioctlData->dofiod_helpers[0].dofhp_dof); +} + +#else /* Solaris and FreeBSD */ + +/* ignore Sol10 GA ... */ +static const char *helper = "/dev/dtrace/helper"; + +static int +load_dof(int fd, dof_helper_t *dh) +{ + int ret; + + ret = ioctl(fd, DTRACEHIOC_ADDDOF, dh); + +#ifdef __FreeBSD__ + if (ret != -1) + ret = dh->gen; +#endif + return ret; +} + +#endif + +static void +pad_section(usdt_dof_section_t *sec) +{ + size_t i, pad; + + if (sec->align > 1) { + i = sec->offset % sec->align; + if (i > 0) { + pad = sec->align - i; + sec->offset = (pad + sec->offset); + sec->pad = pad; + } + } +} + +static void +dof_header(dof_hdr_t *header) +{ + int i; + + header->dofh_ident[DOF_ID_MAG0] = DOF_MAG_MAG0; + header->dofh_ident[DOF_ID_MAG1] = DOF_MAG_MAG1; + header->dofh_ident[DOF_ID_MAG2] = DOF_MAG_MAG2; + header->dofh_ident[DOF_ID_MAG3] = DOF_MAG_MAG3; + + header->dofh_ident[DOF_ID_MODEL] = DOF_MODEL_NATIVE; + header->dofh_ident[DOF_ID_ENCODING] = DOF_ENCODE_NATIVE; + header->dofh_ident[DOF_ID_VERSION] = dof_version(2); + header->dofh_ident[DOF_ID_DIFVERS] = DIF_VERSION; + header->dofh_ident[DOF_ID_DIFIREG] = DIF_DIR_NREGS; + header->dofh_ident[DOF_ID_DIFTREG] = DIF_DTR_NREGS; + + for (i = DOF_ID_PAD; i < DOF_ID_SIZE; i++) + header->dofh_ident[i] = 0; + + header->dofh_flags = 0; + + header->dofh_hdrsize = sizeof(dof_hdr_t); + header->dofh_secsize = sizeof(dof_sec_t); + header->dofh_secoff = sizeof(dof_hdr_t); + + header->dofh_loadsz = 0; + header->dofh_filesz = 0; + header->dofh_pad = 0; +} + +static size_t +add_header(usdt_dof_file_t *file, size_t offset, usdt_dof_section_t *section) +{ + dof_sec_t header; + + header.dofs_flags = section->flags; + header.dofs_type = section->type; + header.dofs_offset = section->offset; + header.dofs_size = section->size; + header.dofs_entsize = section->entsize; + header.dofs_align = section->align; + + memcpy((file->dof + offset), &header, sizeof(dof_sec_t)); + return (offset + sizeof(dof_sec_t)); +} + +static size_t +add_section(usdt_dof_file_t *file, size_t offset, usdt_dof_section_t *section) +{ + if (section->pad > 0) { + /* maximum padding required is 7 */ + memcpy((file->dof + offset), "\0\0\0\0\0\0\0", section->pad); + offset += section->pad; + } + + memcpy((file->dof + offset), section->data, section->size); + return (offset + section->size); +} + +int +usdt_dof_file_unload(usdt_dof_file_t *file) +{ + int fd, ret; + + if ((fd = open(helper, O_RDWR)) < 0) + return (-1); + +#ifdef __FreeBSD__ + ret = ioctl(fd, DTRACEHIOC_REMOVE, &file->gen); +#else + ret = ioctl(fd, DTRACEHIOC_REMOVE, file->gen); +#endif + + if (ret < 0) + return (-1); + + if ((close(fd)) < 0) + return (-1); + + return (0); +} + +int +usdt_dof_file_load(usdt_dof_file_t *file, const char *module) +{ + dof_helper_t dh; + dof_hdr_t *dof; + int fd; + + dof = (dof_hdr_t *) file->dof; + + dh.dofhp_dof = (uintptr_t)dof; + dh.dofhp_addr = (uintptr_t)dof; + (void) strncpy(dh.dofhp_mod, module, sizeof (dh.dofhp_mod)); + + if ((fd = open(helper, O_RDWR)) < 0) + return (-1); + + file->gen = load_dof(fd, &dh); + + if ((close(fd)) < 0) + return (-1); + + if (file->gen < 0) + return (-1); + + return (0); +} + +void +usdt_dof_file_append_section(usdt_dof_file_t *file, usdt_dof_section_t *section) +{ + usdt_dof_section_t *s; + + if (file->sections == NULL) { + file->sections = section; + } + else { + for (s = file->sections; (s->next != NULL); s = s->next) ; + s->next = section; + } +} + +void +usdt_dof_file_generate(usdt_dof_file_t *file, usdt_strtab_t *strtab) +{ + dof_hdr_t header; + uint64_t filesz; + uint64_t loadsz; + usdt_dof_section_t *sec; + size_t offset; + + dof_header(&header); + header.dofh_secnum = 6; + + filesz = sizeof(dof_hdr_t) + (sizeof(dof_sec_t) * header.dofh_secnum); + loadsz = filesz; + + strtab->offset = filesz; + pad_section((usdt_dof_section_t *)strtab); + filesz += strtab->size + strtab->pad; + + if (strtab->flags & 1) + loadsz += strtab->size + strtab->pad; + + for (sec = file->sections; sec != NULL; sec = sec->next) { + sec->offset = filesz; + pad_section(sec); + filesz += sec->size + sec->pad; + if (sec->flags & 1) + loadsz += sec->size + sec->pad; + } + + header.dofh_loadsz = loadsz; + header.dofh_filesz = filesz; + memcpy(file->dof, &header, sizeof(dof_hdr_t)); + + offset = sizeof(dof_hdr_t); + + offset = add_header(file, offset, (usdt_dof_section_t *)strtab); + + for (sec = file->sections; sec != NULL; sec = sec->next) + offset = add_header(file, offset, sec); + + offset = add_section(file, offset, (usdt_dof_section_t *)strtab); + + for (sec = file->sections; sec != NULL; sec = sec->next) + offset = add_section(file, offset, sec); +} + +usdt_dof_file_t * +usdt_dof_file_init(usdt_provider_t *provider, size_t size) +{ + usdt_dof_file_t *file; + + if ((file = malloc(sizeof(*file))) == NULL) { + usdt_error(provider, USDT_ERROR_MALLOC); + return (NULL); + } + + if ((file->dof = valloc(size)) == NULL) { + usdt_error(provider, USDT_ERROR_VALLOC); + return (NULL); + } + + file->sections = NULL; + file->size = size; + + return (file); +} + +void +usdt_dof_file_free(usdt_dof_file_t *file) +{ + free(file->dof); + free(file); +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof_sections.c b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof_sections.c new file mode 100644 index 0000000..9b8cb4e --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_dof_sections.c @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +#include "usdt_internal.h" + +int +usdt_dof_probes_sect(usdt_dof_section_t *probes, + usdt_provider_t *provider, usdt_strtab_t *strtab) +{ + usdt_probedef_t *pd; + dof_probe_t p; + dof_stridx_t type, argv; + uint8_t argc, i; + uint32_t argidx = 0; + uint32_t offidx = 0; + + usdt_dof_section_init(probes, DOF_SECT_PROBES, 1); + + for (pd = provider->probedefs; pd != NULL; pd = pd->next) { + argc = 0; + argv = 0; + type = 0; + + for (i = 0; i < pd->argc; i++) { + type = usdt_strtab_add(strtab, pd->types[i]); + argc++; + if (argv == 0) + argv = type; + } + + if (usdt_create_tracepoints(pd->probe) < 0) { + usdt_error(provider, USDT_ERROR_VALLOC); + return (-1); + } + +#ifdef __x86_64__ + p.dofpr_addr = (uint64_t) pd->probe->isenabled_addr; +#elif __i386__ || __i386 + p.dofpr_addr = (uint32_t) pd->probe->isenabled_addr; +#else +#error "only x86_64 and i386 supported" +#endif + p.dofpr_func = usdt_strtab_add(strtab, pd->function); + p.dofpr_name = usdt_strtab_add(strtab, pd->name); + p.dofpr_nargv = argv; + p.dofpr_xargv = argv; + p.dofpr_argidx = argidx; + p.dofpr_offidx = offidx; + p.dofpr_nargc = argc; + p.dofpr_xargc = argc; + p.dofpr_noffs = 1; + p.dofpr_enoffidx = offidx; + p.dofpr_nenoffs = 1; + p.dofpr_pad1 = 0; + p.dofpr_pad2 = 0; + + usdt_dof_section_add_data(probes, &p, sizeof(dof_probe_t)); + probes->entsize = sizeof(dof_probe_t); + + argidx += argc; + offidx++; + } + + return (0); +} + +int +usdt_dof_prargs_sect(usdt_dof_section_t *prargs, usdt_provider_t *provider) +{ + usdt_probedef_t *pd; + uint8_t i; + + usdt_dof_section_init(prargs, DOF_SECT_PRARGS, 2); + prargs->entsize = 1; + + for (pd = provider->probedefs; pd != NULL; pd = pd->next) { + for (i = 0; i < pd->argc; i++) + usdt_dof_section_add_data(prargs, &i, 1); + } + if (prargs->size == 0) { + i = 0; + if (usdt_dof_section_add_data(prargs, &i, 1) < 0) { + usdt_error(provider, USDT_ERROR_MALLOC); + return (-1); + } + } + + return (0); +} + +int +usdt_dof_proffs_sect(usdt_dof_section_t *proffs, + usdt_provider_t *provider, char *dof) +{ + usdt_probedef_t *pd; + uint32_t off; + + usdt_dof_section_init(proffs, DOF_SECT_PROFFS, 3); + proffs->entsize = 4; + + for (pd = provider->probedefs; pd != NULL; pd = pd->next) { + off = usdt_probe_offset(pd->probe, dof, pd->argc); + if (usdt_dof_section_add_data(proffs, &off, 4) < 0) { + usdt_error(provider, USDT_ERROR_MALLOC); + return (-1); + } + } + + return (0); +} + +int +usdt_dof_prenoffs_sect(usdt_dof_section_t *prenoffs, + usdt_provider_t *provider, char *dof) +{ + usdt_probedef_t *pd; + uint32_t off; + + usdt_dof_section_init(prenoffs, DOF_SECT_PRENOFFS, 4); + prenoffs->entsize = 4; + + for (pd = provider->probedefs; pd != NULL; pd = pd->next) { + off = usdt_is_enabled_offset(pd->probe, dof); + if (usdt_dof_section_add_data(prenoffs, &off, 4) < 0) { + usdt_error(provider, USDT_ERROR_MALLOC); + return (-1); + } + } + + return (0); +} + +int +usdt_dof_provider_sect(usdt_dof_section_t *provider_s, usdt_provider_t *provider) +{ + dof_provider_t p; + + usdt_dof_section_init(provider_s, DOF_SECT_PROVIDER, 5); + + p.dofpv_strtab = 0; + p.dofpv_probes = 1; + p.dofpv_prargs = 2; + p.dofpv_proffs = 3; + p.dofpv_prenoffs = 4; + p.dofpv_name = 1; /* provider name always first strtab entry. */ + + /* + * Stability is something of a hack. Everything is marked * + * "stable" here to permit use of the "args" array, which is * + * needed to access arguments past "arg9". + * + * It should be up to the creator of the provider to decide + * this, though, and it should be possible to set the + * appropriate stability at creation time. + */ + + p.dofpv_provattr = DOF_ATTR(DTRACE_STABILITY_STABLE, + DTRACE_STABILITY_STABLE, + DTRACE_STABILITY_STABLE); + p.dofpv_modattr = DOF_ATTR(DTRACE_STABILITY_STABLE, + DTRACE_STABILITY_STABLE, + DTRACE_STABILITY_STABLE); + p.dofpv_funcattr = DOF_ATTR(DTRACE_STABILITY_STABLE, + DTRACE_STABILITY_STABLE, + DTRACE_STABILITY_STABLE); + p.dofpv_nameattr = DOF_ATTR(DTRACE_STABILITY_STABLE, + DTRACE_STABILITY_STABLE, + DTRACE_STABILITY_STABLE); + p.dofpv_argsattr = DOF_ATTR(DTRACE_STABILITY_STABLE, + DTRACE_STABILITY_STABLE, + DTRACE_STABILITY_STABLE); + + if ((usdt_dof_section_add_data(provider_s, &p, sizeof(p))) < 0) { + usdt_error(provider, USDT_ERROR_MALLOC); + return (-1); + } + + return (0); +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_internal.h b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_internal.h new file mode 100644 index 0000000..25853fb --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_internal.h @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +#ifdef __linux__ +#include +#if __BYTE_ORDER == __LITTLE_ENDIAN +#ifndef _LITTLE_ENDIAN +#define _LITTLE_ENDIAN +#endif +#endif +#endif + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#define FUNC_SIZE 32 + +#include "usdt.h" + +extern void usdt_tracepoint_isenabled(void); +extern void usdt_tracepoint_probe(void); +extern void usdt_tracepoint_end(void); +extern void usdt_probe_args(void *, int, void**); + +uint32_t usdt_probe_offset(usdt_probe_t *probe, char *dof, uint8_t argc); +uint32_t usdt_is_enabled_offset(usdt_probe_t *probe, char *dof); +int usdt_create_tracepoints(usdt_probe_t *probe); +void usdt_free_tracepoints(usdt_probe_t *probe); + +typedef struct usdt_dof_section { + dof_secidx_t index; + uint32_t type; + uint32_t flags; + uint32_t align; + uint64_t offset; + uint64_t size; + uint32_t entsize; + size_t pad; + struct usdt_dof_section *next; + char *data; +} usdt_dof_section_t; + +int usdt_dof_section_init(usdt_dof_section_t *section, + uint32_t type, dof_secidx_t index); +int usdt_dof_section_add_data(usdt_dof_section_t *section, + void *data, size_t length); +void usdt_dof_section_free(usdt_dof_section_t *section); + +typedef struct usdt_strtab { + dof_secidx_t index; + uint32_t type; + uint32_t flags; + uint32_t align; + uint64_t offset; + uint64_t size; + uint32_t entsize; + size_t pad; + int strindex; + char *data; +} usdt_strtab_t; + +int usdt_strtab_init(usdt_strtab_t *strtab, dof_secidx_t index); +dof_stridx_t usdt_strtab_add(usdt_strtab_t *strtab, const char *string); +char *usdt_strtab_header(usdt_strtab_t *strtab); +size_t usdt_strtab_size(usdt_strtab_t *strtab); + +size_t usdt_provider_dof_size(usdt_provider_t *provider, usdt_strtab_t *strtab); + +typedef struct usdt_dof_file { + char *dof; + int gen; + size_t size; + usdt_dof_section_t *sections; +} usdt_dof_file_t; + +usdt_dof_file_t *usdt_dof_file_init(usdt_provider_t *provider, size_t size); +void usdt_dof_file_append_section(usdt_dof_file_t *file, usdt_dof_section_t *section); +void usdt_dof_file_generate(usdt_dof_file_t *file, usdt_strtab_t *strtab); +int usdt_dof_file_load(usdt_dof_file_t *file, const char *module); +int usdt_dof_file_unload(usdt_dof_file_t *file); +void usdt_dof_file_free(usdt_dof_file_t *file); + +int usdt_dof_probes_sect(usdt_dof_section_t *probes, + usdt_provider_t *provider, usdt_strtab_t *strtab); +int usdt_dof_prargs_sect(usdt_dof_section_t *prargs, + usdt_provider_t *provider); +int usdt_dof_proffs_sect(usdt_dof_section_t *proffs, + usdt_provider_t *provider, char *dof); +int usdt_dof_prenoffs_sect(usdt_dof_section_t *prenoffs, + usdt_provider_t *provider, char *dof); +int usdt_dof_provider_sect(usdt_dof_section_t *provider_s, + usdt_provider_t *provider); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_probe.c b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_probe.c new file mode 100644 index 0000000..62aa9c0 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_probe.c @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +#include "usdt_internal.h" + +#ifdef __APPLE__ + +uint32_t +usdt_probe_offset(usdt_probe_t *probe, char *dof, uint8_t argc) +{ + uint32_t offset; +#ifdef __x86_64__ + offset = ((uint64_t) probe->probe_addr - (uint64_t) dof + 2); +#elif __i386__ + offset = ((uint32_t) probe->probe_addr - (uint32_t) dof + 2); +#else +#error "only x86_64 and i386 supported" +#endif + return (offset); +} + +uint32_t +usdt_is_enabled_offset(usdt_probe_t *probe, char *dof) +{ + uint32_t offset; +#ifdef __x86_64__ + offset = ((uint64_t) probe->isenabled_addr - (uint64_t) dof + 6); +#elif __i386__ + offset = ((uint32_t) probe->isenabled_addr - (uint32_t) dof + 6); +#else +#error "only x86_64 and i386 supported" +#endif + return (offset); +} + +#elif defined __linux__ + +uint32_t +usdt_probe_offset(usdt_probe_t *probe, char *dof, uint8_t argc) +{ + return (16); +} + +uint32_t +usdt_is_enabled_offset(usdt_probe_t *probe, char *dof) +{ + return (10); +} + +#else /* solaris and freebsd */ + +uint32_t +usdt_probe_offset(usdt_probe_t *probe, char *dof, uint8_t argc) +{ + return (16); +} + +uint32_t +usdt_is_enabled_offset(usdt_probe_t *probe, char *dof) +{ + return (8); +} + +#endif + +int +usdt_create_tracepoints(usdt_probe_t *probe) +{ + /* Prepare the tracepoints - for each probe, a separate chunk + * of memory with the tracepoint code copied into it, to give + * us unique addresses for each tracepoint. + * + * On Oracle Linux, this must be an mmapped file because USDT + * probes there are implemented as uprobes, which are + * addressed by inode and offset. The file used is a small + * mkstemp'd file we immediately unlink. + * + * Elsewhere, we can use the heap directly because USDT will + * instrument any memory mapped by the process. + */ + + size_t size; +#ifdef __linux__ + int fd; + char tmp[20] = "/tmp/libusdtXXXXXX"; + + if ((fd = mkstemp(tmp)) < 0) + return (-1); + if (unlink(tmp) < 0) + return (-1); + if (write(fd, "\0", FUNC_SIZE) < FUNC_SIZE) + return (-1); + + probe->isenabled_addr = (int (*)())mmap(NULL, FUNC_SIZE, + PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE, fd, 0); +#else + probe->isenabled_addr = (int (*)())valloc(FUNC_SIZE); +#endif + if (probe->isenabled_addr == NULL) + return (-1); + + /* ensure that the tracepoints will fit the heap we're allocating */ + size = ((char *)usdt_tracepoint_end - (char *)usdt_tracepoint_isenabled); + assert(size < FUNC_SIZE); + + size = ((char *)usdt_tracepoint_probe - (char *)usdt_tracepoint_isenabled); + probe->probe_addr = (char *)probe->isenabled_addr + size; + + memcpy((void *)probe->isenabled_addr, + (const void *)usdt_tracepoint_isenabled, FUNC_SIZE); + +#ifdef __linux__ + mprotect((void *)probe->isenabled_addr, FUNC_SIZE, + PROT_READ | PROT_EXEC); +#else + mprotect((void *)probe->isenabled_addr, FUNC_SIZE, + PROT_READ | PROT_WRITE | PROT_EXEC); +#endif + + return (0); +} + +void +usdt_free_tracepoints(usdt_probe_t *probe) +{ +#ifdef __linux__ + (void) munmap(probe->isenabled_addr, FUNC_SIZE); +#else + free(probe->isenabled_addr); +#endif +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_i386.s b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_i386.s new file mode 100644 index 0000000..eb19e97 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_i386.s @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +/* + * Stub functions containing DTrace tracepoints for probes and + * is-enabled probes. These functions are copied for each probe + * dynamically created. + * + */ + .text + + .align 4, 0x90 + .globl usdt_tracepoint_isenabled + .globl _usdt_tracepoint_isenabled + .globl usdt_tracepoint_probe + .globl _usdt_tracepoint_probe + .globl usdt_tracepoint_end + .globl _usdt_tracepoint_end + .globl usdt_probe_args + .globl _usdt_probe_args + +usdt_tracepoint_isenabled: +_usdt_tracepoint_isenabled: + pushl %ebp + movl %esp, %ebp + subl $8, %esp + xorl %eax, %eax + nop + nop + leave + ret +usdt_tracepoint_probe: +_usdt_tracepoint_probe: + nop + nop + nop + nop + nop + addl $0x20,%esp + leave +usdt_tracepoint_end: +_usdt_tracepoint_end: + ret + +/* + * Probe argument marshalling, i386 style + * + */ + +usdt_probe_args: +_usdt_probe_args: + pushl %ebp + movl %esp,%ebp + subl $8,%esp + subl $8,%esp + movl 8(%ebp),%ebx + movl 0xc(%ebp),%ecx + test %ecx,%ecx + je fire +args: movl %ecx,%eax + sal $2,%eax + subl $4,%eax + addl 0x10(%ebp),%eax + pushl (%eax) + dec %ecx + jne args +fire: jmp *%ebx + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_x86_64.s b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_x86_64.s new file mode 100644 index 0000000..7db093f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/libusdt/usdt_tracepoints_x86_64.s @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2012, Chris Andrews. All rights reserved. + */ + +/* + * Stub functions containing DTrace tracepoints for probes and + * is-enabled probes. These functions are copied for each probe + * dynamically created. + * + */ + .text + + .align 4, 0x90 + .globl usdt_tracepoint_isenabled + .globl _usdt_tracepoint_isenabled + .globl usdt_tracepoint_probe + .globl _usdt_tracepoint_probe + .globl usdt_tracepoint_end + .globl _usdt_tracepoint_end + .globl usdt_probe_args + .globl _usdt_probe_args + +usdt_tracepoint_isenabled: +_usdt_tracepoint_isenabled: + pushq %rbp + movq %rsp, %rbp + addq $1, %rax + xorq %rax, %rax + nop + nop + leave + ret +usdt_tracepoint_probe: +_usdt_tracepoint_probe: + nop + nop + nop + nop + nop + addq %r14,%rsp + popq %rbx + popq %r14 + popq %r13 + popq %r12 + leave +usdt_tracepoint_end: +_usdt_tracepoint_end: + ret + +/* + * Probe argument marshalling, x86_64 style + * + */ + +usdt_probe_args: +_usdt_probe_args: + pushq %rbp + movq %rsp,%rbp + pushq %r12 + pushq %r13 + pushq %r14 + pushq %rbx + + movq %rdi,%r12 + movq %rsi,%rbx + movq %rdx,%r11 + movq $0,%r14 + + test %rbx,%rbx + je fire + movq (%r11),%rdi + dec %rbx + test %rbx,%rbx + je fire + addq $8,%r11 + movq (%r11),%rsi + dec %rbx + test %rbx,%rbx + je fire + addq $8,%r11 + movq (%r11),%rdx + dec %rbx + test %rbx,%rbx + je fire + addq $8,%r11 + movq (%r11),%rcx + dec %rbx + test %rbx,%rbx + je fire + addq $8,%r11 + movq (%r11),%r8 + dec %rbx + test %rbx,%rbx + je fire + addq $8,%r11 + movq (%r11),%r9 + + movq %rbx,%r13 +morestack: + dec %rbx + test %rbx,%rbx + je args + subq $16,%rsp + addq $16,%r14 + dec %rbx + test %rbx,%rbx + je args + jmp morestack + +args: + movq %r13,%rbx + movq $0,%r13 +moreargs: + dec %rbx + test %rbx,%rbx + je fire + addq $8,%r11 + movq (%r11),%rax + movq %rax,(%rsp,%r13) + addq $8,%r13 + jmp moreargs + +fire: jmp *%r12 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/.dntrc b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/.dntrc new file mode 100644 index 0000000..47971da --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/.dntrc @@ -0,0 +1,30 @@ +## DNT config file +## see https://github.com/rvagg/dnt + +NODE_VERSIONS="\ + master \ + v0.11.13 \ + v0.10.30 \ + v0.10.29 \ + v0.10.28 \ + v0.10.26 \ + v0.10.25 \ + v0.10.24 \ + v0.10.23 \ + v0.10.22 \ + v0.10.21 \ + v0.10.20 \ + v0.10.19 \ + v0.8.28 \ + v0.8.27 \ + v0.8.26 \ + v0.8.24 \ +" +OUTPUT_PREFIX="nan-" +TEST_CMD=" \ + cd /dnt/ && \ + npm install && \ + node_modules/.bin/node-gyp --nodedir /usr/src/node/ rebuild --directory test && \ + node_modules/.bin/tap --gc test/js/*-test.js \ +" + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/CHANGELOG.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/CHANGELOG.md new file mode 100644 index 0000000..8e8f052 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/CHANGELOG.md @@ -0,0 +1,294 @@ +# NAN ChangeLog + +**Version 1.8.4: current Node 12: 0.12.2, Node 10: 0.10.38, io.js: 1.8.1** + +### 1.8.4 Apr 26 2015 + + - Build: Repackage + +### 1.8.3 Apr 26 2015 + + - Bugfix: Include missing header 1af8648 + +### 1.8.2 Apr 23 2015 + + - Build: Repackage + +### 1.8.1 Apr 23 2015 + + - Bugfix: NanObjectWrapHandle should take a pointer 155f1d3 + +### 1.8.0 Apr 23 2015 + + - Feature: Allow primitives with NanReturnValue 2e4475e + - Feature: Added comparison operators to NanCallback 55b075e + - Feature: Backport thread local storage 15bb7fa + - Removal: Remove support for signatures with arguments 8a2069d + - Correcteness: Replaced NanObjectWrapHandle macro with function 0bc6d59 + +### 1.7.0 Feb 28 2015 + + - Feature: Made NanCallback::Call accept optional target 8d54da7 + - Feature: Support atom-shell 0.21 0b7f1bb + +### 1.6.2 Feb 6 2015 + + - Bugfix: NanEncode: fix argument type for node::Encode on io.js 2be8639 + +### 1.6.1 Jan 23 2015 + + - Build: version bump + +### 1.5.3 Jan 23 2015 + + - Build: repackage + +### 1.6.0 Jan 23 2015 + + - Deprecated `NanNewContextHandle` in favor of `NanNew` 49259af + - Support utility functions moved in newer v8 versions (Node 0.11.15, io.js 1.0) a0aa179 + - Added `NanEncode`, `NanDecodeBytes` and `NanDecodeWrite` 75e6fb9 + +### 1.5.2 Jan 23 2015 + + - Bugfix: Fix non-inline definition build error with clang++ 21d96a1, 60fadd4 + - Bugfix: Readded missing String constructors 18d828f + - Bugfix: Add overload handling NanNew(..) 5ef813b + - Bugfix: Fix uv_work_cb versioning 997e4ae + - Bugfix: Add function factory and test 4eca89c + - Bugfix: Add object template factory and test cdcb951 + - Correctness: Lifted an io.js related typedef c9490be + - Correctness: Make explicit downcasts of String lengths 00074e6 + - Windows: Limit the scope of disabled warning C4530 83d7deb + +### 1.5.1 Jan 15 2015 + + - Build: version bump + +### 1.4.3 Jan 15 2015 + + - Build: version bump + +### 1.4.2 Jan 15 2015 + + - Feature: Support io.js 0dbc5e8 + +### 1.5.0 Jan 14 2015 + + - Feature: Support io.js b003843 + - Correctness: Improved NanNew internals 9cd4f6a + - Feature: Implement progress to NanAsyncWorker 8d6a160 + +### 1.4.1 Nov 8 2014 + + - Bugfix: Handle DEBUG definition correctly + - Bugfix: Accept int as Boolean + +### 1.4.0 Nov 1 2014 + + - Feature: Added NAN_GC_CALLBACK 6a5c245 + - Performance: Removed unnecessary local handle creation 18a7243, 41fe2f8 + - Correctness: Added constness to references in NanHasInstance 02c61cd + - Warnings: Fixed spurious warnings from -Wundef and -Wshadow, 541b122, 99d8cb6 + - Windoze: Shut Visual Studio up when compiling 8d558c1 + - License: Switch to plain MIT from custom hacked MIT license 11de983 + - Build: Added test target to Makefile e232e46 + - Performance: Removed superfluous scope in NanAsyncWorker f4b7821 + - Sugar/Feature: Added NanReturnThis() and NanReturnHolder() shorthands 237a5ff, d697208 + - Feature: Added suitable overload of NanNew for v8::Integer::NewFromUnsigned b27b450 + +### 1.3.0 Aug 2 2014 + + - Added NanNew(std::string) + - Added NanNew(std::string&) + - Added NanAsciiString helper class + - Added NanUtf8String helper class + - Added NanUcs2String helper class + - Deprecated NanRawString() + - Deprecated NanCString() + - Added NanGetIsolateData(v8::Isolate *isolate) + - Added NanMakeCallback(v8::Handle target, v8::Handle func, int argc, v8::Handle* argv) + - Added NanMakeCallback(v8::Handle target, v8::Handle symbol, int argc, v8::Handle* argv) + - Added NanMakeCallback(v8::Handle target, const char* method, int argc, v8::Handle* argv) + - Added NanSetTemplate(v8::Handle templ, v8::Handle name , v8::Handle value, v8::PropertyAttribute attributes) + - Added NanSetPrototypeTemplate(v8::Local templ, v8::Handle name, v8::Handle value, v8::PropertyAttribute attributes) + - Added NanSetInstanceTemplate(v8::Local templ, const char *name, v8::Handle value) + - Added NanSetInstanceTemplate(v8::Local templ, v8::Handle name, v8::Handle value, v8::PropertyAttribute attributes) + +### 1.2.0 Jun 5 2014 + + - Add NanSetPrototypeTemplate + - Changed NAN_WEAK_CALLBACK internals, switched _NanWeakCallbackData to class, + introduced _NanWeakCallbackDispatcher + - Removed -Wno-unused-local-typedefs from test builds + - Made test builds Windows compatible ('Sleep()') + +### 1.1.2 May 28 2014 + + - Release to fix more stuff-ups in 1.1.1 + +### 1.1.1 May 28 2014 + + - Release to fix version mismatch in nan.h and lack of changelog entry for 1.1.0 + +### 1.1.0 May 25 2014 + + - Remove nan_isolate, use v8::Isolate::GetCurrent() internally instead + - Additional explicit overloads for NanNew(): (char*,int), (uint8_t*[,int]), + (uint16_t*[,int), double, int, unsigned int, bool, v8::String::ExternalStringResource*, + v8::String::ExternalAsciiStringResource* + - Deprecate NanSymbol() + - Added SetErrorMessage() and ErrorMessage() to NanAsyncWorker + +### 1.0.0 May 4 2014 + + - Heavy API changes for V8 3.25 / Node 0.11.13 + - Use cpplint.py + - Removed NanInitPersistent + - Removed NanPersistentToLocal + - Removed NanFromV8String + - Removed NanMakeWeak + - Removed NanNewLocal + - Removed NAN_WEAK_CALLBACK_OBJECT + - Removed NAN_WEAK_CALLBACK_DATA + - Introduce NanNew, replaces NanNewLocal, NanPersistentToLocal, adds many overloaded typed versions + - Introduce NanUndefined, NanNull, NanTrue and NanFalse + - Introduce NanEscapableScope and NanEscapeScope + - Introduce NanMakeWeakPersistent (requires a special callback to work on both old and new node) + - Introduce NanMakeCallback for node::MakeCallback + - Introduce NanSetTemplate + - Introduce NanGetCurrentContext + - Introduce NanCompileScript and NanRunScript + - Introduce NanAdjustExternalMemory + - Introduce NanAddGCEpilogueCallback, NanAddGCPrologueCallback, NanRemoveGCEpilogueCallback, NanRemoveGCPrologueCallback + - Introduce NanGetHeapStatistics + - Rename NanAsyncWorker#SavePersistent() to SaveToPersistent() + +### 0.8.0 Jan 9 2014 + + - NanDispose -> NanDisposePersistent, deprecate NanDispose + - Extract _NAN_*_RETURN_TYPE, pull up NAN_*() + +### 0.7.1 Jan 9 2014 + + - Fixes to work against debug builds of Node + - Safer NanPersistentToLocal (avoid reinterpret_cast) + - Speed up common NanRawString case by only extracting flattened string when necessary + +### 0.7.0 Dec 17 2013 + + - New no-arg form of NanCallback() constructor. + - NanCallback#Call takes Handle rather than Local + - Removed deprecated NanCallback#Run method, use NanCallback#Call instead + - Split off _NAN_*_ARGS_TYPE from _NAN_*_ARGS + - Restore (unofficial) Node 0.6 compatibility at NanCallback#Call() + - Introduce NanRawString() for char* (or appropriate void*) from v8::String + (replacement for NanFromV8String) + - Introduce NanCString() for null-terminated char* from v8::String + +### 0.6.0 Nov 21 2013 + + - Introduce NanNewLocal(v8::Handle value) for use in place of + v8::Local::New(...) since v8 started requiring isolate in Node 0.11.9 + +### 0.5.2 Nov 16 2013 + + - Convert SavePersistent and GetFromPersistent in NanAsyncWorker from protected and public + +### 0.5.1 Nov 12 2013 + + - Use node::MakeCallback() instead of direct v8::Function::Call() + +### 0.5.0 Nov 11 2013 + + - Added @TooTallNate as collaborator + - New, much simpler, "include_dirs" for binding.gyp + - Added full range of NAN_INDEX_* macros to match NAN_PROPERTY_* macros + +### 0.4.4 Nov 2 2013 + + - Isolate argument from v8::Persistent::MakeWeak removed for 0.11.8+ + +### 0.4.3 Nov 2 2013 + + - Include node_object_wrap.h, removed from node.h for Node 0.11.8. + +### 0.4.2 Nov 2 2013 + + - Handle deprecation of v8::Persistent::Dispose(v8::Isolate* isolate)) for + Node 0.11.8 release. + +### 0.4.1 Sep 16 2013 + + - Added explicit `#include ` as it was removed from node.h for v0.11.8 + +### 0.4.0 Sep 2 2013 + + - Added NAN_INLINE and NAN_DEPRECATED and made use of them + - Added NanError, NanTypeError and NanRangeError + - Cleaned up code + +### 0.3.2 Aug 30 2013 + + - Fix missing scope declaration in GetFromPersistent() and SaveToPersistent + in NanAsyncWorker + +### 0.3.1 Aug 20 2013 + + - fix "not all control paths return a value" compile warning on some platforms + +### 0.3.0 Aug 19 2013 + + - Made NAN work with NPM + - Lots of fixes to NanFromV8String, pulling in features from new Node core + - Changed node::encoding to Nan::Encoding in NanFromV8String to unify the API + - Added optional error number argument for NanThrowError() + - Added NanInitPersistent() + - Added NanReturnNull() and NanReturnEmptyString() + - Added NanLocker and NanUnlocker + - Added missing scopes + - Made sure to clear disposed Persistent handles + - Changed NanAsyncWorker to allocate error messages on the heap + - Changed NanThrowError(Local) to NanThrowError(Handle) + - Fixed leak in NanAsyncWorker when errmsg is used + +### 0.2.2 Aug 5 2013 + + - Fixed usage of undefined variable with node::BASE64 in NanFromV8String() + +### 0.2.1 Aug 5 2013 + + - Fixed 0.8 breakage, node::BUFFER encoding type not available in 0.8 for + NanFromV8String() + +### 0.2.0 Aug 5 2013 + + - Added NAN_PROPERTY_GETTER, NAN_PROPERTY_SETTER, NAN_PROPERTY_ENUMERATOR, + NAN_PROPERTY_DELETER, NAN_PROPERTY_QUERY + - Extracted _NAN_METHOD_ARGS, _NAN_GETTER_ARGS, _NAN_SETTER_ARGS, + _NAN_PROPERTY_GETTER_ARGS, _NAN_PROPERTY_SETTER_ARGS, + _NAN_PROPERTY_ENUMERATOR_ARGS, _NAN_PROPERTY_DELETER_ARGS, + _NAN_PROPERTY_QUERY_ARGS + - Added NanGetInternalFieldPointer, NanSetInternalFieldPointer + - Added NAN_WEAK_CALLBACK, NAN_WEAK_CALLBACK_OBJECT, + NAN_WEAK_CALLBACK_DATA, NanMakeWeak + - Renamed THROW_ERROR to _NAN_THROW_ERROR + - Added NanNewBufferHandle(char*, size_t, node::smalloc::FreeCallback, void*) + - Added NanBufferUse(char*, uint32_t) + - Added NanNewContextHandle(v8::ExtensionConfiguration*, + v8::Handle, v8::Handle) + - Fixed broken NanCallback#GetFunction() + - Added optional encoding and size arguments to NanFromV8String() + - Added NanGetPointerSafe() and NanSetPointerSafe() + - Added initial test suite (to be expanded) + - Allow NanUInt32OptionValue to convert any Number object + +### 0.1.0 Jul 21 2013 + + - Added `NAN_GETTER`, `NAN_SETTER` + - Added `NanThrowError` with single Local argument + - Added `NanNewBufferHandle` with single uint32_t argument + - Added `NanHasInstance(Persistent&, Handle)` + - Added `Local NanCallback#GetFunction()` + - Added `NanCallback#Call(int, Local[])` + - Deprecated `NanCallback#Run(int, Local[])` in favour of Call diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/LICENSE.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/LICENSE.md new file mode 100644 index 0000000..95c2eb5 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/LICENSE.md @@ -0,0 +1,13 @@ +The MIT License (MIT) +===================== + +Copyright (c) 2015 NAN contributors +----------------------------------- + +*NAN contributors listed at * + +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/README.md new file mode 100644 index 0000000..26f6947 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/README.md @@ -0,0 +1,1402 @@ +Native Abstractions for Node.js +=============================== + +**A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10 and 0.12 as well as io.js.** + +***Current version: 1.8.4*** + +*(See [CHANGELOG.md](https://github.com/iojs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)* + +[![NPM](https://nodei.co/npm/nan.png?downloads=true&downloadRank=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6&height=3)](https://nodei.co/npm/nan/) + +[![Build Status](https://api.travis-ci.org/iojs/nan.svg?branch=master)](http://travis-ci.org/iojs/nan) +[![Build status](https://ci.appveyor.com/api/projects/status/kh73pbm9dsju7fgh)](https://ci.appveyor.com/project/RodVagg/nan) + +Thanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.12, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle. + +This project also contains some helper utilities that make addon development a bit more pleasant. + + * **[News & Updates](#news)** + * **[Usage](#usage)** + * **[Example](#example)** + * **[API](#api)** + * **[Tests](#tests)** + * **[Porting](#porting)** + * **[Governance & Contributing](#governance)** + + +## News & Updates + +### Apr-2015: 1.8.0 release + +* Support V8 4.2 +* Removed support for creating `Signature`s with arguments +* Backported thread local storage routines for libuv + +### Feb-2015: 1.7.0 release + +* Made `NanCallback::Call` accept optional target +* Support atom-shell 0.21 + +Node 0.12.0 is out and supported by NAN. So is atom-shell 0.21. `NanCallback::Call` now accepts an optional `target` argument like `NanMakeCallback`. + +### Jan-2015: 1.6.0 release + +* Deprecated `NanNewContextHandle` in favor of `NanNew` +* Added `NanSetCounterFunction`, `NanSetCreateHistogramFunction`, `NanSetAddHistogramSampleFunction` +* Added `NanIdleNotification`, `NanLowMemoryNotification`, `NanContextDisposedNotification` +* Added `NanEncode`, `NanDecodeBytes` and `NanDecodeWrite` + +### Jan-2015: 1.5.0 release + +* Support [io.js](https://github.com/iojs/io.js) thanks to [Ben Noordhuis](bnoordhuis) +* Rewritten NanNew internals thanks to [David Siegel](agnat) +* NanAsyncWorker now supports progress reporting thanks to [Brett Lawson](brett19) + +### Aug-2014: 1.3.0 release + +* `NanCString()` and `NanRawString()` have been deprecated in favour of new NanAsciiString, NanUtf8String and NanUcs2String. These classes manage the underlying memory for you in a safer way than just handing off an allocated array. You should now `*NanAsciiString(handle)` to access the raw `char` data, you can also allocate on the heap if you need to keep a reference. +* Two more NanMakeCallback overloads have been added to for parity with Node core. +* You can now `NanNew(std::string)` (use `NanNew(std::string&)` to pass by reference) +* NanSetTemplate, NanSetPrototypeTemplate and NanSetInstanceTemplate have been added. + +### May-2014: 1.1.0 release + +* We've deprecated `NanSymbol()`, you should just use `NanNew()` now. +* `NanNull()`, `NanUndefined()`, `NanTrue()`, `NanFalse()` all return `Local`s now. +* `nan_isolate` is gone, it was intended to be internal-only but if you were using it then you should switch to `v8::Isolate::GetCurrent()`. +* `NanNew()` has received some additional overload-love so you should be able to give it many kinds of values without specifying the ``. +* Lots of small fixes and additions to expand the V8 API coverage, *use the source, Luke*. + + +### May-2014: Major changes for V8 3.25 / Node 0.11.13 + +Node 0.11.11 and 0.11.12 were both broken releases for native add-ons, you simply can't properly compile against either of them for different reasons. But we now have a 0.11.13 release that jumps a couple of versions of V8 ahead and includes some more, major (traumatic) API changes. + +Because we are now nearing Node 0.12 and estimate that the version of V8 we are using in Node 0.11.13 will be close to the API we get for 0.12, we have taken the opportunity to not only *fix* NAN for 0.11.13 but make some major changes to improve the NAN API. + +We have **removed support for Node 0.11 versions prior to 0.11.13**. As usual, our tests are run against (and pass) the last 5 versions of Node 0.8 and Node 0.10. We also include Node 0.11.13 obviously. + +The major change is something that [Benjamin Byholm](kkoopa) has put many hours in to. We now have a fantastic new `NanNew(args)` interface for creating new `Local`s, this replaces `NanNewLocal()` and much more. If you look in [./nan.h](nan.h) you'll see a large number of overloaded versions of this method. In general you should be able to `NanNew(arguments)` for any type you want to make a `Local` from. This includes `Persistent` types, so we now have a `Local NanNew(const Persistent arg)` to replace `NanPersistentToLocal()`. + +We also now have `NanUndefined()`, `NanNull()`, `NanTrue()` and `NanFalse()`. Mainly because of the new requirement for an `Isolate` argument for each of the native V8 versions of this. + +V8 has now introduced an `EscapableHandleScope` from which you `scope.Escape(Local value)` to *return* a value from a one scope to another. This replaces the standard `HandleScope` and `scope.Close(Local value)`, although `HandleScope` still exists for when you don't need to return a handle to the caller. For NAN we are exposing it as `NanEscapableScope()` and `NanEscapeScope()`, while `NanScope()` is still how you create a new scope that doesn't need to return handles. For older versions of Node/V8, it'll still map to the older `HandleScope` functionality. + +`NanFromV8String()` was deprecated and has now been removed. You should use `NanCString()` or `NanRawString()` instead. + +Because `node::MakeCallback()` now takes an `Isolate`, and because it doesn't exist in older versions of Node, we've introduced `NanMakeCallback()`. You should *always* use this when calling a JavaScript function from C++. + +There's lots more, check out the Changelog in nan.h or look through [#86](https://github.com/iojs/nan/pull/86) for all the gory details. + +### Dec-2013: NanCString and NanRawString + +Two new functions have been introduced to replace the functionality that's been provided by `NanFromV8String` until now. NanCString has sensible defaults so it's super easy to fetch a null-terminated c-style string out of a `v8::String`. `NanFromV8String` is still around and has defaults that allow you to pass a single handle to fetch a `char*` while `NanRawString` requires a little more attention to arguments. + +### Nov-2013: Node 0.11.9+ breaking V8 change + +The version of V8 that's shipping with Node 0.11.9+ has changed the signature for new `Local`s to: `v8::Local::New(isolate, value)`, i.e. introducing the `isolate` argument and therefore breaking all new `Local` declarations for previous versions. NAN 0.6+ now includes a `NanNewLocal(value)` that can be used in place to work around this incompatibility and maintain compatibility with 0.8->0.11.9+ (minus a few early 0.11 releases). + +For example, if you wanted to return a `null` on a callback you will have to change the argument from `v8::Local::New(v8::Null())` to `NanNewLocal(v8::Null())`. + +### Nov-2013: Change to binding.gyp `"include_dirs"` for NAN + +Inclusion of NAN in a project's binding.gyp is now greatly simplified. You can now just use `" +## Usage + +Simply add **NAN** as a dependency in the *package.json* of your Node addon: + +``` bash +$ npm install --save nan +``` + +Pull in the path to **NAN** in your *binding.gyp* so that you can use `#include ` in your *.cpp* files: + +``` python +"include_dirs" : [ + "` when compiling your addon. + + +## Example + +See **[LevelDOWN](https://github.com/rvagg/node-leveldown/pull/48)** for a full example of **NAN** in use. + +For a simpler example, see the **[async pi estimation example](https://github.com/iojs/nan/tree/master/examples/async_pi_estimate)** in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use of **NAN**. + +For another example, see **[nan-example-eol](https://github.com/CodeCharmLtd/nan-example-eol)**. It shows newline detection implemented as a native addon. + +Compare to the current 0.10 version of this example, found in the [node-addon-examples](https://github.com/iojs/node-addon-examples/tree/master/9_async_work) repository and also a 0.11 version of the same found [here](https://github.com/kkoopa/node-addon-examples/tree/5c01f58fc993377a567812597e54a83af69686d7/9_async_work). + +Note that there is no embedded version sniffing going on here and also the async work is made much simpler, see below for details on the `NanAsyncWorker` class. + +```c++ +// addon.cc +#include +#include +// ... + +using v8::FunctionTemplate; +using v8::Handle; +using v8::Object; +using v8::String; + +void InitAll(Handle exports) { + exports->Set(NanNew("calculateSync"), + NanNew(CalculateSync)->GetFunction()); + + exports->Set(NanNew("calculateAsync"), + NanNew(CalculateAsync)->GetFunction()); +} + +NODE_MODULE(addon, InitAll) +``` + +```c++ +// sync.h +#include +#include + +NAN_METHOD(CalculateSync); +``` + +```c++ +// sync.cc +#include +#include +#include "./sync.h" +// ... + +using v8::Number; + +// Simple synchronous access to the `Estimate()` function +NAN_METHOD(CalculateSync) { + NanScope(); + + // expect a number as the first argument + int points = args[0]->Uint32Value(); + double est = Estimate(points); + + NanReturnValue(NanNew(est)); +} +``` + +```c++ +// async.h +#include +#include + +NAN_METHOD(CalculateAsync); +``` + +```c++ +// async.cc +#include +#include +#include "./async.h" + +// ... + +using v8::Function; +using v8::Local; +using v8::Null; +using v8::Number; +using v8::Value; + +class PiWorker : public NanAsyncWorker { + public: + PiWorker(NanCallback *callback, int points) + : NanAsyncWorker(callback), points(points) {} + ~PiWorker() {} + + // Executed inside the worker-thread. + // It is not safe to access V8, or V8 data structures + // here, so everything we need for input and output + // should go on `this`. + void Execute () { + estimate = Estimate(points); + } + + // Executed when the async work is complete + // this function will be run inside the main event loop + // so it is safe to use V8 again + void HandleOKCallback () { + NanScope(); + + Local argv[] = { + NanNull() + , NanNew(estimate) + }; + + callback->Call(2, argv); + }; + + private: + int points; + double estimate; +}; + +// Asynchronous access to the `Estimate()` function +NAN_METHOD(CalculateAsync) { + NanScope(); + + int points = args[0]->Uint32Value(); + NanCallback *callback = new NanCallback(args[1].As()); + + NanAsyncQueueWorker(new PiWorker(callback, points)); + NanReturnUndefined(); +} +``` + + +## API + + * NAN_METHOD + * NAN_GETTER + * NAN_SETTER + * NAN_PROPERTY_GETTER + * NAN_PROPERTY_SETTER + * NAN_PROPERTY_ENUMERATOR + * NAN_PROPERTY_DELETER + * NAN_PROPERTY_QUERY + * NAN_INDEX_GETTER + * NAN_INDEX_SETTER + * NAN_INDEX_ENUMERATOR + * NAN_INDEX_DELETER + * NAN_INDEX_QUERY + * NAN_GC_CALLBACK + * NAN_WEAK_CALLBACK + * NAN_DEPRECATED + * NAN_INLINE + * NanNew + * NanUndefined + * NanNull + * NanTrue + * NanFalse + * NanReturnValue + * NanReturnUndefined + * NanReturnNull + * NanReturnEmptyString + * NanReturnThis + * NanReturnHolder + * NanScope + * NanEscapableScope + * NanEscapeScope + * NanLocker + * NanUnlocker + * NanGetInternalFieldPointer + * NanSetInternalFieldPointer + * NanObjectWrapHandle + * NanSymbol + * NanGetPointerSafe + * NanSetPointerSafe + * NanRawString + * NanCString + * NanAsciiString + * NanUtf8String + * NanUcs2String + * NanBooleanOptionValue + * NanUInt32OptionValue + * NanError, NanTypeError, NanRangeError + * NanThrowError, NanThrowTypeError, NanThrowRangeError, NanThrowError(Handle), NanThrowError(Handle, int) + * NanNewBufferHandle(char *, size_t, FreeCallback, void *), NanNewBufferHandle(char *, uint32_t), NanNewBufferHandle(uint32_t) + * NanBufferUse(char *, uint32_t) + * NanNewContextHandle + * NanGetCurrentContext + * NanHasInstance + * NanDisposePersistent + * NanAssignPersistent + * NanMakeWeakPersistent + * NanSetTemplate + * NanSetPrototypeTemplate + * NanSetInstanceTemplate + * NanMakeCallback + * NanEncode + * NanDecodeBytes + * NanDecodeWrite + * NanCompileScript + * NanRunScript + * NanAdjustExternalMemory + * NanAddGCEpilogueCallback + * NanAddGCPrologueCallback + * NanRemoveGCEpilogueCallback + * NanRemoveGCPrologueCallback + * NanGetHeapStatistics + * NanSetCounterFunction + * NanSetCreateHistogramFunction + * NanSetAddHistogramSampleFunction + * NanIdleNotification + * NanLowMemoryNotification + * NanContextDisposedNotification + * NanCallback + * NanAsyncWorker + * NanAsyncQueueWorker + + +### NAN_METHOD(methodname) + +Use `NAN_METHOD` to define your V8 accessible methods: + +```c++ +// .h: +class Foo : public node::ObjectWrap { + ... + + static NAN_METHOD(Bar); + static NAN_METHOD(Baz); +} + + +// .cc: +NAN_METHOD(Foo::Bar) { + ... +} + +NAN_METHOD(Foo::Baz) { + ... +} +``` + +The reason for this macro is because of the method signature change in 0.11: + +```c++ +// 0.10 and below: +Handle name(const Arguments& args) + +// 0.11 and above +void name(const FunctionCallbackInfo& args) +``` + +The introduction of `FunctionCallbackInfo` brings additional complications: + + +### NAN_GETTER(methodname) + +Use `NAN_GETTER` to declare your V8 accessible getters. You get a `Local` `property` and an appropriately typed `args` object that can act like the `args` argument to a `NAN_METHOD` call. + +You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_GETTER`. + + +### NAN_SETTER(methodname) + +Use `NAN_SETTER` to declare your V8 accessible setters. Same as `NAN_GETTER` but you also get a `Local` `value` object to work with. + + +### NAN_PROPERTY_GETTER(cbname) +Use `NAN_PROPERTY_GETTER` to declare your V8 accessible property getters. You get a `Local` `property` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call. + +You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_GETTER`. + + +### NAN_PROPERTY_SETTER(cbname) +Use `NAN_PROPERTY_SETTER` to declare your V8 accessible property setters. Same as `NAN_PROPERTY_GETTER` but you also get a `Local` `value` object to work with. + + +### NAN_PROPERTY_ENUMERATOR(cbname) +Use `NAN_PROPERTY_ENUMERATOR` to declare your V8 accessible property enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_PROPERTY_GETTER` call. + +You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_ENUMERATOR`. + + +### NAN_PROPERTY_DELETER(cbname) +Use `NAN_PROPERTY_DELETER` to declare your V8 accessible property deleters. Same as `NAN_PROPERTY_GETTER`. + +You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_DELETER`. + + +### NAN_PROPERTY_QUERY(cbname) +Use `NAN_PROPERTY_QUERY` to declare your V8 accessible property queries. Same as `NAN_PROPERTY_GETTER`. + +You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_QUERY`. + + +### NAN_INDEX_GETTER(cbname) +Use `NAN_INDEX_GETTER` to declare your V8 accessible index getters. You get a `uint32_t` `index` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call. + +You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_GETTER`. + + +### NAN_INDEX_SETTER(cbname) +Use `NAN_INDEX_SETTER` to declare your V8 accessible index setters. Same as `NAN_INDEX_GETTER` but you also get a `Local` `value` object to work with. + + +### NAN_INDEX_ENUMERATOR(cbname) +Use `NAN_INDEX_ENUMERATOR` to declare your V8 accessible index enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_INDEX_GETTER` call. + +You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_ENUMERATOR`. + + +### NAN_INDEX_DELETER(cbname) +Use `NAN_INDEX_DELETER` to declare your V8 accessible index deleters. Same as `NAN_INDEX_GETTER`. + +You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_DELETER`. + + +### NAN_INDEX_QUERY(cbname) +Use `NAN_INDEX_QUERY` to declare your V8 accessible index queries. Same as `NAN_INDEX_GETTER`. + +You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_INDEX_QUERY`. + + +### NAN_GC_CALLBACK(cbname) +Use `NAN_GC_CALLBACK` to declare your callbacks for `NanAddGCEpilogueCallback` and `NanAddGCPrologueCallback`. You get arguments `GCType type` and `GCCallbackFlags flags`. + +```c++ +static Persistent callback; + +NAN_GC_CALLBACK(gcPrologueCallback) { + Local argv[] = {NanNew("prologue")}; + NanMakeCallback(NanGetCurrentContext()->Global(), NanNew(callback), 1, argv); +} + +NAN_METHOD(Hook) { + NanScope(); + NanAssignPersistent(callback, args[0].As()); + NanAddGCPrologueCallback(gcPrologueCallback); + NanReturnValue(args.Holder()); +} +``` + + +### NAN_WEAK_CALLBACK(cbname) + +Use `NAN_WEAK_CALLBACK` to define your V8 WeakReference callbacks. There is an argument object `const _NanWeakCallbackData &data` allowing access to the weak object and the supplied parameter through its `GetValue` and `GetParameter` methods. You can even access the weak callback info object through the `GetCallbackInfo()`method, but you probably should not. `Revive()` keeps the weak object alive until the next GC round. + +```c++ +NAN_WEAK_CALLBACK(weakCallback) { + int *parameter = data.GetParameter(); + NanMakeCallback(NanGetCurrentContext()->Global(), data.GetValue(), 0, NULL); + if ((*parameter)++ == 0) { + data.Revive(); + } else { + delete parameter; + } +} +``` + + +### NAN_DEPRECATED +Declares a function as deprecated. + +```c++ +static NAN_DEPRECATED NAN_METHOD(foo) { + ... +} +``` + + +### NAN_INLINE +Inlines a function. + +```c++ +NAN_INLINE int foo(int bar) { + ... +} +``` + + +### Local<T> NanNew<T>( ... ) + +Use `NanNew` to construct almost all v8 objects (bound `Script`s are constructed with `NanCompileScript(Handle)`) and make new local handles. + +```c++ +Local s = NanNew("value"); + +... + +Persistent o; + +... + +Local lo = NanNew(o); + +``` + + +### Local<Primitive> NanUndefined() + +Use instead of `Undefined()` + + +### Local<Primitive> NanNull() + +Use instead of `Null()` + + +### Local<Boolean> NanTrue() + +Use instead of `True()` + + +### Local<Boolean> NanFalse() + +Use instead of `False()` + + +### NanReturnValue(Handle<Value>) + +Use `NanReturnValue` when you want to return a value from your V8 accessible method: + +```c++ +NAN_METHOD(Foo::Bar) { + ... + + NanReturnValue(NanNew("FooBar!")); +} +``` + +No `return` statement required. + +For convenience, `NanReturnValue` also accepts common primitives directly by implicitly performing an overloaded `NanNew(T)`. + +```c++ +NanReturnValue("FooBar!"); +NanReturnValue(true); +NanReturnValue(12); +NanReturnValue(3.14); +``` + + +### NanReturnUndefined() + +Use `NanReturnUndefined` when you don't want to return anything from your V8 accessible method: + +```c++ +NAN_METHOD(Foo::Baz) { + ... + + NanReturnUndefined(); +} +``` + + +### NanReturnNull() + +Use `NanReturnNull` when you want to return `Null` from your V8 accessible method: + +```c++ +NAN_METHOD(Foo::Baz) { + ... + + NanReturnNull(); +} +``` + + +### NanReturnEmptyString() + +Use `NanReturnEmptyString` when you want to return an empty `String` from your V8 accessible method: + +```c++ +NAN_METHOD(Foo::Baz) { + ... + + NanReturnEmptyString(); +} +``` + + +### NanReturnThis() + +Use `NanReturnThis` when you want to return `This` from your V8 accessible method: + +```c++ +NAN_METHOD(Foo::Baz) { + ... + + NanReturnThis(); +} +``` + + +### NanReturnHolder() + +Use `NanReturnHolder` when you want to return `Holder` from your V8 accessible method: + +```c++ +NAN_METHOD(Foo::Baz) { + ... + + NanReturnHolder(); +} +``` + + +### NanScope() + +The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanScope()` necessary, use it in place of `HandleScope scope` when you do not wish to return handles (`Handle` or `Local`) to the surrounding scope (or in functions directly exposed to V8, as they do not return values in the normal sense): + +```c++ +NAN_METHOD(Foo::Bar) { + NanScope(); + + NanReturnValue(NanNew("FooBar!")); +} +``` + +This method is not directly exposed to V8, nor does it return a handle, so it uses an unescapable scope: + +```c++ +bool Foo::Bar() { + NanScope(); + + Local val = NanFalse(); + ... + return val->Value(); +} +``` + + +### NanEscapableScope() + +The separation of handle scopes into escapable and inescapable scopes makes `NanEscapableScope()` necessary, use it in place of `HandleScope scope` when you later wish to return a handle (`Handle` or `Local`) from the scope, this is for internal functions not directly exposed to V8: + +```c++ +Handle Foo::Bar() { + NanEscapableScope(); + + return NanEscapeScope(NanNew("FooBar!")); +} +``` + + +### Local<T> NanEscapeScope(Handle<T> value); +Use together with `NanEscapableScope` to escape the scope. Corresponds to `HandleScope::Close` or `EscapableHandleScope::Escape`. + + +### NanLocker() + +The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanLocker()` necessary, use it in place of `Locker locker`: + +```c++ +NAN_METHOD(Foo::Bar) { + NanLocker(); + ... + NanUnlocker(); +} +``` + + +### NanUnlocker() + +The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanUnlocker()` necessary, use it in place of `Unlocker unlocker`: + +```c++ +NAN_METHOD(Foo::Bar) { + NanLocker(); + ... + NanUnlocker(); +} +``` + + +### void * NanGetInternalFieldPointer(Handle<Object>, int) + +Gets a pointer to the internal field with at `index` from a V8 `Object` handle. + +```c++ +Local obj; +... +NanGetInternalFieldPointer(obj, 0); +``` + +### void NanSetInternalFieldPointer(Handle<Object>, int, void *) + +Sets the value of the internal field at `index` on a V8 `Object` handle. + +```c++ +static Persistent dataWrapperCtor; +... +Local wrapper = NanNew(dataWrapperCtor)->NewInstance(); +NanSetInternalFieldPointer(wrapper, 0, this); +``` + + +### Local<Object> NanObjectWrapHandle(const node::ObjectWrap &obj) + +When you want to fetch the V8 object handle from a native object you've wrapped with Node's `ObjectWrap`, you should use `NanObjectWrapHandle`: + +```c++ +NanObjectWrapHandle(iterator)->Get(NanNew("end")) +``` + + +### ~~Local<String> NanSymbol(const char *)~~ + +Deprecated. Use `NanNew` instead. +~~Use to create string symbol objects (i.e. `v8::String::NewSymbol(x)`), for getting and setting object properties, or names of objects.~~ + +```c++ +bool foo = false; +if (obj->Has(NanNew("foo"))) + foo = optionsObj->Get(NanNew("foo"))->BooleanValue() +``` + + +### Type NanGetPointerSafe(Type *[, Type]) + +A helper for getting values from optional pointers. If the pointer is `NULL`, the function returns the optional default value, which defaults to `0`. Otherwise, the function returns the value the pointer points to. + +```c++ +char *plugh(uint32_t *optional) { + char res[] = "xyzzy"; + uint32_t param = NanGetPointerSafe(optional, 0x1337); + switch (param) { + ... + } + NanSetPointerSafe(optional, 0xDEADBEEF); +} +``` + + +### bool NanSetPointerSafe(Type *, Type) + +A helper for setting optional argument pointers. If the pointer is `NULL`, the function simply returns `false`. Otherwise, the value is assigned to the variable the pointer points to. + +```c++ +const char *plugh(size_t *outputsize) { + char res[] = "xyzzy"; + if !(NanSetPointerSafe(outputsize, strlen(res) + 1)) { + ... + } + + ... +} +``` + + +### ~~void* NanRawString(Handle<Value>, enum Nan::Encoding, size_t *, void *, size_t, int)~~ + +Deprecated. Use something else. + +~~When you want to convert a V8 `String` to a `char*` buffer, use `NanRawString`. You have to supply an encoding as well as a pointer to a variable that will be assigned the number of bytes in the returned string. It is also possible to supply a buffer and its length to the function in order not to have a new buffer allocated. The final argument allows setting `String::WriteOptions`. +Just remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer:~~ + +```c++ +size_t count; +void* decoded = NanRawString(args[1], Nan::BASE64, &count, NULL, 0, String::HINT_MANY_WRITES_EXPECTED); +... +delete[] reinterpret_cast(decoded); +``` + + +### ~~char* NanCString(Handle<Value>, size_t *[, char *, size_t, int])~~ + +Deprecated. Use `String::Utf8Value` or `NanUtf8String` instead. + +~~When you want to convert a V8 `String` to a null-terminated C `char*` use `NanCString`. The resulting `char*` will be UTF-8-encoded, and you need to supply a pointer to a variable that will be assigned the number of bytes in the returned string. It is also possible to supply a buffer and its length to the function in order not to have a new buffer allocated. The final argument allows optionally setting `String::WriteOptions`, which default to `v8::String::NO_OPTIONS`. +Just remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer:~~ + +```c++ +size_t count; +char* name = NanCString(args[0], &count); +... +delete[] name; +``` + + +### NanAsciiString + +Contrary to the name, this is not actually an ASCII string, it is a one-byte string with no particular encoding. Do not use unless you actually need this incorrect legacy behavior. Consider fixing your broken code instead. If you actually have a proper ASCII-string, use UTF-8, which is a proper superset of ASCII. +Convert a `String` to zero-terminated, sort-of Ascii-encoded `char *`. The underlying buffer is freed when the owner object goes out of scope, so make a copy or heap allocation if you need it to stick around. + +```c++ +NAN_METHOD(foo) { + NanScope(); + NanReturnValue(NanNew(*NanAsciiString(arg[0]))); +} +``` + +####*WRONG*: +the buffer `str` points to has been freed when `baz` was destroyed: +```c++ +static char *str; + +NAN_METHOD(bar) { + NanScope(); + NanAsciiString baz(arg[0]); + + str = *baz; + NanReturnUndefined(); // baz goes out of scope, freeing str +} + +... + +printf(str); // use-after-free error +``` + +####*RIGHT*: +```c++ +static NanAsciiString *str; + +NAN_METHOD(bar) { + NanScope(); + str = new NanAsciiString(arg[0]); + NanReturnUndefined(); +} + +... + +printf(**str); +``` + + +### NanUtf8String + +Equivalent to `String::Utf8Value`, it only exists for the sake of completeness. +Convert a `String` to zero-terminated, Utf8-encoded `char *`. The underlying buffer is freed when the owner object goes out of scope, so make a copy or heap allocation if you need it to stick around. + +```c++ +NAN_METHOD(foo) { + NanScope(); + NanReturnValue(NanNew(*NanUtf8String(arg[0]))); +} +``` + +####*WRONG*: +the buffer `str` points to has been freed when `baz` was destroyed: +```c++ +static char *str; + +NAN_METHOD(bar) { + NanScope(); + NanUtf8String baz(arg[0]); + + str = *baz; + NanReturnUndefined(); // baz goes out of scope, freeing str +} + +... + +printf(str); // use-after-free error +``` + +####*RIGHT*: +```c++ +static NanUtf8String *str; + +NAN_METHOD(bar) { + NanScope(); + str = new NanUtf8String(arg[0]); + NanReturnUndefined(); +} + +... + +printf(**str); +``` + + + +### NanUcs2String + +Equivalent to `String::Value`, it only exists for the sake of completeness. +Convert a `String` to zero-terminated, Ucs2-encoded `uint16_t *`. The underlying buffer is freed when the owner object goes out of scope, so make a copy or heap allocation if you need it to stick around. + +```c++ +NAN_METHOD(foo) { + NanScope(); + NanReturnValue(NanNew(*NanUcs2String(arg[0]))); +} +``` + +####*WRONG*: +the buffer `str` points to has been freed when `baz` was destroyed: +```c++ +static char *str; + +NAN_METHOD(bar) { + NanScope(); + NanUcs2String baz(arg[0]); + + str = *baz; + NanReturnUndefined(); // baz goes out of scope, freeing str +} + +... + +printf(str); // use-after-free error +``` + +####*RIGHT*: +```c++ +static NanUcs2String *str; + +NAN_METHOD(bar) { + NanScope(); + str = new NanUcs2String(arg[0]); + NanReturnUndefined(); +} + +... + +printf(**str); +``` + + +### bool NanBooleanOptionValue(Handle<Value>, Handle<String>[, bool]) + +When you have an "options" object that you need to fetch properties from, boolean options can be fetched with this pair. They check first if the object exists (`IsEmpty`), then if the object has the given property (`Has`) then they get and convert/coerce the property to a `bool`. + +The optional last parameter is the *default* value, which is `false` if left off: + +```c++ +// `foo` is false unless the user supplies a truthy value for it +bool foo = NanBooleanOptionValue(optionsObj, NanNew("foo")); +// `bar` is true unless the user supplies a falsy value for it +bool bar = NanBooleanOptionValueDefTrue(optionsObj, NanNew("bar"), true); +``` + + +### uint32_t NanUInt32OptionValue(Handle<Value>, Handle<String>, uint32_t) + +Similar to `NanBooleanOptionValue`, use `NanUInt32OptionValue` to fetch an integer option from your options object. Can be any kind of JavaScript `Number` and it will be coerced to an unsigned 32-bit integer. + +Requires all 3 arguments as a default is not optional: + +```c++ +uint32_t count = NanUInt32OptionValue(optionsObj, NanNew("count"), 1024); +``` + + +### NanError(message), NanTypeError(message), NanRangeError(message) + +For making `Error`, `TypeError` and `RangeError` objects. + +```c++ +Local res = NanError("you must supply a callback argument"); +``` + + +### NanThrowError(message), NanThrowTypeError(message), NanThrowRangeError(message), NanThrowError(Local<Value>), NanThrowError(Local<Value>, int) + +For throwing `Error`, `TypeError` and `RangeError` objects. + +```c++ +NanThrowError("you must supply a callback argument"); +``` + +Can also handle any custom object you may want to throw. If used with the error code argument, it will add the supplied error code to the error object as a property called `code`. + + +### Local<Object> NanNewBufferHandle(char *, uint32_t), Local<Object> NanNewBufferHandle(uint32_t) + +The `Buffer` API has changed a little in Node 0.11, this helper provides consistent access to `Buffer` creation: + +```c++ +NanNewBufferHandle((char*)value.data(), value.size()); +``` + +Can also be used to initialize a `Buffer` with just a `size` argument. + +Can also be supplied with a `NanFreeCallback` and a hint for the garbage collector. + + +### Local<Object> NanBufferUse(char*, uint32_t) + +`Buffer::New(char*, uint32_t)` prior to 0.11 would make a copy of the data. +While it was possible to get around this, it required a shim by passing a +callback. So the new API `Buffer::Use(char*, uint32_t)` was introduced to remove +needing to use this shim. + +`NanBufferUse` uses the `char*` passed as the backing data, and will free the +memory automatically when the weak callback is called. Keep this in mind, as +careless use can lead to "double free or corruption" and other cryptic failures. + + +### bool NanHasInstance(Persistent<FunctionTemplate>&, Handle<Value>) + +Can be used to check the type of an object to determine it is of a particular class you have already defined and have a `Persistent` handle for. + + +### ~~Local<Context> NanNewContextHandle([ExtensionConfiguration*, Handle<ObjectTemplate>, Handle<Value>])~~ + +Deprecated. Use `NanNew` instead. + +~~Creates a new `Local` handle.~~ + +```c++ +Local ftmpl = NanNew(); +Local otmpl = ftmpl->InstanceTemplate(); +Local ctx = NanNewContextHandle(NULL, otmpl); +``` + + +### Local<Context> NanGetCurrentContext() + +Gets the current context. + +```c++ +Local ctx = NanGetCurrentContext(); +``` + + +### void NanDisposePersistent(Persistent<T> &) + +Use `NanDisposePersistent` to dispose a `Persistent` handle. + +```c++ +NanDisposePersistent(persistentHandle); +``` + + +### NanAssignPersistent(handle, object) + +Use `NanAssignPersistent` to assign a non-`Persistent` handle to a `Persistent` one. You can no longer just declare a `Persistent` handle and assign directly to it later, you have to `Reset` it in Node 0.11, so this makes it easier. + +In general it is now better to place anything you want to protect from V8's garbage collector as properties of a generic `Object` and then assign that to a `Persistent`. This works in older versions of Node also if you use `NanAssignPersistent`: + +```c++ +Persistent persistentHandle; + +... + +Local obj = NanNew(); +obj->Set(NanNew("key"), keyHandle); // where keyHandle might be a Local +NanAssignPersistent(persistentHandle, obj) +``` + + +### _NanWeakCallbackInfo<T, P>* NanMakeWeakPersistent(Handle<T>, P*, _NanWeakCallbackInfo<T, P>::Callback) + +Creates a weak persistent handle with the supplied parameter and `NAN_WEAK_CALLBACK`. + +```c++ +NAN_WEAK_CALLBACK(weakCallback) { + +... + +} + +Local func; + +... + +int *parameter = new int(0); +NanMakeWeakPersistent(func, parameter, &weakCallback); +``` + + +### NanSetTemplate(templ, name, value [, attributes]) + +Use to add properties on object and function templates. + + +### NanSetPrototypeTemplate(templ, name, value [, attributes]) + +Use to add prototype properties on function templates. + + +### NanSetInstanceTemplate(templ, name, value [, attributes]) + +Use to add instance properties on function templates. + + +### NanMakeCallback(target, func, argc, argv) + +Use instead of `node::MakeCallback` to call javascript functions. This (or `NanCallback`) is the only proper way of calling functions. You must _*never, ever*_ directly use `Function::Call`, it will lead to run-time failures. + + +### NanEncode(const void*, size_t[, enum Nan::Encoding]) + +Replaces `node::Encode`. + + +### NanDecodeBytes(v8::Handle<v8::Value>[, enum Nan::Encoding]) + +Replaces `node::DecodeBytes`. + + +### NanDecodeWrite(char *, size_t, v8::Handle<v8::Value>[, enum Nan::Encoding]) + +Replaces `node::DecodeWrite`. + + +### NanCompileScript(Handle s [, const ScriptOrigin& origin]) + +Use to create new scripts bound to the current context. + + +### NanRunScript(script) + +Use to run both bound and unbound scripts. + + +### NanAdjustExternalMemory(int change_in_bytes) + +Simply does `AdjustAmountOfExternalAllocatedMemory`, note that the argument and returned value have type `int`. + + +### NanAddGCEpilogueCallback(GCEpilogueCallback callback, GCType gc_type_filter=kGCTypeAll) + +Simply does `AddGCEpilogueCallback` + + +### NanAddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type_filter=kGCTypeAll) + +Simply does `AddGCPrologueCallback` + + +### NanRemoveGCEpilogueCallback(GCEpilogueCallback callback) + +Simply does `RemoveGCEpilogueCallback` + + +### NanRemoveGCPrologueCallback(GCPrologueCallback callback) + +Simply does `RemoveGCPrologueCallback` + + +### NanGetHeapStatistics(HeapStatistics *heap_statistics) + +Simply does `GetHeapStatistics` + + +### NanSetCounterFunction(CounterLookupCallback cb) + +Simply does `SetCounterFunction` + + +### NanSetCreateHistogramFunction(CreateHistogramCallback cb) + +Simply does `SetCreateHistogramFunction` + + +### NanSetAddHistogramSampleFunction(AddHistogramSampleCallback cb) + +Simply does `SetAddHistogramSampleFunction` + + +### NanIdleNotification(int idle_time_in_ms) + +Simply does `IdleNotification` + + +### NanLowMemoryNotification() + +Simply does `LowMemoryNotification` + + +### NanContextDisposedNotification() + +Simply does `ContextDisposedNotification` + + +### NanCallback + +Because of the difficulties imposed by the changes to `Persistent` handles in V8 in Node 0.11, creating `Persistent` versions of your `Handle` is annoyingly tricky. `NanCallback` makes it easier by taking your handle, making it persistent until the `NanCallback` is deleted and even providing a handy `Call()` method to fetch and execute the callback `Function`. + +```c++ +Local callbackHandle = args[0].As(); +NanCallback *callback = new NanCallback(callbackHandle); +// pass `callback` around and it's safe from GC until you: +delete callback; +``` + +You can execute the callback like so: + +```c++ +// no arguments: +callback->Call(0, NULL); + +// an error argument: +Handle argv[] = { + NanError(NanNew("fail!")) +}; +callback->Call(1, argv); + +// a success argument: +Handle argv[] = { + NanNull(), + NanNew("w00t!") +}; +callback->Call(2, argv); +``` + +`NanCallback` also has a `Local GetFunction()` method that you can use +to fetch a local handle to the underlying callback function, as well as a +`void SetFunction(Handle)` for setting the callback on the +`NanCallback`. You can check if a `NanCallback` is empty with the `bool IsEmpty()` method. Additionally a generic constructor is available for using +`NanCallback` without performing heap allocations. + + +### NanAsyncWorker + +`NanAsyncWorker` is an abstract class that you can subclass to have much of the annoying async queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the async work is in progress. + +See a rough outline of the implementation: + +```c++ +class NanAsyncWorker { +public: + NanAsyncWorker (NanCallback *callback); + + // Clean up persistent handles and delete the *callback + virtual ~NanAsyncWorker (); + + // Check the `ErrorMessage()` and call HandleOKCallback() + // or HandleErrorCallback depending on whether it has been set or not + virtual void WorkComplete (); + + // You must implement this to do some async work. If there is an + // error then use `SetErrorMessage()` to set an error message and the callback will + // be passed that string in an Error object + virtual void Execute (); + + // Save a V8 object in a Persistent handle to protect it from GC + void SaveToPersistent(const char *key, Local &obj); + + // Fetch a stored V8 object (don't call from within `Execute()`) + Local GetFromPersistent(const char *key); + + // Get the error message (or NULL) + const char *ErrorMessage(); + + // Set an error message + void SetErrorMessage(const char *msg); + +protected: + // Default implementation calls the callback function with no arguments. + // Override this to return meaningful data + virtual void HandleOKCallback (); + + // Default implementation calls the callback function with an Error object + // wrapping the `errmsg` string + virtual void HandleErrorCallback (); +}; +``` + + +### NanAsyncQueueWorker(NanAsyncWorker *) + +`NanAsyncQueueWorker` will run a `NanAsyncWorker` asynchronously via libuv. Both the *execute* and *after_work* steps are taken care of for you—most of the logic for this is embedded in `NanAsyncWorker`. + + +### Tests + +To run the NAN tests do: + +``` sh +npm install +npm run-script rebuild-tests +npm test +``` + +Or just: + +``` sh +npm install +make test +``` + +## Porting + +Follows is a guide to porting your C++ node to NAN. + + + + + + + + + + + + + + + + + +
AspectWithout NANWith NAN
Function declaration
class MyClass : public ObjectWrap {
+    ....
+    static Handle ToString(const Arguments& args);
+    ....
+}
class MyClass : public ObjectWrap {
+    ....
+    static NAN_METHOD(ToString);
+    ....
+}
Function definition
Handle
+MyClass::ToString(const Arguments& args)
+{
+	HandleScope scope;
+	....
+}
+NAN_METHOD(MyClass::ToString)
+{
+  NanScope();
+  ....
+}
Return a value
return scope.Close(result);
NanReturnValue(result);
Return undefined
return Undefined();
NanReturnUndefined();
Throw an error
return ThrowException(
+  Exception::Error(
+    String::New("Error text...")));
return NanThrowError("Error text...");
New v8 string literal
String::NewSymbol("my text")
NanNew("my text")
+ +## Contributors + + + +## Governance & Contributing + +NAN is governed by the [io.js](https://iojs.org/) Addon API Working Group + +### Addon API Working Group (WG) + +The NAN project is jointly governed by a Working Group which is responsible for high-level guidance of the project. + +Members of the WG are also known as Collaborators, there is no distinction between the two, unlike other io.js projects. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project [README.md](./README.md#collaborators). + +Individuals making significant and valuable contributions are made members of the WG and given commit-access to the project. These individuals are identified by the WG and their addition to the WG is discussed via GitHub and requires unanimous consensus amongst those WG members participating in the discussion with a quorum of 50% of WG members required for acceptance of the vote. + +_Note:_ If you make a significant contribution and are not considered for commit-access log an issue or contact a WG member directly. + +For the current list of WG members / Collaborators, see the project [README.md](./README.md#collaborators). + +### Consensus Seeking Process + +The WG follows a [Consensus Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) decision making model. + +Modifications of the contents of the NAN 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 WG. All pull requests must be reviewed and accepted by a WG member with sufficient expertise who is able to take full responsibility for the change. In the case of pull requests proposed by an existing WG member, an additional WG member is required for sign-off. Consensus should be sought if additional WG members participate and there is disagreement around a particular modification. + +If a change proposal cannot reach a consensus, a WG member can call for a vote amongst the members of the WG. Simple majority wins. + +### Developer's Certificate of Origin 1.0 + +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. + + +### WG Members / Collaborators + + + + + + + + + +
Rod VaggGitHub/rvaggTwitter/@rvagg
Benjamin ByholmGitHub/kkoopa-
Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
Nathan RajlichGitHub/TooTallNateTwitter/@TooTallNate
Brett LawsonGitHub/brett19Twitter/@brett19x
Ben NoordhuisGitHub/bnoordhuisTwitter/@bnoordhuis
David SiegelGitHub/agnat-
+ +## Licence & copyright + +Copyright (c) 2015 NAN WG Members / Collaborators (listed above). + +Native Abstractions for Node.js is licensed under an MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/appveyor.yml b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/appveyor.yml new file mode 100644 index 0000000..3429453 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/appveyor.yml @@ -0,0 +1,38 @@ +# http://www.appveyor.com/docs/appveyor-yml + +# Test against these versions of Io.js and Node.js. +environment: + matrix: + # node.js + - nodejs_version: "0.8" + - nodejs_version: "0.10" + - nodejs_version: "0.12" + # io.js + - nodejs_version: "1" + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node 0.STABLE.latest + - ps: if($env:nodejs_version -eq "0.8") {Install-Product node $env:nodejs_version} + - ps: if($env:nodejs_version -ne "0.8") {Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)} + - IF NOT %nodejs_version% == 1 npm -g install npm + - IF NOT %nodejs_version% == 1 set PATH=%APPDATA%\npm;%PATH% + # Typical npm stuff. + - npm install + - IF %nodejs_version% == 0.8 node node_modules\node-gyp\bin\node-gyp.js rebuild --directory test + - IF NOT %nodejs_version% == 0.8 npm run rebuild-tests + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - IF NOT %nodejs_version% == 1 npm test + - IF %nodejs_version% == 1 iojs node_modules\tap\bin\tap.js --gc test\js\*-test.js + +# Don't actually build. +build: off + +# Set build version format here instead of in the admin panel. +version: "{build}" diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/include_dirs.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/include_dirs.js new file mode 100644 index 0000000..4f1dfb4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/include_dirs.js @@ -0,0 +1 @@ +console.log(require('path').relative('.', __dirname)); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan.h b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan.h new file mode 100644 index 0000000..fb025a9 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan.h @@ -0,0 +1,2322 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2015 NAN contributors: + * - Rod Vagg + * - Benjamin Byholm + * - Trevor Norris + * - Nathan Rajlich + * - Brett Lawson + * - Ben Noordhuis + * - David Siegel + * + * MIT License + * + * Version 1.8.4: current Node 12: 0.12.2, Node 10: 0.10.38, io.js: 1.8.1 + * + * See https://github.com/rvagg/nan for the latest update to this file + **********************************************************************************/ + +#ifndef NAN_H_ +#define NAN_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(_MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4530 ) +# include +# pragma warning( pop ) +#else +# include +#endif + +#if defined(__GNUC__) && !(defined(DEBUG) && DEBUG) +# define NAN_INLINE inline __attribute__((always_inline)) +#elif defined(_MSC_VER) && !(defined(DEBUG) && DEBUG) +# define NAN_INLINE __forceinline +#else +# define NAN_INLINE inline +#endif + +#if defined(__GNUC__) && \ + !(defined(V8_DISABLE_DEPRECATIONS) && V8_DISABLE_DEPRECATIONS) +# define NAN_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) && \ + !(defined(V8_DISABLE_DEPRECATIONS) && V8_DISABLE_DEPRECATIONS) +# define NAN_DEPRECATED __declspec(deprecated) +#else +# define NAN_DEPRECATED +#endif + +#define NODE_0_10_MODULE_VERSION 11 +#define NODE_0_12_MODULE_VERSION 12 +#define ATOM_0_21_MODULE_VERSION 41 +#define IOJS_1_0_MODULE_VERSION 42 +#define IOJS_1_1_MODULE_VERSION 43 + +#if (NODE_MODULE_VERSION < NODE_0_12_MODULE_VERSION) +typedef v8::InvocationCallback NanFunctionCallback; +typedef v8::Script NanUnboundScript; +typedef v8::Script NanBoundScript; +#else +typedef v8::FunctionCallback NanFunctionCallback; +typedef v8::UnboundScript NanUnboundScript; +typedef v8::Script NanBoundScript; +#endif + +#if (NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION) +typedef v8::String::ExternalAsciiStringResource + NanExternalOneByteStringResource; +#else +typedef v8::String::ExternalOneByteStringResource + NanExternalOneByteStringResource; +#endif + +#include "nan_new.h" // NOLINT(build/include) + +// uv helpers +#ifdef UV_VERSION_MAJOR +#ifndef UV_VERSION_PATCH +#define UV_VERSION_PATCH 0 +#endif +#define NAUV_UVVERSION ((UV_VERSION_MAJOR << 16) | \ + (UV_VERSION_MINOR << 8) | \ + (UV_VERSION_PATCH)) +#else +#define NAUV_UVVERSION 0x000b00 +#endif + + +#if NAUV_UVVERSION < 0x000b17 +#define NAUV_WORK_CB(func) \ + void func(uv_async_t *async, int) +#else +#define NAUV_WORK_CB(func) \ + void func(uv_async_t *async) +#endif + +#if NAUV_UVVERSION >= 0x000b0b + +typedef uv_key_t nauv_key_t; + +inline int nauv_key_create(nauv_key_t *key) { + return uv_key_create(key); +} + +inline void nauv_key_delete(nauv_key_t *key) { + uv_key_delete(key); +} + +inline void* nauv_key_get(nauv_key_t *key) { + return uv_key_get(key); +} + +inline void nauv_key_set(nauv_key_t *key, void *value) { + uv_key_set(key, value); +} + +#else + +/* Implement thread local storage for older versions of libuv. + * This is essentially a backport of libuv commit 5d2434bf + * written by Ben Noordhuis, adjusted for names and inline. + */ + +#ifndef WIN32 + +#include + +typedef pthread_key_t nauv_key_t; + +inline int nauv_key_create(nauv_key_t* key) { + return -pthread_key_create(key, NULL); +} + +inline void nauv_key_delete(nauv_key_t* key) { + if (pthread_key_delete(*key)) + abort(); +} + +inline void* nauv_key_get(nauv_key_t* key) { + return pthread_getspecific(*key); +} + +inline void nauv_key_set(nauv_key_t* key, void* value) { + if (pthread_setspecific(*key, value)) + abort(); +} + +#else + +#include + +typedef struct { + DWORD tls_index; +} nauv_key_t; + +inline int nauv_key_create(nauv_key_t* key) { + key->tls_index = TlsAlloc(); + if (key->tls_index == TLS_OUT_OF_INDEXES) + return UV_ENOMEM; + return 0; +} + +inline void nauv_key_delete(nauv_key_t* key) { + if (TlsFree(key->tls_index) == FALSE) + abort(); + key->tls_index = TLS_OUT_OF_INDEXES; +} + +inline void* nauv_key_get(nauv_key_t* key) { + void* value = TlsGetValue(key->tls_index); + if (value == NULL) + if (GetLastError() != ERROR_SUCCESS) + abort(); + return value; +} + +inline void nauv_key_set(nauv_key_t* key, void* value) { + if (TlsSetValue(key->tls_index, value) == FALSE) + abort(); +} + +#endif +#endif + +// some generic helpers + +template NAN_INLINE bool NanSetPointerSafe( + T *var + , T val +) { + if (var) { + *var = val; + return true; + } else { + return false; + } +} + +template NAN_INLINE T NanGetPointerSafe( + T *var + , T fallback = reinterpret_cast(0) +) { + if (var) { + return *var; + } else { + return fallback; + } +} + +NAN_INLINE bool NanBooleanOptionValue( + v8::Local optionsObj + , v8::Handle opt, bool def +) { + if (def) { + return optionsObj.IsEmpty() + || !optionsObj->Has(opt) + || optionsObj->Get(opt)->BooleanValue(); + } else { + return !optionsObj.IsEmpty() + && optionsObj->Has(opt) + && optionsObj->Get(opt)->BooleanValue(); + } +} + +NAN_INLINE bool NanBooleanOptionValue( + v8::Local optionsObj + , v8::Handle opt +) { + return NanBooleanOptionValue(optionsObj, opt, false); +} + +NAN_INLINE uint32_t NanUInt32OptionValue( + v8::Local optionsObj + , v8::Handle opt + , uint32_t def +) { + return !optionsObj.IsEmpty() + && optionsObj->Has(opt) + && optionsObj->Get(opt)->IsNumber() + ? optionsObj->Get(opt)->Uint32Value() + : def; +} + +template +v8::Local NanNew(v8::Handle); + +template +NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) { + return NanNew(val); +} + +template +NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) { + return val; +} + +template +NAN_INLINE v8::Local _NanEnsureLocal(T val) { + return NanNew(val); +} + +/* io.js 1.0 */ +#if NODE_MODULE_VERSION >= IOJS_1_0_MODULE_VERSION \ + || NODE_VERSION_AT_LEAST(0, 11, 15) + NAN_INLINE + void NanSetCounterFunction(v8::CounterLookupCallback cb) { + v8::Isolate::GetCurrent()->SetCounterFunction(cb); + } + + NAN_INLINE + void NanSetCreateHistogramFunction(v8::CreateHistogramCallback cb) { + v8::Isolate::GetCurrent()->SetCreateHistogramFunction(cb); + } + + NAN_INLINE + void NanSetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) { + v8::Isolate::GetCurrent()->SetAddHistogramSampleFunction(cb); + } + + NAN_INLINE bool NanIdleNotification(int idle_time_in_ms) { + return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms); + } + + NAN_INLINE void NanLowMemoryNotification() { + v8::Isolate::GetCurrent()->LowMemoryNotification(); + } + + NAN_INLINE void NanContextDisposedNotification() { + v8::Isolate::GetCurrent()->ContextDisposedNotification(); + } +#else + NAN_INLINE + void NanSetCounterFunction(v8::CounterLookupCallback cb) { + v8::V8::SetCounterFunction(cb); + } + + NAN_INLINE + void NanSetCreateHistogramFunction(v8::CreateHistogramCallback cb) { + v8::V8::SetCreateHistogramFunction(cb); + } + + NAN_INLINE + void NanSetAddHistogramSampleFunction(v8::AddHistogramSampleCallback cb) { + v8::V8::SetAddHistogramSampleFunction(cb); + } + + NAN_INLINE bool NanIdleNotification(int idle_time_in_ms) { + return v8::V8::IdleNotification(idle_time_in_ms); + } + + NAN_INLINE void NanLowMemoryNotification() { + v8::V8::LowMemoryNotification(); + } + + NAN_INLINE void NanContextDisposedNotification() { + v8::V8::ContextDisposedNotification(); + } +#endif + +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) +// Node 0.11+ (0.11.12 and below won't compile with these) + +# define _NAN_METHOD_ARGS_TYPE const v8::FunctionCallbackInfo& +# define _NAN_METHOD_ARGS _NAN_METHOD_ARGS_TYPE args +# define _NAN_METHOD_RETURN_TYPE void + +# define _NAN_GETTER_ARGS_TYPE const v8::PropertyCallbackInfo& +# define _NAN_GETTER_ARGS _NAN_GETTER_ARGS_TYPE args +# define _NAN_GETTER_RETURN_TYPE void + +# define _NAN_SETTER_ARGS_TYPE const v8::PropertyCallbackInfo& +# define _NAN_SETTER_ARGS _NAN_SETTER_ARGS_TYPE args +# define _NAN_SETTER_RETURN_TYPE void + +# define _NAN_PROPERTY_GETTER_ARGS_TYPE \ + const v8::PropertyCallbackInfo& +# define _NAN_PROPERTY_GETTER_ARGS _NAN_PROPERTY_GETTER_ARGS_TYPE args +# define _NAN_PROPERTY_GETTER_RETURN_TYPE void + +# define _NAN_PROPERTY_SETTER_ARGS_TYPE \ + const v8::PropertyCallbackInfo& +# define _NAN_PROPERTY_SETTER_ARGS _NAN_PROPERTY_SETTER_ARGS_TYPE args +# define _NAN_PROPERTY_SETTER_RETURN_TYPE void + +# define _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE \ + const v8::PropertyCallbackInfo& +# define _NAN_PROPERTY_ENUMERATOR_ARGS _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE args +# define _NAN_PROPERTY_ENUMERATOR_RETURN_TYPE void + +# define _NAN_PROPERTY_DELETER_ARGS_TYPE \ + const v8::PropertyCallbackInfo& +# define _NAN_PROPERTY_DELETER_ARGS \ + _NAN_PROPERTY_DELETER_ARGS_TYPE args +# define _NAN_PROPERTY_DELETER_RETURN_TYPE void + +# define _NAN_PROPERTY_QUERY_ARGS_TYPE \ + const v8::PropertyCallbackInfo& +# define _NAN_PROPERTY_QUERY_ARGS _NAN_PROPERTY_QUERY_ARGS_TYPE args +# define _NAN_PROPERTY_QUERY_RETURN_TYPE void + +# define _NAN_INDEX_GETTER_ARGS_TYPE \ + const v8::PropertyCallbackInfo& +# define _NAN_INDEX_GETTER_ARGS _NAN_INDEX_GETTER_ARGS_TYPE args +# define _NAN_INDEX_GETTER_RETURN_TYPE void + +# define _NAN_INDEX_SETTER_ARGS_TYPE \ + const v8::PropertyCallbackInfo& +# define _NAN_INDEX_SETTER_ARGS _NAN_INDEX_SETTER_ARGS_TYPE args +# define _NAN_INDEX_SETTER_RETURN_TYPE void + +# define _NAN_INDEX_ENUMERATOR_ARGS_TYPE \ + const v8::PropertyCallbackInfo& +# define _NAN_INDEX_ENUMERATOR_ARGS _NAN_INDEX_ENUMERATOR_ARGS_TYPE args +# define _NAN_INDEX_ENUMERATOR_RETURN_TYPE void + +# define _NAN_INDEX_DELETER_ARGS_TYPE \ + const v8::PropertyCallbackInfo& +# define _NAN_INDEX_DELETER_ARGS _NAN_INDEX_DELETER_ARGS_TYPE args +# define _NAN_INDEX_DELETER_RETURN_TYPE void + +# define _NAN_INDEX_QUERY_ARGS_TYPE \ + const v8::PropertyCallbackInfo& +# define _NAN_INDEX_QUERY_ARGS _NAN_INDEX_QUERY_ARGS_TYPE args +# define _NAN_INDEX_QUERY_RETURN_TYPE void + +# define NanScope() v8::HandleScope scope(v8::Isolate::GetCurrent()) +# define NanEscapableScope() \ + v8::EscapableHandleScope scope(v8::Isolate::GetCurrent()) + +# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val)) +# define NanLocker() v8::Locker locker(v8::Isolate::GetCurrent()) +# define NanUnlocker() v8::Unlocker unlocker(v8::Isolate::GetCurrent()) +# define NanReturnValue(value) return args.GetReturnValue().Set(_NanEnsureLocal(value)) +# define NanReturnUndefined() return +# define NanReturnHolder() NanReturnValue(args.Holder()) +# define NanReturnThis() NanReturnValue(args.This()) +# define NanReturnNull() return args.GetReturnValue().SetNull() +# define NanReturnEmptyString() return args.GetReturnValue().SetEmptyString() + + NAN_INLINE v8::Local NanObjectWrapHandle(const node::ObjectWrap *obj) { + return const_cast(obj)->handle(); + } + + NAN_INLINE v8::Local NanUndefined() { + NanEscapableScope(); + return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent()))); + } + + NAN_INLINE v8::Local NanNull() { + NanEscapableScope(); + return NanEscapeScope(NanNew(v8::Null(v8::Isolate::GetCurrent()))); + } + + NAN_INLINE v8::Local NanTrue() { + NanEscapableScope(); + return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent()))); + } + + NAN_INLINE v8::Local NanFalse() { + NanEscapableScope(); + return NanEscapeScope(NanNew(v8::False(v8::Isolate::GetCurrent()))); + } + + NAN_INLINE int NanAdjustExternalMemory(int bc) { + return static_cast( + v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(bc)); + } + + NAN_INLINE void NanSetTemplate( + v8::Handle templ + , const char *name + , v8::Handle value) { + templ->Set(v8::Isolate::GetCurrent(), name, value); + } + + NAN_INLINE void NanSetTemplate( + v8::Handle templ + , v8::Handle name + , v8::Handle value + , v8::PropertyAttribute attributes) { + templ->Set(name, value, attributes); + } + + NAN_INLINE v8::Local NanGetCurrentContext() { + return v8::Isolate::GetCurrent()->GetCurrentContext(); + } + + NAN_INLINE void* NanGetInternalFieldPointer( + v8::Handle object + , int index) { + return object->GetAlignedPointerFromInternalField(index); + } + + NAN_INLINE void NanSetInternalFieldPointer( + v8::Handle object + , int index + , void* value) { + object->SetAlignedPointerInInternalField(index, value); + } + +# define NAN_GC_CALLBACK(name) \ + void name(v8::Isolate *isolate, v8::GCType type, v8::GCCallbackFlags flags) + + NAN_INLINE void NanAddGCEpilogueCallback( + v8::Isolate::GCEpilogueCallback callback + , v8::GCType gc_type_filter = v8::kGCTypeAll) { + v8::Isolate::GetCurrent()->AddGCEpilogueCallback(callback, gc_type_filter); + } + + NAN_INLINE void NanRemoveGCEpilogueCallback( + v8::Isolate::GCEpilogueCallback callback) { + v8::Isolate::GetCurrent()->RemoveGCEpilogueCallback(callback); + } + + NAN_INLINE void NanAddGCPrologueCallback( + v8::Isolate::GCPrologueCallback callback + , v8::GCType gc_type_filter = v8::kGCTypeAll) { + v8::Isolate::GetCurrent()->AddGCPrologueCallback(callback, gc_type_filter); + } + + NAN_INLINE void NanRemoveGCPrologueCallback( + v8::Isolate::GCPrologueCallback callback) { + v8::Isolate::GetCurrent()->RemoveGCPrologueCallback(callback); + } + + NAN_INLINE void NanGetHeapStatistics( + v8::HeapStatistics *heap_statistics) { + v8::Isolate::GetCurrent()->GetHeapStatistics(heap_statistics); + } + + NAN_DEPRECATED NAN_INLINE v8::Local NanSymbol( + const char* data, int length = -1) { + return NanNew(data, length); + } + + template + NAN_INLINE void NanAssignPersistent( + v8::Persistent& handle + , v8::Handle obj) { + handle.Reset(v8::Isolate::GetCurrent(), obj); + } + + template + NAN_INLINE void NanAssignPersistent( + v8::Persistent& handle + , const v8::Persistent& obj) { + handle.Reset(v8::Isolate::GetCurrent(), obj); + } + + template + class _NanWeakCallbackData; + + template + struct _NanWeakCallbackInfo { + typedef void (*Callback)(const _NanWeakCallbackData& data); + NAN_INLINE _NanWeakCallbackInfo(v8::Handle handle, P* param, Callback cb) + : parameter(param), callback(cb) { + NanAssignPersistent(persistent, handle); + } + + NAN_INLINE ~_NanWeakCallbackInfo() { + persistent.Reset(); + } + + P* const parameter; + Callback const callback; + v8::Persistent persistent; + }; + + template + class _NanWeakCallbackData { + public: + NAN_INLINE _NanWeakCallbackData(_NanWeakCallbackInfo *info) + : info_(info) { } + + NAN_INLINE v8::Local GetValue() const { + return NanNew(info_->persistent); + } + + NAN_INLINE P* GetParameter() const { return info_->parameter; } + + NAN_INLINE bool IsNearDeath() const { + return info_->persistent.IsNearDeath(); + } + + NAN_INLINE void Revive() const; + + NAN_INLINE _NanWeakCallbackInfo* GetCallbackInfo() const { + return info_; + } + + NAN_DEPRECATED NAN_INLINE void Dispose() const { + } + + private: + _NanWeakCallbackInfo* info_; + }; + + template + static void _NanWeakCallbackDispatcher( + const v8::WeakCallbackData > &data) { + _NanWeakCallbackInfo *info = data.GetParameter(); + _NanWeakCallbackData wcbd(info); + info->callback(wcbd); + if (wcbd.IsNearDeath()) { + delete wcbd.GetCallbackInfo(); + } + } + + template + NAN_INLINE void _NanWeakCallbackData::Revive() const { + info_->persistent.SetWeak(info_, &_NanWeakCallbackDispatcher); + } + +template +NAN_INLINE _NanWeakCallbackInfo* NanMakeWeakPersistent( + v8::Handle handle + , P* parameter + , typename _NanWeakCallbackInfo::Callback callback) { + _NanWeakCallbackInfo *cbinfo = + new _NanWeakCallbackInfo(handle, parameter, callback); + cbinfo->persistent.SetWeak(cbinfo, &_NanWeakCallbackDispatcher); + return cbinfo; +} + +# define NAN_WEAK_CALLBACK(name) \ + template \ + static void name(const _NanWeakCallbackData &data) + +# define _NAN_ERROR(fun, errmsg) fun(NanNew(errmsg)) + +# define _NAN_THROW_ERROR(fun, errmsg) \ + do { \ + NanScope(); \ + v8::Isolate::GetCurrent()->ThrowException(_NAN_ERROR(fun, errmsg)); \ + } while (0); + + NAN_INLINE v8::Local NanError(const char* errmsg) { + return _NAN_ERROR(v8::Exception::Error, errmsg); + } + + NAN_INLINE void NanThrowError(const char* errmsg) { + _NAN_THROW_ERROR(v8::Exception::Error, errmsg); + } + + NAN_INLINE void NanThrowError(v8::Handle error) { + NanScope(); + v8::Isolate::GetCurrent()->ThrowException(error); + } + + NAN_INLINE v8::Local NanError( + const char *msg + , const int errorNumber + ) { + v8::Local err = v8::Exception::Error(NanNew(msg)); + v8::Local obj = err.As(); + obj->Set(NanNew("code"), NanNew(errorNumber)); + return err; + } + + NAN_INLINE void NanThrowError( + const char *msg + , const int errorNumber + ) { + NanThrowError(NanError(msg, errorNumber)); + } + + NAN_INLINE v8::Local NanTypeError(const char* errmsg) { + return _NAN_ERROR(v8::Exception::TypeError, errmsg); + } + + NAN_INLINE void NanThrowTypeError(const char* errmsg) { + _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); + } + + NAN_INLINE v8::Local NanRangeError(const char* errmsg) { + return _NAN_ERROR(v8::Exception::RangeError, errmsg); + } + + NAN_INLINE void NanThrowRangeError(const char* errmsg) { + _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); + } + + template NAN_INLINE void NanDisposePersistent( + v8::Persistent &handle + ) { + handle.Reset(); + } + + NAN_INLINE v8::Local NanNewBufferHandle ( + char *data + , size_t length + , node::smalloc::FreeCallback callback + , void *hint + ) { + return node::Buffer::New( + v8::Isolate::GetCurrent(), data, length, callback, hint); + } + + NAN_INLINE v8::Local NanNewBufferHandle ( + const char *data + , uint32_t size + ) { + return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); + } + + NAN_INLINE v8::Local NanNewBufferHandle (uint32_t size) { + return node::Buffer::New(v8::Isolate::GetCurrent(), size); + } + + NAN_INLINE v8::Local NanBufferUse( + char* data + , uint32_t size + ) { + return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); + } + + NAN_INLINE bool NanHasInstance( + const v8::Persistent& function_template + , v8::Handle value + ) { + return NanNew(function_template)->HasInstance(value); + } + + NAN_DEPRECATED NAN_INLINE v8::Local NanNewContextHandle( + v8::ExtensionConfiguration* extensions = NULL + , v8::Handle tmpl = v8::Handle() + , v8::Handle obj = v8::Handle() + ) { + v8::Isolate* isolate = v8::Isolate::GetCurrent(); + return v8::Local::New( + isolate + , v8::Context::New(isolate, extensions, tmpl, obj) + ); + } + + NAN_INLINE v8::Local NanCompileScript( + v8::Local s + , const v8::ScriptOrigin& origin + ) { + v8::ScriptCompiler::Source source(s, origin); + return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source); + } + + NAN_INLINE v8::Local NanCompileScript( + v8::Local s + ) { + v8::ScriptCompiler::Source source(s); + return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source); + } + + NAN_INLINE v8::Local NanRunScript( + v8::Handle script + ) { + return script->BindToCurrentContext()->Run(); + } + + NAN_INLINE v8::Local NanRunScript( + v8::Handle script + ) { + return script->Run(); + } + + NAN_INLINE v8::Local NanMakeCallback( + v8::Handle target + , v8::Handle func + , int argc + , v8::Handle* argv) { + return NanNew(node::MakeCallback( + v8::Isolate::GetCurrent(), target, func, argc, argv)); + } + + NAN_INLINE v8::Local NanMakeCallback( + v8::Handle target + , v8::Handle symbol + , int argc + , v8::Handle* argv) { + return NanNew(node::MakeCallback( + v8::Isolate::GetCurrent(), target, symbol, argc, argv)); + } + + NAN_INLINE v8::Local NanMakeCallback( + v8::Handle target + , const char* method + , int argc + , v8::Handle* argv) { + return NanNew(node::MakeCallback( + v8::Isolate::GetCurrent(), target, method, argc, argv)); + } + + template + NAN_INLINE void NanSetIsolateData( + v8::Isolate *isolate + , T *data + ) { + isolate->SetData(0, data); + } + + template + NAN_INLINE T *NanGetIsolateData( + v8::Isolate *isolate + ) { + return static_cast(isolate->GetData(0)); + } + + class NanAsciiString { + public: + NAN_INLINE explicit NanAsciiString(v8::Handle from) { + v8::Local toStr = from->ToString(); + size = toStr->Length(); + buf = new char[size + 1]; + size = toStr->WriteOneByte(reinterpret_cast(buf)); + } + + NAN_DEPRECATED NAN_INLINE int Size() const { + return size; + } + + NAN_INLINE int length() const { + return size; + } + + + NAN_INLINE char* operator*() { return buf; } + NAN_INLINE const char* operator*() const { return buf; } + + NAN_INLINE ~NanAsciiString() { + delete[] buf; + } + + private: + // disallow copying and assigning + NanAsciiString(const NanAsciiString&); + void operator=(const NanAsciiString&); + + char *buf; + int size; + }; + + class NanUtf8String { + public: + NAN_INLINE explicit NanUtf8String(v8::Handle from) { + v8::Local toStr = from->ToString(); + size = toStr->Utf8Length(); + buf = new char[size + 1]; + toStr->WriteUtf8(buf); + } + + NAN_DEPRECATED NAN_INLINE int Size() const { + return size; + } + + NAN_INLINE int length() const { + return size; + } + + NAN_INLINE char* operator*() { return buf; } + NAN_INLINE const char* operator*() const { return buf; } + + NAN_INLINE ~NanUtf8String() { + delete[] buf; + } + + private: + // disallow copying and assigning + NanUtf8String(const NanUtf8String&); + void operator=(const NanUtf8String&); + + char *buf; + int size; + }; + + class NanUcs2String { + public: + NAN_INLINE explicit NanUcs2String(v8::Handle from) { + v8::Local toStr = from->ToString(); + size = toStr->Length(); + buf = new uint16_t[size + 1]; + toStr->Write(buf); + } + + NAN_DEPRECATED NAN_INLINE int Size() const { + return size; + } + + NAN_INLINE int length() const { + return size; + } + + NAN_INLINE uint16_t* operator*() { return buf; } + NAN_INLINE const uint16_t* operator*() const { return buf; } + + NAN_INLINE ~NanUcs2String() { + delete[] buf; + } + + private: + // disallow copying and assigning + NanUcs2String(const NanUcs2String&); + void operator=(const NanUcs2String&); + + uint16_t *buf; + int size; + }; + +#else +// Node 0.8 and 0.10 + +# define _NAN_METHOD_ARGS_TYPE const v8::Arguments& +# define _NAN_METHOD_ARGS _NAN_METHOD_ARGS_TYPE args +# define _NAN_METHOD_RETURN_TYPE v8::Handle + +# define _NAN_GETTER_ARGS_TYPE const v8::AccessorInfo & +# define _NAN_GETTER_ARGS _NAN_GETTER_ARGS_TYPE args +# define _NAN_GETTER_RETURN_TYPE v8::Handle + +# define _NAN_SETTER_ARGS_TYPE const v8::AccessorInfo & +# define _NAN_SETTER_ARGS _NAN_SETTER_ARGS_TYPE args +# define _NAN_SETTER_RETURN_TYPE void + +# define _NAN_PROPERTY_GETTER_ARGS_TYPE const v8::AccessorInfo& +# define _NAN_PROPERTY_GETTER_ARGS _NAN_PROPERTY_GETTER_ARGS_TYPE args +# define _NAN_PROPERTY_GETTER_RETURN_TYPE v8::Handle + +# define _NAN_PROPERTY_SETTER_ARGS_TYPE const v8::AccessorInfo& +# define _NAN_PROPERTY_SETTER_ARGS _NAN_PROPERTY_SETTER_ARGS_TYPE args +# define _NAN_PROPERTY_SETTER_RETURN_TYPE v8::Handle + +# define _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE const v8::AccessorInfo& +# define _NAN_PROPERTY_ENUMERATOR_ARGS _NAN_PROPERTY_ENUMERATOR_ARGS_TYPE args +# define _NAN_PROPERTY_ENUMERATOR_RETURN_TYPE v8::Handle + +# define _NAN_PROPERTY_DELETER_ARGS_TYPE const v8::AccessorInfo& +# define _NAN_PROPERTY_DELETER_ARGS _NAN_PROPERTY_DELETER_ARGS_TYPE args +# define _NAN_PROPERTY_DELETER_RETURN_TYPE v8::Handle + +# define _NAN_PROPERTY_QUERY_ARGS_TYPE const v8::AccessorInfo& +# define _NAN_PROPERTY_QUERY_ARGS _NAN_PROPERTY_QUERY_ARGS_TYPE args +# define _NAN_PROPERTY_QUERY_RETURN_TYPE v8::Handle + +# define _NAN_INDEX_GETTER_ARGS_TYPE const v8::AccessorInfo& +# define _NAN_INDEX_GETTER_ARGS _NAN_INDEX_GETTER_ARGS_TYPE args +# define _NAN_INDEX_GETTER_RETURN_TYPE v8::Handle + +# define _NAN_INDEX_SETTER_ARGS_TYPE const v8::AccessorInfo& +# define _NAN_INDEX_SETTER_ARGS _NAN_INDEX_SETTER_ARGS_TYPE args +# define _NAN_INDEX_SETTER_RETURN_TYPE v8::Handle + +# define _NAN_INDEX_ENUMERATOR_ARGS_TYPE const v8::AccessorInfo& +# define _NAN_INDEX_ENUMERATOR_ARGS _NAN_INDEX_ENUMERATOR_ARGS_TYPE args +# define _NAN_INDEX_ENUMERATOR_RETURN_TYPE v8::Handle + +# define _NAN_INDEX_DELETER_ARGS_TYPE const v8::AccessorInfo& +# define _NAN_INDEX_DELETER_ARGS _NAN_INDEX_DELETER_ARGS_TYPE args +# define _NAN_INDEX_DELETER_RETURN_TYPE v8::Handle + +# define _NAN_INDEX_QUERY_ARGS_TYPE const v8::AccessorInfo& +# define _NAN_INDEX_QUERY_ARGS _NAN_INDEX_QUERY_ARGS_TYPE args +# define _NAN_INDEX_QUERY_RETURN_TYPE v8::Handle + + NAN_DEPRECATED NAN_INLINE v8::Local NanSymbol( + const char* data, int length = -1) { + return v8::String::NewSymbol(data, length); + } + +# define NanScope() v8::HandleScope scope +# define NanEscapableScope() v8::HandleScope scope +# define NanEscapeScope(val) scope.Close(val) +# define NanLocker() v8::Locker locker +# define NanUnlocker() v8::Unlocker unlocker +# define NanReturnValue(value) return scope.Close(_NanEnsureLocal(value)) +# define NanReturnHolder() NanReturnValue(args.Holder()) +# define NanReturnThis() NanReturnValue(args.This()) +# define NanReturnUndefined() return v8::Undefined() +# define NanReturnNull() return v8::Null() +# define NanReturnEmptyString() return v8::String::Empty() + + NAN_INLINE v8::Local NanObjectWrapHandle(const node::ObjectWrap *obj) { + return v8::Local::New(obj->handle_); + } + + NAN_INLINE v8::Local NanUndefined() { + NanEscapableScope(); + return NanEscapeScope(NanNew(v8::Undefined())); + } + + NAN_INLINE v8::Local NanNull() { + NanEscapableScope(); + return NanEscapeScope(NanNew(v8::Null())); + } + + NAN_INLINE v8::Local NanTrue() { + NanEscapableScope(); + return NanEscapeScope(NanNew(v8::True())); + } + + NAN_INLINE v8::Local NanFalse() { + NanEscapableScope(); + return NanEscapeScope(NanNew(v8::False())); + } + + NAN_INLINE int NanAdjustExternalMemory(int bc) { + return static_cast(v8::V8::AdjustAmountOfExternalAllocatedMemory(bc)); + } + + NAN_INLINE void NanSetTemplate( + v8::Handle templ + , const char *name + , v8::Handle value) { + templ->Set(name, value); + } + + NAN_INLINE void NanSetTemplate( + v8::Handle templ + , v8::Handle name + , v8::Handle value + , v8::PropertyAttribute attributes) { + templ->Set(name, value, attributes); + } + + NAN_INLINE v8::Local NanGetCurrentContext() { + return v8::Context::GetCurrent(); + } + + NAN_INLINE void* NanGetInternalFieldPointer( + v8::Handle object + , int index) { + return object->GetPointerFromInternalField(index); + } + + NAN_INLINE void NanSetInternalFieldPointer( + v8::Handle object + , int index + , void* value) { + object->SetPointerInInternalField(index, value); + } + +# define NAN_GC_CALLBACK(name) \ + void name(v8::GCType type, v8::GCCallbackFlags flags) + + NAN_INLINE void NanAddGCEpilogueCallback( + v8::GCEpilogueCallback callback + , v8::GCType gc_type_filter = v8::kGCTypeAll) { + v8::V8::AddGCEpilogueCallback(callback, gc_type_filter); + } + NAN_INLINE void NanRemoveGCEpilogueCallback( + v8::GCEpilogueCallback callback) { + v8::V8::RemoveGCEpilogueCallback(callback); + } + NAN_INLINE void NanAddGCPrologueCallback( + v8::GCPrologueCallback callback + , v8::GCType gc_type_filter = v8::kGCTypeAll) { + v8::V8::AddGCPrologueCallback(callback, gc_type_filter); + } + NAN_INLINE void NanRemoveGCPrologueCallback( + v8::GCPrologueCallback callback) { + v8::V8::RemoveGCPrologueCallback(callback); + } + NAN_INLINE void NanGetHeapStatistics( + v8::HeapStatistics *heap_statistics) { + v8::V8::GetHeapStatistics(heap_statistics); + } + + template + NAN_INLINE void NanAssignPersistent( + v8::Persistent& handle + , v8::Handle obj) { + handle.Dispose(); + handle = v8::Persistent::New(obj); + } + + template + class _NanWeakCallbackData; + + template + struct _NanWeakCallbackInfo { + typedef void (*Callback)(const _NanWeakCallbackData &data); + NAN_INLINE _NanWeakCallbackInfo(v8::Handle handle, P* param, Callback cb) + : parameter(param) + , callback(cb) + , persistent(v8::Persistent::New(handle)) { } + + NAN_INLINE ~_NanWeakCallbackInfo() { + persistent.Dispose(); + persistent.Clear(); + } + + P* const parameter; + Callback const callback; + v8::Persistent persistent; + }; + + template + class _NanWeakCallbackData { + public: + NAN_INLINE _NanWeakCallbackData(_NanWeakCallbackInfo *info) + : info_(info) { } + + NAN_INLINE v8::Local GetValue() const { + return NanNew(info_->persistent); + } + + NAN_INLINE P* GetParameter() const { return info_->parameter; } + + NAN_INLINE bool IsNearDeath() const { + return info_->persistent.IsNearDeath(); + } + + NAN_INLINE void Revive() const; + + NAN_INLINE _NanWeakCallbackInfo* GetCallbackInfo() const { + return info_; + } + + NAN_DEPRECATED NAN_INLINE void Dispose() const { + } + + private: + _NanWeakCallbackInfo* info_; + }; + + template + static void _NanWeakPersistentDispatcher( + v8::Persistent object, void *data) { + _NanWeakCallbackInfo* info = + static_cast<_NanWeakCallbackInfo*>(data); + _NanWeakCallbackData wcbd(info); + info->callback(wcbd); + if (wcbd.IsNearDeath()) { + delete wcbd.GetCallbackInfo(); + } + } + + template + NAN_INLINE void _NanWeakCallbackData::Revive() const { + info_->persistent.MakeWeak( + info_ + , &_NanWeakPersistentDispatcher); + } + + template + NAN_INLINE _NanWeakCallbackInfo* NanMakeWeakPersistent( + v8::Handle handle + , P* parameter + , typename _NanWeakCallbackInfo::Callback callback) { + _NanWeakCallbackInfo *cbinfo = + new _NanWeakCallbackInfo(handle, parameter, callback); + cbinfo->persistent.MakeWeak( + cbinfo + , &_NanWeakPersistentDispatcher); + return cbinfo; + } + +# define NAN_WEAK_CALLBACK(name) \ + template \ + static void name(const _NanWeakCallbackData &data) + +# define _NAN_ERROR(fun, errmsg) \ + fun(v8::String::New(errmsg)) + +# define _NAN_THROW_ERROR(fun, errmsg) \ + do { \ + NanScope(); \ + return v8::Local::New( \ + v8::ThrowException(_NAN_ERROR(fun, errmsg))); \ + } while (0); + + NAN_INLINE v8::Local NanError(const char* errmsg) { + return _NAN_ERROR(v8::Exception::Error, errmsg); + } + + NAN_INLINE v8::Local NanThrowError(const char* errmsg) { + _NAN_THROW_ERROR(v8::Exception::Error, errmsg); + } + + NAN_INLINE v8::Local NanThrowError( + v8::Handle error + ) { + NanScope(); + return v8::Local::New(v8::ThrowException(error)); + } + + NAN_INLINE v8::Local NanError( + const char *msg + , const int errorNumber + ) { + v8::Local err = v8::Exception::Error(v8::String::New(msg)); + v8::Local obj = err.As(); + obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber)); + return err; + } + + NAN_INLINE v8::Local NanThrowError( + const char *msg + , const int errorNumber + ) { + return NanThrowError(NanError(msg, errorNumber)); + } + + NAN_INLINE v8::Local NanTypeError(const char* errmsg) { + return _NAN_ERROR(v8::Exception::TypeError, errmsg); + } + + NAN_INLINE v8::Local NanThrowTypeError( + const char* errmsg + ) { + _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); + } + + NAN_INLINE v8::Local NanRangeError( + const char* errmsg + ) { + return _NAN_ERROR(v8::Exception::RangeError, errmsg); + } + + NAN_INLINE v8::Local NanThrowRangeError( + const char* errmsg + ) { + _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); + } + + template + NAN_INLINE void NanDisposePersistent( + v8::Persistent &handle) { // NOLINT(runtime/references) + handle.Dispose(); + handle.Clear(); + } + + NAN_INLINE v8::Local NanNewBufferHandle ( + char *data + , size_t length + , node::Buffer::free_callback callback + , void *hint + ) { + return NanNew( + node::Buffer::New(data, length, callback, hint)->handle_); + } + + NAN_INLINE v8::Local NanNewBufferHandle ( + const char *data + , uint32_t size + ) { +#if NODE_MODULE_VERSION >= NODE_0_10_MODULE_VERSION + return NanNew(node::Buffer::New(data, size)->handle_); +#else + return NanNew( + node::Buffer::New(const_cast(data), size)->handle_); +#endif + } + + NAN_INLINE v8::Local NanNewBufferHandle (uint32_t size) { + return NanNew(node::Buffer::New(size)->handle_); + } + + NAN_INLINE void FreeData(char *data, void *hint) { + delete[] data; + } + + NAN_INLINE v8::Local NanBufferUse( + char* data + , uint32_t size + ) { + return NanNew( + node::Buffer::New(data, size, FreeData, NULL)->handle_); + } + + NAN_INLINE bool NanHasInstance( + const v8::Persistent& function_template + , v8::Handle value + ) { + return function_template->HasInstance(value); + } + + NAN_DEPRECATED NAN_INLINE v8::Local NanNewContextHandle( + v8::ExtensionConfiguration* extensions = NULL + , v8::Handle tmpl = v8::Handle() + , v8::Handle obj = v8::Handle() + ) { + v8::Persistent ctx = v8::Context::New(extensions, tmpl, obj); + v8::Local lctx = NanNew(ctx); + ctx.Dispose(); + return lctx; + } + + NAN_INLINE v8::Local NanCompileScript( + v8::Local s + , const v8::ScriptOrigin& origin + ) { + return v8::Script::Compile(s, const_cast(&origin)); + } + + NAN_INLINE v8::Local NanCompileScript( + v8::Local s + ) { + return v8::Script::Compile(s); + } + + NAN_INLINE v8::Local NanRunScript(v8::Handle script) { + return script->Run(); + } + + NAN_INLINE v8::Local NanMakeCallback( + v8::Handle target + , v8::Handle func + , int argc + , v8::Handle* argv) { +# if NODE_VERSION_AT_LEAST(0, 8, 0) + return NanNew(node::MakeCallback(target, func, argc, argv)); +# else + v8::TryCatch try_catch; + v8::Local result = func->Call(target, argc, argv); + if (try_catch.HasCaught()) { + node::FatalException(try_catch); + } + return result; +# endif + } + + NAN_INLINE v8::Local NanMakeCallback( + v8::Handle target + , v8::Handle symbol + , int argc + , v8::Handle* argv) { +# if NODE_VERSION_AT_LEAST(0, 8, 0) + return NanNew(node::MakeCallback(target, symbol, argc, argv)); +# else + v8::Local callback = target->Get(symbol).As(); + return NanMakeCallback(target, callback, argc, argv); +# endif + } + + NAN_INLINE v8::Local NanMakeCallback( + v8::Handle target + , const char* method + , int argc + , v8::Handle* argv) { +# if NODE_VERSION_AT_LEAST(0, 8, 0) + return NanNew(node::MakeCallback(target, method, argc, argv)); +# else + return NanMakeCallback(target, NanNew(method), argc, argv); +# endif + } + + template + NAN_INLINE void NanSetIsolateData( + v8::Isolate *isolate + , T *data + ) { + isolate->SetData(data); + } + + template + NAN_INLINE T *NanGetIsolateData( + v8::Isolate *isolate + ) { + return static_cast(isolate->GetData()); + } + + class NanAsciiString { + public: + NAN_INLINE explicit NanAsciiString(v8::Handle from) { + v8::Local toStr = from->ToString(); + size = toStr->Length(); + buf = new char[size + 1]; + size = toStr->WriteAscii(buf); + } + + NAN_DEPRECATED NAN_INLINE int Size() const { + return size; + } + + NAN_INLINE int length() const { + return size; + } + + + NAN_INLINE char* operator*() { return buf; } + NAN_INLINE const char* operator*() const { return buf; } + + NAN_INLINE ~NanAsciiString() { + delete[] buf; + } + + private: + // disallow copying and assigning + NanAsciiString(const NanAsciiString&); + void operator=(const NanAsciiString&); + + char *buf; + int size; + }; + + class NanUtf8String { + public: + NAN_INLINE explicit NanUtf8String(v8::Handle from) { + v8::Local toStr = from->ToString(); + size = toStr->Utf8Length(); + buf = new char[size + 1]; + toStr->WriteUtf8(buf); + } + + NAN_DEPRECATED NAN_INLINE int Size() const { + return size; + } + + NAN_INLINE int length() const { + return size; + } + + NAN_INLINE char* operator*() { return buf; } + NAN_INLINE const char* operator*() const { return buf; } + + NAN_INLINE ~NanUtf8String() { + delete[] buf; + } + + private: + // disallow copying and assigning + NanUtf8String(const NanUtf8String&); + void operator=(const NanUtf8String&); + + char *buf; + int size; + }; + + class NanUcs2String { + public: + NAN_INLINE explicit NanUcs2String(v8::Handle from) { + v8::Local toStr = from->ToString(); + size = toStr->Length(); + buf = new uint16_t[size + 1]; + toStr->Write(buf); + } + + NAN_DEPRECATED NAN_INLINE int Size() const { + return size; + } + + NAN_INLINE int length() const { + return size; + } + + NAN_INLINE uint16_t* operator*() { return buf; } + NAN_INLINE const uint16_t* operator*() const { return buf; } + + NAN_INLINE ~NanUcs2String() { + delete[] buf; + } + + private: + // disallow copying and assigning + NanUcs2String(const NanUcs2String&); + void operator=(const NanUcs2String&); + + uint16_t *buf; + int size; + }; + +#endif // NODE_MODULE_VERSION + +typedef void (*NanFreeCallback)(char *data, void *hint); + +#define NAN_METHOD(name) _NAN_METHOD_RETURN_TYPE name(_NAN_METHOD_ARGS) +#define NAN_GETTER(name) \ + _NAN_GETTER_RETURN_TYPE name( \ + v8::Local property \ + , _NAN_GETTER_ARGS) +#define NAN_SETTER(name) \ + _NAN_SETTER_RETURN_TYPE name( \ + v8::Local property \ + , v8::Local value \ + , _NAN_SETTER_ARGS) +#define NAN_PROPERTY_GETTER(name) \ + _NAN_PROPERTY_GETTER_RETURN_TYPE name( \ + v8::Local property \ + , _NAN_PROPERTY_GETTER_ARGS) +#define NAN_PROPERTY_SETTER(name) \ + _NAN_PROPERTY_SETTER_RETURN_TYPE name( \ + v8::Local property \ + , v8::Local value \ + , _NAN_PROPERTY_SETTER_ARGS) +#define NAN_PROPERTY_ENUMERATOR(name) \ + _NAN_PROPERTY_ENUMERATOR_RETURN_TYPE name(_NAN_PROPERTY_ENUMERATOR_ARGS) +#define NAN_PROPERTY_DELETER(name) \ + _NAN_PROPERTY_DELETER_RETURN_TYPE name( \ + v8::Local property \ + , _NAN_PROPERTY_DELETER_ARGS) +#define NAN_PROPERTY_QUERY(name) \ + _NAN_PROPERTY_QUERY_RETURN_TYPE name( \ + v8::Local property \ + , _NAN_PROPERTY_QUERY_ARGS) +# define NAN_INDEX_GETTER(name) \ + _NAN_INDEX_GETTER_RETURN_TYPE name(uint32_t index, _NAN_INDEX_GETTER_ARGS) +#define NAN_INDEX_SETTER(name) \ + _NAN_INDEX_SETTER_RETURN_TYPE name( \ + uint32_t index \ + , v8::Local value \ + , _NAN_INDEX_SETTER_ARGS) +#define NAN_INDEX_ENUMERATOR(name) \ + _NAN_INDEX_ENUMERATOR_RETURN_TYPE name(_NAN_INDEX_ENUMERATOR_ARGS) +#define NAN_INDEX_DELETER(name) \ + _NAN_INDEX_DELETER_RETURN_TYPE name( \ + uint32_t index \ + , _NAN_INDEX_DELETER_ARGS) +#define NAN_INDEX_QUERY(name) \ + _NAN_INDEX_QUERY_RETURN_TYPE name(uint32_t index, _NAN_INDEX_QUERY_ARGS) + +class NanCallback { + public: + NanCallback() { + NanScope(); + v8::Local obj = NanNew(); + NanAssignPersistent(handle, obj); + } + + explicit NanCallback(const v8::Handle &fn) { + NanScope(); + v8::Local obj = NanNew(); + NanAssignPersistent(handle, obj); + SetFunction(fn); + } + + ~NanCallback() { + if (handle.IsEmpty()) return; + NanDisposePersistent(handle); + } + + bool operator==(const NanCallback &other) const { + NanScope(); + v8::Local a = NanNew(handle)->Get(kCallbackIndex); + v8::Local b = NanNew(other.handle)->Get(kCallbackIndex); + return a->StrictEquals(b); + } + + bool operator!=(const NanCallback &other) const { + return !this->operator==(other); + } + + NAN_INLINE void SetFunction(const v8::Handle &fn) { + NanScope(); + NanNew(handle)->Set(kCallbackIndex, fn); + } + + NAN_INLINE v8::Local GetFunction() const { + NanEscapableScope(); + return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex) + .As()); + } + + NAN_INLINE bool IsEmpty() const { + NanScope(); + return NanNew(handle)->Get(kCallbackIndex)->IsUndefined(); + } + + NAN_INLINE v8::Handle + Call(v8::Handle target + , int argc + , v8::Handle argv[]) const { +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + v8::Isolate *isolate = v8::Isolate::GetCurrent(); + return Call_(isolate, target, argc, argv); +#else + return Call_(target, argc, argv); +#endif + } + + NAN_INLINE v8::Handle + Call(int argc, v8::Handle argv[]) const { +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + v8::Isolate *isolate = v8::Isolate::GetCurrent(); + return Call_(isolate, isolate->GetCurrentContext()->Global(), argc, argv); +#else + return Call_(v8::Context::GetCurrent()->Global(), argc, argv); +#endif + } + + private: + v8::Persistent handle; + static const uint32_t kCallbackIndex = 0; + +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + v8::Handle Call_(v8::Isolate *isolate + , v8::Handle target + , int argc + , v8::Handle argv[]) const { +#else + v8::Handle Call_(v8::Handle target + , int argc + , v8::Handle argv[]) const { +#endif + NanEscapableScope(); +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + v8::Local callback = NanNew(handle)-> + Get(kCallbackIndex).As(); + return NanEscapeScope(node::MakeCallback( + isolate + , target + , callback + , argc + , argv + )); +#else +#if NODE_VERSION_AT_LEAST(0, 8, 0) + v8::Local callback = handle-> + Get(kCallbackIndex).As(); + return NanEscapeScope(node::MakeCallback( + target + , callback + , argc + , argv + )); +#else + v8::Local callback = handle-> + Get(kCallbackIndex).As(); + return NanEscapeScope(NanMakeCallback( + target, callback, argc, argv)); +#endif +#endif + } +}; + +/* abstract */ class NanAsyncWorker { + public: + explicit NanAsyncWorker(NanCallback *callback_) + : callback(callback_), errmsg_(NULL) { + request.data = this; + + NanScope(); + v8::Local obj = NanNew(); + NanAssignPersistent(persistentHandle, obj); + } + + virtual ~NanAsyncWorker() { + NanScope(); + + if (!persistentHandle.IsEmpty()) + NanDisposePersistent(persistentHandle); + if (callback) + delete callback; + if (errmsg_) + delete[] errmsg_; + } + + virtual void WorkComplete() { + NanScope(); + + if (errmsg_ == NULL) + HandleOKCallback(); + else + HandleErrorCallback(); + delete callback; + callback = NULL; + } + + NAN_INLINE void SaveToPersistent( + const char *key, const v8::Local &obj) { + v8::Local handle = NanNew(persistentHandle); + handle->Set(NanNew(key), obj); + } + + v8::Local GetFromPersistent(const char *key) const { + NanEscapableScope(); + v8::Local handle = NanNew(persistentHandle); + return NanEscapeScope(handle->Get(NanNew(key)).As()); + } + + virtual void Execute() = 0; + + uv_work_t request; + + virtual void Destroy() { + delete this; + } + + protected: + v8::Persistent persistentHandle; + NanCallback *callback; + + virtual void HandleOKCallback() { + callback->Call(0, NULL); + } + + virtual void HandleErrorCallback() { + NanScope(); + + v8::Local argv[] = { + v8::Exception::Error(NanNew(ErrorMessage())) + }; + callback->Call(1, argv); + } + + void SetErrorMessage(const char *msg) { + if (errmsg_) { + delete[] errmsg_; + } + + size_t size = strlen(msg) + 1; + errmsg_ = new char[size]; + memcpy(errmsg_, msg, size); + } + + const char* ErrorMessage() const { + return errmsg_; + } + + private: + char *errmsg_; +}; + +/* abstract */ class NanAsyncProgressWorker : public NanAsyncWorker { + public: + explicit NanAsyncProgressWorker(NanCallback *callback_) + : NanAsyncWorker(callback_), asyncdata_(NULL), asyncsize_(0) { + async = new uv_async_t; + uv_async_init( + uv_default_loop() + , async + , AsyncProgress_ + ); + async->data = this; + + uv_mutex_init(&async_lock); + } + + virtual ~NanAsyncProgressWorker() { + uv_mutex_destroy(&async_lock); + + if (asyncdata_) { + delete[] asyncdata_; + } + } + + void WorkProgress() { + uv_mutex_lock(&async_lock); + char *data = asyncdata_; + size_t size = asyncsize_; + asyncdata_ = NULL; + uv_mutex_unlock(&async_lock); + + // Dont send progress events after we've already completed. + if (callback) { + HandleProgressCallback(data, size); + } + delete[] data; + } + + class ExecutionProgress { + friend class NanAsyncProgressWorker; + public: + // You could do fancy generics with templates here. + void Send(const char* data, size_t size) const { + that_->SendProgress_(data, size); + } + + private: + explicit ExecutionProgress(NanAsyncProgressWorker* that) : that_(that) {} + // Prohibit copying and assignment. + ExecutionProgress(const ExecutionProgress&); + void operator=(const ExecutionProgress&); + #if __cplusplus >= 201103L + // Prohibit C++11 move semantics. + ExecutionProgress(ExecutionProgress&&) = delete; + void operator=(ExecutionProgress&&) = delete; + #endif + NanAsyncProgressWorker* const that_; + }; + + virtual void Execute(const ExecutionProgress& progress) = 0; + virtual void HandleProgressCallback(const char *data, size_t size) = 0; + + virtual void Destroy() { + uv_close(reinterpret_cast(async), AsyncClose_); + } + + private: + void Execute() /*final override*/ { + ExecutionProgress progress(this); + Execute(progress); + } + + void SendProgress_(const char *data, size_t size) { + char *new_data = new char[size]; + memcpy(new_data, data, size); + + uv_mutex_lock(&async_lock); + char *old_data = asyncdata_; + asyncdata_ = new_data; + asyncsize_ = size; + uv_mutex_unlock(&async_lock); + + if (old_data) { + delete[] old_data; + } + uv_async_send(async); + } + + NAN_INLINE static NAUV_WORK_CB(AsyncProgress_) { + NanAsyncProgressWorker *worker = + static_cast(async->data); + worker->WorkProgress(); + } + + NAN_INLINE static void AsyncClose_(uv_handle_t* handle) { + NanAsyncProgressWorker *worker = + static_cast(handle->data); + delete reinterpret_cast(handle); + delete worker; + } + + uv_async_t *async; + uv_mutex_t async_lock; + char *asyncdata_; + size_t asyncsize_; +}; + +NAN_INLINE void NanAsyncExecute (uv_work_t* req) { + NanAsyncWorker *worker = static_cast(req->data); + worker->Execute(); +} + +NAN_INLINE void NanAsyncExecuteComplete (uv_work_t* req) { + NanAsyncWorker* worker = static_cast(req->data); + worker->WorkComplete(); + worker->Destroy(); +} + +NAN_INLINE void NanAsyncQueueWorker (NanAsyncWorker* worker) { + uv_queue_work( + uv_default_loop() + , &worker->request + , NanAsyncExecute + , (uv_after_work_cb)NanAsyncExecuteComplete + ); +} + +//// Base 64 //// + +#define _nan_base64_encoded_size(size) ((size + 2 - ((size + 2) % 3)) / 3 * 4) + +// Doesn't check for padding at the end. Can be 1-2 bytes over. +NAN_INLINE size_t _nan_base64_decoded_size_fast(size_t size) { + size_t remainder = size % 4; + + size = (size / 4) * 3; + if (remainder) { + if (size == 0 && remainder == 1) { + // special case: 1-byte input cannot be decoded + size = 0; + } else { + // non-padded input, add 1 or 2 extra bytes + size += 1 + (remainder == 3); + } + } + + return size; +} + +template +NAN_INLINE size_t _nan_base64_decoded_size( + const T* src + , size_t size +) { + if (size == 0) + return 0; + + if (src[size - 1] == '=') + size--; + if (size > 0 && src[size - 1] == '=') + size--; + + return _nan_base64_decoded_size_fast(size); +} + +// supports regular and URL-safe base64 +static const int _nan_unbase64_table[] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -2, -1, -1 + , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + , -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, 62, -1, 63 + , 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1 + , -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 + , 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63 + , -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 + , 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 + , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + , -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 +}; + +#define _nan_unbase64(x) _nan_unbase64_table[(uint8_t)(x)] + +template static size_t _nan_base64_decode( + char* buf + , size_t len + , const T* src + , const size_t srcLen +) { + char* dst = buf; + char* dstEnd = buf + len; + const T* srcEnd = src + srcLen; + + while (src < srcEnd && dst < dstEnd) { + ptrdiff_t remaining = srcEnd - src; + char a, b, c, d; + + while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; + if (remaining == 0 || *src == '=') break; + a = _nan_unbase64(*src++); + + while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; + if (remaining <= 1 || *src == '=') break; + b = _nan_unbase64(*src++); + + *dst++ = (a << 2) | ((b & 0x30) >> 4); + if (dst == dstEnd) break; + + while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; + if (remaining <= 2 || *src == '=') break; + c = _nan_unbase64(*src++); + + *dst++ = ((b & 0x0F) << 4) | ((c & 0x3C) >> 2); + if (dst == dstEnd) break; + + while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; + if (remaining <= 3 || *src == '=') break; + d = _nan_unbase64(*src++); + + *dst++ = ((c & 0x03) << 6) | (d & 0x3F); + } + + return dst - buf; +} + +//// HEX //// + +template unsigned _nan_hex2bin(T c) { + if (c >= '0' && c <= '9') return c - '0'; + if (c >= 'A' && c <= 'F') return 10 + (c - 'A'); + if (c >= 'a' && c <= 'f') return 10 + (c - 'a'); + return static_cast(-1); +} + +template static size_t _nan_hex_decode( + char* buf + , size_t len + , const T* src + , const size_t srcLen +) { + size_t i; + for (i = 0; i < len && i * 2 + 1 < srcLen; ++i) { + unsigned a = _nan_hex2bin(src[i * 2 + 0]); + unsigned b = _nan_hex2bin(src[i * 2 + 1]); + if (!~a || !~b) return i; + buf[i] = a * 16 + b; + } + + return i; +} + +namespace NanIntern { + +inline +NanExternalOneByteStringResource const* +GetExternalResource(v8::Local str) { +#if NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION + return str->GetExternalAsciiStringResource(); +#else + return str->GetExternalOneByteStringResource(); +#endif +} + +inline +bool +IsExternal(v8::Local str) { +#if NODE_MODULE_VERSION < ATOM_0_21_MODULE_VERSION + return str->IsExternalAscii(); +#else + return str->IsExternalOneByte(); +#endif +} + +} // end of namespace NanIntern + +static bool _NanGetExternalParts( + v8::Handle val + , const char** data + , size_t* len +) { + if (node::Buffer::HasInstance(val)) { + *data = node::Buffer::Data(val.As()); + *len = node::Buffer::Length(val.As()); + return true; + } + + assert(val->IsString()); + v8::Local str = NanNew(val.As()); + + if (NanIntern::IsExternal(str)) { + const NanExternalOneByteStringResource* ext; + ext = NanIntern::GetExternalResource(str); + *data = ext->data(); + *len = ext->length(); + return true; + } + + if (str->IsExternal()) { + const v8::String::ExternalStringResource* ext; + ext = str->GetExternalStringResource(); + *data = reinterpret_cast(ext->data()); + *len = ext->length(); + return true; + } + + return false; +} + +namespace Nan { + enum Encoding {ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER}; +} + +#if !NODE_VERSION_AT_LEAST(0, 10, 0) +# include "nan_string_bytes.h" // NOLINT(build/include) +#endif + +NAN_INLINE v8::Local NanEncode( + const void *buf, size_t len, enum Nan::Encoding encoding = Nan::BINARY) { +#if (NODE_MODULE_VERSION >= ATOM_0_21_MODULE_VERSION) + v8::Isolate* isolate = v8::Isolate::GetCurrent(); + node::encoding node_enc = static_cast(encoding); + + if (encoding == Nan::UCS2) { + return node::Encode( + isolate + , reinterpret_cast(buf) + , len / 2); + } else { + return node::Encode( + isolate + , reinterpret_cast(buf) + , len + , node_enc); + } +#elif (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + return node::Encode( + v8::Isolate::GetCurrent() + , buf, len + , static_cast(encoding)); +#else +# if NODE_VERSION_AT_LEAST(0, 10, 0) + return node::Encode(buf, len, static_cast(encoding)); +# else + return NanIntern::Encode(reinterpret_cast(buf), len, encoding); +# endif +#endif +} + +NAN_INLINE ssize_t NanDecodeBytes( + v8::Handle val, enum Nan::Encoding encoding = Nan::BINARY) { +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + return node::DecodeBytes( + v8::Isolate::GetCurrent() + , val + , static_cast(encoding)); +#else +# if (NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION) + if (encoding == Nan::BUFFER) { + return node::DecodeBytes(val, node::BINARY); + } +# endif + return node::DecodeBytes(val, static_cast(encoding)); +#endif +} + +NAN_INLINE ssize_t NanDecodeWrite( + char *buf + , size_t len + , v8::Handle val + , enum Nan::Encoding encoding = Nan::BINARY) { +#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION) + return node::DecodeWrite( + v8::Isolate::GetCurrent() + , buf + , len + , val + , static_cast(encoding)); +#else +# if (NODE_MODULE_VERSION < NODE_0_10_MODULE_VERSION) + if (encoding == Nan::BUFFER) { + return node::DecodeWrite(buf, len, val, node::BINARY); + } +# endif + return node::DecodeWrite( + buf + , len + , val + , static_cast(encoding)); +#endif +} + +/* NAN_DEPRECATED */ NAN_INLINE void* _NanRawString( + v8::Handle from + , enum Nan::Encoding encoding + , size_t *datalen + , void *buf + , size_t buflen + , int flags +) { + NanScope(); + + size_t sz_; + size_t term_len = !(flags & v8::String::NO_NULL_TERMINATION); + char *data = NULL; + size_t len; + bool is_extern = _NanGetExternalParts( + from + , const_cast(&data) + , &len); + + if (is_extern && !term_len) { + NanSetPointerSafe(datalen, len); + return data; + } + + v8::Local toStr = from->ToString(); + + char *to = static_cast(buf); + + switch (encoding) { + case Nan::ASCII: +#if NODE_MODULE_VERSION < NODE_0_12_MODULE_VERSION + sz_ = toStr->Length(); + if (to == NULL) { + to = new char[sz_ + term_len]; + } else { + assert(buflen >= sz_ + term_len && "too small buffer"); + } + NanSetPointerSafe( + datalen + , toStr->WriteAscii(to, 0, static_cast(sz_ + term_len), flags)); + return to; +#endif + case Nan::BINARY: + case Nan::BUFFER: + sz_ = toStr->Length(); + if (to == NULL) { + to = new char[sz_ + term_len]; + } else { + assert(buflen >= sz_ + term_len && "too small buffer"); + } +#if NODE_MODULE_VERSION < NODE_0_12_MODULE_VERSION + { + uint16_t* twobytebuf = new uint16_t[sz_ + term_len]; + + size_t somelen = toStr->Write(twobytebuf, 0, + static_cast(sz_ + term_len), flags); + + for (size_t i = 0; i < sz_ + term_len && i < somelen + term_len; i++) { + unsigned char *b = reinterpret_cast(&twobytebuf[i]); + to[i] = *b; + } + + NanSetPointerSafe(datalen, somelen); + + delete[] twobytebuf; + return to; + } +#else + NanSetPointerSafe( + datalen, + toStr->WriteOneByte( + reinterpret_cast(to) + , 0 + , static_cast(sz_ + term_len) + , flags)); + return to; +#endif + case Nan::UTF8: + sz_ = toStr->Utf8Length(); + if (to == NULL) { + to = new char[sz_ + term_len]; + } else { + assert(buflen >= sz_ + term_len && "too small buffer"); + } + NanSetPointerSafe( + datalen + , toStr->WriteUtf8(to, static_cast(sz_ + term_len) + , NULL, flags) + - term_len); + return to; + case Nan::BASE64: + { + v8::String::Value value(toStr); + sz_ = _nan_base64_decoded_size(*value, value.length()); + if (to == NULL) { + to = new char[sz_ + term_len]; + } else { + assert(buflen >= sz_ + term_len); + } + NanSetPointerSafe( + datalen + , _nan_base64_decode(to, sz_, *value, value.length())); + if (term_len) { + to[sz_] = '\0'; + } + return to; + } + case Nan::UCS2: + { + sz_ = toStr->Length(); + if (to == NULL) { + to = new char[(sz_ + term_len) * 2]; + } else { + assert(buflen >= (sz_ + term_len) * 2 && "too small buffer"); + } + + int bc = 2 * toStr->Write( + reinterpret_cast(to) + , 0 + , static_cast(sz_ + term_len) + , flags); + NanSetPointerSafe(datalen, bc); + return to; + } + case Nan::HEX: + { + v8::String::Value value(toStr); + sz_ = value.length(); + assert(!(sz_ & 1) && "bad hex data"); + if (to == NULL) { + to = new char[sz_ / 2 + term_len]; + } else { + assert(buflen >= sz_ / 2 + term_len && "too small buffer"); + } + NanSetPointerSafe( + datalen + , _nan_hex_decode(to, sz_ / 2, *value, value.length())); + } + if (term_len) { + to[sz_ / 2] = '\0'; + } + return to; + default: + assert(0 && "unknown encoding"); + } + return to; +} + +NAN_DEPRECATED NAN_INLINE void* NanRawString( + v8::Handle from + , enum Nan::Encoding encoding + , size_t *datalen + , void *buf + , size_t buflen + , int flags +) { + return _NanRawString(from, encoding, datalen, buf, buflen, flags); +} + + +NAN_DEPRECATED NAN_INLINE char* NanCString( + v8::Handle from + , size_t *datalen + , char *buf = NULL + , size_t buflen = 0 + , int flags = v8::String::NO_OPTIONS +) { + return static_cast( + _NanRawString(from, Nan::UTF8, datalen, buf, buflen, flags) + ); +} + +NAN_INLINE void NanSetPrototypeTemplate( + v8::Local templ + , const char *name + , v8::Handle value +) { + NanSetTemplate(templ->PrototypeTemplate(), name, value); +} + +NAN_INLINE void NanSetPrototypeTemplate( + v8::Local templ + , v8::Handle name + , v8::Handle value + , v8::PropertyAttribute attributes +) { + NanSetTemplate(templ->PrototypeTemplate(), name, value, attributes); +} + +NAN_INLINE void NanSetInstanceTemplate( + v8::Local templ + , const char *name + , v8::Handle value +) { + NanSetTemplate(templ->InstanceTemplate(), name, value); +} + +NAN_INLINE void NanSetInstanceTemplate( + v8::Local templ + , v8::Handle name + , v8::Handle value + , v8::PropertyAttribute attributes +) { + NanSetTemplate(templ->InstanceTemplate(), name, value, attributes); +} + +//=== Export ================================================================== + +inline +void +NanExport(v8::Handle target, const char * name, + NanFunctionCallback f) { + target->Set(NanNew(name), + NanNew(f)->GetFunction()); +} + +//=== Tap Reverse Binding ===================================================== + +struct NanTap { + explicit NanTap(v8::Handle t) : t_() { + NanAssignPersistent(t_, t->ToObject()); + } + + ~NanTap() { NanDisposePersistent(t_); } // not sure if neccessary + + inline void plan(int i) { + v8::Handle arg = NanNew(i); + NanMakeCallback(NanNew(t_), "plan", 1, &arg); + } + + inline void ok(bool isOk, const char * msg = NULL) { + v8::Handle args[2]; + args[0] = NanNew(isOk); + if (msg) args[1] = NanNew(msg); + NanMakeCallback(NanNew(t_), "ok", msg ? 2 : 1, args); + } + + private: + v8::Persistent t_; +}; + +#define NAN_STRINGIZE2(x) #x +#define NAN_STRINGIZE(x) NAN_STRINGIZE2(x) +#define NAN_TEST_EXPRESSION(expression) \ + ( expression ), __FILE__ ":" NAN_STRINGIZE(__LINE__) ": " #expression + +#define return_NanValue(v) NanReturnValue(v) +#define return_NanUndefined() NanReturnUndefined() +#define NAN_EXPORT(target, function) NanExport(target, #function, function) + +#endif // NAN_H_ diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_12_inl.h b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_12_inl.h new file mode 100644 index 0000000..fc0e0ac --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_12_inl.h @@ -0,0 +1,261 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2015 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_IMPLEMENTATION_12_INL_H_ +#define NAN_IMPLEMENTATION_12_INL_H_ +//============================================================================== +// node v0.11 implementation +//============================================================================== + +#if defined(_MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4530 ) +# include +# pragma warning( pop ) +#else +# include +#endif + +namespace NanIntern { + +//=== Array ==================================================================== + +Factory::return_t +Factory::New() { + return v8::Array::New(v8::Isolate::GetCurrent()); +} + +Factory::return_t +Factory::New(int length) { + return v8::Array::New(v8::Isolate::GetCurrent(), length); +} + +//=== Boolean ================================================================== + +Factory::return_t +Factory::New(bool value) { + return v8::Boolean::New(v8::Isolate::GetCurrent(), value); +} + +//=== Boolean Object =========================================================== + +Factory::return_t +Factory::New(bool value) { + return v8::BooleanObject::New(value).As(); +} + +//=== Context ================================================================== + +Factory::return_t +Factory::New( v8::ExtensionConfiguration* extensions + , v8::Handle tmpl + , v8::Handle obj) { + return v8::Context::New(v8::Isolate::GetCurrent(), extensions, tmpl, obj); +} + +//=== Date ===================================================================== + +Factory::return_t +Factory::New(double value) { + return v8::Date::New(v8::Isolate::GetCurrent(), value).As(); +} + +//=== External ================================================================= + +Factory::return_t +Factory::New(void * value) { + return v8::External::New(v8::Isolate::GetCurrent(), value); +} + +//=== Function ================================================================= + +Factory::return_t +Factory::New( NanFunctionCallback callback + , v8::Handle data) { + return v8::Function::New( v8::Isolate::GetCurrent() + , callback + , data); +} + +//=== Function Template ======================================================== + +Factory::return_t +Factory::New( NanFunctionCallback callback + , v8::Handle data + , v8::Handle signature) { + return v8::FunctionTemplate::New( v8::Isolate::GetCurrent() + , callback + , data + , signature); +} + +//=== Number =================================================================== + +Factory::return_t +Factory::New(double value) { + return v8::Number::New(v8::Isolate::GetCurrent(), value); +} + +//=== Number Object ============================================================ + +Factory::return_t +Factory::New(double value) { + return v8::NumberObject::New( v8::Isolate::GetCurrent() + , value).As(); +} + +//=== Integer, Int32 and Uint32 ================================================ + +template +typename IntegerFactory::return_t +IntegerFactory::New(int32_t value) { + return To(T::New(v8::Isolate::GetCurrent(), value)); +} + +template +typename IntegerFactory::return_t +IntegerFactory::New(uint32_t value) { + return To(T::NewFromUnsigned(v8::Isolate::GetCurrent(), value)); +} + +Factory::return_t +Factory::New(int32_t value) { + return To( + v8::Uint32::NewFromUnsigned(v8::Isolate::GetCurrent(), value)); +} + +Factory::return_t +Factory::New(uint32_t value) { + return To( + v8::Uint32::NewFromUnsigned(v8::Isolate::GetCurrent(), value)); +} + +//=== Object =================================================================== + +Factory::return_t +Factory::New() { + return v8::Object::New(v8::Isolate::GetCurrent()); +} + +//=== Object Template ========================================================== + +Factory::return_t +Factory::New() { + return v8::ObjectTemplate::New(v8::Isolate::GetCurrent()); +} + +//=== RegExp =================================================================== + +Factory::return_t +Factory::New( + v8::Handle pattern + , v8::RegExp::Flags flags) { + return v8::RegExp::New(pattern, flags); +} + +//=== Script =================================================================== + +Factory::return_t +Factory::New( v8::Local source) { + v8::ScriptCompiler::Source src(source); + return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src); +} + +Factory::return_t +Factory::New( v8::Local source + , v8::ScriptOrigin const& origin) { + v8::ScriptCompiler::Source src(source, origin); + return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src); +} + +//=== Signature ================================================================ + +Factory::return_t +Factory::New(Factory::FTH receiver) { + return v8::Signature::New(v8::Isolate::GetCurrent(), receiver); +} + +//=== String =================================================================== + +Factory::return_t +Factory::New() { + return v8::String::Empty(v8::Isolate::GetCurrent()); +} + +Factory::return_t +Factory::New(const char * value, int length) { + return v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), value, + v8::String::kNormalString, length); +} + +Factory::return_t +Factory::New(std::string const& value) { + assert(value.size() <= INT_MAX && "string too long"); + return v8::String::NewFromUtf8(v8::Isolate::GetCurrent(), + value.data(), v8::String::kNormalString, static_cast(value.size())); +} + +Factory::return_t +Factory::New(const uint8_t * value, int length) { + return v8::String::NewFromOneByte(v8::Isolate::GetCurrent(), value, + v8::String::kNormalString, length); +} + +Factory::return_t +Factory::New(const uint16_t * value, int length) { + return v8::String::NewFromTwoByte(v8::Isolate::GetCurrent(), value, + v8::String::kNormalString, length); +} + +Factory::return_t +Factory::New(v8::String::ExternalStringResource * value) { + return v8::String::NewExternal(v8::Isolate::GetCurrent(), value); +} + +Factory::return_t +Factory::New(NanExternalOneByteStringResource * value) { + return v8::String::NewExternal(v8::Isolate::GetCurrent(), value); +} + +//=== String Object ============================================================ + +Factory::return_t +Factory::New(v8::Handle value) { + return v8::StringObject::New(value).As(); +} + +//=== Unbound Script =========================================================== + +Factory::return_t +Factory::New(v8::Local source) { + v8::ScriptCompiler::Source src(source); + return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src); +} + +Factory::return_t +Factory::New( v8::Local source + , v8::ScriptOrigin const& origin) { + v8::ScriptCompiler::Source src(source, origin); + return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src); +} + +} // end of namespace NanIntern + +//=== Presistents and Handles ================================================== + +template +inline v8::Local NanNew(v8::Handle h) { + return v8::Local::New(v8::Isolate::GetCurrent(), h); +} + +template +inline v8::Local NanNew(v8::Persistent const& p) { + return v8::Local::New(v8::Isolate::GetCurrent(), p); +} + +#endif // NAN_IMPLEMENTATION_12_INL_H_ diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_pre_12_inl.h b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_pre_12_inl.h new file mode 100644 index 0000000..e995a14 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_implementation_pre_12_inl.h @@ -0,0 +1,267 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2015 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_IMPLEMENTATION_PRE_12_INL_H_ +#define NAN_IMPLEMENTATION_PRE_12_INL_H_ + +#include + +#if defined(_MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4530 ) +# include +# include +# pragma warning( pop ) +#else +# include +# include +#endif + +//============================================================================== +// node v0.10 implementation +//============================================================================== + +namespace NanIntern { + +//=== Array ==================================================================== + +Factory::return_t +Factory::New() { + return v8::Array::New(); +} + +Factory::return_t +Factory::New(int length) { + return v8::Array::New(length); +} + +//=== Boolean ================================================================== + +Factory::return_t +Factory::New(bool value) { + return v8::Boolean::New(value)->ToBoolean(); +} + +//=== Boolean Object =========================================================== + +Factory::return_t +Factory::New(bool value) { + return v8::BooleanObject::New(value).As(); +} + +//=== Context ================================================================== + +Factory::return_t +Factory::New( v8::ExtensionConfiguration* extensions + , v8::Handle tmpl + , v8::Handle obj) { + v8::Persistent ctx = v8::Context::New(extensions, tmpl, obj); + v8::Local lctx = v8::Local::New(ctx); + ctx.Dispose(); + return lctx; +} + +//=== Date ===================================================================== + +Factory::return_t +Factory::New(double value) { + return v8::Date::New(value).As(); +} + +//=== External ================================================================= + +Factory::return_t +Factory::New(void * value) { + return v8::External::New(value); +} + +//=== Function ================================================================= + +Factory::return_t +Factory::New( NanFunctionCallback callback + , v8::Handle data) { + return Factory::New( callback + , data + , v8::Handle() + )->GetFunction(); +} + + +//=== FunctionTemplate ========================================================= + +Factory::return_t +Factory::New( NanFunctionCallback callback + , v8::Handle data + , v8::Handle signature) { + // Note(agnat): Emulate length argument here. Unfortunately, I couldn't find + // a way. Have at it though... + return v8::FunctionTemplate::New( callback + , data + , signature); +} + +//=== Number =================================================================== + +Factory::return_t +Factory::New(double value) { + return v8::Number::New(value); +} + +//=== Number Object ============================================================ + +Factory::return_t +Factory::New(double value) { + return v8::NumberObject::New(value).As(); +} + +//=== Integer, Int32 and Uint32 ================================================ + +template +typename IntegerFactory::return_t +IntegerFactory::New(int32_t value) { + return To(T::New(value)); +} + +template +typename IntegerFactory::return_t +IntegerFactory::New(uint32_t value) { + return To(T::NewFromUnsigned(value)); +} + +Factory::return_t +Factory::New(int32_t value) { + return To(v8::Uint32::NewFromUnsigned(value)); +} + +Factory::return_t +Factory::New(uint32_t value) { + return To(v8::Uint32::NewFromUnsigned(value)); +} + + +//=== Object =================================================================== + +Factory::return_t +Factory::New() { + return v8::Object::New(); +} + +//=== Object Template ========================================================== + +Factory::return_t +Factory::New() { + return v8::ObjectTemplate::New(); +} + +//=== RegExp =================================================================== + +Factory::return_t +Factory::New( + v8::Handle pattern + , v8::RegExp::Flags flags) { + return v8::RegExp::New(pattern, flags); +} + +//=== Script =================================================================== + +Factory::return_t +Factory::New( v8::Local source) { + return v8::Script::New(source); +} +Factory::return_t +Factory::New( v8::Local source + , v8::ScriptOrigin const& origin) { + return v8::Script::New(source, const_cast(&origin)); +} + +//=== Signature ================================================================ + +Factory::return_t +Factory::New(Factory::FTH receiver) { + return v8::Signature::New(receiver); +} + +//=== String =================================================================== + +Factory::return_t +Factory::New() { + return v8::String::Empty(); +} + +Factory::return_t +Factory::New(const char * value, int length) { + return v8::String::New(value, length); +} + +Factory::return_t +Factory::New(std::string const& value) { + assert(value.size() <= INT_MAX && "string too long"); + return v8::String::New( value.data(), static_cast(value.size())); +} + +inline +void +widenString(std::vector *ws, const uint8_t *s, int l = -1) { + size_t len = static_cast(l); + if (l < 0) { + len = strlen(reinterpret_cast(s)); + } + assert(len <= INT_MAX && "string too long"); + ws->resize(len); + std::copy(s, s + len, ws->begin()); +} + +Factory::return_t +Factory::New(const uint16_t * value, int length) { + return v8::String::New(value, length); +} + +Factory::return_t +Factory::New(const uint8_t * value, int length) { + std::vector wideString; + widenString(&wideString, value, length); + if (wideString.size() == 0) { + return v8::String::Empty(); + } else { + return v8::String::New(&wideString.front() + , static_cast(wideString.size())); + } +} + +Factory::return_t +Factory::New(v8::String::ExternalStringResource * value) { + return v8::String::NewExternal(value); +} + +Factory::return_t +Factory::New(v8::String::ExternalAsciiStringResource * value) { + return v8::String::NewExternal(value); +} + +//=== String Object ============================================================ + +Factory::return_t +Factory::New(v8::Handle value) { + return v8::StringObject::New(value).As(); +} + +} // end of namespace NanIntern + +//=== Presistents and Handles ================================================== + +template +inline v8::Local NanNew(v8::Handle h) { + return v8::Local::New(h); +} + +template +inline v8::Local NanNew(v8::Persistent const& p) { + return v8::Local::New(p); +} + +#endif // NAN_IMPLEMENTATION_PRE_12_INL_H_ diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_new.h b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_new.h new file mode 100644 index 0000000..c189092 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_new.h @@ -0,0 +1,328 @@ +/********************************************************************* + * NAN - Native Abstractions for Node.js + * + * Copyright (c) 2015 NAN contributors + * + * MIT License + ********************************************************************/ + +#ifndef NAN_NEW_H_ +#define NAN_NEW_H_ + +#if defined(_MSC_VER) +# pragma warning( push ) +# pragma warning( disable : 4530 ) +# include +# pragma warning( pop ) +#else +# include +#endif + +namespace NanIntern { // scnr + +// TODO(agnat): Generalize +template v8::Local To(v8::Handle i); + +template <> +inline +v8::Local +To(v8::Handle i) { return i->ToInteger(); } + +template <> +inline +v8::Local +To(v8::Handle i) { return i->ToInt32(); } + +template <> +inline +v8::Local +To(v8::Handle i) { return i->ToUint32(); } + +template struct FactoryBase { typedef v8::Local return_t; }; + +template struct Factory; + +template <> +struct Factory : FactoryBase { + static inline return_t New(); + static inline return_t New(int length); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(bool value); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(bool value); +}; + +template <> +struct Factory : FactoryBase { + static inline + return_t + New( v8::ExtensionConfiguration* extensions = NULL + , v8::Handle tmpl = v8::Handle() + , v8::Handle obj = v8::Handle()); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(double value); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(void *value); +}; + +template <> +struct Factory : FactoryBase { + static inline + return_t + New( NanFunctionCallback callback + , v8::Handle data = v8::Handle()); +}; + +template <> +struct Factory : FactoryBase { + static inline + return_t + New( NanFunctionCallback callback = NULL + , v8::Handle data = v8::Handle() + , v8::Handle signature = v8::Handle()); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(double value); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(double value); +}; + +template +struct IntegerFactory : FactoryBase { + typedef typename FactoryBase::return_t return_t; + static inline return_t New(int32_t value); + static inline return_t New(uint32_t value); +}; + +template <> +struct Factory : IntegerFactory {}; + +template <> +struct Factory : IntegerFactory {}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(int32_t value); + static inline return_t New(uint32_t value); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New( + v8::Handle pattern, v8::RegExp::Flags flags); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New( v8::Local source); + static inline return_t New( v8::Local source + , v8::ScriptOrigin const& origin); +}; + +template <> +struct Factory : FactoryBase { + typedef v8::Handle FTH; + static inline return_t New(FTH receiver = FTH()); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(); + static inline return_t New(const char *value, int length = -1); + static inline return_t New(const uint16_t *value, int length = -1); + static inline return_t New(std::string const& value); + + static inline return_t New(v8::String::ExternalStringResource * value); + static inline return_t New(NanExternalOneByteStringResource * value); + + // TODO(agnat): Deprecate. + static inline return_t New(const uint8_t * value, int length = -1); +}; + +template <> +struct Factory : FactoryBase { + static inline return_t New(v8::Handle value); +}; + +} // end of namespace NanIntern + +#if (NODE_MODULE_VERSION >= 12) + +namespace NanIntern { + +template <> +struct Factory : FactoryBase { + static inline return_t New( v8::Local source); + static inline return_t New( v8::Local source + , v8::ScriptOrigin const& origin); +}; + +} // end of namespace NanIntern + +# include "nan_implementation_12_inl.h" + +#else // NODE_MODULE_VERSION >= 12 + +# include "nan_implementation_pre_12_inl.h" + +#endif + +//=== API ====================================================================== + +template +typename NanIntern::Factory::return_t +NanNew() { + return NanIntern::Factory::New(); +} + +template +typename NanIntern::Factory::return_t +NanNew(A0 arg0) { + return NanIntern::Factory::New(arg0); +} + +template +typename NanIntern::Factory::return_t +NanNew(A0 arg0, A1 arg1) { + return NanIntern::Factory::New(arg0, arg1); +} + +template +typename NanIntern::Factory::return_t +NanNew(A0 arg0, A1 arg1, A2 arg2) { + return NanIntern::Factory::New(arg0, arg1, arg2); +} + +template +typename NanIntern::Factory::return_t +NanNew(A0 arg0, A1 arg1, A2 arg2, A3 arg3) { + return NanIntern::Factory::New(arg0, arg1, arg2, arg3); +} + +// Note(agnat): When passing overloaded function pointers to template functions +// as generic arguments the compiler needs help in picking the right overload. +// These two functions handle NanNew and NanNew with +// all argument variations. + +// v8::Function and v8::FunctionTemplate with one or two arguments +template +typename NanIntern::Factory::return_t +NanNew( NanFunctionCallback callback + , v8::Handle data = v8::Handle()) { + return NanIntern::Factory::New(callback, data); +} + +// v8::Function and v8::FunctionTemplate with three arguments +template +typename NanIntern::Factory::return_t +NanNew( NanFunctionCallback callback + , v8::Handle data = v8::Handle() + , A2 a2 = A2()) { + return NanIntern::Factory::New(callback, data, a2); +} + +// Convenience + +template inline v8::Local NanNew(v8::Handle h); +template inline v8::Local NanNew(v8::Persistent const& p); + +inline +NanIntern::Factory::return_t +NanNew(bool value) { + return NanNew(value); +} + +inline +NanIntern::Factory::return_t +NanNew(int32_t value) { + return NanNew(value); +} + +inline +NanIntern::Factory::return_t +NanNew(uint32_t value) { + return NanNew(value); +} + +inline +NanIntern::Factory::return_t +NanNew(double value) { + return NanNew(value); +} + +inline +NanIntern::Factory::return_t +NanNew(std::string const& value) { + return NanNew(value); +} + +inline +NanIntern::Factory::return_t +NanNew(const char * value, int length) { + return NanNew(value, length); +} + +inline +NanIntern::Factory::return_t +NanNew(const char * value) { + return NanNew(value); +} + +inline +NanIntern::Factory::return_t +NanNew(const uint8_t * value) { + return NanNew(value); +} + +inline +NanIntern::Factory::return_t +NanNew(const uint16_t * value) { + return NanNew(value); +} + +inline +NanIntern::Factory::return_t +NanNew(v8::String::ExternalStringResource * value) { + return NanNew(value); +} + +inline +NanIntern::Factory::return_t +NanNew(NanExternalOneByteStringResource * value) { + return NanNew(value); +} + +inline +NanIntern::Factory::return_t +NanNew(v8::Handle pattern, v8::RegExp::Flags flags) { + return NanNew(pattern, flags); +} + +#endif // NAN_NEW_H_ diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_string_bytes.h b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_string_bytes.h new file mode 100644 index 0000000..9deecfb --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_string_bytes.h @@ -0,0 +1,312 @@ +// 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. + +#ifndef NAN_STRING_BYTES_H_ +#define NAN_STRING_BYTES_H_ + +// Decodes a v8::Handle or Buffer to a raw char* + +#include +#include +#include +#include // memcpy +#include + +namespace NanIntern { + +using v8::Local; +using v8::Handle; +using v8::Object; +using v8::String; +using v8::Value; + + +//// Base 64 //// + +#define base64_encoded_size(size) ((size + 2 - ((size + 2) % 3)) / 3 * 4) + + + +//// Nan::HEX //// + +static bool contains_non_ascii_slow(const char* buf, size_t len) { + for (size_t i = 0; i < len; ++i) { + if (buf[i] & 0x80) return true; + } + return false; +} + + +static bool contains_non_ascii(const char* src, size_t len) { + if (len < 16) { + return contains_non_ascii_slow(src, len); + } + + const unsigned bytes_per_word = sizeof(void*); + const unsigned align_mask = bytes_per_word - 1; + const unsigned unaligned = reinterpret_cast(src) & align_mask; + + if (unaligned > 0) { + const unsigned n = bytes_per_word - unaligned; + if (contains_non_ascii_slow(src, n)) return true; + src += n; + len -= n; + } + + +#if defined(__x86_64__) || defined(_WIN64) + const uintptr_t mask = 0x8080808080808080ll; +#else + const uintptr_t mask = 0x80808080l; +#endif + + const uintptr_t* srcw = reinterpret_cast(src); + + for (size_t i = 0, n = len / bytes_per_word; i < n; ++i) { + if (srcw[i] & mask) return true; + } + + const unsigned remainder = len & align_mask; + if (remainder > 0) { + const size_t offset = len - remainder; + if (contains_non_ascii_slow(src + offset, remainder)) return true; + } + + return false; +} + + +static void force_ascii_slow(const char* src, char* dst, size_t len) { + for (size_t i = 0; i < len; ++i) { + dst[i] = src[i] & 0x7f; + } +} + + +static void force_ascii(const char* src, char* dst, size_t len) { + if (len < 16) { + force_ascii_slow(src, dst, len); + return; + } + + const unsigned bytes_per_word = sizeof(void*); + const unsigned align_mask = bytes_per_word - 1; + const unsigned src_unalign = reinterpret_cast(src) & align_mask; + const unsigned dst_unalign = reinterpret_cast(dst) & align_mask; + + if (src_unalign > 0) { + if (src_unalign == dst_unalign) { + const unsigned unalign = bytes_per_word - src_unalign; + force_ascii_slow(src, dst, unalign); + src += unalign; + dst += unalign; + len -= src_unalign; + } else { + force_ascii_slow(src, dst, len); + return; + } + } + +#if defined(__x86_64__) || defined(_WIN64) + const uintptr_t mask = ~0x8080808080808080ll; +#else + const uintptr_t mask = ~0x80808080l; +#endif + + const uintptr_t* srcw = reinterpret_cast(src); + uintptr_t* dstw = reinterpret_cast(dst); + + for (size_t i = 0, n = len / bytes_per_word; i < n; ++i) { + dstw[i] = srcw[i] & mask; + } + + const unsigned remainder = len & align_mask; + if (remainder > 0) { + const size_t offset = len - remainder; + force_ascii_slow(src + offset, dst + offset, remainder); + } +} + + +static size_t base64_encode(const char* src, + size_t slen, + char* dst, + size_t dlen) { + // We know how much we'll write, just make sure that there's space. + assert(dlen >= base64_encoded_size(slen) && + "not enough space provided for base64 encode"); + + dlen = base64_encoded_size(slen); + + unsigned a; + unsigned b; + unsigned c; + unsigned i; + unsigned k; + unsigned n; + + static const char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/"; + + i = 0; + k = 0; + n = slen / 3 * 3; + + while (i < n) { + a = src[i + 0] & 0xff; + b = src[i + 1] & 0xff; + c = src[i + 2] & 0xff; + + dst[k + 0] = table[a >> 2]; + dst[k + 1] = table[((a & 3) << 4) | (b >> 4)]; + dst[k + 2] = table[((b & 0x0f) << 2) | (c >> 6)]; + dst[k + 3] = table[c & 0x3f]; + + i += 3; + k += 4; + } + + if (n != slen) { + switch (slen - n) { + case 1: + a = src[i + 0] & 0xff; + dst[k + 0] = table[a >> 2]; + dst[k + 1] = table[(a & 3) << 4]; + dst[k + 2] = '='; + dst[k + 3] = '='; + break; + + case 2: + a = src[i + 0] & 0xff; + b = src[i + 1] & 0xff; + dst[k + 0] = table[a >> 2]; + dst[k + 1] = table[((a & 3) << 4) | (b >> 4)]; + dst[k + 2] = table[(b & 0x0f) << 2]; + dst[k + 3] = '='; + break; + } + } + + return dlen; +} + + +static size_t hex_encode(const char* src, size_t slen, char* dst, size_t dlen) { + // We know how much we'll write, just make sure that there's space. + assert(dlen >= slen * 2 && + "not enough space provided for hex encode"); + + dlen = slen * 2; + for (uint32_t i = 0, k = 0; k < dlen; i += 1, k += 2) { + static const char hex[] = "0123456789abcdef"; + uint8_t val = static_cast(src[i]); + dst[k + 0] = hex[val >> 4]; + dst[k + 1] = hex[val & 15]; + } + + return dlen; +} + + + +static Local Encode(const char* buf, + size_t buflen, + enum Nan::Encoding encoding) { + assert(buflen <= node::Buffer::kMaxLength); + if (!buflen && encoding != Nan::BUFFER) + return NanNew(""); + + Local val; + switch (encoding) { + case Nan::BUFFER: + return NanNewBufferHandle(buf, buflen); + + case Nan::ASCII: + if (contains_non_ascii(buf, buflen)) { + char* out = new char[buflen]; + force_ascii(buf, out, buflen); + val = NanNew(out, buflen); + delete[] out; + } else { + val = NanNew(buf, buflen); + } + break; + + case Nan::UTF8: + val = NanNew(buf, buflen); + break; + + case Nan::BINARY: { + // TODO(isaacs) use ExternalTwoByteString? + const unsigned char *cbuf = reinterpret_cast(buf); + uint16_t * twobytebuf = new uint16_t[buflen]; + for (size_t i = 0; i < buflen; i++) { + // XXX is the following line platform independent? + twobytebuf[i] = cbuf[i]; + } + val = NanNew(twobytebuf, buflen); + delete[] twobytebuf; + break; + } + + case Nan::BASE64: { + size_t dlen = base64_encoded_size(buflen); + char* dst = new char[dlen]; + + size_t written = base64_encode(buf, buflen, dst, dlen); + assert(written == dlen); + + val = NanNew(dst, dlen); + delete[] dst; + break; + } + + case Nan::UCS2: { + const uint16_t* data = reinterpret_cast(buf); + val = NanNew(data, buflen / 2); + break; + } + + case Nan::HEX: { + size_t dlen = buflen * 2; + char* dst = new char[dlen]; + size_t written = hex_encode(buf, buflen, dst, dlen); + assert(written == dlen); + + val = NanNew(dst, dlen); + delete[] dst; + break; + } + + default: + assert(0 && "unknown encoding"); + break; + } + + return val; +} + +#undef base64_encoded_size + +} // namespace NanIntern + +#endif // NAN_STRING_BYTES_H_ diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/package.json new file mode 100644 index 0000000..483811a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/package.json @@ -0,0 +1,90 @@ +{ + "name": "nan", + "version": "1.8.4", + "description": "Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility", + "main": "include_dirs.js", + "repository": { + "type": "git", + "url": "git://github.com/iojs/nan.git" + }, + "scripts": { + "test": "tap --gc test/js/*-test.js", + "rebuild-tests": "pangyp rebuild --directory test" + }, + "contributors": [ + { + "name": "Rod Vagg", + "email": "r@va.gg", + "url": "https://github.com/rvagg" + }, + { + "name": "Benjamin Byholm", + "email": "bbyholm@abo.fi", + "url": "https://github.com/kkoopa/" + }, + { + "name": "Trevor Norris", + "email": "trev.norris@gmail.com", + "url": "https://github.com/trevnorris" + }, + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net", + "url": "https://github.com/TooTallNate" + }, + { + "name": "Brett Lawson", + "email": "brett19@gmail.com", + "url": "https://github.com/brett19" + }, + { + "name": "Ben Noordhuis", + "email": "info@bnoordhuis.nl", + "url": "https://github.com/bnoordhuis" + }, + { + "name": "David Siegel", + "email": "david@artcom.de", + "url": "https://github.com/agnat" + } + ], + "devDependencies": { + "bindings": "~1.2.1", + "node-gyp": "~1.0.2", + "pangyp": "~2.0.1", + "tap": "~0.7.1", + "xtend": "~4.0.0" + }, + "license": "MIT", + "gitHead": "ed3bbf4ced0cf7937b4e4164766797f71aa97f3d", + "bugs": { + "url": "https://github.com/iojs/nan/issues" + }, + "homepage": "https://github.com/iojs/nan#readme", + "_id": "nan@1.8.4", + "_shasum": "3c76b5382eab33e44b758d2813ca9d92e9342f34", + "_from": "nan@1.8.4", + "_npmVersion": "2.8.3", + "_nodeVersion": "0.12.2", + "_npmUser": { + "name": "kkoopa", + "email": "bbyholm@abo.fi" + }, + "maintainers": [ + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "kkoopa", + "email": "bbyholm@abo.fi" + } + ], + "dist": { + "shasum": "3c76b5382eab33e44b758d2813ca9d92e9342f34", + "tarball": "http://registry.npmjs.org/nan/-/nan-1.8.4.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/nan/-/nan-1.8.4.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/package.json new file mode 100644 index 0000000..311c161 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/package.json @@ -0,0 +1,64 @@ +{ + "name": "dtrace-provider", + "version": "0.5.0", + "description": "Native DTrace providers for node.js applications", + "keywords": [ + "dtrace" + ], + "homepage": "https://github.com/chrisa/node-dtrace-provider#readme", + "author": { + "name": "Chris Andrews", + "email": "chris@nodnol.org" + }, + "repository": { + "type": "git", + "url": "http://github.com/chrisa/node-dtrace-provider.git" + }, + "engines": { + "node": ">=0.6" + }, + "dependencies": { + "nan": "~1.8.4" + }, + "devDependencies": { + "tap": ">=0.2.0" + }, + "scripts": { + "install": "node scripts/install.js", + "test": "tap test/*test.js" + }, + "main": "./dtrace-provider.js", + "gitHead": "8622b7ad803bed19bfe3ffaf81f7e0132efa5dbc", + "bugs": { + "url": "https://github.com/chrisa/node-dtrace-provider/issues" + }, + "_id": "dtrace-provider@0.5.0", + "_shasum": "3fddbadd181aed83fc889a535c5703f54e559fea", + "_from": "dtrace-provider@0.5.0", + "_npmVersion": "1.4.21", + "_npmUser": { + "name": "dap", + "email": "dap@cs.brown.edu" + }, + "maintainers": [ + { + "name": "chrisa", + "email": "chris@nodnol.org" + }, + { + "name": "tjfontaine", + "email": "tjfontaine@gmail.com" + }, + { + "name": "dap", + "email": "dap@cs.brown.edu" + } + ], + "dist": { + "shasum": "3fddbadd181aed83fc889a535c5703f54e559fea", + "tarball": "http://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.5.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/dtrace-provider/-/dtrace-provider-0.5.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/scripts/install.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/scripts/install.js new file mode 100755 index 0000000..c11f5e5 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/scripts/install.js @@ -0,0 +1,68 @@ +#!/usr/bin/env node + +var movedFile = false; + +if (["linux", "win32"].indexOf(process.platform) !== -1) + return; + +var fs = require('fs'); +var path = require('path'); + +var src = path.join(__dirname, '..', 'compile.py'); +var dst = path.join(__dirname, '..', 'binding.gyp'); + +fs.renameSync(src, dst); + +movedFile = true; + +//npm_execpath: '/usr/local/lib/node_modules/npm/bin/npm-cli.js', +var nodegyp = path.join(process.env.npm_execpath, + '..', + 'node-gyp-bin', + 'node-gyp'); + +if (!fs.existsSync(nodegyp)) + nodegyp = path.join(process.execPath, + '..', + '..', + 'lib', + 'node_modules', + 'npm', + 'bin', + 'node-gyp-bin', + 'node-gyp'); + +if (!fs.existsSync(nodegyp)) { + console.error('cannot locate npm install'); + return; +} + +var spawn = require('child_process').spawn; + +var stdio = 'ignore'; + +if (process.env.V) + stdio = 'inherit'; + +var options = { + cwd: path.join(__dirname, '..'), + stdio: stdio +}; + +var child = spawn(nodegyp, ['rebuild'], options); + +child.on('close', function(code, signal) { + if ((code || signal) && process.env.V === undefined) { + console.error('---------------'); + console.error('Building dtrace-provider failed with exit code %d and signal %d', + code, signal); + console.error('re-run install with environment variable V set to see the build output'); + console.error('---------------'); + } + process.exit(0); +}); + +process.on('exit', function() { + if (movedFile) + fs.renameSync(dst, src); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe-char.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe-char.test.js new file mode 100644 index 0000000..5e3cac0 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe-char.test.js @@ -0,0 +1,49 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +if (process.platform == 'darwin') { + var dscript = 'testlibusdt*:::32probe{ printf("%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\\n", copyinstr((user_addr_t)args[0]), copyinstr((user_addr_t)args[1]), copyinstr((user_addr_t)args[2]), copyinstr((user_addr_t)args[3]), copyinstr((user_addr_t)args[4]), copyinstr((user_addr_t)args[5]), copyinstr((user_addr_t)args[6]), copyinstr((user_addr_t)args[7]), copyinstr((user_addr_t)args[8]), copyinstr((user_addr_t)args[9]), copyinstr((user_addr_t)args[10]), copyinstr((user_addr_t)args[11]), copyinstr((user_addr_t)args[12]), copyinstr((user_addr_t)args[13]), copyinstr((user_addr_t)args[14]), copyinstr((user_addr_t)args[15]), copyinstr((user_addr_t)args[16]), copyinstr((user_addr_t)args[17]), copyinstr((user_addr_t)args[18]), copyinstr((user_addr_t)args[19]), copyinstr((user_addr_t)args[20]), copyinstr((user_addr_t)args[21]), copyinstr((user_addr_t)args[22]), copyinstr((user_addr_t)args[23]), copyinstr((user_addr_t)args[24]), copyinstr((user_addr_t)args[25]), copyinstr((user_addr_t)args[26]), copyinstr((user_addr_t)args[27]), copyinstr((user_addr_t)args[28]), copyinstr((user_addr_t)args[29]), copyinstr((user_addr_t)args[30]), copyinstr((user_addr_t)args[31])); }'; +} +else { + var dscript = 'testlibusdt*:::32probe{ printf("%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\\n", copyinstr((uintptr_t)args[0]), copyinstr((uintptr_t)args[1]), copyinstr((uintptr_t)args[2]), copyinstr((uintptr_t)args[3]), copyinstr((uintptr_t)args[4]), copyinstr((uintptr_t)args[5]), copyinstr((uintptr_t)args[6]), copyinstr((uintptr_t)args[7]), copyinstr((uintptr_t)args[8]), copyinstr((uintptr_t)args[9]), copyinstr((uintptr_t)args[10]), copyinstr((uintptr_t)args[11]), copyinstr((uintptr_t)args[12]), copyinstr((uintptr_t)args[13]), copyinstr((uintptr_t)args[14]), copyinstr((uintptr_t)args[15]), copyinstr((uintptr_t)args[16]), copyinstr((uintptr_t)args[17]), copyinstr((uintptr_t)args[18]), copyinstr((uintptr_t)args[19]), copyinstr((uintptr_t)args[20]), copyinstr((uintptr_t)args[21]), copyinstr((uintptr_t)args[22]), copyinstr((uintptr_t)args[23]), copyinstr((uintptr_t)args[24]), copyinstr((uintptr_t)args[25]), copyinstr((uintptr_t)args[26]), copyinstr((uintptr_t)args[27]), copyinstr((uintptr_t)args[28]), copyinstr((uintptr_t)args[29]), copyinstr((uintptr_t)args[30]), copyinstr((uintptr_t)args[31])); }'; +} + +test( + '32-arg probe', + dtest( + function() { + var d = require('../dtrace-provider'); + // define this provider here, even though we won't fire it, so that we + // can start dtrace with an otherwise unstable set of probes - -Z + // won't work here. + var provider = d.createDTraceProvider("testlibusdt"); + var p = provider.addProbe( + "32probe", + "char *", "char *", "char *", "char *", "char *", "char *", "char *", "char *", + "char *", "char *", "char *", "char *", "char *", "char *", "char *", "char *", + "char *", "char *", "char *", "char *", "char *", "char *", "char *", "char *", + "char *", "char *", "char *", "char *", "char *", "char *", "char *", "char *"); + provider.enable(); + }, + ['dtrace', '-qn', + dscript, + '-c', format('node %s/32probe-char_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces.length, 1); + + var letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', + 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F']; + + var traced = traces[0].split(' '); + for (var i = 0; i < 32; i++) { + t.equal(traced[i], letters[i], + format('arg%d of a 32-arg probe firing should be %s', i, letters[i])); + } + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe-char_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe-char_fire.js new file mode 100644 index 0000000..cfb6e88 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe-char_fire.js @@ -0,0 +1,22 @@ +// see 32probe-char.test.js + +var d = require('../dtrace-provider'); + +var provider = d.createDTraceProvider("testlibusdt"); +var probe = provider.addProbe( + "32probe", + "char *", "char *", "char *", "char *", "char *", "char *", "char *", "char *", + "char *", "char *", "char *", "char *", "char *", "char *", "char *", "char *", + "char *", "char *", "char *", "char *", "char *", "char *", "char *", "char *", + "char *", "char *", "char *", "char *", "char *", "char *", "char *", "char *"); +provider.enable(); + +var letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', + 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F']; + +probe.fire(function(p) { + return letters; +}); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe.test.js new file mode 100644 index 0000000..594ea38 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe.test.js @@ -0,0 +1,40 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + '32-arg probe', + dtest( + function() { + var d = require('../dtrace-provider'); + // define this provider here, even though we won't fire it, so that we + // can start dtrace with an otherwise unstable set of probes - -Z + // won't work here. + var provider = d.createDTraceProvider("testlibusdt"); + var probe = provider.addProbe("32probe", + "int", "int", "int", "int", "int", "int", "int", "int", + "int", "int", "int", "int", "int", "int", "int", "int", + "int", "int", "int", "int", "int", "int", "int", "int", + "int", "int", "int", "int", "int", "int", "int", "int"); + provider.enable(); + }, + ['dtrace', '-qn', + 'testlibusdt*:::32probe{ printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d\\n", args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9], args[10], args[11], args[12], args[13], args[14], args[15], args[16], args[17], args[18], args[19], args[20], args[21], args[22], args[23], args[24], args[25], args[26], args[27], args[28], args[29], args[30], args[31]) }', + '-c', format('node %s/32probe_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces.length, 32, 'got 32 traces'); + + var args = []; + for (var i = 1; i <= 32; i++) { + args.push(i); + var traced = traces[i - 1].split(' '); + args.forEach(function(n) { + t.equal(traced[n - 1], [n].toString(), + format('arg%d of a %d-arg probe firing should be %d', n - 1, i, n)); + }); + } + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe_fire.js new file mode 100644 index 0000000..3975002 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/32probe_fire.js @@ -0,0 +1,21 @@ +// see 32probe.test.js + +var d = require('../dtrace-provider'); + +var provider = d.createDTraceProvider("testlibusdt"); +var probe = provider.addProbe( + "32probe", + "int", "int", "int", "int", "int", "int", "int", "int", + "int", "int", "int", "int", "int", "int", "int", "int", + "int", "int", "int", "int", "int", "int", "int", "int", + "int", "int", "int", "int", "int", "int", "int", "int"); + +provider.enable(); + +var args = []; +for (var n = 1; n <= 32; n++) { + args.push(n); + probe.fire(function(p) { + return args; + }); +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/add-probes.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/add-probes.test.js new file mode 100644 index 0000000..6296bf2 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/add-probes.test.js @@ -0,0 +1,27 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'adding probes to an existing provider', + dtest( + function() { }, + [ + 'dtrace', '-Zqn', + 'nodeapp*:::{ printf("%d\\n", arg0); }', + '-c', format('node %s/add-probes_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces.length, 46); + traces.sort(function(a, b) { return a - b }); + t.equal(traces[0], '0'); + var x = 1; + for (var i = 1; i < 10; i++) { + for (var j = 0; j < i; j++) { + t.equal(traces[x++], [i].toString()); + } + } + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/add-probes_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/add-probes_fire.js new file mode 100644 index 0000000..037130b --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/add-probes_fire.js @@ -0,0 +1,14 @@ +var d = require('../dtrace-provider'); +var dtp = d.createDTraceProvider("nodeapp"); +dtp.addProbe("probe0", "int"); +dtp.enable(); +dtp.fire("probe0", function(p) { return [0]; }); + +for (var i = 1; i < 10; i++) { + dtp.addProbe("probe" + i, "int"); + dtp.disable(); + dtp.enable(); + for (var j = 0; j < i; j++) { + dtp.fire("probe" + j, function(p) { return [i]; }); + } +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/basic.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/basic.test.js new file mode 100644 index 0000000..8c220a3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/basic.test.js @@ -0,0 +1,21 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'basic probes', + dtest( + function() { + }, + [ + 'dtrace', '-Zqn', + 'nodeapp$target:::p1{ printf("%d\\n", arg0); printf("%s\\n", copyinstr(arg1)) }', + '-c', format('node %s/basic_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces[0], '42'); + t.equal(traces[1], 'forty-two'); + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/basic_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/basic_fire.js new file mode 100644 index 0000000..e6628bf --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/basic_fire.js @@ -0,0 +1,8 @@ +var d = require('../dtrace-provider'); +var provider = d.createDTraceProvider("nodeapp"); +var probe = provider.addProbe("p1", "int", "char *"); +provider.enable(); + +probe.fire(function(p) { + return [42, 'forty-two']; +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/create-destroy.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/create-destroy.test.js new file mode 100644 index 0000000..e09823c --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/create-destroy.test.js @@ -0,0 +1,23 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'creating and destroying a provider', + dtest( + function() { }, + [ + 'dtrace', '-Zqn', + 'nodeapp*:::{ printf("%d\\n", arg0); }', + '-c', format('node %s/create-destroy_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces.length, 10); + traces.sort(function(a, b) { return a - b }); + for (var i = 0; i < 10; i++) { + t.equal(traces[i], [i].toString()); + } + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/create-destroy_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/create-destroy_fire.js new file mode 100644 index 0000000..c4e90d4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/create-destroy_fire.js @@ -0,0 +1,12 @@ +var d = require('../dtrace-provider'); + +for (var i = 0; i < 10; i++) { + //gc(); + var dtp = d.createDTraceProvider("nodeapp"); + dtp.addProbe("probe1", "int"); + dtp.enable(); + dtp.fire("probe1", function(p) { return [i]; }); + //dtp.disable(); +} + + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/disambiguation.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/disambiguation.test.js new file mode 100644 index 0000000..c1271aa --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/disambiguation.test.js @@ -0,0 +1,23 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'module name disambiguation', + dtest( + function() { }, + [ + 'dtrace', '-Zqn', + 'test*:::{printf("%s\\n%s\\n", probename, probemod)}', + '-c', format('node %s/disambiguation_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces.length, 8); + t.equal(traces[0], traces[2]); + t.notEqual(traces[1], traces[3]); + t.equal(traces[4], traces[6]); + t.notEqual(traces[5], traces[7]); + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/disambiguation_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/disambiguation_fire.js new file mode 100644 index 0000000..4c1e170 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/disambiguation_fire.js @@ -0,0 +1,37 @@ +var d = require('../dtrace-provider'); + +var dtp = d.createDTraceProvider('test'); +dtp.addProbe('probe1', 'int', 'int'); +dtp.addProbe('probe2', 'int', 'int'); +dtp.enable(); + +var dtp2 = d.createDTraceProvider('test'); +dtp2.addProbe('probe3', 'int', 'int'); +dtp2.addProbe('probe1', 'int', 'int'); +dtp2.enable(); + +var dtp3 = d.createDTraceProvider('test', 'mymod1'); +dtp3.addProbe('probe1', 'int', 'int'); +dtp3.addProbe('probe2', 'int', 'int'); +dtp3.enable(); + +var dtp4 = d.createDTraceProvider('test', 'mymod2'); +dtp4.addProbe('probe1', 'int', 'int'); +dtp4.addProbe('probe3', 'int', 'int'); +dtp4.enable(); + +dtp.fire('probe1', function () { + return ([12, 3]); +}); + +dtp2.fire('probe1', function () { + return ([12, 73]); +}); + +dtp3.fire('probe1', function () { + return ([12, 3]); +}); + +dtp4.fire('probe1', function () { + return ([12, 73]); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/dtrace-test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/dtrace-test.js new file mode 100644 index 0000000..9ad41b1 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/dtrace-test.js @@ -0,0 +1,30 @@ +var spawn = require('child_process').spawn; + +exports.dtraceTest = function(setup, dtargv, test) { + return function(t) { + setup(); + + var dtrace = spawn('/usr/sbin/dtrace', dtargv.slice(1)); + + var traces = []; + var exit_code; + dtrace.stdout.on('data', function (data) { + //console.error("DTRACE STDOUT:", data.toString()); + traces.push(data.toString()); + }); + dtrace.stderr.on('data', function (data) { + //console.error("DTRACE STDERR:", data.toString()); + }); + dtrace.on('exit', function (code) { + exit_code = code; + }); + dtrace.on('close', function () { + traces = traces.join('').split('\n') + .filter(function (t) { return t.trim().length }); + + test(t, exit_code, traces); + t.end(); + }); + }; +} + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabled-disabled.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabled-disabled.test.js new file mode 100644 index 0000000..4a9058b --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabled-disabled.test.js @@ -0,0 +1,23 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'enabling and disabling a provider', + dtest( + function() { }, + [ + 'dtrace', '-Zqn', + 'nodeapp*:::{ printf("%d\\n", arg0); }', + '-c', format('node %s/enabled-disabled_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces.length, 11); + traces.sort(function(a, b) { return a - b }); + for (var i = 0; i < 10; i++) { + t.equal(traces[i], [i].toString()); + } + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabled-disabled_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabled-disabled_fire.js new file mode 100644 index 0000000..fd59dc3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabled-disabled_fire.js @@ -0,0 +1,14 @@ +var d = require('../dtrace-provider'); +var dtp = d.createDTraceProvider("nodeapp"); +dtp.addProbe("probe1", "int"); +dtp.enable(); +dtp.fire("probe1", function(p) { return [0]; }); + +for (var i = 1; i <= 10; i++) { + dtp.enable(); + dtp.fire("probe1", function(p) { return [i]; }); + dtp.disable(); + //gc(); +} +dtp.fire("probe1", function(p) { return [42]; }); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabledagain.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabledagain.test.js new file mode 100644 index 0000000..f36acd7 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabledagain.test.js @@ -0,0 +1,35 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'provider enabled again', + dtest( + function() { }, + [ + 'dtrace', '-Zqn', + 'nodeapp$target:::{ printf("%d %d\\n", epid, arg0); }', + '-c', format('node %s/enabledagain_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces.length, 2, 'got 2 traces'); + + var i = 1; + var epid; + traces.forEach(function(trace) { + cols = trace.split(' '); + t.equal([i].toString(), cols[1], 'traced value correct'); + if (epid) { + t.equal(epid, cols[0], 'same epid'); + } + else { + epid = cols[0]; + } + i++; + }); + } + ) +); + + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabledagain_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabledagain_fire.js new file mode 100644 index 0000000..24b12e1 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/enabledagain_fire.js @@ -0,0 +1,7 @@ +var d = require('../dtrace-provider'); +var dtp = d.createDTraceProvider("nodeapp"); +dtp.addProbe("probe1", "int"); +dtp.enable(); +dtp.fire("probe1", function(p) { return [1]; }); +dtp.enable(); +dtp.fire("probe1", function(p) { return [2]; }); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args-json.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args-json.test.js new file mode 100644 index 0000000..6bc3270 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args-json.test.js @@ -0,0 +1,21 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'firing JSON probe with too few arguments', + dtest( + function() { + }, + [ + 'dtrace', '-Zqn', + 'nodeapp$target:::p1{ printf("%s\\n%s\\n", copyinstr(arg0), copyinstr(arg1)); }', + '-c', format('node %s/fewer-args-json_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces[0], '{"foo":1}'); + t.equal(traces[1], 'undefined'); + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args-json_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args-json_fire.js new file mode 100644 index 0000000..c908a4e --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args-json_fire.js @@ -0,0 +1,8 @@ +var d = require('../dtrace-provider'); +var provider = d.createDTraceProvider("nodeapp"); +var probe = provider.addProbe("p1", "json", "json"); +provider.enable(); + +probe.fire(function(p) { + return [{ "foo": 1 }]; +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args.test.js new file mode 100644 index 0000000..47e2f1d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args.test.js @@ -0,0 +1,22 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'firing probe with too few arguments', + dtest( + function() { + }, + [ + 'dtrace', '-Zqn', + 'nodeapp$target:::p1{ printf("%d\\n%d\\n%s\\n", arg0, arg1, copyinstr(arg2)); }', + '-c', format('node %s/fewer-args_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces[0], '42'); + t.equal(traces[1], '0'); + t.equal(traces[2], 'undefined'); + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args_fire.js new file mode 100644 index 0000000..b3b7dc9 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/fewer-args_fire.js @@ -0,0 +1,8 @@ +var d = require('../dtrace-provider'); +var provider = d.createDTraceProvider("nodeapp"); +var probe = provider.addProbe("p1", "int", "int", "char *"); +provider.enable(); + +probe.fire(function(p) { + return [42]; +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc.js new file mode 100644 index 0000000..cda0bd4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc.js @@ -0,0 +1,22 @@ +// expected output: +// +// $ sudo dtrace -Zn 'nodeapp*:::gcprobe{ trace(arg0); }' -c 'node --expose_gc test/gc.js' +// Dtrace: description 'nodeapp*:::gcprobe' matched 0 probes +// dtrace: pid 66257 has exited +// CPU ID FUNCTION:NAME +// 1 1778 gcprobe:gcprobe 4320227343 + +var d = require('../dtrace-provider'); +var dtp = d.createDTraceProvider("nodeapp"); + +// don't assign the returned probe object anywhere +dtp.addProbe("gcprobe", "int"); +dtp.enable(); + +// run GC +gc(); + +// probe object should still be around +dtp.fire("gcprobe", function() { + return []; +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc.test.js new file mode 100644 index 0000000..1b6097c --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc.test.js @@ -0,0 +1,20 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'check probe object is not GCd while provider exists', + dtest( + function() { + }, + [ + 'dtrace', '-Zqn', + 'nodeapp$target:::gcprobe{ printf("%d\\n", arg0); }', + '-c', format('node --expose_gc %s/gc_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces[0], '0'); + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc2.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc2.js new file mode 100644 index 0000000..aef5612 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc2.js @@ -0,0 +1,27 @@ +// node --expose_gc ... + +var d = require('../dtrace-provider'); +var dtp = d.createDTraceProvider("testlibusdt"); + +// don't assign the returned probe object anywhere +var p = dtp.addProbe("gcprobe"); +dtp.enable(); + +// run GC +gc(); + +// probe object should still be around +dtp.fire("gcprobe", function() { + return []; +}); + +dtp = "something else"; +gc(); + +p.fire(function() { + return []; +}); + +p = "something else"; + +gc(); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc3.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc3.js new file mode 100644 index 0000000..05a737a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc3.js @@ -0,0 +1,12 @@ +// node --expose_gc ... + +var d = require('../dtrace-provider'); + +for (var i = 0; i < 1000000; i++) { + console.log("i: " + i); + var dtp = d.createDTraceProvider("testlibusdt" + i); + var p = dtp.addProbe("gcprobe"); + dtp.enable(); + dtp.disable(); +} +gc(); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc_fire.js new file mode 100644 index 0000000..b48a0e4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/gc_fire.js @@ -0,0 +1,14 @@ +var d = require('../dtrace-provider'); +var dtp = d.createDTraceProvider("nodeapp"); + +// don't assign the returned probe object anywhere +dtp.addProbe("gcprobe", "int"); +dtp.enable(); + +// run GC +gc(); + +// probe object should still be around +dtp.fire("gcprobe", function() { + return []; +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/json-args.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/json-args.test.js new file mode 100644 index 0000000..3ccc244 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/json-args.test.js @@ -0,0 +1,27 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'probes with json type', + dtest( + function() { }, + [ + 'dtrace', '-Zqn', + 'nodeapp$target:::json1{ this->j = copyinstr(arg0); printf("%s\\n%d\\n%s\\n", this->j, strtoll(json(this->j, "foo")), json(this->j, "bar")) }', + '-c', format('node %s/json-args_fire.js', __dirname) + ], + function(t, exit_code, traces) { + // skip if dtrace failed; assume no json() sub + skip = exit_code == 0 ? 0 : 1; + + t.test("json tests, need json() subroutine", {"skip": skip}, function (t) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces[0], '{"foo":42,"bar":"forty-two"}'); + t.equal(traces[1], '42'); + t.equal(traces[2], 'forty-two'); + t.end(); + }); + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/json-args_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/json-args_fire.js new file mode 100644 index 0000000..58b7afd --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/json-args_fire.js @@ -0,0 +1,12 @@ +var d = require('../dtrace-provider'); +var provider = d.createDTraceProvider("nodeapp"); +var probe = provider.addProbe("json1", "json"); +provider.enable(); + +var obj = new Object; +obj.foo = 42; +obj.bar = 'forty-two'; + +probe.fire(function(p) { + return [obj]; +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/more-args.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/more-args.test.js new file mode 100644 index 0000000..923462a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/more-args.test.js @@ -0,0 +1,21 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'firing probe with too many arguments', + dtest( + function() { + }, + [ + 'dtrace', '-Zqn', + 'nodeapp$target:::p1{ printf("%d\\n%d\\n", arg0, arg1); }', + '-c', format('node %s/more-args_fire.js', __dirname) + ], + function(t, exit_code, traces) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces[0], '1'); + t.equal(traces[1], '2'); + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/more-args_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/more-args_fire.js new file mode 100644 index 0000000..a26da27 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/more-args_fire.js @@ -0,0 +1,8 @@ +var d = require('../dtrace-provider'); +var provider = d.createDTraceProvider("nodeapp"); +var probe = provider.addProbe("p1", "int", "int"); +provider.enable(); + +probe.fire(function(p) { + return [1, 2, 3, 4]; +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/multiple-json-args.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/multiple-json-args.test.js new file mode 100644 index 0000000..085ff58 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/multiple-json-args.test.js @@ -0,0 +1,25 @@ +var test = require('tap').test; +var format = require('util').format; +var dtest = require('./dtrace-test').dtraceTest; + +test( + 'probes with multiple json types', + dtest( + function() { }, + [ + 'dtrace', '-Zqn', + 'nodeapp$target:::json1{ printf("%s %s", json(copyinstr(arg0), "value"), json(copyinstr(arg1), "value")) }', + '-c', format('node %s/multiple-json-args_fire.js', __dirname) + ], + function(t, exit_code, traces) { + // skip if dtrace failed; assume no json() sub + skip = exit_code == 0 ? 0 : 1; + + t.test("json tests, need json() subroutine", {"skip": skip}, function (t) { + t.notOk(exit_code, 'dtrace exited cleanly'); + t.equal(traces[0], 'abc def'); + t.end(); + }); + } + ) +); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/multiple-json-args_fire.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/multiple-json-args_fire.js new file mode 100644 index 0000000..8623c45 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/multiple-json-args_fire.js @@ -0,0 +1,11 @@ +var d = require('../dtrace-provider'); +var provider = d.createDTraceProvider("nodeapp"); +var probe = provider.addProbe("json1", "json", "json"); +provider.enable(); + +var obj1 = { "value": "abc" }; +var obj2 = { "value": "def" }; + +probe.fire(function(p) { + return [obj1, obj2]; +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/notenabled.test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/notenabled.test.js new file mode 100644 index 0000000..4383f9e --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/test/notenabled.test.js @@ -0,0 +1,18 @@ +var test = require('tap').test; +var d = require('../dtrace-provider'); + +test( + 'firing probes when provider not enabled', + function(t) { + var dtp = d.createDTraceProvider("nodeapp"); + dtp.addProbe("probe1", "int"); + //dtp.enable(); + dtp.fire("probe1", function(p) { + t.notOk(); + return [1]; + }); + t.ok(1, 'no problem'); + t.end(); + } +); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/wscript b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/wscript new file mode 100644 index 0000000..42e6bda --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/dtrace-provider/wscript @@ -0,0 +1,30 @@ +import Options, Utils, sys +from os import unlink, symlink, popen +from os.path import exists, islink + +srcdir = '.' +blddir = 'build' +VERSION = '0.2.8' + +libusdtdir = 'libusdt' + +def set_options(ctx): + ctx.tool_options('compiler_cxx') + +def configure(ctx): + ctx.check_tool('compiler_cxx') + ctx.check_tool('node_addon') + +def build(ctx): + if sys.platform.startswith("sunos") or sys.platform.startswith("darwin") or sys.platform.startswith("freebsd"): + ctx.new_task_gen( + rule = "cd ../" + libusdtdir + " && ARCH=i386 make clean all && cd -", + shell = True + ) + + t = ctx.new_task_gen('cxx', 'shlib', 'node_addon') + t.target = 'DTraceProviderBindings' + t.source = ['dtrace_provider.cc', 'dtrace_probe.cc', 'dtrace_argument.cc'] + t.includes = [libusdtdir] + t.staticlib = 'usdt' + t.libpath = "../" + libusdtdir diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/.npmignore b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/.npmignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/.npmignore @@ -0,0 +1 @@ +/node_modules diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/.travis.yml b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/.travis.yml new file mode 100644 index 0000000..125e04a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.12" + - "0.10" diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/LICENSE new file mode 100644 index 0000000..e57596d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2014 Andrew Kelley + +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/README.md new file mode 100644 index 0000000..7708039 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/README.md @@ -0,0 +1,33 @@ +[![Build Status](https://secure.travis-ci.org/andrewrk/node-mv.png)](http://travis-ci.org/andrewrk/node-mv) + +Usage: +------ + +```js +var mv = require('mv'); + +mv('source/file', 'dest/file', function(err) { + // done. it tried fs.rename first, and then falls back to + // piping the source file to the dest file and then unlinking + // the source file. +}); +``` + +Another example: + +```js +mv('source/dir', 'dest/a/b/c/dir', {mkdirp: true}, function(err) { + // done. it first created all the necessary directories, and then + // tried fs.rename, then falls back to using ncp to copy the dir + // to dest and then rimraf to remove the source dir +}); +``` + +Another example: + +```js +mv('source/file', 'dest/file', {clobber: false}, function(err) { + // done. If 'dest/file' exists, an error is returned + // with err.code === 'EEXIST'. +}); +``` diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/index.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/index.js new file mode 100644 index 0000000..ec6c8ee --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/index.js @@ -0,0 +1,105 @@ +var fs = require('fs'); +var ncp = require('ncp').ncp; +var path = require('path'); +var rimraf = require('rimraf'); +var mkdirp = require('mkdirp'); + +module.exports = mv; + +function mv(source, dest, options, cb){ + if (typeof options === 'function') { + cb = options; + options = {}; + } + var shouldMkdirp = !!options.mkdirp; + var clobber = options.clobber !== false; + var limit = options.limit || 16; + + if (shouldMkdirp) { + mkdirs(); + } else { + doRename(); + } + + function mkdirs() { + mkdirp(path.dirname(dest), function(err) { + if (err) return cb(err); + doRename(); + }); + } + + function doRename() { + if (clobber) { + fs.rename(source, dest, function(err) { + if (!err) return cb(); + if (err.code !== 'EXDEV') return cb(err); + moveFileAcrossDevice(source, dest, clobber, limit, cb); + }); + } else { + fs.link(source, dest, function(err) { + if (err) { + if (err.code === 'EXDEV') { + moveFileAcrossDevice(source, dest, clobber, limit, cb); + return; + } + if (err.code === 'EISDIR' || err.code === 'EPERM') { + moveDirAcrossDevice(source, dest, clobber, limit, cb); + return; + } + cb(err); + return; + } + fs.unlink(source, cb); + }); + } + } +} + +function moveFileAcrossDevice(source, dest, clobber, limit, cb) { + var outFlags = clobber ? 'w' : 'wx'; + var ins = fs.createReadStream(source); + var outs = fs.createWriteStream(dest, {flags: outFlags}); + ins.on('error', function(err){ + ins.destroy(); + outs.destroy(); + outs.removeListener('close', onClose); + if (err.code === 'EISDIR' || err.code === 'EPERM') { + moveDirAcrossDevice(source, dest, clobber, limit, cb); + } else { + cb(err); + } + }); + outs.on('error', function(err){ + ins.destroy(); + outs.destroy(); + outs.removeListener('close', onClose); + cb(err); + }); + outs.once('close', onClose); + ins.pipe(outs); + function onClose(){ + fs.unlink(source, cb); + } +} + +function moveDirAcrossDevice(source, dest, clobber, limit, cb) { + var options = { + stopOnErr: true, + clobber: false, + limit: limit, + }; + if (clobber) { + rimraf(dest, { disableGlob: true }, function(err) { + if (err) return cb(err); + startNcp(); + }); + } else { + startNcp(); + } + function startNcp() { + ncp(source, dest, options, function(errList) { + if (errList) return cb(errList[0]); + rimraf(source, { disableGlob: true }, cb); + }); + } +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/mkdirp b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/mkdirp new file mode 120000 index 0000000..017896c --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/mkdirp @@ -0,0 +1 @@ +../mkdirp/bin/cmd.js \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/ncp b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/ncp new file mode 120000 index 0000000..1c02648 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/ncp @@ -0,0 +1 @@ +../ncp/bin/ncp \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/rimraf b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/rimraf new file mode 120000 index 0000000..4cd49a4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/.bin/rimraf @@ -0,0 +1 @@ +../rimraf/bin.js \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/.travis.yml b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/.travis.yml new file mode 100644 index 0000000..74c57bf --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.12" + - "iojs" +before_install: + - npm install -g npm@~1.4.6 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/LICENSE new file mode 100644 index 0000000..432d1ae --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/bin/cmd.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/bin/cmd.js new file mode 100755 index 0000000..d95de15 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/bin/cmd.js @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var mkdirp = require('../'); +var minimist = require('minimist'); +var fs = require('fs'); + +var argv = minimist(process.argv.slice(2), { + alias: { m: 'mode', h: 'help' }, + string: [ 'mode' ] +}); +if (argv.help) { + fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); + return; +} + +var paths = argv._.slice(); +var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; + +(function next () { + if (paths.length === 0) return; + var p = paths.shift(); + + if (mode === undefined) mkdirp(p, cb) + else mkdirp(p, mode, cb) + + function cb (err) { + if (err) { + console.error(err.message); + process.exit(1); + } + else next(); + } +})(); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/bin/usage.txt b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/bin/usage.txt new file mode 100644 index 0000000..f952aa2 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/bin/usage.txt @@ -0,0 +1,12 @@ +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/examples/pow.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/examples/pow.js new file mode 100644 index 0000000..e692421 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/examples/pow.js @@ -0,0 +1,6 @@ +var mkdirp = require('mkdirp'); + +mkdirp('/tmp/foo/bar/baz', function (err) { + if (err) console.error(err) + else console.log('pow!') +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/index.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/index.js new file mode 100644 index 0000000..6ce241b --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/index.js @@ -0,0 +1,98 @@ +var path = require('path'); +var fs = require('fs'); +var _0777 = parseInt('0777', 8); + +module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; + +function mkdirP (p, opts, f, made) { + if (typeof opts === 'function') { + f = opts; + opts = {}; + } + else if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + var cb = f || function () {}; + p = path.resolve(p); + + xfs.mkdir(p, mode, function (er) { + if (!er) { + made = made || p; + return cb(null, made); + } + switch (er.code) { + case 'ENOENT': + mkdirP(path.dirname(p), opts, function (er, made) { + if (er) cb(er, made); + else mkdirP(p, opts, cb, made); + }); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + xfs.stat(p, function (er2, stat) { + // if the stat fails, then that's super weird. + // let the original error be the failure reason. + if (er2 || !stat.isDirectory()) cb(er, made) + else cb(null, made); + }); + break; + } + }); +} + +mkdirP.sync = function sync (p, opts, made) { + if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { + mode = _0777 & (~process.umask()); + } + if (!made) made = null; + + p = path.resolve(p); + + try { + xfs.mkdirSync(p, mode); + made = made || p; + } + catch (err0) { + switch (err0.code) { + case 'ENOENT' : + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); + break; + + // In the case of any other error, just see if there's a dir + // there already. If so, then hooray! If not, then something + // is borked. + default: + var stat; + try { + stat = xfs.statSync(p); + } + catch (err1) { + throw err0; + } + if (!stat.isDirectory()) throw err0; + break; + } + } + + return made; +}; diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/.travis.yml b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/example/parse.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/example/parse.js new file mode 100644 index 0000000..abff3e8 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/example/parse.js @@ -0,0 +1,2 @@ +var argv = require('../')(process.argv.slice(2)); +console.dir(argv); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/index.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/index.js new file mode 100644 index 0000000..584f551 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/index.js @@ -0,0 +1,187 @@ +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {} }; + + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + }); + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function setArg (key, val) { + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + setArg(m[1], m[2]); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2)); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, args[i+1]); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + } + else { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + notFlags.forEach(function(key) { + argv._.push(key); + }); + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + +function longest (xs) { + return Math.max.apply(null, xs.map(function (x) { return x.length })); +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/package.json new file mode 100644 index 0000000..09e9ec4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/package.json @@ -0,0 +1,67 @@ +{ + "name": "minimist", + "version": "0.0.8", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "tape": "~1.0.4", + "tap": "~0.4.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "ff/5", + "firefox/latest", + "chrome/10", + "chrome/latest", + "safari/5.1", + "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/substack/minimist/issues" + }, + "_id": "minimist@0.0.8", + "dist": { + "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + }, + "_from": "minimist@0.0.8", + "_npmVersion": "1.4.3", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, + "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/readme.markdown b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/readme.markdown new file mode 100644 index 0000000..c256353 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/readme.markdown @@ -0,0 +1,73 @@ +# minimist + +parse argument options + +This module is the guts of optimist's argument parser without all the +fanciful decoration. + +[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) + +[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) + +# example + +``` js +var argv = require('minimist')(process.argv.slice(2)); +console.dir(argv); +``` + +``` +$ node example/parse.js -a beep -b boop +{ _: [], a: 'beep', b: 'boop' } +``` + +``` +$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz +{ _: [ 'foo', 'bar', 'baz' ], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' } +``` + +# methods + +``` js +var parseArgs = require('minimist') +``` + +## var argv = parseArgs(args, opts={}) + +Return an argument object `argv` populated with the array arguments from `args`. + +`argv._` contains all the arguments that didn't have an option associated with +them. + +Numeric-looking arguments will be returned as numbers unless `opts.string` or +`opts.boolean` is set for that argument name. + +Any arguments after `'--'` will not be parsed and will end up in `argv._`. + +options can be: + +* `opts.string` - a string or array of strings argument names to always treat as +strings +* `opts.boolean` - a string or array of strings to always treat as booleans +* `opts.alias` - an object mapping string names to strings or arrays of string +argument names to use as aliases +* `opts.default` - an object mapping string argument names to default values + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/dash.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/dash.js new file mode 100644 index 0000000..8b034b9 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/dash.js @@ -0,0 +1,24 @@ +var parse = require('../'); +var test = require('tape'); + +test('-', function (t) { + t.plan(5); + t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); + t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); + t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); + t.deepEqual( + parse([ '-b', '-' ], { boolean: 'b' }), + { b: true, _: [ '-' ] } + ); + t.deepEqual( + parse([ '-s', '-' ], { string: 's' }), + { s: '-', _: [] } + ); +}); + +test('-a -- b', function (t) { + t.plan(3); + t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/default_bool.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/default_bool.js new file mode 100644 index 0000000..f0041ee --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/default_bool.js @@ -0,0 +1,20 @@ +var test = require('tape'); +var parse = require('../'); + +test('boolean default true', function (t) { + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true } + }); + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false } + }); + t.equal(argv.somefalse, false); + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/dotted.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/dotted.js new file mode 100644 index 0000000..ef0ae34 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/dotted.js @@ -0,0 +1,16 @@ +var parse = require('../'); +var test = require('tape'); + +test('dotted alias', function (t) { + var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); +}); + +test('dotted default', function (t) { + var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/long.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/long.js new file mode 100644 index 0000000..5d3a1e0 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/long.js @@ -0,0 +1,31 @@ +var test = require('tape'); +var parse = require('../'); + +test('long opts', function (t) { + t.deepEqual( + parse([ '--bool' ]), + { bool : true, _ : [] }, + 'long boolean' + ); + t.deepEqual( + parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture sp' + ); + t.deepEqual( + parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture eq' + ); + t.deepEqual( + parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures sp' + ); + t.deepEqual( + parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures eq' + ); + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/parse.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/parse.js new file mode 100644 index 0000000..8a90646 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/parse.js @@ -0,0 +1,318 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse args', function (t) { + t.deepEqual( + parse([ '--no-moo' ]), + { moo : false, _ : [] }, + 'no' + ); + t.deepEqual( + parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [] }, + 'multi' + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ] + } + ); + t.end(); +}); + +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + +test('flag boolean', function (t) { + var argv = parse([ '-t', 'moo' ], { boolean: 't' }); + t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: [ 't', 'verbose' ], + default: { verbose: true } + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); + +test('newlines in params' , function (t) { + var args = parse([ '-s', "X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse([ "--s=X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + t.end(); +}); + +test('strings' , function (t) { + var s = parse([ '-s', '0001234' ], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse([ '-x', '56' ], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = parse([ ' ', ' ' ], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('empty strings', function(t) { + var s = parse([ '-s' ], { string: 's' }).s; + t.equal(s, ''); + t.equal(typeof s, 'string'); + + var str = parse([ '--str' ], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); + + var letters = parse([ '-art' ], { + string: [ 'a', 't' ] + }); + + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); + + t.end(); +}); + + +test('slashBreak', function (t) { + t.same( + parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [] } + ); + t.same( + parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [] } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: 'zoom' } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: [ 'zm', 'zoom' ] } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]); + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + } + }); + t.same(argv.beep, { boop : true }); + t.end(); +}); + +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js new file mode 100644 index 0000000..21851b0 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js @@ -0,0 +1,9 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse with modifier functions' , function (t) { + t.plan(1); + + var argv = parse([ '-b', '123' ], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: ['123'] }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/short.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/short.js new file mode 100644 index 0000000..d513a1c --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/short.js @@ -0,0 +1,67 @@ +var parse = require('../'); +var test = require('tape'); + +test('numeric short args', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); + t.deepEqual( + parse([ '-123', '456' ]), + { 1: true, 2: true, 3: 456, _: [] } + ); +}); + +test('short', function (t) { + t.deepEqual( + parse([ '-b' ]), + { b : true, _ : [] }, + 'short boolean' + ); + t.deepEqual( + parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ] }, + 'bare' + ); + t.deepEqual( + parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [] }, + 'group' + ); + t.deepEqual( + parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [] }, + 'short group next' + ); + t.deepEqual( + parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [] }, + 'short capture' + ); + t.deepEqual( + parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [] }, + 'short captures' + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.deepEqual( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/whitespace.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/whitespace.js new file mode 100644 index 0000000..8a52a58 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/node_modules/minimist/test/whitespace.js @@ -0,0 +1,8 @@ +var parse = require('../'); +var test = require('tape'); + +test('whitespace should be whitespace' , function (t) { + t.plan(1); + var x = parse([ '-x', '\t' ]).x; + t.equal(x, '\t'); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/package.json new file mode 100644 index 0000000..72b4d13 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/package.json @@ -0,0 +1,60 @@ +{ + "name": "mkdirp", + "description": "Recursively mkdir, like `mkdir -p`", + "version": "0.5.1", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "main": "index.js", + "keywords": [ + "mkdir", + "directory" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/substack/node-mkdirp.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "dependencies": { + "minimist": "0.0.8" + }, + "devDependencies": { + "tap": "1", + "mock-fs": "2 >=2.7.0" + }, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "license": "MIT", + "gitHead": "d4eff0f06093aed4f387e88e9fc301cb76beedc7", + "bugs": { + "url": "https://github.com/substack/node-mkdirp/issues" + }, + "homepage": "https://github.com/substack/node-mkdirp#readme", + "_id": "mkdirp@0.5.1", + "_shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "_from": "mkdirp@0.5.1", + "_npmVersion": "2.9.0", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "dist": { + "shasum": "30057438eac6cf7f8c4767f38648d6697d75c903", + "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/readme.markdown b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/readme.markdown new file mode 100644 index 0000000..3cc1315 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/readme.markdown @@ -0,0 +1,100 @@ +# mkdirp + +Like `mkdir -p`, but in node.js! + +[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) + +# example + +## pow.js + +```js +var mkdirp = require('mkdirp'); + +mkdirp('/tmp/foo/bar/baz', function (err) { + if (err) console.error(err) + else console.log('pow!') +}); +``` + +Output + +``` +pow! +``` + +And now /tmp/foo/bar/baz exists, huzzah! + +# methods + +```js +var mkdirp = require('mkdirp'); +``` + +## mkdirp(dir, opts, cb) + +Create a new directory and any necessary subdirectories at `dir` with octal +permission string `opts.mode`. If `opts` is a non-object, it will be treated as +the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +`cb(err, made)` fires with the error or the first directory `made` +that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and +`opts.fs.stat(path, cb)`. + +## mkdirp.sync(dir, opts) + +Synchronously create a new directory and any necessary subdirectories at `dir` +with octal permission string `opts.mode`. If `opts` is a non-object, it will be +treated as the `opts.mode`. + +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. + +Returns the first directory that had to be created, if any. + +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and +`opts.fs.statSync(path)`. + +# usage + +This package also ships with a `mkdirp` command. + +``` +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + +``` + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install mkdirp +``` + +to get the library, or + +``` +npm install -g mkdirp +``` + +to get the command. + +# license + +MIT diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/chmod.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/chmod.js new file mode 100644 index 0000000..6a404b9 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/chmod.js @@ -0,0 +1,41 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); +var _0744 = parseInt('0744', 8); + +var ps = [ '', 'tmp' ]; + +for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); +} + +var file = ps.join('/'); + +test('chmod-pre', function (t) { + var mode = _0744 + mkdirp(file, mode, function (er) { + t.ifError(er, 'should not error'); + fs.stat(file, function (er, stat) { + t.ifError(er, 'should exist'); + t.ok(stat && stat.isDirectory(), 'should be directory'); + t.equal(stat && stat.mode & _0777, mode, 'should be 0744'); + t.end(); + }); + }); +}); + +test('chmod', function (t) { + var mode = _0755 + mkdirp(file, mode, function (er) { + t.ifError(er, 'should not error'); + fs.stat(file, function (er, stat) { + t.ifError(er, 'should exist'); + t.ok(stat && stat.isDirectory(), 'should be directory'); + t.end(); + }); + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/clobber.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/clobber.js new file mode 100644 index 0000000..2433b9a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/clobber.js @@ -0,0 +1,38 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0755 = parseInt('0755', 8); + +var ps = [ '', 'tmp' ]; + +for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); +} + +var file = ps.join('/'); + +// a file in the way +var itw = ps.slice(0, 3).join('/'); + + +test('clobber-pre', function (t) { + console.error("about to write to "+itw) + fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); + + fs.stat(itw, function (er, stat) { + t.ifError(er) + t.ok(stat && stat.isFile(), 'should be file') + t.end() + }) +}) + +test('clobber', function (t) { + t.plan(2); + mkdirp(file, _0755, function (err) { + t.ok(err); + t.equal(err.code, 'ENOTDIR'); + t.end(); + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/mkdirp.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/mkdirp.js new file mode 100644 index 0000000..eaa8921 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/mkdirp.js @@ -0,0 +1,28 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('woo', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/opts_fs.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/opts_fs.js new file mode 100644 index 0000000..97186b6 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/opts_fs.js @@ -0,0 +1,29 @@ +var mkdirp = require('../'); +var path = require('path'); +var test = require('tap').test; +var mockfs = require('mock-fs'); +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('opts.fs', function (t) { + t.plan(5); + + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/beep/boop/' + [x,y,z].join('/'); + var xfs = mockfs.fs(); + + mkdirp(file, { fs: xfs, mode: _0755 }, function (err) { + t.ifError(err); + xfs.exists(file, function (ex) { + t.ok(ex, 'created file'); + xfs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/opts_fs_sync.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/opts_fs_sync.js new file mode 100644 index 0000000..6c370aa --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/opts_fs_sync.js @@ -0,0 +1,27 @@ +var mkdirp = require('../'); +var path = require('path'); +var test = require('tap').test; +var mockfs = require('mock-fs'); +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('opts.fs sync', function (t) { + t.plan(4); + + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/beep/boop/' + [x,y,z].join('/'); + var xfs = mockfs.fs(); + + mkdirp.sync(file, { fs: xfs, mode: _0755 }); + xfs.exists(file, function (ex) { + t.ok(ex, 'created file'); + xfs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/perm.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/perm.js new file mode 100644 index 0000000..fbce44b --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/perm.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('async perm', function (t) { + t.plan(5); + var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); + +test('async root perm', function (t) { + mkdirp('/tmp', _0755, function (err) { + if (err) t.fail(err); + t.end(); + }); + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/perm_sync.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/perm_sync.js new file mode 100644 index 0000000..398229f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/perm_sync.js @@ -0,0 +1,36 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('sync perm', function (t) { + t.plan(4); + var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; + + mkdirp.sync(file, _0755); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); + +test('sync root perm', function (t) { + t.plan(3); + + var file = '/tmp'; + mkdirp.sync(file, _0755); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/race.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/race.js new file mode 100644 index 0000000..b0b9e18 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/race.js @@ -0,0 +1,37 @@ +var mkdirp = require('../').mkdirp; +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('race', function (t) { + t.plan(10); + var ps = [ '', 'tmp' ]; + + for (var i = 0; i < 25; i++) { + var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + ps.push(dir); + } + var file = ps.join('/'); + + var res = 2; + mk(file); + + mk(file); + + function mk (file, cb) { + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }) + }); + } +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/rel.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/rel.js new file mode 100644 index 0000000..4ddb342 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/rel.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('rel', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var cwd = process.cwd(); + process.chdir('/tmp'); + + var file = [x,y,z].join('/'); + + mkdirp(file, _0755, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + process.chdir(cwd); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }) + }) + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/return.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/return.js new file mode 100644 index 0000000..bce68e5 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/return.js @@ -0,0 +1,25 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; + +test('return value', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + // should return the first dir created. + // By this point, it would be profoundly surprising if /tmp didn't + // already exist, since every other test makes things in there. + mkdirp(file, function (err, made) { + t.ifError(err); + t.equal(made, '/tmp/' + x); + mkdirp(file, function (err, made) { + t.ifError(err); + t.equal(made, null); + }); + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/return_sync.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/return_sync.js new file mode 100644 index 0000000..7c222d3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/return_sync.js @@ -0,0 +1,24 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; + +test('return value', function (t) { + t.plan(2); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + // should return the first dir created. + // By this point, it would be profoundly surprising if /tmp didn't + // already exist, since every other test makes things in there. + // Note that this will throw on failure, which will fail the test. + var made = mkdirp.sync(file); + t.equal(made, '/tmp/' + x); + + // making the same file again should have no effect. + made = mkdirp.sync(file); + t.equal(made, null); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/root.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/root.js new file mode 100644 index 0000000..9e7d079 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/root.js @@ -0,0 +1,19 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var test = require('tap').test; +var _0755 = parseInt('0755', 8); + +test('root', function (t) { + // '/' on unix, 'c:/' on windows. + var file = path.resolve('/'); + + mkdirp(file, _0755, function (err) { + if (err) throw err + fs.stat(file, function (er, stat) { + if (er) throw er + t.ok(stat.isDirectory(), 'target is a directory'); + t.end(); + }) + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/sync.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/sync.js new file mode 100644 index 0000000..8c8dc93 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/sync.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('sync', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + try { + mkdirp.sync(file, _0755); + } catch (err) { + t.fail(err); + return t.end(); + } + + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/umask.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/umask.js new file mode 100644 index 0000000..2033c63 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/umask.js @@ -0,0 +1,28 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('implicit mode from umask', function (t) { + t.plan(5); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + mkdirp(file, function (err) { + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, _0777 & (~process.umask())); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }) + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/umask_sync.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/umask_sync.js new file mode 100644 index 0000000..11a7614 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/mkdirp/test/umask_sync.js @@ -0,0 +1,32 @@ +var mkdirp = require('../'); +var path = require('path'); +var fs = require('fs'); +var exists = fs.exists || path.exists; +var test = require('tap').test; +var _0777 = parseInt('0777', 8); +var _0755 = parseInt('0755', 8); + +test('umask sync modes', function (t) { + t.plan(4); + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/tmp/' + [x,y,z].join('/'); + + try { + mkdirp.sync(file); + } catch (err) { + t.fail(err); + return t.end(); + } + + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & _0777, (_0777 & (~process.umask()))); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/.npmignore b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/.npmignore new file mode 100644 index 0000000..3e6a4d7 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/.npmignore @@ -0,0 +1,4 @@ +node_modules +.*.sw[op] +.DS_Store +test/*fixtures/out diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/.travis.yml b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/.travis.yml new file mode 100644 index 0000000..a6e2198 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/.travis.yml @@ -0,0 +1,6 @@ +language: node_js + +node_js: + - 0.8 + - "0.10" + - "0.11" diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/LICENSE.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/LICENSE.md new file mode 100644 index 0000000..e2b9b41 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/LICENSE.md @@ -0,0 +1,21 @@ +# MIT License + +###Copyright (C) 2011 by Charlie McConnell + +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/README.md new file mode 100644 index 0000000..9480032 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/README.md @@ -0,0 +1,63 @@ +# ncp - Asynchronous recursive file & directory copying + +[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp) + +Think `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically. + +## Command Line usage + +Usage is simple: `ncp [source] [dest] [--limit=concurrency limit] +[--filter=filter] --stopOnErr` + +The 'filter' is a Regular Expression - matched files will be copied. + +The 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time. + +'stoponerr' is a boolean flag that will tell `ncp` to stop immediately if any +errors arise, rather than attempting to continue while logging errors. The default behavior is to complete as many copies as possible, logging errors along the way. + +If there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue. + +## Programmatic usage + +Programmatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error. + +```javascript +var ncp = require('ncp').ncp; + +ncp.limit = 16; + +ncp(source, destination, function (err) { + if (err) { + return console.error(err); + } + console.log('done!'); +}); +``` + +You can also call ncp like `ncp(source, destination, options, callback)`. +`options` should be a dictionary. Currently, such options are available: + + * `options.filter` - a `RegExp` instance, against which each file name is + tested to determine whether to copy it or not, or a function taking single + parameter: copied file name, returning `true` or `false`, determining + whether to copy file or not. + + * `options.transform` - a function: `function (read, write) { read.pipe(write) }` + used to apply streaming transforms while copying. + + * `options.clobber` - boolean=true. if set to false, `ncp` will not overwrite + destination files that already exist. + + * `options.dereference` - boolean=false. If set to true, `ncp` will follow symbolic + links. For example, a symlink in the source tree pointing to a regular file + will become a regular file in the destination tree. Broken symlinks will result in + errors. + + * `options.stopOnErr` - boolean=false. If set to true, `ncp` will behave like `cp -r`, + and stop on the first error it encounters. By default, `ncp` continues copying, logging all + errors and returning an array. + + * `options.errs` - stream. If `options.stopOnErr` is `false`, a stream can be provided, and errors will be written to this stream. + +Please open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/bin/ncp b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/bin/ncp new file mode 100755 index 0000000..388eaba --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/bin/ncp @@ -0,0 +1,48 @@ +#!/usr/bin/env node + + + + +var ncp = require('../lib/ncp'), + args = process.argv.slice(2), + source, dest; + +if (args.length < 2) { + console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]'); + process.exit(1); +} + +// parse arguments the hard way +function startsWith(str, prefix) { + return str.substr(0, prefix.length) == prefix; +} + +var options = {}; +args.forEach(function (arg) { + if (startsWith(arg, "--limit=")) { + options.limit = parseInt(arg.split('=', 2)[1], 10); + } + if (startsWith(arg, "--filter=")) { + options.filter = new RegExp(arg.split('=', 2)[1]); + } + if (startsWith(arg, "--stoponerr")) { + options.stopOnErr = true; + } +}); + +ncp.ncp(args[0], args[1], options, function (err) { + if (Array.isArray(err)) { + console.error('There were errors during the copy.'); + err.forEach(function (err) { + console.error(err.stack || err.message); + }); + process.exit(1); + } + else if (err) { + console.error('An error has occurred.'); + console.error(err.stack || err.message); + process.exit(1); + } +}); + + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/lib/ncp.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/lib/ncp.js new file mode 100644 index 0000000..96eed47 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/lib/ncp.js @@ -0,0 +1,261 @@ +var fs = require('fs'), + path = require('path'); + +module.exports = ncp; +ncp.ncp = ncp; + +function ncp (source, dest, options, callback) { + var cback = callback; + + if (!callback) { + cback = options; + options = {}; + } + + var basePath = process.cwd(), + currentPath = path.resolve(basePath, source), + targetPath = path.resolve(basePath, dest), + filter = options.filter, + rename = options.rename, + transform = options.transform, + clobber = options.clobber !== false, + modified = options.modified, + dereference = options.dereference, + errs = null, + started = 0, + finished = 0, + running = 0, + limit = options.limit || ncp.limit || 16; + + limit = (limit < 1) ? 1 : (limit > 512) ? 512 : limit; + + startCopy(currentPath); + + function startCopy(source) { + started++; + if (filter) { + if (filter instanceof RegExp) { + if (!filter.test(source)) { + return cb(true); + } + } + else if (typeof filter === 'function') { + if (!filter(source)) { + return cb(true); + } + } + } + return getStats(source); + } + + function getStats(source) { + var stat = dereference ? fs.stat : fs.lstat; + if (running >= limit) { + return setImmediate(function () { + getStats(source); + }); + } + running++; + stat(source, function (err, stats) { + var item = {}; + if (err) { + return onError(err); + } + + // We need to get the mode from the stats object and preserve it. + item.name = source; + item.mode = stats.mode; + item.mtime = stats.mtime; //modified time + item.atime = stats.atime; //access time + + if (stats.isDirectory()) { + return onDir(item); + } + else if (stats.isFile()) { + return onFile(item); + } + else if (stats.isSymbolicLink()) { + // Symlinks don't really need to know about the mode. + return onLink(source); + } + }); + } + + function onFile(file) { + var target = file.name.replace(currentPath, targetPath); + if(rename) { + target = rename(target); + } + isWritable(target, function (writable) { + if (writable) { + return copyFile(file, target); + } + if(clobber) { + rmFile(target, function () { + copyFile(file, target); + }); + } + if (modified) { + var stat = dereference ? fs.stat : fs.lstat; + stat(target, function(err, stats) { + //if souce modified time greater to target modified time copy file + if (file.mtime.getTime()>stats.mtime.getTime()) + copyFile(file, target); + else return cb(); + }); + } + else { + return cb(); + } + }); + } + + function copyFile(file, target) { + var readStream = fs.createReadStream(file.name), + writeStream = fs.createWriteStream(target, { mode: file.mode }); + + readStream.on('error', onError); + writeStream.on('error', onError); + + if(transform) { + transform(readStream, writeStream, file); + } else { + writeStream.on('open', function() { + readStream.pipe(writeStream); + }); + } + writeStream.once('finish', function() { + if (modified) { + //target file modified date sync. + fs.utimesSync(target, file.atime, file.mtime); + cb(); + } + else cb(); + }); + } + + function rmFile(file, done) { + fs.unlink(file, function (err) { + if (err) { + return onError(err); + } + return done(); + }); + } + + function onDir(dir) { + var target = dir.name.replace(currentPath, targetPath); + isWritable(target, function (writable) { + if (writable) { + return mkDir(dir, target); + } + copyDir(dir.name); + }); + } + + function mkDir(dir, target) { + fs.mkdir(target, dir.mode, function (err) { + if (err) { + return onError(err); + } + copyDir(dir.name); + }); + } + + function copyDir(dir) { + fs.readdir(dir, function (err, items) { + if (err) { + return onError(err); + } + items.forEach(function (item) { + startCopy(path.join(dir, item)); + }); + return cb(); + }); + } + + function onLink(link) { + var target = link.replace(currentPath, targetPath); + fs.readlink(link, function (err, resolvedPath) { + if (err) { + return onError(err); + } + checkLink(resolvedPath, target); + }); + } + + function checkLink(resolvedPath, target) { + if (dereference) { + resolvedPath = path.resolve(basePath, resolvedPath); + } + isWritable(target, function (writable) { + if (writable) { + return makeLink(resolvedPath, target); + } + fs.readlink(target, function (err, targetDest) { + if (err) { + return onError(err); + } + if (dereference) { + targetDest = path.resolve(basePath, targetDest); + } + if (targetDest === resolvedPath) { + return cb(); + } + return rmFile(target, function () { + makeLink(resolvedPath, target); + }); + }); + }); + } + + function makeLink(linkPath, target) { + fs.symlink(linkPath, target, function (err) { + if (err) { + return onError(err); + } + return cb(); + }); + } + + function isWritable(path, done) { + fs.lstat(path, function (err) { + if (err) { + if (err.code === 'ENOENT') return done(true); + return done(false); + } + return done(false); + }); + } + + function onError(err) { + if (options.stopOnError) { + return cback(err); + } + else if (!errs && options.errs) { + errs = fs.createWriteStream(options.errs); + } + else if (!errs) { + errs = []; + } + if (typeof errs.write === 'undefined') { + errs.push(err); + } + else { + errs.write(err.stack + '\n\n'); + } + return cb(); + } + + function cb(skipped) { + if (!skipped) running--; + finished++; + if ((started === finished) && (running === 0)) { + if (cback !== undefined ) { + return errs ? cback(errs) : cback(null); + } + } + } +} + + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/package.json new file mode 100644 index 0000000..1cf78e8 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/package.json @@ -0,0 +1,64 @@ +{ + "name": "ncp", + "version": "2.0.0", + "author": { + "name": "AvianFlu", + "email": "charlie@charlieistheman.com" + }, + "description": "Asynchronous recursive file copy utility.", + "bin": { + "ncp": "./bin/ncp" + }, + "devDependencies": { + "mocha": "1.15.x", + "rimraf": "1.0.x", + "read-dir-files": "0.0.x" + }, + "main": "./lib/ncp.js", + "repository": { + "type": "git", + "url": "https://github.com/AvianFlu/ncp.git" + }, + "keywords": [ + "cli", + "copy" + ], + "license": "MIT", + "engine": { + "node": ">=0.10" + }, + "scripts": { + "test": "mocha -R spec" + }, + "gitHead": "93c7c6c719e2a4944dc09a16178b09aef428cdf0", + "bugs": { + "url": "https://github.com/AvianFlu/ncp/issues" + }, + "homepage": "https://github.com/AvianFlu/ncp", + "_id": "ncp@2.0.0", + "_shasum": "195a21d6c46e361d2fb1281ba38b91e9df7bdbb3", + "_from": "ncp@2.0.0", + "_npmVersion": "2.6.0", + "_nodeVersion": "0.13.0-pre", + "_npmUser": { + "name": "mmalecki", + "email": "me@mmalecki.com" + }, + "maintainers": [ + { + "name": "avianflu", + "email": "charlie@charlieistheman.com" + }, + { + "name": "mmalecki", + "email": "me@mmalecki.com" + } + ], + "dist": { + "shasum": "195a21d6c46e361d2fb1281ba38b91e9df7bdbb3", + "tarball": "http://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/modified-files/out/a b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/modified-files/out/a new file mode 100644 index 0000000..29f446a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/modified-files/out/a @@ -0,0 +1 @@ +test3 \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/modified-files/src/a b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/modified-files/src/a new file mode 100644 index 0000000..29f446a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/modified-files/src/a @@ -0,0 +1 @@ +test3 \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/ncp.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/ncp.js new file mode 100644 index 0000000..bc6df22 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/ncp.js @@ -0,0 +1,197 @@ + + +var assert = require('assert'), + fs = require('fs'), + path = require('path'), + rimraf = require('rimraf'), + readDirFiles = require('read-dir-files'), + util = require('util'), + ncp = require('../').ncp; + + + +describe('ncp', function () { + describe('regular files and directories', function () { + var fixtures = path.join(__dirname, 'regular-fixtures'), + src = path.join(fixtures, 'src'), + out = path.join(fixtures, 'out'); + + before(function (cb) { + rimraf(out, function() { + ncp(src, out, cb); + }); + }); + + describe('when copying a directory of files', function () { + it('files are copied correctly', function (cb) { + readDirFiles(src, 'utf8', function (srcErr, srcFiles) { + readDirFiles(out, 'utf8', function (outErr, outFiles) { + assert.ifError(srcErr); + assert.deepEqual(srcFiles, outFiles); + cb(); + }); + }); + }); + }); + + describe('when copying files using filter', function () { + before(function (cb) { + var filter = function(name) { + return name.substr(name.length - 1) != 'a'; + }; + rimraf(out, function () { + ncp(src, out, {filter: filter}, cb); + }); + }); + + it('files are copied correctly', function (cb) { + readDirFiles(src, 'utf8', function (srcErr, srcFiles) { + function filter(files) { + for (var fileName in files) { + var curFile = files[fileName]; + if (curFile instanceof Object) + return filter(curFile); + if (fileName.substr(fileName.length - 1) == 'a') + delete files[fileName]; + } + } + filter(srcFiles); + readDirFiles(out, 'utf8', function (outErr, outFiles) { + assert.ifError(outErr); + assert.deepEqual(srcFiles, outFiles); + cb(); + }); + }); + }); + }); + + describe('when using clobber=false', function () { + it('the copy is completed successfully', function (cb) { + ncp(src, out, function() { + ncp(src, out, {clobber: false}, function(err) { + assert.ifError(err); + cb(); + }); + }); + }); + }); + + describe('when using transform', function () { + it('file descriptors are passed correctly', function (cb) { + ncp(src, out, { + transform: function(read,write,file) { + assert.notEqual(file.name, undefined); + assert.strictEqual(typeof file.mode,'number'); + read.pipe(write); + } + }, cb); + }); + }); + + describe('when using rename', function() { + it('output files are correctly redirected', function(cb) { + ncp(src, out, { + rename: function(target) { + if(path.basename(target) == 'a') return path.resolve(path.dirname(target), 'z'); + return target; + } + }, function(err) { + if(err) return cb(err); + + readDirFiles(src, 'utf8', function (srcErr, srcFiles) { + readDirFiles(out, 'utf8', function (outErr, outFiles) { + assert.ifError(srcErr); + assert.deepEqual(srcFiles.a, outFiles.z); + cb(); + }); + }); + }); + }); + }); + }); + + describe('symlink handling', function () { + var fixtures = path.join(__dirname, 'symlink-fixtures'), + src = path.join(fixtures, 'src'), + out = path.join(fixtures, 'out'); + + beforeEach(function (cb) { + rimraf(out, cb); + }); + + it('copies symlinks by default', function (cb) { + ncp(src, out, function (err) { + if (err) return cb(err); + assert.equal(fs.readlinkSync(path.join(out, 'file-symlink')), 'foo'); + assert.equal(fs.readlinkSync(path.join(out, 'dir-symlink')), 'dir'); + cb(); + }) + }); + + it('copies file contents when dereference=true', function (cb) { + ncp(src, out, { dereference: true }, function (err) { + var fileSymlinkPath = path.join(out, 'file-symlink'); + assert.ok(fs.lstatSync(fileSymlinkPath).isFile()); + assert.equal(fs.readFileSync(fileSymlinkPath), 'foo contents'); + + var dirSymlinkPath = path.join(out, 'dir-symlink'); + assert.ok(fs.lstatSync(dirSymlinkPath).isDirectory()); + assert.deepEqual(fs.readdirSync(dirSymlinkPath), ['bar']); + + cb(); + }); + }); + }); + + describe('broken symlink handling', function () { + var fixtures = path.join(__dirname, 'broken-symlink-fixtures'), + src = path.join(fixtures, 'src'), + out = path.join(fixtures, 'out'); + + beforeEach(function (cb) { + rimraf(out, cb); + }); + + it('copies broken symlinks by default', function (cb) { + ncp(src, out, function (err) { + if (err) return cb(err); + assert.equal(fs.readlinkSync(path.join(out, 'broken-symlink')), 'does-not-exist'); + cb(); + }) + }); + + it('returns an error when dereference=true', function (cb) { + ncp(src, out, {dereference: true}, function (err) { + assert.equal(err.length, 1); + assert.equal(err[0].code, 'ENOENT'); + cb(); + }); + }); + }); + + describe('modified files copies', function () { + var fixtures = path.join(__dirname, 'modified-files'), + src = path.join(fixtures, 'src'), + out = path.join(fixtures, 'out'); + + it('if file not exists copy file to target', function(cb) { + rimraf(out, function() { + ncp(src, out, {modified: true, clobber: false}, function (err) { + assert.equal(fs.existsSync(out), true); + cb(); + }); + }); + }); + + it('change source file mtime and copy', function(cb) { + fs.utimesSync(src+"/a", new Date().getTime()/1000, new Date('2015-01-01 00:00:00').getTime()/1000); + ncp(src, out, {modified: true, clobber: false}, function (err) { + fs.stat(out+"/a", function(err, stats) { + assert.equal(stats.mtime.getTime(), new Date('2015-01-01 00:00:00').getTime()); + cb(); + }); + }); + }); + + }); +}); \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/a b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/a new file mode 100644 index 0000000..802992c --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/a @@ -0,0 +1 @@ +Hello world diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/b b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/b new file mode 100644 index 0000000..9f6bb18 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/b @@ -0,0 +1 @@ +Hello ncp diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/c b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/c new file mode 100644 index 0000000..e69de29 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/d b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/d new file mode 100644 index 0000000..e69de29 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/e b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/e new file mode 100644 index 0000000..e69de29 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/f b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/f new file mode 100644 index 0000000..e69de29 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/sub/a b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/sub/a new file mode 100644 index 0000000..cf291b5 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/sub/a @@ -0,0 +1 @@ +Hello nodejitsu diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/sub/b b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/regular-fixtures/src/sub/b new file mode 100644 index 0000000..e69de29 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/symlink-fixtures/src/dir/bar b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/symlink-fixtures/src/dir/bar new file mode 100644 index 0000000..fd06f5f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/symlink-fixtures/src/dir/bar @@ -0,0 +1 @@ +bar contents \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/symlink-fixtures/src/foo b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/symlink-fixtures/src/foo new file mode 100644 index 0000000..35fc060 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/ncp/test/symlink-fixtures/src/foo @@ -0,0 +1 @@ +foo contents \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/README.md new file mode 100644 index 0000000..18659f6 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/README.md @@ -0,0 +1,38 @@ +[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies) + +The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node. + +Install with `npm install rimraf`, or just drop rimraf.js somewhere. + +## API + +`rimraf(f, callback)` + +The callback will be called with an error if there is one. Certain +errors are handled for you: + +* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of + `opts.maxBusyTries` times before giving up, adding 100ms of wait + between each attempt. The default `maxBusyTries` is 3. +* `ENOENT` - If the file doesn't exist, rimraf will return + successfully, since your desired outcome is already the case. +* `EMFILE` - Since `readdir` requires opening a file descriptor, it's + possible to hit `EMFILE` if too many file descriptors are in use. + In the sync case, there's nothing to be done for this. But in the + async case, rimraf will gradually back off with timeouts up to + `opts.emfileWait` ms, which defaults to 1000. + +## rimraf.sync + +It can remove stuff synchronously, too. But that's not so good. Use +the async API. It's better. + +## CLI + +If installed with `npm install rimraf -g` it can be used as a global +command `rimraf [ ...]` which is useful for cross platform support. + +## mkdirp + +If you need to create a directory recursively, check out +[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/bin.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/bin.js new file mode 100755 index 0000000..1bd5a0d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/bin.js @@ -0,0 +1,40 @@ +#!/usr/bin/env node + +var rimraf = require('./') + +var help = false +var dashdash = false +var args = process.argv.slice(2).filter(function(arg) { + if (dashdash) + return !!arg + else if (arg === '--') + dashdash = true + else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) + help = true + else + return !!arg +}); + +if (help || args.length === 0) { + // If they didn't ask for help, then this is not a "success" + var log = help ? console.log : console.error + log('Usage: rimraf [ ...]') + log('') + log(' Deletes all files and folders at "path" recursively.') + log('') + log('Options:') + log('') + log(' -h, --help Display this usage info') + process.exit(help ? 0 : 1) +} else + go(0) + +function go (n) { + if (n >= args.length) + return + rimraf(args[n], function (er) { + if (er) + throw er + go(n+1) + }) +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/README.md new file mode 100644 index 0000000..063cf95 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/README.md @@ -0,0 +1,377 @@ +[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies) + +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +![](oh-my-glob.gif) + +## Usage + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Glob Primer + +"Globs" are the patterns you type when you do stuff like `ls *.js` on +the command line, or put `build/*` in a `.gitignore` file. + +Before parsing the path part patterns, braced sections are expanded +into a set. Braced sections start with `{` and end with `}`, with any +number of comma-delimited sections within. Braced sections may contain +slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. + +The following characters have special magic meaning when used in a +path portion: + +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +### Dots + +If a file or directory path portion has a `.` as the first character, +then it will not match any glob pattern unless that pattern's +corresponding path part also has a `.` as its first character. + +For example, the pattern `a/.*/c` would match the file at `a/.b/c`. +However the pattern `a/*/c` would not, because `*` does not start with +a dot character. + +You can make glob treat dots as normal characters by setting +`dot:true` in the options. + +### Basename Matching + +If you set `matchBase:true` in the options, and the pattern has no +slashes in it, then it will seek for any file anywhere in the tree +with a matching basename. For example, `*.js` would match +`test/simple/basic.js`. + +### Negation + +The intent for negation would be for a pattern starting with `!` to +match everything that *doesn't* match the supplied pattern. However, +the implementation is weird, and for the time being, this should be +avoided. The behavior is deprecated in version 5, and will be removed +entirely in version 6. + +### Empty Sets + +If no matching files are found, then an empty array is returned. This +differs from the shell, where the pattern itself is returned. For +example: + + $ echo a*s*d*f + a*s*d*f + +To get the bash-style behavior, set the `nonull:true` in the options. + +### See Also: + +* `man sh` +* `man bash` (Search for "Pattern Matching") +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob.hasMagic(pattern, [options]) + +Returns `true` if there are any special characters in the pattern, and +`false` otherwise. + +Note that the options affect the results. If `noext:true` is set in +the options object, then `+(a|b)` will not be considered a magic +pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` +then that is considered magical, unless `nobrace:true` is set in the +options. + +## glob(pattern, [options], cb) + +* `pattern` {String} Pattern to be matched +* `options` {Object} +* `cb` {Function} + * `err` {Error | null} + * `matches` {Array} filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` {String} Pattern to be matched +* `options` {Object} +* return: {Array} filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instantiating the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` {String} pattern to search for +* `options` {Object} +* `cb` {Function} Called when an error occurs, or matches are found + * `err` {Error | null} + * `matches` {Array} filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `'DIR'` - Path exists, and is not a directory + * `'FILE'` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` +* `statCache` Cache of `fs.stat` results, to prevent statting the same + path multiple times. +* `symlinks` A record of which paths are symbolic links, which is + relevant in resolving `**` patterns. +* `realpathCache` An optional object which is passed to `fs.realpath` + to minimize unnecessary syscalls. It is stored on the instantiated + Glob object, and may be re-used. + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the matched. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `pause` Temporarily stop the search +* `resume` Resume the search +* `abort` Stop the search forever + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the Glob object, as well. + +If you are running many `glob` operations, you can pass a Glob object +as the `options` argument to a subsequent operation to shortcut some +`stat` and `readdir` calls. At the very least, you may pass in shared +`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that +parallel glob operations will be sped up by sharing information about +the filesystem. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. +* `silent` When an unusual error is encountered when attempting to + read a directory, a warning will be printed to stderr. Set the + `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered when attempting to + read a directory, the process will just continue on in search of + other matches. Set the `strict` option to raise an error in these + cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary + to set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `symlinks` A cache of known symbolic links. You may pass in a + previously generated `symlinks` object to save `lstat` calls when + resolving `**` matches. +* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. Set this + flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `debug` Set to enable debug logging in minimatch and glob. +* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. +* `noglobstar` Do not match `**` against multiple filenames. (Ie, + treat it as a normal `*` instead.) +* `noext` Do not match `+(a|b)` "extglob" patterns. +* `nocase` Perform a case-insensitive match. Note: on + case-insensitive filesystems, non-magic patterns will match by + default, since `stat` and `readdir` will not raise errors. +* `matchBase` Perform a basename-only match if the pattern does not + contain any slash characters. That is, `*.js` would be treated as + equivalent to `**/*.js`, matching all js files in all directories. +* `nodir` Do not match directories, only files. (Note: to match + *only* directories, simply put a `/` at the end of the pattern.) +* `ignore` Add a pattern or an array of patterns to exclude matches. +* `follow` Follow symlinked directories when expanding `**` patterns. + Note that this can result in a lot of duplicate references in the + presence of cyclic links. +* `realpath` Set to true to call `fs.realpath` on all of the results. + In the case of a symlink that cannot be resolved, the full absolute + path to the matched entry is returned (though it will usually be a + broken symlink) +* `nonegate` Suppress deprecated `negate` behavior. (See below.) + Default=true +* `nocomment` Suppress deprecated `comment` behavior. (See below.) + Default=true + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.3, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +Note that symlinked directories are not crawled as part of a `**`, +though their contents may match against subsequent portions of the +pattern. This prevents infinite loops and duplicates and the like. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +### Comments and Negation + +**Note**: In version 5 of this module, negation and comments are +**disabled** by default. You can explicitly set `nonegate:false` or +`nocomment:false` to re-enable them. They are going away entirely in +version 6. + +The intent for negation would be for a pattern starting with `!` to +match everything that *doesn't* match the supplied pattern. However, +the implementation is weird. It is better to use the `ignore` option +to set a pattern or set of patterns to exclude from matches. If you +want the "everything except *x*" type of behavior, you can use `**` as +the main pattern, and set an `ignore` for the things to exclude. + +The comments feature is added in minimatch, primarily to more easily +support use cases like ignore files, where a `#` at the start of a +line makes the pattern "empty". However, in the context of a +straightforward filesystem globber, "comments" don't make much sense. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. + +## Contributing + +Any change to behavior (including bugfixes) must come with a test. + +Patches that fail tests or reduce performance will be rejected. + +``` +# to run tests +npm test + +# to re-generate test fixtures +npm run test-regen + +# to benchmark against bash/zsh +npm run bench + +# to profile javascript +npm run prof +``` diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/common.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/common.js new file mode 100644 index 0000000..e36a631 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/common.js @@ -0,0 +1,245 @@ +exports.alphasort = alphasort +exports.alphasorti = alphasorti +exports.setopts = setopts +exports.ownProp = ownProp +exports.makeAbs = makeAbs +exports.finish = finish +exports.mark = mark +exports.isIgnored = isIgnored +exports.childrenIgnored = childrenIgnored + +function ownProp (obj, field) { + return Object.prototype.hasOwnProperty.call(obj, field) +} + +var path = require("path") +var minimatch = require("minimatch") +var isAbsolute = require("path-is-absolute") +var Minimatch = minimatch.Minimatch + +function alphasorti (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()) +} + +function alphasort (a, b) { + return a.localeCompare(b) +} + +function setupIgnores (self, options) { + self.ignore = options.ignore || [] + + if (!Array.isArray(self.ignore)) + self.ignore = [self.ignore] + + if (self.ignore.length) { + self.ignore = self.ignore.map(ignoreMap) + } +} + +function ignoreMap (pattern) { + var gmatcher = null + if (pattern.slice(-3) === '/**') { + var gpattern = pattern.replace(/(\/\*\*)+$/, '') + gmatcher = new Minimatch(gpattern) + } + + return { + matcher: new Minimatch(pattern), + gmatcher: gmatcher + } +} + +function setopts (self, pattern, options) { + if (!options) + options = {} + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + self.silent = !!options.silent + self.pattern = pattern + self.strict = options.strict !== false + self.realpath = !!options.realpath + self.realpathCache = options.realpathCache || Object.create(null) + self.follow = !!options.follow + self.dot = !!options.dot + self.mark = !!options.mark + self.nodir = !!options.nodir + if (self.nodir) + self.mark = true + self.sync = !!options.sync + self.nounique = !!options.nounique + self.nonull = !!options.nonull + self.nosort = !!options.nosort + self.nocase = !!options.nocase + self.stat = !!options.stat + self.noprocess = !!options.noprocess + + self.maxLength = options.maxLength || Infinity + self.cache = options.cache || Object.create(null) + self.statCache = options.statCache || Object.create(null) + self.symlinks = options.symlinks || Object.create(null) + + setupIgnores(self, options) + + self.changedCwd = false + var cwd = process.cwd() + if (!ownProp(options, "cwd")) + self.cwd = cwd + else { + self.cwd = options.cwd + self.changedCwd = path.resolve(options.cwd) !== cwd + } + + self.root = options.root || path.resolve(self.cwd, "/") + self.root = path.resolve(self.root) + if (process.platform === "win32") + self.root = self.root.replace(/\\/g, "/") + + self.nomount = !!options.nomount + + // disable comments and negation unless the user explicitly + // passes in false as the option. + options.nonegate = options.nonegate === false ? false : true + options.nocomment = options.nocomment === false ? false : true + deprecationWarning(options) + + self.minimatch = new Minimatch(pattern, options) + self.options = self.minimatch.options +} + +// TODO(isaacs): remove entirely in v6 +// exported to reset in tests +exports.deprecationWarned +function deprecationWarning(options) { + if (!options.nonegate || !options.nocomment) { + if (process.noDeprecation !== true && !exports.deprecationWarned) { + var msg = 'glob WARNING: comments and negation will be disabled in v6' + if (process.throwDeprecation) + throw new Error(msg) + else if (process.traceDeprecation) + console.trace(msg) + else + console.error(msg) + + exports.deprecationWarned = true + } + } +} + +function finish (self) { + var nou = self.nounique + var all = nou ? [] : Object.create(null) + + for (var i = 0, l = self.matches.length; i < l; i ++) { + var matches = self.matches[i] + if (!matches || Object.keys(matches).length === 0) { + if (self.nonull) { + // do like the shell, and spit out the literal glob + var literal = self.minimatch.globSet[i] + if (nou) + all.push(literal) + else + all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) + all.push.apply(all, m) + else + m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) + all = Object.keys(all) + + if (!self.nosort) + all = all.sort(self.nocase ? alphasorti : alphasort) + + // at *some* point we statted all of these + if (self.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self._mark(all[i]) + } + if (self.nodir) { + all = all.filter(function (e) { + return !(/\/$/.test(e)) + }) + } + } + + if (self.ignore.length) + all = all.filter(function(m) { + return !isIgnored(self, m) + }) + + self.found = all +} + +function mark (self, p) { + var abs = makeAbs(self, p) + var c = self.cache[abs] + var m = p + if (c) { + var isDir = c === 'DIR' || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + var mabs = makeAbs(self, m) + self.statCache[mabs] = self.statCache[abs] + self.cache[mabs] = self.cache[abs] + } + } + + return m +} + +// lotta situps... +function makeAbs (self, f) { + var abs = f + if (f.charAt(0) === '/') { + abs = path.join(self.root, f) + } else if (isAbsolute(f) || f === '') { + abs = f + } else if (self.changedCwd) { + abs = path.resolve(self.cwd, f) + } else { + abs = path.resolve(f) + } + return abs +} + + +// Return true, if pattern ends with globstar '**', for the accompanying parent directory. +// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents +function isIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) + }) +} + +function childrenIgnored (self, path) { + if (!self.ignore.length) + return false + + return self.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path)) + }) +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/glob.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/glob.js new file mode 100644 index 0000000..022d2ac --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/glob.js @@ -0,0 +1,752 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern, false) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern, inGlobStar) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// +// If inGlobStar and PREFIX is symlink and points to dir +// set ENTRIES = [] +// else readdir(PREFIX) as ENTRIES +// If fail, END +// +// with ENTRIES +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// // Mark that this entry is a globstar match +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + +module.exports = glob + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var inherits = require('inherits') +var EE = require('events').EventEmitter +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var globSync = require('./sync.js') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var inflight = require('inflight') +var util = require('util') +var childrenIgnored = common.childrenIgnored +var isIgnored = common.isIgnored + +var once = require('once') + +function glob (pattern, options, cb) { + if (typeof options === 'function') cb = options, options = {} + if (!options) options = {} + + if (options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return globSync(pattern, options) + } + + return new Glob(pattern, options, cb) +} + +glob.sync = globSync +var GlobSync = glob.GlobSync = globSync.GlobSync + +// old api surface +glob.glob = glob + +glob.hasMagic = function (pattern, options_) { + var options = util._extend({}, options_) + options.noprocess = true + + var g = new Glob(pattern, options) + var set = g.minimatch.set + if (set.length > 1) + return true + + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== 'string') + return true + } + + return false +} + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + + if (options && options.sync) { + if (cb) + throw new TypeError('callback provided to sync glob') + return new GlobSync(pattern, options) + } + + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb) + + setopts(this, pattern, options) + this._didRealPath = false + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + if (typeof cb === 'function') { + cb = once(cb) + this.on('error', cb) + this.on('end', function (matches) { + cb(null, matches) + }) + } + + var self = this + var n = this.minimatch.set.length + this._processing = 0 + this.matches = new Array(n) + + this._emitQueue = [] + this._processQueue = [] + this.paused = false + + if (this.noprocess) + return this + + if (n === 0) + return done() + + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false, done) + } + + function done () { + --self._processing + if (self._processing <= 0) + self._finish() + } +} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + if (this.aborted) + return + + if (this.realpath && !this._didRealpath) + return this._realpath() + + common.finish(this) + this.emit('end', this.found) +} + +Glob.prototype._realpath = function () { + if (this._didRealpath) + return + + this._didRealpath = true + + var n = this.matches.length + if (n === 0) + return this._finish() + + var self = this + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next) + + function next () { + if (--n === 0) + self._finish() + } +} + +Glob.prototype._realpathSet = function (index, cb) { + var matchset = this.matches[index] + if (!matchset) + return cb() + + var found = Object.keys(matchset) + var self = this + var n = found.length + + if (n === 0) + return cb() + + var set = this.matches[index] = Object.create(null) + found.forEach(function (p, i) { + // If there's a problem with the stat, then it means that + // one or more of the links in the realpath couldn't be + // resolved. just return the abs value in that case. + p = self._makeAbs(p) + fs.realpath(p, self.realpathCache, function (er, real) { + if (!er) + set[real] = true + else if (er.syscall === 'stat') + set[p] = true + else + self.emit('error', er) // srsly wtf right here + + if (--n === 0) { + self.matches[index] = set + cb() + } + }) + }) +} + +Glob.prototype._mark = function (p) { + return common.mark(this, p) +} + +Glob.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit('abort') +} + +Glob.prototype.pause = function () { + if (!this.paused) { + this.paused = true + this.emit('pause') + } +} + +Glob.prototype.resume = function () { + if (this.paused) { + this.emit('resume') + this.paused = false + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0) + this._emitQueue.length = 0 + for (var i = 0; i < eq.length; i ++) { + var e = eq[i] + this._emitMatch(e[0], e[1]) + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0) + this._processQueue.length = 0 + for (var i = 0; i < pq.length; i ++) { + var p = pq[i] + this._processing-- + this._process(p[0], p[1], p[2], p[3]) + } + } + } +} + +Glob.prototype._process = function (pattern, index, inGlobStar, cb) { + assert(this instanceof Glob) + assert(typeof cb === 'function') + + if (this.aborted) + return + + this._processing++ + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]) + return + } + + //console.error('PROCESS %d', this._processing, pattern) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index, cb) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip _processing + if (childrenIgnored(this, read)) + return cb() + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) +} + +Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + +Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return cb() + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return cb() + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this._emitMatch(index, e) + } + // This was the last one, and no stats were needed + return cb() + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) { + if (prefix !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + this._process([e].concat(remain), index, inGlobStar, cb) + } + cb() +} + +Glob.prototype._emitMatch = function (index, e) { + if (this.aborted) + return + + if (this.matches[index][e]) + return + + if (isIgnored(this, e)) + return + + if (this.paused) { + this._emitQueue.push([index, e]) + return + } + + var abs = this._makeAbs(e) + + if (this.nodir) { + var c = this.cache[abs] + if (c === 'DIR' || Array.isArray(c)) + return + } + + if (this.mark) + e = this._mark(e) + + this.matches[index][e] = true + + var st = this.statCache[abs] + if (st) + this.emit('stat', e, st) + + this.emit('match', e) +} + +Glob.prototype._readdirInGlobStar = function (abs, cb) { + if (this.aborted) + return + + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false, cb) + + var lstatkey = 'lstat\0' + abs + var self = this + var lstatcb = inflight(lstatkey, lstatcb_) + + if (lstatcb) + fs.lstat(abs, lstatcb) + + function lstatcb_ (er, lstat) { + if (er) + return cb() + + var isSym = lstat.isSymbolicLink() + self.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) { + self.cache[abs] = 'FILE' + cb() + } else + self._readdir(abs, false, cb) + } +} + +Glob.prototype._readdir = function (abs, inGlobStar, cb) { + if (this.aborted) + return + + cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) + if (!cb) + return + + //console.error('RD %j %j', +inGlobStar, abs) + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return cb() + + if (Array.isArray(c)) + return cb(null, c) + } + + var self = this + fs.readdir(abs, readdirCb(this, abs, cb)) +} + +function readdirCb (self, abs, cb) { + return function (er, entries) { + if (er) + self._readdirError(abs, er, cb) + else + self._readdirEntries(abs, entries, cb) + } +} + +Glob.prototype._readdirEntries = function (abs, entries, cb) { + if (this.aborted) + return + + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + return cb(null, entries) +} + +Glob.prototype._readdirError = function (f, er, cb) { + if (this.aborted) + return + + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + this.cache[this._makeAbs(f)] = 'FILE' + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) { + this.emit('error', er) + // If the error is handled, then we abort + // if not, we threw out of here + this.abort() + } + if (!this.silent) + console.error('glob error', er) + break + } + + return cb() +} + +Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { + var self = this + this._readdir(abs, inGlobStar, function (er, entries) { + self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) + }) +} + + +Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { + //console.error('pgs2', prefix, remain[0], entries) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return cb() + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false, cb) + + var isSym = this.symlinks[abs] + var len = entries.length + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return cb() + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true, cb) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true, cb) + } + + cb() +} + +Glob.prototype._processSimple = function (prefix, index, cb) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var self = this + this._stat(prefix, function (er, exists) { + self._processSimple2(prefix, index, er, exists, cb) + }) +} +Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { + + //console.error('ps2', prefix, exists) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return cb() + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this._emitMatch(index, prefix) + cb() +} + +// Returns either 'DIR', 'FILE', or false +Glob.prototype._stat = function (f, cb) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return cb() + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return cb(null, c) + + if (needDir && c === 'FILE') + return cb() + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (stat !== undefined) { + if (stat === false) + return cb(null, stat) + else { + var type = stat.isDirectory() ? 'DIR' : 'FILE' + if (needDir && type === 'FILE') + return cb() + else + return cb(null, type, stat) + } + } + + var self = this + var statcb = inflight('stat\0' + abs, lstatcb_) + if (statcb) + fs.lstat(abs, statcb) + + function lstatcb_ (er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + // If it's a symlink, then treat it as the target, unless + // the target does not exist, then treat it as a file. + return fs.stat(abs, function (er, stat) { + if (er) + self._stat2(f, abs, null, lstat, cb) + else + self._stat2(f, abs, er, stat, cb) + }) + } else { + self._stat2(f, abs, er, lstat, cb) + } + } +} + +Glob.prototype._stat2 = function (f, abs, er, stat, cb) { + if (er) { + this.statCache[abs] = false + return cb() + } + + var needDir = f.slice(-1) === '/' + this.statCache[abs] = stat + + if (abs.slice(-1) === '/' && !stat.isDirectory()) + return cb(null, false, stat) + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return cb() + + return cb(null, c, stat) +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc new file mode 100644 index 0000000..b7a1550 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc @@ -0,0 +1,17 @@ +{ + "env" : { + "node" : true + }, + "rules" : { + "semi": [2, "never"], + "strict": 0, + "quotes": [1, "single", "avoid-escape"], + "no-use-before-define": 0, + "curly": 0, + "no-underscore-dangle": 0, + "no-lonely-if": 1, + "no-unused-vars": [2, {"vars" : "all", "args" : "after-used"}], + "no-mixed-requires": 0, + "space-infix-ops": 0 + } +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE new file mode 100644 index 0000000..05eeeb8 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md new file mode 100644 index 0000000..6dc8929 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md @@ -0,0 +1,37 @@ +# inflight + +Add callbacks to requests in flight to avoid async duplication + +## USAGE + +```javascript +var inflight = require('inflight') + +// some request that does some stuff +function req(key, callback) { + // key is any random string. like a url or filename or whatever. + // + // will return either a falsey value, indicating that the + // request for this key is already in flight, or a new callback + // which when called will call all callbacks passed to inflightk + // with the same key + callback = inflight(key, callback) + + // If we got a falsey value back, then there's already a req going + if (!callback) return + + // this is where you'd fetch the url or whatever + // callback is also once()-ified, so it can safely be assigned + // to multiple events etc. First call wins. + setTimeout(function() { + callback(null, key) + }, 100) +} + +// only assigns a single setTimeout +// when it dings, all cbs get called +req('foo', cb1) +req('foo', cb2) +req('foo', cb3) +req('foo', cb4) +``` diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js new file mode 100644 index 0000000..8bc96cb --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js @@ -0,0 +1,44 @@ +var wrappy = require('wrappy') +var reqs = Object.create(null) +var once = require('once') + +module.exports = wrappy(inflight) + +function inflight (key, cb) { + if (reqs[key]) { + reqs[key].push(cb) + return null + } else { + reqs[key] = [cb] + return makeres(key) + } +} + +function makeres (key) { + return once(function RES () { + var cbs = reqs[key] + var len = cbs.length + var args = slice(arguments) + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args) + } + if (cbs.length > len) { + // added more in the interim. + // de-zalgo, just in case, but don't call again. + cbs.splice(0, len) + process.nextTick(function () { + RES.apply(null, args) + }) + } else { + delete reqs[key] + } + }) +} + +function slice (args) { + var length = args.length + var array = [] + + for (var i = 0; i < length; i++) array[i] = args[i] + return array +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md new file mode 100644 index 0000000..98eab25 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json new file mode 100644 index 0000000..5411286 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json @@ -0,0 +1,52 @@ +{ + "name": "wrappy", + "version": "1.0.1", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^0.4.12" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "homepage": "https://github.com/npm/wrappy", + "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", + "_id": "wrappy@1.0.1", + "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "_from": "wrappy@1.0.1", + "_npmVersion": "2.0.0", + "_nodeVersion": "0.10.31", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + }, + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js new file mode 100644 index 0000000..5ed0fcd --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js @@ -0,0 +1,51 @@ +var test = require('tap').test +var wrappy = require('../wrappy.js') + +test('basic', function (t) { + function onceifier (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } + } + onceifier.iAmOnce = {} + var once = wrappy(onceifier) + t.equal(once.iAmOnce, onceifier.iAmOnce) + + var called = 0 + function boo () { + t.equal(called, 0) + called++ + } + // has some rando property + boo.iAmBoo = true + + var onlyPrintOnce = once(boo) + + onlyPrintOnce() // prints 'boo' + onlyPrintOnce() // does nothing + t.equal(called, 1) + + // random property is retained! + t.equal(onlyPrintOnce.iAmBoo, true) + + var logs = [] + var logwrap = wrappy(function (msg, cb) { + logs.push(msg + ' wrapping cb') + return function () { + logs.push(msg + ' before cb') + var ret = cb.apply(this, arguments) + logs.push(msg + ' after cb') + } + }) + + var c = logwrap('foo', function () { + t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) + }) + c() + t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) + + t.end() +}) diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js new file mode 100644 index 0000000..bb7e7d6 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json new file mode 100644 index 0000000..b72690c --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json @@ -0,0 +1,61 @@ +{ + "name": "inflight", + "version": "1.0.4", + "description": "Add callbacks to requests in flight to avoid async duplication", + "main": "inflight.js", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + }, + "devDependencies": { + "tap": "^0.4.10" + }, + "scripts": { + "test": "tap test.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inflight.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/inflight/issues" + }, + "homepage": "https://github.com/isaacs/inflight", + "license": "ISC", + "gitHead": "c7b5531d572a867064d4a1da9e013e8910b7d1ba", + "_id": "inflight@1.0.4", + "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "_from": "inflight@1.0.4", + "_npmVersion": "2.1.3", + "_nodeVersion": "0.10.32", + "_npmUser": { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + }, + { + "name": "iarna", + "email": "me@re-becca.org" + } + ], + "dist": { + "shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a", + "tarball": "http://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js new file mode 100644 index 0000000..2bb75b3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js @@ -0,0 +1,97 @@ +var test = require('tap').test +var inf = require('./inflight.js') + + +function req (key, cb) { + cb = inf(key, cb) + if (cb) setTimeout(function () { + cb(key) + cb(key) + }) + return cb +} + +test('basic', function (t) { + var calleda = false + var a = req('key', function (k) { + t.notOk(calleda) + calleda = true + t.equal(k, 'key') + if (calledb) t.end() + }) + t.ok(a, 'first returned cb function') + + var calledb = false + var b = req('key', function (k) { + t.notOk(calledb) + calledb = true + t.equal(k, 'key') + if (calleda) t.end() + }) + + t.notOk(b, 'second should get falsey inflight response') +}) + +test('timing', function (t) { + var expect = [ + 'method one', + 'start one', + 'end one', + 'two', + 'tick', + 'three' + ] + var i = 0 + + function log (m) { + t.equal(m, expect[i], m + ' === ' + expect[i]) + ++i + if (i === expect.length) + t.end() + } + + function method (name, cb) { + log('method ' + name) + process.nextTick(cb) + } + + var one = inf('foo', function () { + log('start one') + var three = inf('foo', function () { + log('three') + }) + if (three) method('three', three) + log('end one') + }) + + method('one', one) + + var two = inf('foo', function () { + log('two') + }) + if (two) method('one', two) + + process.nextTick(log.bind(null, 'tick')) +}) + +test('parameters', function (t) { + t.plan(8) + + var a = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.ok(a, 'first returned cb function') + + var b = inf('key', function (first, second, third) { + t.equal(first, 1) + t.equal(second, 2) + t.equal(third, 3) + }) + t.notOk(b, 'second should get falsey inflight response') + + setTimeout(function () { + a(1, 2, 3) + }) +}) diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE new file mode 100644 index 0000000..dea3013 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md new file mode 100644 index 0000000..b1c5665 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js new file mode 100644 index 0000000..29f5e24 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js @@ -0,0 +1 @@ +module.exports = require('util').inherits diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js new file mode 100644 index 0000000..c1e78a7 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json new file mode 100644 index 0000000..d6435d0 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json @@ -0,0 +1,50 @@ +{ + "name": "inherits", + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "version": "2.0.1", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "main": "./inherits.js", + "browser": "./inherits_browser.js", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits.git" + }, + "license": "ISC", + "scripts": { + "test": "node test" + }, + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "_id": "inherits@2.0.1", + "dist": { + "shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "tarball": "http://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz" + }, + "_from": "inherits@2.0.1", + "_npmVersion": "1.3.8", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_shasum": "b17d08d326b4423e568eff719f91b0b1cbdf69f1", + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/isaacs/inherits#readme" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js new file mode 100644 index 0000000..fc53012 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js @@ -0,0 +1,25 @@ +var inherits = require('./inherits.js') +var assert = require('assert') + +function test(c) { + assert(c.constructor === Child) + assert(c.constructor.super_ === Parent) + assert(Object.getPrototypeOf(c) === Child.prototype) + assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype) + assert(c instanceof Child) + assert(c instanceof Parent) +} + +function Child() { + Parent.call(this) + test(this) +} + +function Parent() {} + +inherits(Child, Parent) + +var c = new Child +test(c) + +console.log('ok') diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md new file mode 100644 index 0000000..d458bc2 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md @@ -0,0 +1,216 @@ +# minimatch + +A minimal matching utility. + +[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) + + +This is the matching library used internally by npm. + +It works by converting glob expressions into JavaScript `RegExp` +objects. + +## Usage + +```javascript +var minimatch = require("minimatch") + +minimatch("bar.foo", "*.foo") // true! +minimatch("bar.foo", "*.bar") // false! +minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! +``` + +## Features + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` + +## Minimatch Class + +Create a minimatch object by instanting the `minimatch.Minimatch` class. + +```javascript +var Minimatch = require("minimatch").Minimatch +var mm = new Minimatch(pattern, options) +``` + +### Properties + +* `pattern` The original pattern the minimatch object represents. +* `options` The options supplied to the constructor. +* `set` A 2-dimensional array of regexp or string expressions. + Each row in the + array corresponds to a brace-expanded pattern. Each item in the row + corresponds to a single path-part. For example, the pattern + `{a,b/c}/d` would expand to a set of patterns like: + + [ [ a, d ] + , [ b, c, d ] ] + + If a portion of the pattern doesn't have any "magic" in it + (that is, it's something like `"foo"` rather than `fo*o?`), then it + will be left as a string rather than converted to a regular + expression. + +* `regexp` Created by the `makeRe` method. A single regular expression + expressing the entire pattern. This is useful in cases where you wish + to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. +* `negate` True if the pattern is negated. +* `comment` True if the pattern is a comment. +* `empty` True if the pattern is `""`. + +### Methods + +* `makeRe` Generate the `regexp` member if necessary, and return it. + Will return `false` if the pattern is invalid. +* `match(fname)` Return true if the filename matches the pattern, or + false otherwise. +* `matchOne(fileArray, patternArray, partial)` Take a `/`-split + filename, and match it against a single row in the `regExpSet`. This + method is mainly for internal use, but is exposed so that it can be + used by a glob-walker that needs to avoid excessive filesystem calls. + +All other methods are internal, and will be called as necessary. + +## Functions + +The top-level exported function has a `cache` property, which is an LRU +cache set to store 100 items. So, calling these methods repeatedly +with the same pattern and options will use the same Minimatch object, +saving the cost of parsing it multiple times. + +### minimatch(path, pattern, options) + +Main export. Tests a path against the pattern using the options. + +```javascript +var isJS = minimatch(file, "*.js", { matchBase: true }) +``` + +### minimatch.filter(pattern, options) + +Returns a function that tests its +supplied argument, suitable for use with `Array.filter`. Example: + +```javascript +var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) +``` + +### minimatch.match(list, pattern, options) + +Match against the list of +files, in the style of fnmatch or glob. If nothing is matched, and +options.nonull is set, then return a list containing the pattern itself. + +```javascript +var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) +``` + +### minimatch.makeRe(pattern, options) + +Make a regular expression object from the pattern. + +## Options + +All options are `false` by default. + +### debug + +Dump a ton of stuff to stderr. + +### nobrace + +Do not expand `{a,b}` and `{1..3}` brace sets. + +### noglobstar + +Disable `**` matching against multiple folder names. + +### dot + +Allow patterns to match filenames starting with a period, even if +the pattern does not explicitly have a period in that spot. + +Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` +is set. + +### noext + +Disable "extglob" style patterns like `+(a|b)`. + +### nocase + +Perform a case-insensitive match. + +### nonull + +When a match is not found by `minimatch.match`, return a list containing +the pattern itself if this option is set. When not set, an empty list +is returned if there are no matches. + +### matchBase + +If set, then patterns without slashes will be matched +against the basename of the path if it contains slashes. For example, +`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. + +### nocomment + +Suppress the behavior of treating `#` at the start of a pattern as a +comment. + +### nonegate + +Suppress the behavior of treating a leading `!` character as negation. + +### flipNegate + +Returns from negate expressions the same as if they were not negated. +(Ie, true on a hit, false on a miss.) + + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between minimatch and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then minimatch.match returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js new file mode 100644 index 0000000..7d05159 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/browser.js @@ -0,0 +1,1159 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.minimatch = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + plType = stateChar + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + re += ')' + var pl = patternListStack.pop() + plType = pl.type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case '!': + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length + break + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway + } + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + +},{"brace-expansion":2,"path":undefined}],2:[function(require,module,exports){ +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 []; + + var expansions = expand(escapeBraces(str)); + return expansions.filter(identity).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) { + 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 = /^(.*,)+(.+)?$/.test(m.body); + 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]).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post) + : ['']; + 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) + : ['']; + + 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) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + expansions.push([pre, N[j], post[k]].join('')) + } + } + + return expansions; +} + + +},{"balanced-match":3,"concat-map":4}],3:[function(require,module,exports){ +module.exports = balanced; +function balanced(a, b, str) { + var bal = 0; + var m = {}; + var ended = false; + + for (var i = 0; i < str.length; i++) { + if (a == str.substr(i, a.length)) { + if (!('start' in m)) m.start = i; + bal++; + } + else if (b == str.substr(i, b.length) && 'start' in m) { + ended = true; + bal--; + if (!bal) { + m.end = i; + m.pre = str.substr(0, m.start); + m.body = (m.end - m.start > 1) + ? str.substring(m.start + a.length, m.end) + : ''; + m.post = str.slice(m.end + b.length); + return m; + } + } + } + + // if we opened more than we closed, find the one we closed + if (bal && ended) { + var start = m.start + a.length; + m = balanced(a, b, str.substr(start)); + if (m) { + m.start += start; + m.end += start; + m.pre = str.slice(0, start) + m.pre; + } + return m; + } +} + +},{}],4:[function(require,module,exports){ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (Array.isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +},{}]},{},[1])(1) +}); \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js new file mode 100644 index 0000000..ec4c05c --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js @@ -0,0 +1,912 @@ +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = { sep: '/' } +try { + path = require('path') +} catch (er) {} + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +var expand = require('brace-expansion') + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + a = a || {} + b = b || {} + var t = {} + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return minimatch + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig.minimatch(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + if (!def || !Object.keys(def).length) return Minimatch + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + // "" only matches "" + if (pattern.trim() === '') return p === '' + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + if (typeof pattern !== 'string') { + throw new TypeError('glob pattern string required') + } + + if (!options) options = {} + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + // don't do it more than once. + if (this._made) return + + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = console.error + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + if (typeof pattern === 'undefined') { + throw new Error('undefined pattern') + } + + if (options.nobrace || + !pattern.match(/\{.*\}/)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + var options = this.options + + // shortcuts + if (!options.noglobstar && pattern === '**') return GLOBSTAR + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var plType + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + case '/': + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + plType = stateChar + patternListStack.push({ + type: plType, + start: i - 1, + reStart: re.length + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + re += ')' + var pl = patternListStack.pop() + plType = pl.type + // negation is (?:(?!js)[^/]*) + // The others are (?:) + switch (plType) { + case '!': + negativeLists.push(pl) + re += ')[^/]*?)' + pl.reEnd = re.length + break + case '?': + case '+': + case '*': + re += plType + break + case '@': break // the default anyway + } + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + if (inClass) { + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + 3) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '.': + case '[': + case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + var regExp = new RegExp('^' + re + '$', flags) + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = match +function match (f, partial) { + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + var pattern = set[i] + var file = f + if (options.matchBase && pattern.length === 1) { + file = [filename] + } + var hit = this.matchOne(file, pattern, partial) + if (hit) { + if (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + if (options.nocase) { + hit = f.toLowerCase() === p.toLowerCase() + } else { + hit = f === p + } + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') + return emptyFileEnd + } + + // should be unreachable. + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore new file mode 100644 index 0000000..249bc20 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore @@ -0,0 +1,2 @@ +node_modules +*.sw* diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml new file mode 100644 index 0000000..6e5919d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md new file mode 100644 index 0000000..62bc7ba --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md @@ -0,0 +1,121 @@ +# 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) + +[![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 seperated 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) + +## License + +(MIT) + +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js new file mode 100644 index 0000000..60ecfc7 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js @@ -0,0 +1,8 @@ +var expand = require('./'); + +console.log(expand('http://any.org/archive{1996..1999}/vol{1..4}/part{a,b,c}.html')); +console.log(expand('http://www.numericals.com/file{1..100..10}.txt')); +console.log(expand('http://www.letters.com/file{a..z..2}.txt')); +console.log(expand('mkdir /usr/local/src/bash/{old,new,dist,bugs}')); +console.log(expand('chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}')); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js new file mode 100644 index 0000000..a23104e --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js @@ -0,0 +1,191 @@ +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 []; + + 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 = /^(.*,)+(.+)?$/.test(m.body); + 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; +} + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore new file mode 100644 index 0000000..fd4f2b0 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore @@ -0,0 +1,2 @@ +node_modules +.DS_Store diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml new file mode 100644 index 0000000..cc4dba2 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile new file mode 100644 index 0000000..fa5da71 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile @@ -0,0 +1,6 @@ + +test: + @node_modules/.bin/tape test/*.js + +.PHONY: test + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md new file mode 100644 index 0000000..2aff0eb --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md @@ -0,0 +1,80 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. + +[![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')); +``` + +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' } +``` + +## 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', '']`. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install balanced-match +``` + +## License + +(MIT) + +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js new file mode 100644 index 0000000..c02ad34 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js @@ -0,0 +1,5 @@ +var balanced = require('./'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js new file mode 100644 index 0000000..d165ae8 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js @@ -0,0 +1,38 @@ +module.exports = balanced; +function balanced(a, b, str) { + var bal = 0; + var m = {}; + var ended = false; + + for (var i = 0; i < str.length; i++) { + if (a == str.substr(i, a.length)) { + if (!('start' in m)) m.start = i; + bal++; + } + else if (b == str.substr(i, b.length) && 'start' in m) { + ended = true; + bal--; + if (!bal) { + m.end = i; + m.pre = str.substr(0, m.start); + m.body = (m.end - m.start > 1) + ? str.substring(m.start + a.length, m.end) + : ''; + m.post = str.slice(m.end + b.length); + return m; + } + } + } + + // if we opened more than we closed, find the one we closed + if (bal && ended) { + var start = m.start + a.length; + m = balanced(a, b, str.substr(start)); + if (m) { + m.start += start; + m.end += start; + m.pre = str.slice(0, start) + m.pre; + } + return m; + } +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json new file mode 100644 index 0000000..39ca6a1 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -0,0 +1,73 @@ +{ + "name": "balanced-match", + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "version": "0.2.0", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "homepage": "https://github.com/juliangruber/balanced-match", + "main": "index.js", + "scripts": { + "test": "make test" + }, + "dependencies": {}, + "devDependencies": { + "tape": "~1.1.1" + }, + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "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" + ] + }, + "gitHead": "ba40ed78e7114a4a67c51da768a100184dead39c", + "bugs": { + "url": "https://github.com/juliangruber/balanced-match/issues" + }, + "_id": "balanced-match@0.2.0", + "_shasum": "38f6730c03aab6d5edbb52bd934885e756d71674", + "_from": "balanced-match@0.2.0", + "_npmVersion": "2.1.8", + "_nodeVersion": "0.10.32", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "dist": { + "shasum": "38f6730c03aab6d5edbb52bd934885e756d71674", + "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.2.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js new file mode 100644 index 0000000..36bfd39 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js @@ -0,0 +1,56 @@ +var test = require('tape'); +var balanced = require('..'); + +test('balanced', function(t) { + t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), { + start: 3, + end: 12, + pre: 'pre', + body: 'in{nest}', + post: 'post' + }); + t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), { + start: 8, + end: 11, + pre: '{{{{{{{{', + body: 'in', + post: 'post' + }); + t.deepEqual(balanced('{', '}', 'pre{body{in}post'), { + start: 8, + end: 11, + pre: 'pre{body', + body: 'in', + post: 'post' + }); + t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), { + start: 4, + end: 13, + pre: 'pre}', + body: 'in{nest}', + post: 'post' + }); + t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), { + start: 3, + end: 8, + pre: 'pre', + body: 'body', + post: 'between{body2}post' + }); + t.notOk(balanced('{', '}', 'nope'), 'should be notOk'); + t.deepEqual(balanced('', '', 'preinnestpost'), { + start: 3, + end: 19, + pre: 'pre', + body: 'innest', + post: 'post' + }); + t.deepEqual(balanced('', '', 'preinnestpost'), { + start: 7, + end: 23, + pre: 'pre', + body: 'innest', + post: 'post' + }); + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml new file mode 100644 index 0000000..f1d0f13 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.4 + - 0.6 diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE new file mode 100644 index 0000000..ee27ba4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown new file mode 100644 index 0000000..408f70a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown @@ -0,0 +1,62 @@ +concat-map +========== + +Concatenative mapdashery. + +[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) + +[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) + +example +======= + +``` js +var concatMap = require('concat-map'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); +``` + +*** + +``` +[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] +``` + +methods +======= + +``` js +var concatMap = require('concat-map') +``` + +concatMap(xs, fn) +----------------- + +Return an array of concatenated elements by calling `fn(x, i)` for each element +`x` and each index `i` in the array `xs`. + +When `fn(x, i)` returns an array, its result will be concatenated with the +result array. If `fn(x, i)` returns anything else, that value will be pushed +onto the end of the result array. + +install +======= + +With [npm](http://npmjs.org) do: + +``` +npm install concat-map +``` + +license +======= + +MIT + +notes +===== + +This module was written while sitting high above the ground in a tree. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js new file mode 100644 index 0000000..3365621 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js @@ -0,0 +1,6 @@ +var concatMap = require('../'); +var xs = [ 1, 2, 3, 4, 5, 6 ]; +var ys = concatMap(xs, function (x) { + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; +}); +console.dir(ys); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js new file mode 100644 index 0000000..b29a781 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js @@ -0,0 +1,13 @@ +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json new file mode 100644 index 0000000..b516138 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json @@ -0,0 +1,83 @@ +{ + "name": "concat-map", + "description": "concatenative mapdashery", + "version": "0.0.1", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-concat-map.git" + }, + "main": "index.js", + "keywords": [ + "concat", + "concatMap", + "map", + "functional", + "higher-order" + ], + "directories": { + "example": "example", + "test": "test" + }, + "scripts": { + "test": "tape test/*.js" + }, + "devDependencies": { + "tape": "~2.4.0" + }, + "license": "MIT", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "bugs": { + "url": "https://github.com/substack/node-concat-map/issues" + }, + "homepage": "https://github.com/substack/node-concat-map", + "_id": "concat-map@0.0.1", + "dist": { + "shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "tarball": "http://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "_from": "concat-map@0.0.1", + "_npmVersion": "1.3.21", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", + "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js new file mode 100644 index 0000000..fdbd702 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js @@ -0,0 +1,39 @@ +var concatMap = require('../'); +var test = require('tape'); + +test('empty or not', function (t) { + var xs = [ 1, 2, 3, 4, 5, 6 ]; + var ixes = []; + var ys = concatMap(xs, function (x, ix) { + ixes.push(ix); + return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; + }); + t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); + t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); + t.end(); +}); + +test('always something', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('scalars', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function (x) { + return x === 'b' ? [ 'B', 'B', 'B' ] : x; + }); + t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); + t.end(); +}); + +test('undefs', function (t) { + var xs = [ 'a', 'b', 'c', 'd' ]; + var ys = concatMap(xs, function () {}); + t.same(ys, [ undefined, undefined, undefined, undefined ]); + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json new file mode 100644 index 0000000..7f5c26a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -0,0 +1,75 @@ +{ + "name": "brace-expansion", + "description": "Brace expansion as known from sh/bash", + "version": "1.1.0", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "homepage": "https://github.com/juliangruber/brace-expansion", + "main": "index.js", + "scripts": { + "test": "tape test/*.js", + "gentest": "bash test/generate.sh" + }, + "dependencies": { + "balanced-match": "^0.2.0", + "concat-map": "0.0.1" + }, + "devDependencies": { + "tape": "^3.0.3" + }, + "keywords": [], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT", + "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" + ] + }, + "gitHead": "b5fa3b1c74e5e2dba2d0efa19b28335641bc1164", + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "_id": "brace-expansion@1.1.0", + "_shasum": "c9b7d03c03f37bc704be100e522b40db8f6cfcd9", + "_from": "brace-expansion@1.1.0", + "_npmVersion": "2.1.10", + "_nodeVersion": "0.10.32", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + } + ], + "dist": { + "shasum": "c9b7d03c03f37bc704be100e522b40db8f6cfcd9", + "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js new file mode 100644 index 0000000..5fe2b8a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js @@ -0,0 +1,32 @@ +var test = require('tape'); +var expand = require('..'); +var fs = require('fs'); +var resfile = __dirname + '/bash-results.txt'; +var cases = fs.readFileSync(resfile, 'utf8').split('><><><><'); + +// throw away the EOF marker +cases.pop() + +test('matches bash expansions', function(t) { + cases.forEach(function(testcase) { + var set = testcase.split('\n'); + var pattern = set.shift(); + var actual = expand(pattern); + + // If it expands to the empty string, then it's actually + // just nothing, but Bash is a singly typed language, so + // "nothing" is the same as "". + if (set.length === 1 && set[0] === '') { + set = [] + } else { + // otherwise, strip off the [] that were added so that + // "" expansions would be preserved properly. + set = set.map(function (s) { + return s.replace(/^\[|\]$/g, '') + }) + } + + t.same(actual, set, pattern); + }); + t.end(); +}) diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt new file mode 100644 index 0000000..958148d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt @@ -0,0 +1,1075 @@ +A{b,{d,e},{f,g}}Z +[AbZ] +[AdZ] +[AeZ] +[AfZ] +[AgZ]><><><><><><><\{a,b}{{a,b},a,b} +[{a,b}a] +[{a,b}b] +[{a,b}a] +[{a,b}b]><><><><{{a,b} +[{a] +[{b]><><><><{a,b}} +[a}] +[b}]><><><><{,} +><><><><><><><{,}b +[b] +[b]><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><{-01..5} +[-01] +[000] +[001] +[002] +[003] +[004] +[005]><><><><{-05..100..5} +[-05] +[000] +[005] +[010] +[015] +[020] +[025] +[030] +[035] +[040] +[045] +[050] +[055] +[060] +[065] +[070] +[075] +[080] +[085] +[090] +[095] +[100]><><><><{-05..100} +[-05] +[-04] +[-03] +[-02] +[-01] +[000] +[001] +[002] +[003] +[004] +[005] +[006] +[007] +[008] +[009] +[010] +[011] +[012] +[013] +[014] +[015] +[016] +[017] +[018] +[019] +[020] +[021] +[022] +[023] +[024] +[025] +[026] +[027] +[028] +[029] +[030] +[031] +[032] +[033] +[034] +[035] +[036] +[037] +[038] +[039] +[040] +[041] +[042] +[043] +[044] +[045] +[046] +[047] +[048] +[049] +[050] +[051] +[052] +[053] +[054] +[055] +[056] +[057] +[058] +[059] +[060] +[061] +[062] +[063] +[064] +[065] +[066] +[067] +[068] +[069] +[070] +[071] +[072] +[073] +[074] +[075] +[076] +[077] +[078] +[079] +[080] +[081] +[082] +[083] +[084] +[085] +[086] +[087] +[088] +[089] +[090] +[091] +[092] +[093] +[094] +[095] +[096] +[097] +[098] +[099] +[100]><><><><{0..5..2} +[0] +[2] +[4]><><><><{0001..05..2} +[0001] +[0003] +[0005]><><><><{0001..-5..2} +[0001] +[-001] +[-003] +[-005]><><><><{0001..-5..-2} +[0001] +[-001] +[-003] +[-005]><><><><{0001..5..-2} +[0001] +[0003] +[0005]><><><><{01..5} +[01] +[02] +[03] +[04] +[05]><><><><{1..05} +[01] +[02] +[03] +[04] +[05]><><><><{1..05..3} +[01] +[04]><><><><{05..100} +[005] +[006] +[007] +[008] +[009] +[010] +[011] +[012] +[013] +[014] +[015] +[016] +[017] +[018] +[019] +[020] +[021] +[022] +[023] +[024] +[025] +[026] +[027] +[028] +[029] +[030] +[031] +[032] +[033] +[034] +[035] +[036] +[037] +[038] +[039] +[040] +[041] +[042] +[043] +[044] +[045] +[046] +[047] +[048] +[049] +[050] +[051] +[052] +[053] +[054] +[055] +[056] +[057] +[058] +[059] +[060] +[061] +[062] +[063] +[064] +[065] +[066] +[067] +[068] +[069] +[070] +[071] +[072] +[073] +[074] +[075] +[076] +[077] +[078] +[079] +[080] +[081] +[082] +[083] +[084] +[085] +[086] +[087] +[088] +[089] +[090] +[091] +[092] +[093] +[094] +[095] +[096] +[097] +[098] +[099] +[100]><><><><{0a..0z} +[{0a..0z}]><><><><{a,b\}c,d} +[a] +[b}c] +[d]><><><><{a,b{c,d} +[{a,bc] +[{a,bd]><><><><{a,b}c,d} +[ac,d}] +[bc,d}]><><><><{a..F} +[a] +[`] +[_] +[^] +[]] +[] +[[] +[Z] +[Y] +[X] +[W] +[V] +[U] +[T] +[S] +[R] +[Q] +[P] +[O] +[N] +[M] +[L] +[K] +[J] +[I] +[H] +[G] +[F]><><><><{A..f} +[A] +[B] +[C] +[D] +[E] +[F] +[G] +[H] +[I] +[J] +[K] +[L] +[M] +[N] +[O] +[P] +[Q] +[R] +[S] +[T] +[U] +[V] +[W] +[X] +[Y] +[Z] +[[] +[] +[]] +[^] +[_] +[`] +[a] +[b] +[c] +[d] +[e] +[f]><><><><{a..Z} +[a] +[`] +[_] +[^] +[]] +[] +[[] +[Z]><><><><{A..z} +[A] +[B] +[C] +[D] +[E] +[F] +[G] +[H] +[I] +[J] +[K] +[L] +[M] +[N] +[O] +[P] +[Q] +[R] +[S] +[T] +[U] +[V] +[W] +[X] +[Y] +[Z] +[[] +[] +[]] +[^] +[_] +[`] +[a] +[b] +[c] +[d] +[e] +[f] +[g] +[h] +[i] +[j] +[k] +[l] +[m] +[n] +[o] +[p] +[q] +[r] +[s] +[t] +[u] +[v] +[w] +[x] +[y] +[z]><><><><{z..A} +[z] +[y] +[x] +[w] +[v] +[u] +[t] +[s] +[r] +[q] +[p] +[o] +[n] +[m] +[l] +[k] +[j] +[i] +[h] +[g] +[f] +[e] +[d] +[c] +[b] +[a] +[`] +[_] +[^] +[]] +[] +[[] +[Z] +[Y] +[X] +[W] +[V] +[U] +[T] +[S] +[R] +[Q] +[P] +[O] +[N] +[M] +[L] +[K] +[J] +[I] +[H] +[G] +[F] +[E] +[D] +[C] +[B] +[A]><><><><{Z..a} +[Z] +[[] +[] +[]] +[^] +[_] +[`] +[a]><><><><{a..F..2} +[a] +[_] +[]] +[[] +[Y] +[W] +[U] +[S] +[Q] +[O] +[M] +[K] +[I] +[G]><><><><{A..f..02} +[A] +[C] +[E] +[G] +[I] +[K] +[M] +[O] +[Q] +[S] +[U] +[W] +[Y] +[[] +[]] +[_] +[a] +[c] +[e]><><><><{a..Z..5} +[a] +[]><><><><><><><{A..z..10} +[A] +[K] +[U] +[_] +[i] +[s]><><><><{z..A..-2} +[z] +[x] +[v] +[t] +[r] +[p] +[n] +[l] +[j] +[h] +[f] +[d] +[b] +[`] +[^] +[] +[Z] +[X] +[V] +[T] +[R] +[P] +[N] +[L] +[J] +[H] +[F] +[D] +[B]><><><><{Z..a..20} +[Z]><><><><{a{,b} +[{a] +[{ab]><><><><{a},b} +[a}] +[b]><><><><{x,y{,}g} +[x] +[yg] +[yg]><><><><{x,y{}g} +[x] +[y{}g]><><><><{{a,b} +[{a] +[{b]><><><><{{a,b},c} +[a] +[b] +[c]><><><><{{a,b}c} +[{ac}] +[{bc}]><><><><{{a,b},} +[a] +[b]><><><><><><><{{a,b},}c +[ac] +[bc] +[c]><><><><{{a,b}.} +[{a.}] +[{b.}]><><><><{{a,b}} +[{a}] +[{b}]><><><><><><>< +><><><><{-10..00} +[-10] +[-09] +[-08] +[-07] +[-06] +[-05] +[-04] +[-03] +[-02] +[-01] +[000]><><><><{a,\\{a,b}c} +[a] +[\ac] +[\bc]><><><><{a,\{a,b}c} +[ac}] +[{ac}] +[bc}]><><><><><><><{-10.\.00} +[{-10..00}]><><><><><><><><><><{l,n,m}xyz +[lxyz] +[nxyz] +[mxyz]><><><><{abc\,def} +[{abc,def}]><><><><{abc} +[{abc}]><><><><{x\,y,\{abc\},trie} +[x,y] +[{abc}] +[trie]><><><><{} +[{}]><><><><} +[}]><><><><{ +[{]><><><><><><><{1..10} +[1] +[2] +[3] +[4] +[5] +[6] +[7] +[8] +[9] +[10]><><><><{0..10,braces} +[0..10] +[braces]><><><><{{0..10},braces} +[0] +[1] +[2] +[3] +[4] +[5] +[6] +[7] +[8] +[9] +[10] +[braces]><><><><><><><{3..3} +[3]><><><><><><><{10..1} +[10] +[9] +[8] +[7] +[6] +[5] +[4] +[3] +[2] +[1]><><><><{10..1}y +[10y] +[9y] +[8y] +[7y] +[6y] +[5y] +[4y] +[3y] +[2y] +[1y]><><><><><><><{a..f} +[a] +[b] +[c] +[d] +[e] +[f]><><><><{f..a} +[f] +[e] +[d] +[c] +[b] +[a]><><><><{a..A} +[a] +[`] +[_] +[^] +[]] +[] +[[] +[Z] +[Y] +[X] +[W] +[V] +[U] +[T] +[S] +[R] +[Q] +[P] +[O] +[N] +[M] +[L] +[K] +[J] +[I] +[H] +[G] +[F] +[E] +[D] +[C] +[B] +[A]><><><><{A..a} +[A] +[B] +[C] +[D] +[E] +[F] +[G] +[H] +[I] +[J] +[K] +[L] +[M] +[N] +[O] +[P] +[Q] +[R] +[S] +[T] +[U] +[V] +[W] +[X] +[Y] +[Z] +[[] +[] +[]] +[^] +[_] +[`] +[a]><><><><{f..f} +[f]><><><><{1..f} +[{1..f}]><><><><{f..1} +[{f..1}]><><><><{-1..-10} +[-1] +[-2] +[-3] +[-4] +[-5] +[-6] +[-7] +[-8] +[-9] +[-10]><><><><{-20..0} +[-20] +[-19] +[-18] +[-17] +[-16] +[-15] +[-14] +[-13] +[-12] +[-11] +[-10] +[-9] +[-8] +[-7] +[-6] +[-5] +[-4] +[-3] +[-2] +[-1] +[0]><><><><><><><><><><{klklkl}{1,2,3} +[{klklkl}1] +[{klklkl}2] +[{klklkl}3]><><><><{1..10..2} +[1] +[3] +[5] +[7] +[9]><><><><{-1..-10..2} +[-1] +[-3] +[-5] +[-7] +[-9]><><><><{-1..-10..-2} +[-1] +[-3] +[-5] +[-7] +[-9]><><><><{10..1..-2} +[10] +[8] +[6] +[4] +[2]><><><><{10..1..2} +[10] +[8] +[6] +[4] +[2]><><><><{1..20..2} +[1] +[3] +[5] +[7] +[9] +[11] +[13] +[15] +[17] +[19]><><><><{1..20..20} +[1]><><><><{100..0..5} +[100] +[95] +[90] +[85] +[80] +[75] +[70] +[65] +[60] +[55] +[50] +[45] +[40] +[35] +[30] +[25] +[20] +[15] +[10] +[5] +[0]><><><><{100..0..-5} +[100] +[95] +[90] +[85] +[80] +[75] +[70] +[65] +[60] +[55] +[50] +[45] +[40] +[35] +[30] +[25] +[20] +[15] +[10] +[5] +[0]><><><><{a..z} +[a] +[b] +[c] +[d] +[e] +[f] +[g] +[h] +[i] +[j] +[k] +[l] +[m] +[n] +[o] +[p] +[q] +[r] +[s] +[t] +[u] +[v] +[w] +[x] +[y] +[z]><><><><{a..z..2} +[a] +[c] +[e] +[g] +[i] +[k] +[m] +[o] +[q] +[s] +[u] +[w] +[y]><><><><{z..a..-2} +[z] +[x] +[v] +[t] +[r] +[p] +[n] +[l] +[j] +[h] +[f] +[d] +[b]><><><><{2147483645..2147483649} +[2147483645] +[2147483646] +[2147483647] +[2147483648] +[2147483649]><><><><{10..0..2} +[10] +[8] +[6] +[4] +[2] +[0]><><><><{10..0..-2} +[10] +[8] +[6] +[4] +[2] +[0]><><><><{-50..-0..5} +[-50] +[-45] +[-40] +[-35] +[-30] +[-25] +[-20] +[-15] +[-10] +[-5] +[0]><><><><{1..10.f} +[{1..10.f}]><><><><{1..ff} +[{1..ff}]><><><><{1..10..ff} +[{1..10..ff}]><><><><{1.20..2} +[{1.20..2}]><><><><{1..20..f2} +[{1..20..f2}]><><><><{1..20..2f} +[{1..20..2f}]><><><><{1..2f..2} +[{1..2f..2}]><><><><{1..ff..2} +[{1..ff..2}]><><><><{1..ff} +[{1..ff}]><><><><{1..f} +[{1..f}]><><><><{1..0f} +[{1..0f}]><><><><{1..10f} +[{1..10f}]><><><><{1..10.f} +[{1..10.f}]><><><><{1..10.f} +[{1..10.f}]><><><>< \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt new file mode 100644 index 0000000..e5161c3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt @@ -0,0 +1,182 @@ +# skip quotes for now +# "{x,x}" +# {"x,x"} +# {x","x} +# '{a,b}{{a,b},a,b}' +A{b,{d,e},{f,g}}Z +PRE-{a,b}{{a,b},a,b}-POST +\\{a,b}{{a,b},a,b} +{{a,b} +{a,b}} +{,} +a{,} +{,}b +a{,}b +a{b}c +a{1..5}b +a{01..5}b +a{-01..5}b +a{-01..5..3}b +a{001..9}b +a{b,c{d,e},{f,g}h}x{y,z +a{b,c{d,e},{f,g}h}x{y,z\\} +a{b,c{d,e},{f,g}h}x{y,z} +a{b{c{d,e}f{x,y{{g}h +a{b{c{d,e}f{x,y{}g}h +a{b{c{d,e}f{x,y}}g}h +a{b{c{d,e}f}g}h +a{{x,y},z}b +f{x,y{g,z}}h +f{x,y{{g,z}}h +f{x,y{{g,z}}h} +f{x,y{{g}h +f{x,y{{g}}h +f{x,y{}g}h +z{a,b{,c}d +z{a,b},c}d +{-01..5} +{-05..100..5} +{-05..100} +{0..5..2} +{0001..05..2} +{0001..-5..2} +{0001..-5..-2} +{0001..5..-2} +{01..5} +{1..05} +{1..05..3} +{05..100} +{0a..0z} +{a,b\\}c,d} +{a,b{c,d} +{a,b}c,d} +{a..F} +{A..f} +{a..Z} +{A..z} +{z..A} +{Z..a} +{a..F..2} +{A..f..02} +{a..Z..5} +d{a..Z..5}b +{A..z..10} +{z..A..-2} +{Z..a..20} +{a{,b} +{a},b} +{x,y{,}g} +{x,y{}g} +{{a,b} +{{a,b},c} +{{a,b}c} +{{a,b},} +X{{a,b},}X +{{a,b},}c +{{a,b}.} +{{a,b}} +X{a..#}X +# this next one is an empty string + +{-10..00} +# Need to escape slashes in here for reasons i guess. +{a,\\\\{a,b}c} +{a,\\{a,b}c} +a,\\{b,c} +{-10.\\.00} +#### bash tests/braces.tests +# Note that some tests are edited out because some features of +# bash are intentionally not supported in this brace expander. +ff{c,b,a} +f{d,e,f}g +{l,n,m}xyz +{abc\\,def} +{abc} +{x\\,y,\\{abc\\},trie} +# not impementing back-ticks obviously +# XXXX\\{`echo a b c | tr ' ' ','`\\} +{} +# We only ever have to worry about parsing a single argument, +# not a command line, so spaces have a different meaning than bash. +# { } +} +{ +abcd{efgh +# spaces +# foo {1,2} bar +# not impementing back-ticks obviously +# `zecho foo {1,2} bar` +# $(zecho foo {1,2} bar) +# ${var} is not a variable here, like it is in bash. omit. +# foo{bar,${var}.} +# foo{bar,${var}} +# isaacs: skip quotes for now +# "${var}"{x,y} +# $var{x,y} +# ${var}{x,y} +# new sequence brace operators +{1..10} +# this doesn't work yet +{0..10,braces} +# but this does +{{0..10},braces} +x{{0..10},braces}y +{3..3} +x{3..3}y +{10..1} +{10..1}y +x{10..1}y +{a..f} +{f..a} +{a..A} +{A..a} +{f..f} +# mixes are incorrectly-formed brace expansions +{1..f} +{f..1} +# spaces +# 0{1..9} {10..20} +# do negative numbers work? +{-1..-10} +{-20..0} +# weirdly-formed brace expansions -- fixed in post-bash-3.1 +a-{b{d,e}}-c +a-{bdef-{g,i}-c +# isaacs: skip quotes for now +# {"klklkl"}{1,2,3} +# isaacs: this is a valid test, though +{klklkl}{1,2,3} +# {"x,x"} +{1..10..2} +{-1..-10..2} +{-1..-10..-2} +{10..1..-2} +{10..1..2} +{1..20..2} +{1..20..20} +{100..0..5} +{100..0..-5} +{a..z} +{a..z..2} +{z..a..-2} +# make sure brace expansion handles ints > 2**31 - 1 using intmax_t +{2147483645..2147483649} +# unwanted zero-padding -- fixed post-bash-4.0 +{10..0..2} +{10..0..-2} +{-50..-0..5} +# bad +{1..10.f} +{1..ff} +{1..10..ff} +{1.20..2} +{1..20..f2} +{1..20..2f} +{1..2f..2} +{1..ff..2} +{1..ff} +{1..f} +{1..0f} +{1..10f} +{1..10.f} +{1..10.f} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js new file mode 100644 index 0000000..3fcc185 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js @@ -0,0 +1,9 @@ +var test = require('tape'); +var expand = require('..'); + +test('ignores ${', function(t) { + t.deepEqual(expand('${1..3}'), ['${1..3}']); + t.deepEqual(expand('${a,b}${c,d}'), ['${a,b}${c,d}']); + t.deepEqual(expand('x${a,b}x${c,d}x'), ['x${a,b}x${c,d}x']); + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js new file mode 100644 index 0000000..e429121 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js @@ -0,0 +1,10 @@ +var test = require('tape'); +var expand = require('..'); + +test('empty option', function(t) { + t.deepEqual(expand('-v{,,,,}'), [ + '-v', '-v', '-v', '-v', '-v' + ]); + t.end(); +}); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh new file mode 100644 index 0000000..e040e66 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +set -e + +# Bash 4.3 because of arbitrary need to pick a single standard. + +if [ "${BASH_VERSINFO[0]}" != "4" ] || [ "${BASH_VERSINFO[1]}" != "3" ]; then + echo "this script requires bash 4.3" >&2 + exit 1 +fi + +CDPATH= cd "$(dirname "$0")" + +js='require("./")(process.argv[1]).join(" ")' + +cat cases.txt | \ + while read case; do + if [ "${case:0:1}" = "#" ]; then + continue; + fi; + b="$($BASH -c 'for c in '"$case"'; do echo ["$c"]; done')" + echo "$case" + echo -n "$b><><><><"; + done > bash-results.txt diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js new file mode 100644 index 0000000..8d434c2 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js @@ -0,0 +1,15 @@ +var test = require('tape'); +var expand = require('..'); + +test('negative increment', function(t) { + t.deepEqual(expand('{3..1}'), ['3', '2', '1']); + t.deepEqual(expand('{10..8}'), ['10', '9', '8']); + t.deepEqual(expand('{10..08}'), ['10', '09', '08']); + t.deepEqual(expand('{c..a}'), ['c', 'b', 'a']); + + t.deepEqual(expand('{4..0..2}'), ['4', '2', '0']); + t.deepEqual(expand('{4..0..-2}'), ['4', '2', '0']); + t.deepEqual(expand('{e..a..2}'), ['e', 'c', 'a']); + + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js new file mode 100644 index 0000000..0862dc5 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js @@ -0,0 +1,16 @@ +var test = require('tape'); +var expand = require('..'); + +test('nested', function(t) { + t.deepEqual(expand('{a,b{1..3},c}'), [ + 'a', 'b1', 'b2', 'b3', 'c' + ]); + t.deepEqual(expand('{{A..Z},{a..z}}'), + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('') + ); + t.deepEqual(expand('ppp{,config,oe{,conf}}'), [ + 'ppp', 'pppconfig', 'pppoe', 'pppoeconf' + ]); + t.end(); +}); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js new file mode 100644 index 0000000..c00ad15 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js @@ -0,0 +1,10 @@ +var test = require('tape'); +var expand = require('..'); + +test('order', function(t) { + t.deepEqual(expand('a{d,c,b}e'), [ + 'ade', 'ace', 'abe' + ]); + t.end(); +}); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js new file mode 100644 index 0000000..e415877 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js @@ -0,0 +1,13 @@ +var test = require('tape'); +var expand = require('..'); + +test('pad', function(t) { + t.deepEqual(expand('{9..11}'), [ + '9', '10', '11' + ]); + t.deepEqual(expand('{09..11}'), [ + '09', '10', '11' + ]); + t.end(); +}); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js new file mode 100644 index 0000000..3038fba --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js @@ -0,0 +1,7 @@ +var test = require('tape'); +var expand = require('..'); + +test('x and y of same type', function(t) { + t.deepEqual(expand('{a..9}'), ['{a..9}']); + t.end(); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js new file mode 100644 index 0000000..f73a957 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js @@ -0,0 +1,50 @@ +var test = require('tape'); +var expand = require('..'); + +test('numeric sequences', function(t) { + t.deepEqual(expand('a{1..2}b{2..3}c'), [ + 'a1b2c', 'a1b3c', 'a2b2c', 'a2b3c' + ]); + t.deepEqual(expand('{1..2}{2..3}'), [ + '12', '13', '22', '23' + ]); + t.end(); +}); + +test('numeric sequences with step count', function(t) { + t.deepEqual(expand('{0..8..2}'), [ + '0', '2', '4', '6', '8' + ]); + t.deepEqual(expand('{1..8..2}'), [ + '1', '3', '5', '7' + ]); + t.end(); +}); + +test('numeric sequence with negative x / y', function(t) { + t.deepEqual(expand('{3..-2}'), [ + '3', '2', '1', '0', '-1', '-2' + ]); + t.end(); +}); + +test('alphabetic sequences', function(t) { + t.deepEqual(expand('1{a..b}2{b..c}3'), [ + '1a2b3', '1a2c3', '1b2b3', '1b2c3' + ]); + t.deepEqual(expand('{a..b}{b..c}'), [ + 'ab', 'ac', 'bb', 'bc' + ]); + t.end(); +}); + +test('alphabetic sequences with step count', function(t) { + t.deepEqual(expand('{a..k..2}'), [ + 'a', 'c', 'e', 'g', 'i', 'k' + ]); + t.deepEqual(expand('{b..k..2}'), [ + 'b', 'd', 'f', 'h', 'j' + ]); + t.end(); +}); + diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json new file mode 100644 index 0000000..8f5c7dc --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json @@ -0,0 +1,63 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "name": "minimatch", + "description": "a glob matcher in javascript", + "version": "2.0.10", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/minimatch.git" + }, + "main": "minimatch.js", + "scripts": { + "posttest": "standard minimatch.js test/*.js", + "test": "tap test/*.js", + "prepublish": "browserify -o browser.js -e minimatch.js -s minimatch --bare" + }, + "engines": { + "node": "*" + }, + "dependencies": { + "brace-expansion": "^1.0.0" + }, + "devDependencies": { + "browserify": "^9.0.3", + "standard": "^3.7.2", + "tap": "^1.2.0" + }, + "license": "ISC", + "files": [ + "minimatch.js", + "browser.js" + ], + "gitHead": "6afb85f0c324b321f76a38df81891e562693e257", + "bugs": { + "url": "https://github.com/isaacs/minimatch/issues" + }, + "homepage": "https://github.com/isaacs/minimatch#readme", + "_id": "minimatch@2.0.10", + "_shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", + "_from": "minimatch@2.0.10", + "_npmVersion": "3.1.0", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "8d087c39c6b38c001b97fca7ce6d0e1e80afbac7", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/README.md new file mode 100644 index 0000000..a2981ea --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/README.md @@ -0,0 +1,51 @@ +# once + +Only call a function once. + +## usage + +```javascript +var once = require('once') + +function load (file, cb) { + cb = once(cb) + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Or add to the Function.prototype in a responsible way: + +```javascript +// only has to be done once +require('once').proto() + +function load (file, cb) { + cb = cb.once() + loader.load('file') + loader.once('load', cb) + loader.once('error', cb) +} +``` + +Ironically, the prototype feature makes this module twice as +complicated as necessary. + +To check whether you function has been called, use `fn.called`. Once the +function is called for the first time the return value of the original +function is saved in `fn.value` and subsequent calls will continue to +return this value. + +```javascript +var once = require('once') + +function load (cb) { + cb = once(cb) + var stream = createStream() + stream.once('data', cb) + stream.once('end', function () { + if (!cb.called) cb(new Error('not found')) + }) +} +``` diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md new file mode 100644 index 0000000..98eab25 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md @@ -0,0 +1,36 @@ +# wrappy + +Callback wrapping utility + +## USAGE + +```javascript +var wrappy = require("wrappy") + +// var wrapper = wrappy(wrapperFunction) + +// make sure a cb is called only once +// See also: http://npm.im/once for this specific use case +var once = wrappy(function (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } +}) + +function printBoo () { + console.log('boo') +} +// has some rando property +printBoo.iAmBooPrinter = true + +var onlyPrintOnce = once(printBoo) + +onlyPrintOnce() // prints 'boo' +onlyPrintOnce() // does nothing + +// random property is retained! +assert.equal(onlyPrintOnce.iAmBooPrinter, true) +``` diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json new file mode 100644 index 0000000..5411286 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json @@ -0,0 +1,52 @@ +{ + "name": "wrappy", + "version": "1.0.1", + "description": "Callback wrapping utility", + "main": "wrappy.js", + "directories": { + "test": "test" + }, + "dependencies": {}, + "devDependencies": { + "tap": "^0.4.12" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/npm/wrappy.git" + }, + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "bugs": { + "url": "https://github.com/npm/wrappy/issues" + }, + "homepage": "https://github.com/npm/wrappy", + "gitHead": "006a8cbac6b99988315834c207896eed71fd069a", + "_id": "wrappy@1.0.1", + "_shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "_from": "wrappy@1.0.1", + "_npmVersion": "2.0.0", + "_nodeVersion": "0.10.31", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "dist": { + "shasum": "1e65969965ccbc2db4548c6b84a6f2c5aedd4739", + "tarball": "http://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz" + }, + "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js new file mode 100644 index 0000000..5ed0fcd --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js @@ -0,0 +1,51 @@ +var test = require('tap').test +var wrappy = require('../wrappy.js') + +test('basic', function (t) { + function onceifier (cb) { + var called = false + return function () { + if (called) return + called = true + return cb.apply(this, arguments) + } + } + onceifier.iAmOnce = {} + var once = wrappy(onceifier) + t.equal(once.iAmOnce, onceifier.iAmOnce) + + var called = 0 + function boo () { + t.equal(called, 0) + called++ + } + // has some rando property + boo.iAmBoo = true + + var onlyPrintOnce = once(boo) + + onlyPrintOnce() // prints 'boo' + onlyPrintOnce() // does nothing + t.equal(called, 1) + + // random property is retained! + t.equal(onlyPrintOnce.iAmBoo, true) + + var logs = [] + var logwrap = wrappy(function (msg, cb) { + logs.push(msg + ' wrapping cb') + return function () { + logs.push(msg + ' before cb') + var ret = cb.apply(this, arguments) + logs.push(msg + ' after cb') + } + }) + + var c = logwrap('foo', function () { + t.same(logs, [ 'foo wrapping cb', 'foo before cb' ]) + }) + c() + t.same(logs, [ 'foo wrapping cb', 'foo before cb', 'foo after cb' ]) + + t.end() +}) diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js new file mode 100644 index 0000000..bb7e7d6 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js @@ -0,0 +1,33 @@ +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/once.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/once.js new file mode 100644 index 0000000..2e1e721 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/once.js @@ -0,0 +1,21 @@ +var wrappy = require('wrappy') +module.exports = wrappy(once) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/package.json new file mode 100644 index 0000000..39887f8 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/package.json @@ -0,0 +1,60 @@ +{ + "name": "once", + "version": "1.3.2", + "description": "Run a function exactly one time", + "main": "once.js", + "directories": { + "test": "test" + }, + "dependencies": { + "wrappy": "1" + }, + "devDependencies": { + "tap": "~0.3.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/isaacs/once.git" + }, + "keywords": [ + "once", + "function", + "one", + "single" + ], + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "gitHead": "e35eed5a7867574e2bf2260a1ba23970958b22f2", + "bugs": { + "url": "https://github.com/isaacs/once/issues" + }, + "homepage": "https://github.com/isaacs/once#readme", + "_id": "once@1.3.2", + "_shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", + "_from": "once@1.3.2", + "_npmVersion": "2.9.1", + "_nodeVersion": "2.0.0", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "d8feeca93b039ec1dcdee7741c92bdac5e28081b", + "tarball": "http://registry.npmjs.org/once/-/once-1.3.2.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "_resolved": "https://registry.npmjs.org/once/-/once-1.3.2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js new file mode 100644 index 0000000..c618360 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/once/test/once.js @@ -0,0 +1,23 @@ +var test = require('tap').test +var once = require('../once.js') + +test('once', function (t) { + var f = 0 + function fn (g) { + t.equal(f, 0) + f ++ + return f + g + this + } + fn.ownProperty = {} + var foo = once(fn) + t.equal(fn.ownProperty, foo.ownProperty) + t.notOk(foo.called) + for (var i = 0; i < 1E3; i++) { + t.same(f, i === 0 ? 0 : 1) + var g = foo.call(1, 1) + t.ok(foo.called) + t.same(g, 3) + t.same(f, 1) + } + t.end() +}) diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js new file mode 100644 index 0000000..19f103f --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js @@ -0,0 +1,20 @@ +'use strict'; + +function posix(path) { + return path.charAt(0) === '/'; +}; + +function win32(path) { + // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ''; + var isUnc = !!device && device.charAt(1) !== ':'; + + // UNC paths are always absolute + return !!result[2] || isUnc; +}; + +module.exports = process.platform === 'win32' ? win32 : posix; +module.exports.posix = posix; +module.exports.win32 = win32; diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license new file mode 100644 index 0000000..654d0bf --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.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. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json new file mode 100644 index 0000000..6279e09 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json @@ -0,0 +1,70 @@ +{ + "name": "path-is-absolute", + "version": "1.0.0", + "description": "Node.js 0.12 path.isAbsolute() ponyfill", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/path-is-absolute.git" + }, + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=0.10.0" + }, + "scripts": { + "test": "node test.js" + }, + "files": [ + "index.js" + ], + "keywords": [ + "path", + "paths", + "file", + "dir", + "absolute", + "isabsolute", + "is-absolute", + "built-in", + "util", + "utils", + "core", + "ponyfill", + "polyfill", + "shim", + "is", + "detect", + "check" + ], + "gitHead": "7a76a0c9f2263192beedbe0a820e4d0baee5b7a1", + "bugs": { + "url": "https://github.com/sindresorhus/path-is-absolute/issues" + }, + "homepage": "https://github.com/sindresorhus/path-is-absolute", + "_id": "path-is-absolute@1.0.0", + "_shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", + "_from": "path-is-absolute@1.0.0", + "_npmVersion": "2.5.1", + "_nodeVersion": "0.12.0", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "dist": { + "shasum": "263dada66ab3f2fb10bf7f9d24dd8f3e570ef912", + "tarball": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md new file mode 100644 index 0000000..cdf94f4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md @@ -0,0 +1,51 @@ +# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) + +> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) ponyfill + +> Ponyfill: A polyfill that doesn't overwrite the native method + + +## Install + +``` +$ npm install --save path-is-absolute +``` + + +## Usage + +```js +var pathIsAbsolute = require('path-is-absolute'); + +// Linux +pathIsAbsolute('/home/foo'); +//=> true + +// Windows +pathIsAbsolute('C:/Users/'); +//=> true + +// Any OS +pathIsAbsolute.posix('/home/foo'); +//=> true +``` + + +## API + +See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). + +### pathIsAbsolute(path) + +### pathIsAbsolute.posix(path) + +The Posix specific version. + +### pathIsAbsolute.win32(path) + +The Windows specific version. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/package.json new file mode 100644 index 0000000..0e325a6 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/package.json @@ -0,0 +1,73 @@ +{ + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "name": "glob", + "description": "a little globber", + "version": "5.0.14", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "main": "glob.js", + "files": [ + "glob.js", + "sync.js", + "common.js" + ], + "engines": { + "node": "*" + }, + "dependencies": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^2.0.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "devDependencies": { + "mkdirp": "0", + "rimraf": "^2.2.8", + "tap": "^1.1.4", + "tick": "0.0.6" + }, + "scripts": { + "prepublish": "npm run benchclean", + "profclean": "rm -f v8.log profile.txt", + "test": "tap test/*.js --cov", + "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js", + "bench": "bash benchmark.sh", + "prof": "bash prof.sh && cat profile.txt", + "benchclean": "node benchclean.js" + }, + "license": "ISC", + "gitHead": "c47d4514f8f93f23b589afa18947306116bfe40f", + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "homepage": "https://github.com/isaacs/node-glob#readme", + "_id": "glob@5.0.14", + "_shasum": "a811d507acb605441edd6cd2622a3c6f06cc00e1", + "_from": "glob@5.0.14", + "_npmVersion": "3.1.0", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "a811d507acb605441edd6cd2622a3c6f06cc00e1", + "tarball": "http://registry.npmjs.org/glob/-/glob-5.0.14.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.14.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/sync.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/sync.js new file mode 100644 index 0000000..09883d2 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/sync.js @@ -0,0 +1,460 @@ +module.exports = globSync +globSync.GlobSync = GlobSync + +var fs = require('fs') +var minimatch = require('minimatch') +var Minimatch = minimatch.Minimatch +var Glob = require('./glob.js').Glob +var util = require('util') +var path = require('path') +var assert = require('assert') +var isAbsolute = require('path-is-absolute') +var common = require('./common.js') +var alphasort = common.alphasort +var alphasorti = common.alphasorti +var setopts = common.setopts +var ownProp = common.ownProp +var childrenIgnored = common.childrenIgnored + +function globSync (pattern, options) { + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + return new GlobSync(pattern, options).found +} + +function GlobSync (pattern, options) { + if (!pattern) + throw new Error('must provide pattern') + + if (typeof options === 'function' || arguments.length === 3) + throw new TypeError('callback provided to sync glob\n'+ + 'See: https://github.com/isaacs/node-glob/issues/167') + + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options) + + setopts(this, pattern, options) + + if (this.noprocess) + return this + + var n = this.minimatch.set.length + this.matches = new Array(n) + for (var i = 0; i < n; i ++) { + this._process(this.minimatch.set[i], i, false) + } + this._finish() +} + +GlobSync.prototype._finish = function () { + assert(this instanceof GlobSync) + if (this.realpath) { + var self = this + this.matches.forEach(function (matchset, index) { + var set = self.matches[index] = Object.create(null) + for (var p in matchset) { + try { + p = self._makeAbs(p) + var real = fs.realpathSync(p, self.realpathCache) + set[real] = true + } catch (er) { + if (er.syscall === 'stat') + set[self._makeAbs(p)] = true + else + throw er + } + } + }) + } + common.finish(this) +} + + +GlobSync.prototype._process = function (pattern, index, inGlobStar) { + assert(this instanceof GlobSync) + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === 'string') { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // See if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join('/'), index) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's 'absolute' like /foo/bar, + // or 'relative' like '../baz' + prefix = pattern.slice(0, n).join('/') + break + } + + var remain = pattern.slice(n) + + // get the list of entries. + var read + if (prefix === null) + read = '.' + else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { + if (!prefix || !isAbsolute(prefix)) + prefix = '/' + prefix + read = prefix + } else + read = prefix + + var abs = this._makeAbs(read) + + //if ignored, skip processing + if (childrenIgnored(this, read)) + return + + var isGlobStar = remain[0] === minimatch.GLOBSTAR + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar) +} + + +GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar) + + // if the abs isn't a dir, then nothing can match! + if (!entries) + return + + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = remain[0] + var negate = !!this.minimatch.negate + var rawGlob = pn._glob + var dotOk = this.dot || rawGlob.charAt(0) === '.' + + var matchedEntries = [] + for (var i = 0; i < entries.length; i++) { + var e = entries[i] + if (e.charAt(0) !== '.' || dotOk) { + var m + if (negate && !prefix) { + m = !e.match(pn) + } else { + m = e.match(pn) + } + if (m) + matchedEntries.push(e) + } + } + + var len = matchedEntries.length + // If there are no matched entries, then nothing matches. + if (len === 0) + return + + // if this is the last remaining pattern bit, then no need for + // an additional stat *unless* the user has specified mark or + // stat explicitly. We know they exist, since readdir returned + // them. + + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + if (prefix) { + if (prefix.slice(-1) !== '/') + e = prefix + '/' + e + else + e = prefix + e + } + + if (e.charAt(0) === '/' && !this.nomount) { + e = path.join(this.root, e) + } + this.matches[index][e] = true + } + // This was the last one, and no stats were needed + return + } + + // now test all matched entries as stand-ins for that part + // of the pattern. + remain.shift() + for (var i = 0; i < len; i ++) { + var e = matchedEntries[i] + var newPattern + if (prefix) + newPattern = [prefix, e] + else + newPattern = [e] + this._process(newPattern.concat(remain), index, inGlobStar) + } +} + + +GlobSync.prototype._emitMatch = function (index, e) { + var abs = this._makeAbs(e) + if (this.mark) + e = this._mark(e) + + if (this.matches[index][e]) + return + + if (this.nodir) { + var c = this.cache[this._makeAbs(e)] + if (c === 'DIR' || Array.isArray(c)) + return + } + + this.matches[index][e] = true + if (this.stat) + this._stat(e) +} + + +GlobSync.prototype._readdirInGlobStar = function (abs) { + // follow all symlinked directories forever + // just proceed as if this is a non-globstar situation + if (this.follow) + return this._readdir(abs, false) + + var entries + var lstat + var stat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + // lstat failed, doesn't exist + return null + } + + var isSym = lstat.isSymbolicLink() + this.symlinks[abs] = isSym + + // If it's not a symlink or a dir, then it's definitely a regular file. + // don't bother doing a readdir in that case. + if (!isSym && !lstat.isDirectory()) + this.cache[abs] = 'FILE' + else + entries = this._readdir(abs, false) + + return entries +} + +GlobSync.prototype._readdir = function (abs, inGlobStar) { + var entries + + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs) + + if (ownProp(this.cache, abs)) { + var c = this.cache[abs] + if (!c || c === 'FILE') + return null + + if (Array.isArray(c)) + return c + } + + try { + return this._readdirEntries(abs, fs.readdirSync(abs)) + } catch (er) { + this._readdirError(abs, er) + return null + } +} + +GlobSync.prototype._readdirEntries = function (abs, entries) { + // if we haven't asked to stat everything, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i ++) { + var e = entries[i] + if (abs === '/') + e = abs + e + else + e = abs + '/' + e + this.cache[e] = true + } + } + + this.cache[abs] = entries + + // mark and cache dir-ness + return entries +} + +GlobSync.prototype._readdirError = function (f, er) { + // handle errors, and cache the information + switch (er.code) { + case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 + case 'ENOTDIR': // totally normal. means it *does* exist. + this.cache[this._makeAbs(f)] = 'FILE' + break + + case 'ENOENT': // not terribly unusual + case 'ELOOP': + case 'ENAMETOOLONG': + case 'UNKNOWN': + this.cache[this._makeAbs(f)] = false + break + + default: // some unusual error. Treat as failure. + this.cache[this._makeAbs(f)] = false + if (this.strict) + throw er + if (!this.silent) + console.error('glob error', er) + break + } +} + +GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { + + var entries = this._readdir(abs, inGlobStar) + + // no entries means not a dir, so it can never have matches + // foo.txt/** doesn't match foo.txt + if (!entries) + return + + // test without the globstar, and with every child both below + // and replacing the globstar. + var remainWithoutGlobStar = remain.slice(1) + var gspref = prefix ? [ prefix ] : [] + var noGlobStar = gspref.concat(remainWithoutGlobStar) + + // the noGlobStar pattern exits the inGlobStar state + this._process(noGlobStar, index, false) + + var len = entries.length + var isSym = this.symlinks[abs] + + // If it's a symlink, and we're in a globstar, then stop + if (isSym && inGlobStar) + return + + for (var i = 0; i < len; i++) { + var e = entries[i] + if (e.charAt(0) === '.' && !this.dot) + continue + + // these two cases enter the inGlobStar state + var instead = gspref.concat(entries[i], remainWithoutGlobStar) + this._process(instead, index, true) + + var below = gspref.concat(entries[i], remain) + this._process(below, index, true) + } +} + +GlobSync.prototype._processSimple = function (prefix, index) { + // XXX review this. Shouldn't it be doing the mounting etc + // before doing stat? kinda weird? + var exists = this._stat(prefix) + + if (!this.matches[index]) + this.matches[index] = Object.create(null) + + // If it doesn't exist, then just mark the lack of results + if (!exists) + return + + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix) + if (prefix.charAt(0) === '/') { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + if (trail) + prefix += '/' + } + } + + if (process.platform === 'win32') + prefix = prefix.replace(/\\/g, '/') + + // Mark this as a match + this.matches[index][prefix] = true +} + +// Returns either 'DIR', 'FILE', or false +GlobSync.prototype._stat = function (f) { + var abs = this._makeAbs(f) + var needDir = f.slice(-1) === '/' + + if (f.length > this.maxLength) + return false + + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs] + + if (Array.isArray(c)) + c = 'DIR' + + // It exists, but maybe not how we need it + if (!needDir || c === 'DIR') + return c + + if (needDir && c === 'FILE') + return false + + // otherwise we have to stat, because maybe c=true + // if we know it exists, but not what it is. + } + + var exists + var stat = this.statCache[abs] + if (!stat) { + var lstat + try { + lstat = fs.lstatSync(abs) + } catch (er) { + return false + } + + if (lstat.isSymbolicLink()) { + try { + stat = fs.statSync(abs) + } catch (er) { + stat = lstat + } + } else { + stat = lstat + } + } + + this.statCache[abs] = stat + + var c = stat.isDirectory() ? 'DIR' : 'FILE' + this.cache[abs] = this.cache[abs] || c + + if (needDir && c !== 'DIR') + return false + + return c +} + +GlobSync.prototype._mark = function (p) { + return common.mark(this, p) +} + +GlobSync.prototype._makeAbs = function (f) { + return common.makeAbs(this, f) +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/package.json new file mode 100644 index 0000000..449d380 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/package.json @@ -0,0 +1,62 @@ +{ + "name": "rimraf", + "version": "2.4.2", + "main": "rimraf.js", + "description": "A deep deletion module for node (like `rm -rf`)", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "license": "ISC", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/rimraf.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "bin": { + "rimraf": "./bin.js" + }, + "dependencies": { + "glob": "^5.0.14" + }, + "files": [ + "LICENSE", + "README.md", + "bin.js", + "rimraf.js" + ], + "devDependencies": { + "mkdirp": "^0.5.1", + "tap": "^1.3.1" + }, + "gitHead": "4359e9d3b3c0f26e6abe3139a00b93337f1689d7", + "bugs": { + "url": "https://github.com/isaacs/rimraf/issues" + }, + "homepage": "https://github.com/isaacs/rimraf#readme", + "_id": "rimraf@2.4.2", + "_shasum": "ab4f39b08b72eae07c3d9fe9f4831aebfc9f431d", + "_from": "rimraf@2.4.2", + "_npmVersion": "3.1.0", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "dist": { + "shasum": "ab4f39b08b72eae07c3d9fe9f4831aebfc9f431d", + "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.4.2.tgz" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.2.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/rimraf.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/rimraf.js new file mode 100644 index 0000000..447705a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/node_modules/rimraf/rimraf.js @@ -0,0 +1,333 @@ +module.exports = rimraf +rimraf.sync = rimrafSync + +var assert = require("assert") +var path = require("path") +var fs = require("fs") +var glob = require("glob") + +var globOpts = { + nosort: true, + nocomment: true, + nonegate: true, + silent: true +} + +// for EMFILE handling +var timeout = 0 + +var isWindows = (process.platform === "win32") + +function defaults (options) { + var methods = [ + 'unlink', + 'chmod', + 'stat', + 'lstat', + 'rmdir', + 'readdir' + ] + methods.forEach(function(m) { + options[m] = options[m] || fs[m] + m = m + 'Sync' + options[m] = options[m] || fs[m] + }) + + options.maxBusyTries = options.maxBusyTries || 3 + options.emfileWait = options.emfileWait || 1000 + options.disableGlob = options.disableGlob || false +} + +function rimraf (p, options, cb) { + if (typeof options === 'function') { + cb = options + options = {} + } + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + assert.equal(typeof cb, 'function', 'rimraf: callback function required') + + defaults(options) + + var busyTries = 0 + var errState = null + var n = 0 + + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]) + + fs.lstat(p, function (er, stat) { + if (!er) + return afterGlob(null, [p]) + + glob(p, globOpts, afterGlob) + }) + + function next (er) { + errState = errState || er + if (--n === 0) + cb(errState) + } + + function afterGlob (er, results) { + if (er) + return cb(er) + + n = results.length + if (n === 0) + return cb() + + results.forEach(function (p) { + rimraf_(p, options, function CB (er) { + if (er) { + if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && + busyTries < options.maxBusyTries) { + busyTries ++ + var time = busyTries * 100 + // try again, with the same exact callback as this one. + return setTimeout(function () { + rimraf_(p, options, CB) + }, time) + } + + // this one won't happen if graceful-fs is used. + if (er.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(function () { + rimraf_(p, options, CB) + }, timeout ++) + } + + // already gone + if (er.code === "ENOENT") er = null + } + + timeout = 0 + next(er) + }) + }) + } +} + +// Two possible strategies. +// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR +// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR +// +// Both result in an extra syscall when you guess wrong. However, there +// are likely far more normal files in the world than directories. This +// is based on the assumption that a the average number of files per +// directory is >= 1. +// +// If anyone ever complains about this, then I guess the strategy could +// be made configurable somehow. But until then, YAGNI. +function rimraf_ (p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + // sunos lets the root user unlink directories, which is... weird. + // so we have to lstat here and make sure it's not a dir. + options.lstat(p, function (er, st) { + if (er && er.code === "ENOENT") + return cb(null) + + if (st && st.isDirectory()) + return rmdir(p, options, er, cb) + + options.unlink(p, function (er) { + if (er) { + if (er.code === "ENOENT") + return cb(null) + if (er.code === "EPERM") + return (isWindows) + ? fixWinEPERM(p, options, er, cb) + : rmdir(p, options, er, cb) + if (er.code === "EISDIR") + return rmdir(p, options, er, cb) + } + return cb(er) + }) + }) +} + +function fixWinEPERM (p, options, er, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + if (er) + assert(er instanceof Error) + + options.chmod(p, 666, function (er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er) + else + options.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er) + else if (stats.isDirectory()) + rmdir(p, options, er, cb) + else + options.unlink(p, cb) + }) + }) +} + +function fixWinEPERMSync (p, options, er) { + assert(p) + assert(options) + if (er) + assert(er instanceof Error) + + try { + options.chmodSync(p, 666) + } catch (er2) { + if (er2.code === "ENOENT") + return + else + throw er + } + + try { + var stats = options.statSync(p) + } catch (er3) { + if (er3.code === "ENOENT") + return + else + throw er + } + + if (stats.isDirectory()) + rmdirSync(p, options, er) + else + options.unlinkSync(p) +} + +function rmdir (p, options, originalEr, cb) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + assert(typeof cb === 'function') + + // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) + // if we guessed wrong, and it's not a directory, then + // raise the original error. + options.rmdir(p, function (er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb) + else if (er && er.code === "ENOTDIR") + cb(originalEr) + else + cb(er) + }) +} + +function rmkids(p, options, cb) { + assert(p) + assert(options) + assert(typeof cb === 'function') + + options.readdir(p, function (er, files) { + if (er) + return cb(er) + var n = files.length + if (n === 0) + return options.rmdir(p, cb) + var errState + files.forEach(function (f) { + rimraf(path.join(p, f), options, function (er) { + if (errState) + return + if (er) + return cb(errState = er) + if (--n === 0) + options.rmdir(p, cb) + }) + }) + }) +} + +// this looks simpler, and is strictly *faster*, but will +// tie up the JavaScript thread and fail on excessively +// deep directory trees. +function rimrafSync (p, options) { + options = options || {} + defaults(options) + + assert(p, 'rimraf: missing path') + assert.equal(typeof p, 'string', 'rimraf: path should be a string') + assert(options, 'rimraf: missing options') + assert.equal(typeof options, 'object', 'rimraf: options should be object') + + var results + + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p] + } else { + try { + fs.lstatSync(p) + results = [p] + } catch (er) { + results = glob.sync(p, globOpts) + } + } + + if (!results.length) + return + + for (var i = 0; i < results.length; i++) { + var p = results[i] + + try { + var st = options.lstatSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + } + + try { + // sunos lets the root user unlink directories, which is... weird. + if (st && st.isDirectory()) + rmdirSync(p, options, null) + else + options.unlinkSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er) + if (er.code !== "EISDIR") + throw er + rmdirSync(p, options, er) + } + } +} + +function rmdirSync (p, options, originalEr) { + assert(p) + assert(options) + if (originalEr) + assert(originalEr instanceof Error) + + try { + options.rmdirSync(p) + } catch (er) { + if (er.code === "ENOENT") + return + if (er.code === "ENOTDIR") + throw originalEr + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options) + } +} + +function rmkidsSync (p, options) { + assert(p) + assert(options) + options.readdirSync(p).forEach(function (f) { + rimrafSync(path.join(p, f), options) + }) + options.rmdirSync(p, options) +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/package.json new file mode 100644 index 0000000..02b71e2 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/package.json @@ -0,0 +1,65 @@ +{ + "name": "mv", + "version": "2.1.1", + "description": "fs.rename but works across devices. same as the unix utility 'mv'", + "main": "index.js", + "scripts": { + "test": "mocha test/test.js --reporter spec" + }, + "repository": { + "type": "git", + "url": "git://github.com/andrewrk/node-mv.git" + }, + "keywords": [ + "mv", + "move", + "rename", + "device", + "recursive", + "folder" + ], + "author": { + "name": "Andrew Kelley" + }, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + }, + "devDependencies": { + "mocha": "~2.2.5" + }, + "dependencies": { + "mkdirp": "~0.5.1", + "ncp": "~2.0.0", + "rimraf": "~2.4.0" + }, + "bugs": { + "url": "https://github.com/andrewrk/node-mv/issues" + }, + "homepage": "https://github.com/andrewrk/node-mv", + "directories": { + "test": "test" + }, + "gitHead": "645d8f4c783abf84204be704098fdd41f36ab195", + "_id": "mv@2.1.1", + "_shasum": "ae6ce0d6f6d5e0a4f7d893798d03c1ea9559b6a2", + "_from": "mv@2.1.1", + "_npmVersion": "2.5.1", + "_nodeVersion": "0.12.0", + "_npmUser": { + "name": "superjoe", + "email": "superjoe30@gmail.com" + }, + "dist": { + "shasum": "ae6ce0d6f6d5e0a4f7d893798d03c1ea9559b6a2", + "tarball": "http://registry.npmjs.org/mv/-/mv-2.1.1.tgz" + }, + "maintainers": [ + { + "name": "superjoe", + "email": "superjoe30@gmail.com" + } + ], + "_resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-file b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-file new file mode 100644 index 0000000..94a709d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-file @@ -0,0 +1 @@ +sonic the hedgehog diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-folder/another-file b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-folder/another-file new file mode 100644 index 0000000..31340c7 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-folder/another-file @@ -0,0 +1 @@ +tails diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-folder/another-folder/file3 b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-folder/another-folder/file3 new file mode 100644 index 0000000..73a394d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/a-folder/another-folder/file3 @@ -0,0 +1 @@ +knuckles diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/test.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/test.js new file mode 100644 index 0000000..ee8b2f4 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/mv/test/test.js @@ -0,0 +1,151 @@ +var assert = require('assert'); +var fs = require('fs'); +var rimraf = require('rimraf'); +var describe = global.describe; +var it = global.it; +var mv = require('../'); + +var realFsRename = fs.rename; +function overrideFsRename() { + // makes fs.rename return cross-device error. + fs.rename = function(src, dest, cb) { + setTimeout(function() { + var err = new Error(); + err.code = 'EXDEV'; + cb(err); + }, 10); + }; +} + +function restoreFsRename() { + fs.rename = realFsRename; +} + +describe("mv", function() { + it("should rename a file on the same device", function (done) { + mv("test/a-file", "test/a-file-dest", function (err) { + assert.ifError(err); + fs.readFile("test/a-file-dest", 'utf8', function (err, contents) { + assert.ifError(err); + assert.strictEqual(contents, "sonic the hedgehog\n"); + // move it back + mv("test/a-file-dest", "test/a-file", done); + }); + }); + }); + + it("should not overwrite if clobber = false", function (done) { + mv("test/a-file", "test/a-folder/another-file", {clobber: false}, function (err) { + assert.ok(err && err.code === 'EEXIST', "throw EEXIST"); + done(); + }); + }); + + it("should not create directory structure by default", function (done) { + mv("test/a-file", "test/does/not/exist/a-file-dest", function (err) { + assert.strictEqual(err.code, 'ENOENT'); + done(); + }); + }); + + it("should create directory structure when mkdirp option set", function (done) { + mv("test/a-file", "test/does/not/exist/a-file-dest", {mkdirp: true}, function (err) { + assert.ifError(err); + fs.readFile("test/does/not/exist/a-file-dest", 'utf8', function (err, contents) { + assert.ifError(err); + assert.strictEqual(contents, "sonic the hedgehog\n"); + // move it back + mv("test/does/not/exist/a-file-dest", "test/a-file", function(err) { + assert.ifError(err); + rimraf("test/does", { disableGlob: true }, done); + }); + }); + }); + }); + + it("should work across devices", function (done) { + overrideFsRename(); + mv("test/a-file", "test/a-file-dest", function (err) { + assert.ifError(err); + fs.readFile("test/a-file-dest", 'utf8', function (err, contents) { + assert.ifError(err); + assert.strictEqual(contents, "sonic the hedgehog\n"); + // move it back + mv("test/a-file-dest", "test/a-file", function(err) { + restoreFsRename(); + done(err); + }); + }); + }); + }); + + it("should work across devices, even with special characters", function (done) { + overrideFsRename(); + mv("test/a-file", "test/a-*", function (err) { + assert.ifError(err); + fs.readFile("test/a-*", 'utf8', function (err, contents) { + assert.ifError(err); + assert.strictEqual(contents, "sonic the hedgehog\n"); + // move it back + mv("test/a-*", "test/a-file", function(err) { + assert.ifError(err); + fs.readFile("test/a-file", 'utf8', function (err, contents) { + assert.ifError(err); + assert.strictEqual(contents, "sonic the hedgehog\n"); + restoreFsRename(); + done(err); + }); + }); + }); + }); + }); + + it("should move folders", function (done) { + mv("test/a-folder", "test/a-folder-dest", function (err) { + assert.ifError(err); + fs.readFile("test/a-folder-dest/another-file", 'utf8', function (err, contents) { + assert.ifError(err); + assert.strictEqual(contents, "tails\n"); + // move it back + mv("test/a-folder-dest", "test/a-folder", done); + }); + }); + }); + + it("should move folders across devices", function (done) { + overrideFsRename(); + mv("test/a-folder", "test/a-folder-dest", function (err) { + assert.ifError(err); + fs.readFile("test/a-folder-dest/another-folder/file3", 'utf8', function (err, contents) { + assert.ifError(err); + assert.strictEqual(contents, "knuckles\n"); + // move it back + mv("test/a-folder-dest", "test/a-folder", function(err) { + restoreFsRename(); + done(err); + }); + }); + }); + }); + + it("should move folders across devices, even with special characters", function (done) { + overrideFsRename(); + mv("test/a-folder", "test/a-*", function (err) { + assert.ifError(err); + fs.readFile("test/a-*/another-folder/file3", 'utf8', function (err, contents) { + assert.ifError(err); + assert.strictEqual(contents, "knuckles\n"); + // move it back + mv("test/a-*", "test/a-folder", function(err) { + assert.ifError(err); + fs.readFile("test/a-folder/another-folder/file3", 'utf8', function (err, contents) { + assert.ifError(err); + assert.strictEqual(contents, "knuckles\n"); + restoreFsRename(); + done(err); + }); + }); + }); + }); + }); +}); diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/.npmignore b/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/.npmignore new file mode 100644 index 0000000..ee4c926 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/.npmignore @@ -0,0 +1 @@ +/test diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/README.md b/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/README.md new file mode 100644 index 0000000..6507607 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/README.md @@ -0,0 +1,99 @@ +Safe JSON Stringify +=================== +A wrapper for `JSON.stringify` that handles circular references and prevent defined getters from throwing errors. + +Circular references are handled by returning `[Circular]` when a circular reference is spotted. + +Defined getters that throws errors are handled by returning `[Throws]`. + + +Usage +----- +Install it using NPM + +```sh +npm install safe-json-stringify +``` + +And require it into your Node project. + +```js +var safeJsonStringify = require('safe-json-stringify'); + +var data = {foo: 'bar'} + +console.log(safeJsonStringify(data)); +``` + +An `ensureProperties` function is exposed too, which returns a safe object without the stringify step. Usage: `safeJsonStringify.ensureProperties(data);`. + + +Why? +---- +The `stringify` function on the JavaScript JSON object will take any data and return a string representation of said data. If this data contains an object literal it will attempt to return the values of any enumerable property set on this object. This can be dangerous because JavaScript support a couple of ways to define property getters on objects. + +The old, non-standard, and now deprecated `Object.prototype.__defineGetter__()` will define a named property which value is the return of a given function. + +```js +// Never ever do this in your code. Please. +var obj = {}; +obj.__defineGetter__('foo', function() { return 'bar'; }); + +JSON.stringify(obj); // {"foo":"bar"} +``` + +This is kinda bad, because we could make that function throw an error. + +```js +// Never ever do this in your code. Please. +var obj = {}; +obj.__defineGetter__('foo', function() { throw new Error('ouch!'); }); + +JSON.stringify(obj); // error thrown +``` + +This property is created as an enumerable on the object, so the object from the previous example would make any function that iterate choke and throw an error. This is bad because one would never expect a simple property get to throw an error and bring down a system. + +`JSON.stringify` will blindly trust any object property, and will throw an error if it hits a defined property that throws an error. This could potentially take down your program. + +The slightly better `Object.defineProperty()` does the same thing, but has the common courtesy to not define the getter as enumerable--that is pr default. The following example would bring us in the same situation as with `__defineGetter__`. + +```js +// Never ever do this in your code. Please. +var obj = {}; +Object.defineProperty(obj, 'foo', { + get: function() { throw new Error('ouch!'); }, + enumerable: true // enumerable is false by default +}); + +JSON.stringify(obj); // error thrown +``` + +So, we can not trust any of them. One could argue that they should never be used, and we can, and should, apply that principle to our own software, but we cannot trust code from third party modules. If data from third party modules are to be stringified by JSON we should take these situations into considerations. This module attempt to do that by spotting defined getters and return "[Throws]" if said getter throws an error. + +```js +var safeJsonStringify = require('safe-json-stringify'); +// Never ever do this in your code. Please. +var obj = {}; +Object.defineProperty(obj, 'foo', { + get: function() { throw new Error('ouch!'); }, + enumerable: true +}); + +safeJsonStringify(obj); // '{"foo":"[Throws]"}' +``` + +And it attempt to handle circular references too. It returns "[Circular]" if it spots one. + + +License +------- +The MIT License (MIT) + +Copyright (c) 2014 E-conomic + +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. diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/index.js b/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/index.js new file mode 100644 index 0000000..f8234c7 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/index.js @@ -0,0 +1,59 @@ +var hasProp = Object.prototype.hasOwnProperty; + +function throwsMessage(err) { + return '[Throws: ' + (err ? err.message : '?') + ']'; +} + +function safeGetValueFromPropertyOnObject(obj, property) { + if (hasProp.call(obj, property)) { + try { + return obj[property]; + } + catch (err) { + return throwsMessage(err); + } + } + + return obj[property]; +} + +function ensureProperties(obj) { + var seen = [ ]; // store references to objects we have seen before + + function visit(obj) { + if (obj === null || typeof obj !== 'object') { + return obj; + } + + if (seen.indexOf(obj) !== -1) { + return '[Circular]'; + } + seen.push(obj); + + if (typeof obj.toJSON === 'function') { + try { + return visit(obj.toJSON()); + } catch(err) { + return throwsMessage(err); + } + } + + if (Array.isArray(obj)) { + return obj.map(visit); + } + + return Object.keys(obj).reduce(function(result, prop) { + // prevent faulty defined getter properties + result[prop] = visit(safeGetValueFromPropertyOnObject(obj, prop)); + return result; + }, {}); + }; + + return visit(obj); +} + +module.exports = function(data) { + return JSON.stringify(ensureProperties(data)); +} + +module.exports.ensureProperties = ensureProperties; diff --git a/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/package.json b/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/package.json new file mode 100644 index 0000000..3674475 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/package.json @@ -0,0 +1,70 @@ +{ + "name": "safe-json-stringify", + "version": "1.0.3", + "repository": { + "type": "git", + "url": "git@github.com:e-conomic/safe-json-stringify.git" + }, + "bugs": { + "url": "https://github.com/e-conomic/safe-json-stringify/issues" + }, + "homepage": "https://github.com/e-conomic/safe-json-stringify", + "description": "Prevent defined property getters from throwing errors", + "main": "index.js", + "scripts": { + "test": "tape test/safe-json-stringify-test.js" + }, + "author": { + "name": "E-conomic" + }, + "license": "MIT", + "devDependencies": { + "tape": "3.5.0" + }, + "gitHead": "f299fda39691b6021211e3babd6ff4073314c2f6", + "_id": "safe-json-stringify@1.0.3", + "_shasum": "3cb6717660a086d07cb5bd9b7a6875bcf67bd05e", + "_from": "safe-json-stringify@1.0.3", + "_npmVersion": "1.4.21", + "_npmUser": { + "name": "gausby", + "email": "martin@gausby.dk" + }, + "maintainers": [ + { + "name": "gausby", + "email": "martin@gausby.dk" + }, + { + "name": "ebdrup", + "email": "allan@878.dk" + }, + { + "name": "bubenshchykov", + "email": "a.bubenshchykov@gmail.com" + }, + { + "name": "eagleeye", + "email": "eagleeyes91@gmail.com" + }, + { + "name": "kapetan", + "email": "mirza.kapetanovic@gmail.com" + }, + { + "name": "wtfil", + "email": "evgen.filatov@gmail.com" + }, + { + "name": "bifrost", + "email": "dan@steenbjerg.com" + } + ], + "dist": { + "shasum": "3cb6717660a086d07cb5bd9b7a6875bcf67bd05e", + "tarball": "http://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.0.3.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.0.3.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/bunyan/package.json b/packages/logging/.npm/package/node_modules/bunyan/package.json new file mode 100644 index 0000000..c00baff --- /dev/null +++ b/packages/logging/.npm/package/node_modules/bunyan/package.json @@ -0,0 +1,165 @@ +{ + "name": "bunyan", + "version": "1.4.0", + "description": "a JSON logging library for node.js services", + "author": { + "name": "Trent Mick", + "email": "trentm@gmail.com", + "url": "http://trentm.com" + }, + "main": "./lib/bunyan.js", + "bin": { + "bunyan": "./bin/bunyan" + }, + "repository": { + "type": "git", + "url": "git://github.com/trentm/node-bunyan.git" + }, + "engines": [ + "node >=0.8.0" + ], + "keywords": [ + "log", + "logging", + "log4j", + "json", + "bunyan" + ], + "// comment1": "'dtrace-provider' required for dtrace features", + "// comment2": "'mv' required for RotatingFileStream", + "optionalDependencies": { + "dtrace-provider": "~0.5", + "mv": "~2", + "safe-json-stringify": "~1" + }, + "devDependencies": { + "nodeunit": "0.9.*", + "ben": "0.0.0", + "verror": "1.3.3", + "vasync": "1.4.3" + }, + "scripts": { + "test": "make test" + }, + "contributors": [ + { + "name": "Trent Mick", + "email": "trentm@gmail.com", + "url": "http://trentm.com" + }, + { + "name": "Mark Cavage", + "email": "mcavage@gmail.com", + "url": "https://github.com/mcavage" + }, + { + "name": "Dave Pacheco", + "email": "dap@joyent.com", + "url": "https://github.com/davepacheco" + }, + { + "name": "Michael Hart", + "url": "https://github.com/mhart" + }, + { + "name": "Isaac Schlueter", + "url": "https://github.com/isaacs" + }, + { + "name": "Rob Gulewich", + "url": "https://github.com/rgulewich" + }, + { + "name": "Bryan Cantrill", + "url": "https://github.com/bcantrill" + }, + { + "name": "Michael Hart", + "url": "https://github.com/mhart" + }, + { + "name": "Simon Wade", + "url": "https://github.com/aexmachina" + }, + { + "name": "https://github.com/glenn-murray-bse" + }, + { + "name": "Chakrit Wichian", + "url": "https://github.com/chakrit" + }, + { + "name": "Patrick Mooney", + "url": "https://github.com/pfmooney" + }, + { + "name": "Johan Nordberg", + "url": "https://github.com/jnordberg" + }, + { + "name": "https://github.com/timborodin" + }, + { + "name": "Ryan Graham", + "url": "https://github.com/rmg" + }, + { + "name": "Alex Kocharin", + "url": "https://github.com/rlidwka" + }, + { + "name": "Andrei Neculau", + "url": "https://github.com/andreineculau" + }, + { + "name": "Mihai Tomescu", + "url": "https://github.com/matomesc" + }, + { + "name": "Daniel Juhl", + "url": "https://github.com/danieljuhl" + }, + { + "name": "Chris Barber", + "url": "https://github.com/cb1kenobi" + }, + { + "name": "Manuel Schneider", + "url": "https://github.com/manuelschneider" + }, + { + "name": "Martin Gausby", + "url": "https://github.com/gausby" + } + ], + "bugs": { + "url": "https://github.com/trentm/node-bunyan/issues" + }, + "homepage": "https://github.com/trentm/node-bunyan", + "dependencies": { + "dtrace-provider": "~0.5", + "mv": "~2", + "safe-json-stringify": "~1" + }, + "_id": "bunyan@1.4.0", + "_shasum": "b6e66ace7b6dd7880f414a5b8deec7e273eec5e7", + "_from": "bunyan@1.4.0", + "_npmVersion": "1.4.9", + "_npmUser": { + "name": "trentm", + "email": "trentm@gmail.com" + }, + "maintainers": [ + { + "name": "trentm", + "email": "trentm@gmail.com" + } + ], + "dist": { + "shasum": "b6e66ace7b6dd7880f414a5b8deec7e273eec5e7", + "tarball": "http://registry.npmjs.org/bunyan/-/bunyan-1.4.0.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.4.0.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/log-with-style/.npmignore b/packages/logging/.npm/package/node_modules/log-with-style/.npmignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/.npmignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/log-with-style/Gruntfile.coffee b/packages/logging/.npm/package/node_modules/log-with-style/Gruntfile.coffee new file mode 100644 index 0000000..6ce4846 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/Gruntfile.coffee @@ -0,0 +1,28 @@ +module.exports = (grunt) -> + grunt.initConfig + pkg: grunt.file.readJSON('package.json') + + coffee: + compile: + files: + 'log.js': 'log.coffee' + + watch: + coffee: + files: ['log.coffee'] + tasks: ['coffee', 'uglify'] + options: + atBegin: true + + uglify: + log: + src: 'log.js' + dest: 'log.min.js' + options: + banner: '/*! log.js <%= pkg.version %> */\n' + + grunt.loadNpmTasks 'grunt-contrib-watch' + grunt.loadNpmTasks 'grunt-contrib-uglify' + grunt.loadNpmTasks 'grunt-contrib-coffee' + + grunt.registerTask 'default', ['coffee', 'uglify'] \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/log-with-style/LICENSE b/packages/logging/.npm/package/node_modules/log-with-style/LICENSE new file mode 100644 index 0000000..2486d4d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2014 Adam Schwartz, http://adamschwartz.co + +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. diff --git a/packages/logging/.npm/package/node_modules/log-with-style/README.md b/packages/logging/.npm/package/node_modules/log-with-style/README.md new file mode 100644 index 0000000..dfec7dd --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/README.md @@ -0,0 +1,31 @@ +## Log + +> Console.log with style + +### [Demo](http://adamschwartz.co/log) + +### Features + +- Safely call `log` (instead of `console.log`) in any browser. +- Use markdown syntax for quick formatting: + - *italic* — `log('this is *italic*')` + - **bold** — `log('this word _bold_')` + - `code` — ``log('this word `code`')`` +- Use a custom syntax to style text however you want: `log('this is [c="color: red"]red[c]')`. + +### Support + +Stylized logs are supported in the following browsers: + +- Chrome 26+ +- Firefox with [Firebug 1.11 beta 2](http://blog.getfirebug.com/2012/11/16/firebug-1-11-beta-2/) or later +- Opera with Blink (15+) +- Safari Nightly (537.38+) + +### Screenshot + +![](https://raw.github.com/adamschwartz/log/gh-pages/screenshot.png) + +### Implementations + +- Ruby on Rails — [https://github.com/vlado/rails_javascript_log](https://github.com/vlado/rails_javascript_log) diff --git a/packages/logging/.npm/package/node_modules/log-with-style/bower.json b/packages/logging/.npm/package/node_modules/log-with-style/bower.json new file mode 100644 index 0000000..3a5addc --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/bower.json @@ -0,0 +1,28 @@ +{ + "name": "log", + "version": "0.1.5", + "homepage": "http://adamschwartz.co/log", + "authors": [ + "Adam Schwartz " + ], + "description": "Console.log with style", + "main": [ + "log.js", + "log.min.js" + ], + "keywords": [ + "log", + "console", + "console.log", + "inspector", + "Chrome" + ], + "license": "MIT", + "ignore": [ + "node_modules", + "bower_components", + "**/.*", + "test", + "tests" + ] +} \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/log-with-style/component.json b/packages/logging/.npm/package/node_modules/log-with-style/component.json new file mode 100644 index 0000000..fc73ce7 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/component.json @@ -0,0 +1,11 @@ +{ + "name": "log", + "repo": "adamschwartz/log", + "version": "0.1.5", + "description": "Console.log with style", + "keywords": [], + "main": "log.js", + "scripts": [ + "log.js" + ] +} diff --git a/packages/logging/.npm/package/node_modules/log-with-style/log.coffee b/packages/logging/.npm/package/node_modules/log-with-style/log.coffee new file mode 100644 index 0000000..411b1f8 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/log.coffee @@ -0,0 +1,114 @@ +return unless window.console and window.console.log + +log = -> + args = [] + + makeArray(arguments).forEach (arg) -> + if typeof arg is 'string' + args = args.concat stringToArgs arg + + else + args.push arg + + _log.apply window, args + +_log = -> + console.log.apply console, makeArray(arguments) + +makeArray = (arrayLikeThing) -> + Array::slice.call arrayLikeThing + +formats = [{ + # Italic + regex: /\*([^\*]+)\*/ + replacer: (m, p1) -> "%c#{p1}%c" + styles: -> ['font-style: italic', ''] +}, { + # Bold + regex: /\_([^\_]+)\_/ + replacer: (m, p1) -> "%c#{p1}%c" + styles: -> ['font-weight: bold', ''] +}, { + # Code + regex: /\`([^\`]+)\`/ + replacer: (m, p1) -> "%c#{p1}%c" + styles: -> ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', ''] +}, { + # Custom syntax: [c="color: red"]red[c] + regex: /\[c\=(?:\"|\')?((?:(?!(?:\"|\')\]).)*)(?:\"|\')?\]((?:(?!\[c\]).)*)\[c\]/ + replacer: (m, p1, p2) -> "%c#{p2}%c" + styles: (match) -> [match[1], ''] +}] + +hasMatches = (str) -> + _hasMatches = false + + formats.forEach (format) -> + if format.regex.test str + _hasMatches = true + + return _hasMatches + +getOrderedMatches = (str) -> + matches = [] + + formats.forEach (format) -> + match = str.match format.regex + if match + matches.push + format: format + match: match + + return matches.sort((a, b) -> a.match.index - b.match.index) + +stringToArgs = (str) -> + styles = [] + + while hasMatches str + matches = getOrderedMatches str + firstMatch = matches[0] + str = str.replace firstMatch.format.regex, firstMatch.format.replacer + styles = styles.concat firstMatch.format.styles(firstMatch.match) + + [str].concat styles + +# Browser detection +# https://twitter.com/paul_irish/status/384789864396226560 + +isSafari = -> /Safari/.test(navigator.userAgent) and /Apple Computer/.test(navigator.vendor) +isOpera = -> /OPR/.test(navigator.userAgent) and /Opera/.test(navigator.vendor) +isFF = -> /Firefox/.test(navigator.userAgent) +isIE = -> /MSIE/.test(navigator.userAgent) + +# Safari starting supporting stylized logs in Nightly 537.38+ +# See https://github.com/adamschwartz/log/issues/6 +safariSupport = -> + m = navigator.userAgent.match /AppleWebKit\/(\d+)\.(\d+)(\.|\+|\s)/ + return false unless m + return 537.38 <= parseInt(m[1], 10) + (parseInt(m[2], 10) / 100) + +# Opera +operaSupport = -> + m = navigator.userAgent.match /OPR\/(\d+)\./ + return false unless m + return 15 <= parseInt(m[1], 10) + +# Detect for Firebug http://stackoverflow.com/a/398120/131898 +ffSupport = -> + window.console.firebug or window.console.exception + +# Export + +if isIE() or (isFF() and not ffSupport()) or (isOpera() and not operaSupport()) or (isSafari() and not safariSupport()) + exportedLog = _log +else + exportedLog = log + +exportedLog.l = _log + +if typeof define is 'function' and define.amd + define exportedLog +else if typeof exports isnt 'undefined' + module.exports = exportedLog +else + window.log = exportedLog diff --git a/packages/logging/.npm/package/node_modules/log-with-style/log.js b/packages/logging/.npm/package/node_modules/log-with-style/log.js new file mode 100644 index 0000000..288c944 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/log.js @@ -0,0 +1,160 @@ +(function() { + var exportedLog, ffSupport, formats, getOrderedMatches, hasMatches, isFF, isIE, isOpera, isSafari, log, makeArray, operaSupport, safariSupport, stringToArgs, _log; + + if (!(window.console && window.console.log)) { + return; + } + + log = function() { + var args; + args = []; + makeArray(arguments).forEach(function(arg) { + if (typeof arg === 'string') { + return args = args.concat(stringToArgs(arg)); + } else { + return args.push(arg); + } + }); + return _log.apply(window, args); + }; + + _log = function() { + return console.log.apply(console, makeArray(arguments)); + }; + + makeArray = function(arrayLikeThing) { + return Array.prototype.slice.call(arrayLikeThing); + }; + + formats = [ + { + regex: /\*([^\*]+)\*/, + replacer: function(m, p1) { + return "%c" + p1 + "%c"; + }, + styles: function() { + return ['font-style: italic', '']; + } + }, { + regex: /\_([^\_]+)\_/, + replacer: function(m, p1) { + return "%c" + p1 + "%c"; + }, + styles: function() { + return ['font-weight: bold', '']; + } + }, { + regex: /\`([^\`]+)\`/, + replacer: function(m, p1) { + return "%c" + p1 + "%c"; + }, + styles: function() { + return ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', '']; + } + }, { + regex: /\[c\=(?:\"|\')?((?:(?!(?:\"|\')\]).)*)(?:\"|\')?\]((?:(?!\[c\]).)*)\[c\]/, + replacer: function(m, p1, p2) { + return "%c" + p2 + "%c"; + }, + styles: function(match) { + return [match[1], '']; + } + } + ]; + + hasMatches = function(str) { + var _hasMatches; + _hasMatches = false; + formats.forEach(function(format) { + if (format.regex.test(str)) { + return _hasMatches = true; + } + }); + return _hasMatches; + }; + + getOrderedMatches = function(str) { + var matches; + matches = []; + formats.forEach(function(format) { + var match; + match = str.match(format.regex); + if (match) { + return matches.push({ + format: format, + match: match + }); + } + }); + return matches.sort(function(a, b) { + return a.match.index - b.match.index; + }); + }; + + stringToArgs = function(str) { + var firstMatch, matches, styles; + styles = []; + while (hasMatches(str)) { + matches = getOrderedMatches(str); + firstMatch = matches[0]; + str = str.replace(firstMatch.format.regex, firstMatch.format.replacer); + styles = styles.concat(firstMatch.format.styles(firstMatch.match)); + } + return [str].concat(styles); + }; + + isSafari = function() { + return /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor); + }; + + isOpera = function() { + return /OPR/.test(navigator.userAgent) && /Opera/.test(navigator.vendor); + }; + + isFF = function() { + return /Firefox/.test(navigator.userAgent); + }; + + isIE = function() { + return /MSIE/.test(navigator.userAgent); + }; + + safariSupport = function() { + var m; + m = navigator.userAgent.match(/AppleWebKit\/(\d+)\.(\d+)(\.|\+|\s)/); + if (!m) { + return false; + } + return 537.38 <= parseInt(m[1], 10) + (parseInt(m[2], 10) / 100); + }; + + operaSupport = function() { + var m; + m = navigator.userAgent.match(/OPR\/(\d+)\./); + if (!m) { + return false; + } + return 15 <= parseInt(m[1], 10); + }; + + ffSupport = function() { + return window.console.firebug || window.console.exception; + }; + + if (isIE() || (isFF() && !ffSupport()) || (isOpera() && !operaSupport()) || (isSafari() && !safariSupport())) { + exportedLog = _log; + } else { + exportedLog = log; + } + + exportedLog.l = _log; + + if (typeof define === 'function' && define.amd) { + define(exportedLog); + } else if (typeof exports !== 'undefined') { + module.exports = exportedLog; + } else { + window.log = exportedLog; + } + +}).call(this); diff --git a/packages/logging/.npm/package/node_modules/log-with-style/log.min.js b/packages/logging/.npm/package/node_modules/log-with-style/log.min.js new file mode 100644 index 0000000..8ef2855 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/log.min.js @@ -0,0 +1,2 @@ +/*! log.js 0.1.5 */ +(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;window.console&&window.console.log&&(j=function(){var a;return a=[],k(arguments).forEach(function(b){return"string"==typeof b?a=a.concat(n(b)):a.push(b)}),o.apply(window,a)},o=function(){return console.log.apply(console,k(arguments))},k=function(a){return Array.prototype.slice.call(a)},c=[{regex:/\*([^\*]+)\*/,replacer:function(a,b){return"%c"+b+"%c"},styles:function(){return["font-style: italic",""]}},{regex:/\_([^\_]+)\_/,replacer:function(a,b){return"%c"+b+"%c"},styles:function(){return["font-weight: bold",""]}},{regex:/\`([^\`]+)\`/,replacer:function(a,b){return"%c"+b+"%c"},styles:function(){return["background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)",""]}},{regex:/\[c\=(?:\"|\')?((?:(?!(?:\"|\')\]).)*)(?:\"|\')?\]((?:(?!\[c\]).)*)\[c\]/,replacer:function(a,b,c){return"%c"+c+"%c"},styles:function(a){return[a[1],""]}}],e=function(a){var b;return b=!1,c.forEach(function(c){return c.regex.test(a)?b=!0:void 0}),b},d=function(a){var b;return b=[],c.forEach(function(c){var d;return d=a.match(c.regex),d?b.push({format:c,match:d}):void 0}),b.sort(function(a,b){return a.match.index-b.match.index})},n=function(a){var b,c,f;for(f=[];e(a);)c=d(a),b=c[0],a=a.replace(b.format.regex,b.format.replacer),f=f.concat(b.format.styles(b.match));return[a].concat(f)},i=function(){return/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)},h=function(){return/OPR/.test(navigator.userAgent)&&/Opera/.test(navigator.vendor)},f=function(){return/Firefox/.test(navigator.userAgent)},g=function(){return/MSIE/.test(navigator.userAgent)},m=function(){var a;return a=navigator.userAgent.match(/AppleWebKit\/(\d+)\.(\d+)(\.|\+|\s)/),a?537.38<=parseInt(a[1],10)+parseInt(a[2],10)/100:!1},l=function(){var a;return a=navigator.userAgent.match(/OPR\/(\d+)\./),a?15<=parseInt(a[1],10):!1},b=function(){return window.console.firebug||window.console.exception},a=g()||f()&&!b()||h()&&!l()||i()&&!m()?o:j,a.l=o,"function"==typeof define&&define.amd?define(a):"undefined"!=typeof exports?module.exports=a:window.log=a)}).call(this); \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/log-with-style/package.json b/packages/logging/.npm/package/node_modules/log-with-style/package.json new file mode 100644 index 0000000..0783735 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/package.json @@ -0,0 +1,48 @@ +{ + "name": "log-with-style", + "version": "0.1.5", + "description": "Console.log with style", + "author": { + "name": "Adam Schwartz", + "email": "adam.flynn.schwartz@gmail.com" + }, + "repository": { + "type": "git", + "url": "git://github.com/adamschwartz/log" + }, + "license": "MIT", + "main": "log.js", + "devDependencies": { + "grunt-contrib-coffee": "~0.7.0", + "coffee-script": "~1.6.3", + "grunt-contrib-uglify": "~0.2.4", + "grunt-cli": "~0.1.9", + "grunt": "~0.4.1", + "grunt-contrib-watch": "~0.5.3" + }, + "bugs": { + "url": "https://github.com/adamschwartz/log/issues" + }, + "_id": "log-with-style@0.1.5", + "dist": { + "shasum": "018e177f609845fef435ddd55940148c66c62915", + "tarball": "http://registry.npmjs.org/log-with-style/-/log-with-style-0.1.5.tgz" + }, + "_from": "log-with-style@0.1.5", + "_npmVersion": "1.3.2", + "_npmUser": { + "name": "adamschwartz", + "email": "adam.flynn.schwartz@gmail.com" + }, + "maintainers": [ + { + "name": "adamschwartz", + "email": "adam.flynn.schwartz@gmail.com" + } + ], + "directories": {}, + "_shasum": "018e177f609845fef435ddd55940148c66c62915", + "_resolved": "https://registry.npmjs.org/log-with-style/-/log-with-style-0.1.5.tgz", + "readme": "ERROR: No README data found!", + "homepage": "https://github.com/adamschwartz/log" +} diff --git a/packages/logging/.npm/package/node_modules/log-with-style/test.html b/packages/logging/.npm/package/node_modules/log-with-style/test.html new file mode 100644 index 0000000..689c743 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/log-with-style/test.html @@ -0,0 +1,72 @@ + +Log Test Suite + + + + + +Open the console \ No newline at end of file diff --git a/packages/logging/.npm/package/node_modules/process/LICENSE b/packages/logging/.npm/package/node_modules/process/LICENSE new file mode 100644 index 0000000..b8c1246 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/process/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2013 Roman Shtylman + +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. diff --git a/packages/logging/.npm/package/node_modules/process/README.md b/packages/logging/.npm/package/node_modules/process/README.md new file mode 100644 index 0000000..adf13a1 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/process/README.md @@ -0,0 +1,24 @@ +# process + +```require('process');``` just like any other module. + +Works in node.js and browsers via the browser.js shim provided with the module. + +## browser implementation + +The goal of this module is not to be a full-fledged alternative to the builtin process module. This module mostly exists to provide the nextTick functionality and nothing more. We keep this module lean because it will often be included by default by tools like browserify when it detects a module has used the `process` global. + +If you are looking to provide other process methods, I suggest you monkey patch them onto the process global in your app. A list of user created patches is below. + +* [hrtime](https://github.com/kumavis/browser-process-hrtime) +* [stdout](https://github.com/kumavis/browser-stdout) + +## package manager notes + +If you are writing a bundler to package modules for client side use, make sure you use the ```browser``` field hint in package.json. + +See https://gist.github.com/4339901 for details. + +The [browserify](https://github.com/substack/node-browserify) module will properly handle this field when bundling your files. + + diff --git a/packages/logging/.npm/package/node_modules/process/browser.js b/packages/logging/.npm/package/node_modules/process/browser.js new file mode 100644 index 0000000..4930a1a --- /dev/null +++ b/packages/logging/.npm/package/node_modules/process/browser.js @@ -0,0 +1,90 @@ +// shim for using process in browser + +var process = module.exports = {}; +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = setTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + currentQueue[queueIndex].run(); + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + clearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + setTimeout(drainQueue, 0); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; diff --git a/packages/logging/.npm/package/node_modules/process/index.js b/packages/logging/.npm/package/node_modules/process/index.js new file mode 100644 index 0000000..8d8ed7d --- /dev/null +++ b/packages/logging/.npm/package/node_modules/process/index.js @@ -0,0 +1,2 @@ +// for now just expose the builtin process global from node.js +module.exports = global.process; diff --git a/packages/logging/.npm/package/node_modules/process/package.json b/packages/logging/.npm/package/node_modules/process/package.json new file mode 100644 index 0000000..d18f561 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/process/package.json @@ -0,0 +1,58 @@ +{ + "author": { + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" + }, + "name": "process", + "description": "process information for node.js and browsers", + "keywords": [ + "process" + ], + "scripts": { + "test": "mocha test.js" + }, + "version": "0.11.1", + "repository": { + "type": "git", + "url": "git://github.com/shtylman/node-process.git" + }, + "browser": "./browser.js", + "main": "./index.js", + "engines": { + "node": ">= 0.6.0" + }, + "devDependencies": { + "mocha": "2.2.1" + }, + "gitHead": "2d0290765eef8f977298a8313460c85d3964d84b", + "bugs": { + "url": "https://github.com/shtylman/node-process/issues" + }, + "homepage": "https://github.com/shtylman/node-process#readme", + "_id": "process@0.11.1", + "_shasum": "ee3becb4335edf3c8b14ccbf7e17a1125a4431ae", + "_from": "process@0.11.1", + "_npmVersion": "2.9.0", + "_nodeVersion": "0.10.35", + "_npmUser": { + "name": "defunctzombie", + "email": "shtylman@gmail.com" + }, + "dist": { + "shasum": "ee3becb4335edf3c8b14ccbf7e17a1125a4431ae", + "tarball": "http://registry.npmjs.org/process/-/process-0.11.1.tgz" + }, + "maintainers": [ + { + "name": "coolaj86", + "email": "coolaj86@gmail.com" + }, + { + "name": "defunctzombie", + "email": "shtylman@gmail.com" + } + ], + "directories": {}, + "_resolved": "https://registry.npmjs.org/process/-/process-0.11.1.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/packages/logging/.npm/package/node_modules/process/test.js b/packages/logging/.npm/package/node_modules/process/test.js new file mode 100644 index 0000000..9e3e309 --- /dev/null +++ b/packages/logging/.npm/package/node_modules/process/test.js @@ -0,0 +1,66 @@ +var assert = require('assert'); +var ourProcess = require('./browser'); +describe('test against process', function () { + test(process); +}); +if (!process.browser) { + describe('test against our shim', function () { + test(ourProcess); + }); +} +function test (ourProcess) { + describe('test arguments', function (t) { + it ('works', function (done) { + var order = 0; + + + ourProcess.nextTick(function (num) { + assert.equal(num, order++, 'first one works'); + ourProcess.nextTick(function (num) { + assert.equal(num, order++, 'recursive one is 4th'); + }, 3); + }, 0); + ourProcess.nextTick(function (num) { + assert.equal(num, order++, 'second one starts'); + ourProcess.nextTick(function (num) { + assert.equal(num, order++, 'this is third'); + ourProcess.nextTick(function (num) { + assert.equal(num, order++, 'this is last'); + done(); + }, 5); + }, 4); + }, 1); + ourProcess.nextTick(function (num) { + + assert.equal(num, order++, '3rd schedualed happens after the error'); + }, 2); + }); + }); + + describe('test errors', function (t) { + it ('works', function (done) { + var order = 0; + process.removeAllListeners('uncaughtException'); + process.once('uncaughtException', function(err) { + assert.equal(2, order++, 'error is third'); + ourProcess.nextTick(function () { + assert.equal(5, order++, 'schedualed in error is last'); + done(); + }); + }); + ourProcess.nextTick(function () { + assert.equal(0, order++, 'first one works'); + ourProcess.nextTick(function () { + assert.equal(4, order++, 'recursive one is 4th'); + }); + }); + ourProcess.nextTick(function () { + assert.equal(1, order++, 'second one starts'); + throw(new Error('an error is thrown')); + }); + ourProcess.nextTick(function () { + assert.equal(3, order++, '3rd schedualed happens after the error'); + }); + }); + }); +} diff --git a/packages/materialize/init.js b/packages/materialize/init.js index 9b008ad..f288aa1 100644 --- a/packages/materialize/init.js +++ b/packages/materialize/init.js @@ -1,4 +1,4 @@ -Options.init('homePath') +Options.init('homePath'); Options.init('siteName'); Options.init('materialize.headerColor'); diff --git a/packages/materialize/views/layout/layout.js b/packages/materialize/views/layout/layout.js index 3165450..8be0b53 100644 --- a/packages/materialize/views/layout/layout.js +++ b/packages/materialize/views/layout/layout.js @@ -1,5 +1,5 @@ Template.orionMaterializeLayout.onRendered(function() { - + }); Template.orionMaterializeHeaderContainer.onRendered(function() { @@ -8,7 +8,7 @@ Template.orionMaterializeHeaderContainer.onRendered(function() { $('.dropdown-button').dropdown({ constrain_width: false }); -}) +}); Template.orionMaterializeHeaderContainer.events({ 'click .logout': function() { diff --git a/packages/materialize/views/misc/misc.js b/packages/materialize/views/misc/misc.js index 916f112..1a5abe9 100644 --- a/packages/materialize/views/misc/misc.js +++ b/packages/materialize/views/misc/misc.js @@ -12,7 +12,7 @@ ReactiveTemplates.onRendered('attribute.froala', function() { $('label[for="' + id + '"]').addClass('active'); $('label[for="' + id + '"]').css({ 'top': '0' }); }, 100); -}) +}); Template.orionMaterializeHasOneAttribute.events({ 'focus .selectize-input input': function (event, template) { diff --git a/packages/materialize/views/sidebar/sidebar.js b/packages/materialize/views/sidebar/sidebar.js index b46e65b..a566b07 100644 --- a/packages/materialize/views/sidebar/sidebar.js +++ b/packages/materialize/views/sidebar/sidebar.js @@ -2,5 +2,5 @@ Template.orionMaterializeSidebar.onRendered(function() { this.autorun(function() { var depend = orion.links._collection.find().fetch(); $('.materialize-sidebar .collapsible').collapsible(); - }) -}) + }); +}); diff --git a/packages/pages/pages_client.js b/packages/pages/pages_client.js index 2a12eaa..b29b7a5 100644 --- a/packages/pages/pages_client.js +++ b/packages/pages/pages_client.js @@ -69,7 +69,7 @@ AutoForm.hooks({ orion.pages.templates[name].schema.namedContext('orionPagesCreateForm').addInvalidKeys([{name: 'url', type: 'notUnique'}]); self.result(false); } - }) + }); } } }, @@ -105,7 +105,7 @@ AutoForm.hooks({ } else { self.result(doc); } - }) + }); } } }, diff --git a/packages/pages/pages_server.js b/packages/pages/pages_server.js index 60d1b30..0651bc4 100644 --- a/packages/pages/pages_server.js +++ b/packages/pages/pages_server.js @@ -21,4 +21,4 @@ Meteor.methods({ check(url, String); return orion.pages.collection.findOne({ url: url }); } -}) +}); diff --git a/packages/relationships/package.js b/packages/relationships/package.js index fc8aef0..504aa10 100644 --- a/packages/relationships/package.js +++ b/packages/relationships/package.js @@ -12,7 +12,7 @@ Package.onUse(function(api) { 'orionjs:base@1.4.0', 'orionjs:attributes@1.4.0', 'less', - 'jeremy:selectize@0.12.1' + 'jeremy:selectize@0.12.1_3' ]); api.imply([ diff --git a/packages/relationships/relationships.js b/packages/relationships/relationships.js index 1e7e812..10c7e44 100644 --- a/packages/relationships/relationships.js +++ b/packages/relationships/relationships.js @@ -10,17 +10,23 @@ var initSelect = function(template, dataContext, schema, options) { options: options, render: schema.orion.render, }); -} +}; var onRendered = function() { var template = this; template.autorun(function() { +<<<<<<< d7b5207b4790c1b09545c50e7a26a40156fec7a3 RouterLayer.isActiveRoute('admin'); template.$('select')[0].selectize && template.$('select')[0].selectize.destroy(); }) +======= + Router.current(); + if (template.$('select')[0].selectize !== null) template.$('select')[0].selectize.destroy(); + }); +>>>>>>> Linting & Hoisting & package bumped template.autorun(function () { var dataContext = Template.currentData(); - var schema = AutoForm.getSchemaForField(dataContext.name) + var schema = AutoForm.getSchemaForField(dataContext.name); var subscription = template.subscribe(schema.orion.publicationName); if (subscription.ready()) { var filter = schema.orion.filter(Meteor.userId()); @@ -29,21 +35,21 @@ var onRendered = function() { for (var i = 0; i < schema.orion.fields.length; i++) { var field = schema.orion.fields[i]; newItem[field] = orion.helpers.searchObjectWithDots(item, field, true); - }; + } return newItem; }); - initSelect(template, dataContext, schema, options) + initSelect(template, dataContext, schema, options); } }); -} +}; var onDestroyed = function() { - this.$('select')[0].selectize && this.$('select')[0].selectize.destroy(); -} -ReactiveTemplates.onRendered('attribute.hasMany', onRendered) -ReactiveTemplates.onRendered('attribute.hasOne', onRendered) -ReactiveTemplates.onDestroyed('attribute.hasMany', onDestroyed) -ReactiveTemplates.onDestroyed('attribute.hasOne', onDestroyed) + if (this.$('select')[0].selectize !== null) this.$('select')[0].selectize.destroy(); +}; +ReactiveTemplates.onRendered('attribute.hasMany', onRendered); +ReactiveTemplates.onRendered('attribute.hasOne', onRendered); +ReactiveTemplates.onDestroyed('attribute.hasMany', onDestroyed); +ReactiveTemplates.onDestroyed('attribute.hasOne', onDestroyed); ReactiveTemplates.helpers('attributePreview.hasMany', { val: function() { diff --git a/packages/s3/s3.js b/packages/s3/s3.js index 494e8b2..05f6951 100644 --- a/packages/s3/s3.js +++ b/packages/s3/s3.js @@ -35,11 +35,11 @@ if (Meteor.isClient) { }; } -orion.config.add('AWS_API_KEY', 'aws') -orion.config.add('AWS_API_SECRET', 'aws', { secret: true }) -orion.config.add('AWS_S3_BUCKET', 'aws') -orion.config.add('AWS_S3_REGION', 'aws', { optional: true }) -orion.config.add('AWS_S3_PATH', 'aws', { optional: true }) +orion.config.add('AWS_API_KEY', 'aws'); +orion.config.add('AWS_API_SECRET', 'aws', { secret: true }); +orion.config.add('AWS_S3_BUCKET', 'aws'); +orion.config.add('AWS_S3_REGION', 'aws', { optional: true }); +orion.config.add('AWS_S3_PATH', 'aws', { optional: true }); if (Meteor.isServer) { S3.config = { diff --git a/packages/summernote/summernote.js b/packages/summernote/summernote.js index 7e27f26..be6ba8e 100644 --- a/packages/summernote/summernote.js +++ b/packages/summernote/summernote.js @@ -29,7 +29,7 @@ ReactiveTemplates.onRendered('attribute.summernote', function() { } }); element.code(this.data.value); -}) +}); ReactiveTemplates.helpers('attribute.summernote', { isUploading: function() { @@ -38,7 +38,7 @@ ReactiveTemplates.helpers('attribute.summernote', { progress: function() { return Session.get('orionSummernoteProgress'); } -}) +}); ReactiveTemplates.helpers('attributePreview.summernote', { preview: function () { From ae742d8d534c4ebb594294b6b87dbeb727ad3a38 Mon Sep 17 00:00:00 2001 From: PEM-- Date: Sat, 15 Aug 2015 12:27:43 +0200 Subject: [PATCH 2/8] Namespace & Logging package --- packages/accounts/package.js | 2 +- packages/base/init.js | 1 - packages/base/package.js | 6 +- packages/core/package.js | 13 +- packages/logging/.npm/package/.gitignore | 1 + packages/logging/.npm/package/README | 7 + .../logging/.npm/package/npm-shrinkwrap.json | 109 + packages/logging/.versions | 0 packages/logging/README.md | 35 + packages/logging/logging_both.js | 12 + packages/logging/logging_client.browserify.js | 46 + .../logging_client.browserify.js.cached | 9821 +++++++++++++++++ .../logging/logging_client.browserify.js.map | 111 + packages/logging/logging_server.js | 5 + packages/logging/package.js | 34 + packages/namespace/README.md | 2 + packages/namespace/init.js | 2 + packages/namespace/package.js | 20 + 18 files changed, 10219 insertions(+), 8 deletions(-) delete mode 100644 packages/base/init.js create mode 100644 packages/logging/.npm/package/.gitignore create mode 100644 packages/logging/.npm/package/README create mode 100644 packages/logging/.npm/package/npm-shrinkwrap.json create mode 100644 packages/logging/.versions create mode 100644 packages/logging/README.md create mode 100644 packages/logging/logging_both.js create mode 100644 packages/logging/logging_client.browserify.js create mode 100644 packages/logging/logging_client.browserify.js.cached create mode 100644 packages/logging/logging_client.browserify.js.map create mode 100644 packages/logging/logging_server.js create mode 100644 packages/logging/package.js create mode 100644 packages/namespace/README.md create mode 100644 packages/namespace/init.js create mode 100644 packages/namespace/package.js diff --git a/packages/accounts/package.js b/packages/accounts/package.js index 2fe6eaa..afcaf43 100644 --- a/packages/accounts/package.js +++ b/packages/accounts/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:accounts', summary: 'Orion accounts mannager', - version: '1.4.2', + version: '1.4.3', git: 'https://github.com/orionjs/orion' }); diff --git a/packages/base/init.js b/packages/base/init.js deleted file mode 100644 index 0a490db..0000000 --- a/packages/base/init.js +++ /dev/null @@ -1 +0,0 @@ -orion = {}; \ No newline at end of file diff --git a/packages/base/package.js b/packages/base/package.js index 87c1664..377001e 100644 --- a/packages/base/package.js +++ b/packages/base/package.js @@ -1,11 +1,15 @@ Package.describe({ name: 'orionjs:base', summary: 'Orion', +<<<<<<< e053de23a3f5383f8c48dcfe848e2d32757f4a94 <<<<<<< d7b5207b4790c1b09545c50e7a26a40156fec7a3 version: '1.4.1', ======= version: '1.3.1', >>>>>>> Linting & Hoisting & package bumped +======= + version: '1.3.2', +>>>>>>> Namespace & Logging package git: 'https://github.com/orionjs/orion' }); @@ -24,6 +28,7 @@ Package.onUse(function(api) { 'orionjs:lang-en@1.4.0' ======= 'zimme:active-route@2.3.0', + 'orionjs:logging@1.3.0', 'orionjs:lang-en@1.3.1' >>>>>>> Linting & Hoisting & package bumped ]); @@ -39,7 +44,6 @@ Package.onUse(function(api) { ]); api.addFiles([ - 'init.js', 'helpers.js', 'home-route.js', 'layouts.js', diff --git a/packages/core/package.js b/packages/core/package.js index 9cad1d8..b3550ea 100644 --- a/packages/core/package.js +++ b/packages/core/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:core', summary: 'Orion', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/orion' }); @@ -10,7 +10,7 @@ Package.onUse(function(api) { api.use([ 'orionjs:base@1.4.0', - 'orionjs:accounts@1.4.0', + 'orionjs:accounts@1.4.3', 'orionjs:config@1.4.0', 'orionjs:collections@1.4.0', 'orionjs:dictionary@1.4.0', @@ -19,6 +19,7 @@ Package.onUse(function(api) { ]); api.imply([ + 'orionjs:logging', 'orionjs:lang-en', 'orionjs:base', 'orionjs:accounts', @@ -26,12 +27,14 @@ Package.onUse(function(api) { 'orionjs:collections', 'orionjs:dictionary', 'orionjs:attributes', - ]); + ]); api.export('orion'); }); Package.onTest(function(api) { - api.use('tinytest'); - api.use('orionjs:core'); + api.use([ + 'tinytest', + 'orionjs:core' + ]); }); diff --git a/packages/logging/.npm/package/.gitignore b/packages/logging/.npm/package/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/packages/logging/.npm/package/.gitignore @@ -0,0 +1 @@ +node_modules diff --git a/packages/logging/.npm/package/README b/packages/logging/.npm/package/README new file mode 100644 index 0000000..3d49255 --- /dev/null +++ b/packages/logging/.npm/package/README @@ -0,0 +1,7 @@ +This directory and the files immediately inside it are automatically generated +when you change this package's NPM dependencies. Commit the files in this +directory (npm-shrinkwrap.json, .gitignore, and this README) to source control +so that others run the same versions of sub-dependencies. + +You should NOT check in the node_modules directory that Meteor automatically +creates; if you are using git, the .gitignore file tells git to ignore it. diff --git a/packages/logging/.npm/package/npm-shrinkwrap.json b/packages/logging/.npm/package/npm-shrinkwrap.json new file mode 100644 index 0000000..1410ece --- /dev/null +++ b/packages/logging/.npm/package/npm-shrinkwrap.json @@ -0,0 +1,109 @@ +{ + "dependencies": { + "bunyan": { + "version": "1.4.0", + "dependencies": { + "dtrace-provider": { + "version": "0.5.0", + "dependencies": { + "nan": { + "version": "1.8.4" + } + } + }, + "mv": { + "version": "2.1.1", + "dependencies": { + "mkdirp": { + "version": "0.5.1", + "dependencies": { + "minimist": { + "version": "0.0.8" + } + } + }, + "ncp": { + "version": "2.0.0" + }, + "rimraf": { + "version": "2.4.2", + "dependencies": { + "glob": { + "version": "5.0.14", + "dependencies": { + "inflight": { + "version": "1.0.4", + "dependencies": { + "wrappy": { + "version": "1.0.1" + } + } + }, + "inherits": { + "version": "2.0.1" + }, + "minimatch": { + "version": "2.0.10", + "dependencies": { + "brace-expansion": { + "version": "1.1.0", + "dependencies": { + "balanced-match": { + "version": "0.2.0" + }, + "concat-map": { + "version": "0.0.1" + } + } + } + } + }, + "once": { + "version": "1.3.2", + "dependencies": { + "wrappy": { + "version": "1.0.1" + } + } + }, + "path-is-absolute": { + "version": "1.0.0" + } + } + } + } + } + } + }, + "safe-json-stringify": { + "version": "1.0.3" + } + } + }, + "bunyan-format": { + "version": "0.2.1", + "dependencies": { + "ansistyles": { + "version": "0.1.3" + }, + "ansicolors": { + "version": "0.2.1" + }, + "xtend": { + "version": "2.1.2", + "dependencies": { + "object-keys": { + "version": "0.4.0" + } + } + } + } + }, + "log-with-style": { + "version": "0.1.5" + }, + "process": { + "version": "0.11.1" + } + } +} diff --git a/packages/logging/.versions b/packages/logging/.versions new file mode 100644 index 0000000..e69de29 diff --git a/packages/logging/README.md b/packages/logging/README.md new file mode 100644 index 0000000..fa5357b --- /dev/null +++ b/packages/logging/README.md @@ -0,0 +1,35 @@ +# OrionJS - Logging +Provide an isomorphic logging capabilities for OrionJS. + +## Installation +```bash +meteor add orionjs:logging +``` + +## Introduction +This package exposes [Bunyan](https://github.com/trentm/node-bunyan) within OrionJS. + +It declares a reusable logger in OrionJS as `orion.log` and a default formatter +as `orion.log.logFormatter`. However in order to separate your application's logs +from the one of OrionJS, we recommend you to instantiate your own logger like so: + +```js +// Client and server side +myAppLog = new bunyan.createLogger({ + name: 'myApp', + stream: orion.logFormatter, + level: 'info' +}); +... +// And using it this way within your app +myAppLog.info('Info level logs'); +myAppLog.warn('Warning level logs'); +myAppLog.error('Error level logs'); +... +``` + +## Links +* Inspired from [Ongoworks's Bunyan](https://github.com/ongoworks/meteor-bunyan) +* [Bunyan](https://github.com/trentm/node-bunyan) +* [Comparison between Winston and Bunyan](https://strongloop.com/strongblog/compare-node-js-logging-winston-bunyan/) +* [Log with style](https://www.npmjs.com/package/log-with-style) diff --git a/packages/logging/logging_both.js b/packages/logging/logging_both.js new file mode 100644 index 0000000..1f619fe --- /dev/null +++ b/packages/logging/logging_both.js @@ -0,0 +1,12 @@ +// Default log informations +ORION_LOG_FRAMEWORK_NAME = 'OrionJS'; +ORION_LOG_LEVEL = 'info'; + +// Instantiate logger +orion.log = bunyan.createLogger({ + name: ORION_LOG_FRAMEWORK_NAME, + stream: orion.logFormatter, + level: ORION_LOG_LEVEL +}); + +orion.log.info('Logger activated'); diff --git a/packages/logging/logging_client.browserify.js b/packages/logging/logging_client.browserify.js new file mode 100644 index 0000000..1328277 --- /dev/null +++ b/packages/logging/logging_client.browserify.js @@ -0,0 +1,46 @@ +RotatingFileStream = null; // see: https://github.com/trentm/node-bunyan/issues/223 +bunyan = require('bunyan'); +bunyanFormat = require('bunyan-format'); + +var WritableStream = require('stream').Writable; +var inherits = require('util').inherits; +var logStyle = require('log-with-style'); + +inherits(BrowserStdout, WritableStream); + +function BrowserStdout() { + if (!(this instanceof BrowserStdout)) { + return new BrowserStdout(); + } + WritableStream.call(this); +} + +BrowserStdout.prototype._write = function(chunks, encoding, cb) { + var output = JSON.parse(chunks.toString ? chunks.toString() : chunks); + var color = '[c="color: green"]'; + var level = 'INFO'; + if (output.level > 40) { + color = '[c="color: red"]'; + if (output.level === 60) { + level = 'FATAL'; + } else { + level = 'ERROR'; + } + } else if (output.level === 40) { + color = '[c="color: orange"]'; + level = 'WARNING'; + } else if (output.level === 20) { + level = 'DEBUG'; + } else if (output.level === 10) { + level = 'TRACE'; + } + logStyle(color + level + '[c] ' + '[c="color: blue"]' + output.name + '[c] ' + output.msg); + process.nextTick(cb); +}; + +// Import process.stdout and process.stderr +process = require('process'); +process.stdout = BrowserStdout(); +process.stderr = BrowserStdout(); + +orion.logFormatter = BrowserStdout(); diff --git a/packages/logging/logging_client.browserify.js.cached b/packages/logging/logging_client.browserify.js.cached new file mode 100644 index 0000000..d46e195 --- /dev/null +++ b/packages/logging/logging_client.browserify.js.cached @@ -0,0 +1,9821 @@ +(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o +// +// 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 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. + +// when used in node, this will actually load the util module we depend on +// versus loading the builtin util module as happens otherwise +// this is a bug in node module loading as far as I am concerned +var util = require('util/'); + +var pSlice = Array.prototype.slice; +var hasOwn = Object.prototype.hasOwnProperty; + +// 1. The assert module provides functions that throw +// AssertionError's when particular conditions are not met. The +// assert module must conform to the following interface. + +var assert = module.exports = ok; + +// 2. The AssertionError is defined in assert. +// new assert.AssertionError({ message: message, +// actual: actual, +// expected: expected }) + +assert.AssertionError = function AssertionError(options) { + this.name = 'AssertionError'; + this.actual = options.actual; + this.expected = options.expected; + this.operator = options.operator; + if (options.message) { + this.message = options.message; + this.generatedMessage = false; + } else { + this.message = getMessage(this); + this.generatedMessage = true; + } + var stackStartFunction = options.stackStartFunction || fail; + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, stackStartFunction); + } + else { + // non v8 browsers so we can have a stacktrace + var err = new Error(); + if (err.stack) { + var out = err.stack; + + // try to strip useless frames + var fn_name = stackStartFunction.name; + var idx = out.indexOf('\n' + fn_name); + if (idx >= 0) { + // once we have located the function frame + // we need to strip out everything before it (and its line) + var next_line = out.indexOf('\n', idx + 1); + out = out.substring(next_line + 1); + } + + this.stack = out; + } + } +}; + +// assert.AssertionError instanceof Error +util.inherits(assert.AssertionError, Error); + +function replacer(key, value) { + if (util.isUndefined(value)) { + return '' + value; + } + if (util.isNumber(value) && !isFinite(value)) { + return value.toString(); + } + if (util.isFunction(value) || util.isRegExp(value)) { + return value.toString(); + } + return value; +} + +function truncate(s, n) { + if (util.isString(s)) { + return s.length < n ? s : s.slice(0, n); + } else { + return s; + } +} + +function getMessage(self) { + return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + + self.operator + ' ' + + truncate(JSON.stringify(self.expected, replacer), 128); +} + +// At present only the three keys mentioned above are used and +// understood by the spec. Implementations or sub modules can pass +// other keys to the AssertionError's constructor - they will be +// ignored. + +// 3. All of the following functions must throw an AssertionError +// when a corresponding condition is not met, with a message that +// may be undefined if not provided. All assertion methods provide +// both the actual and expected values to the assertion error for +// display purposes. + +function fail(actual, expected, message, operator, stackStartFunction) { + throw new assert.AssertionError({ + message: message, + actual: actual, + expected: expected, + operator: operator, + stackStartFunction: stackStartFunction + }); +} + +// EXTENSION! allows for well behaved errors defined elsewhere. +assert.fail = fail; + +// 4. Pure assertion tests whether a value is truthy, as determined +// by !!guard. +// assert.ok(guard, message_opt); +// This statement is equivalent to assert.equal(true, !!guard, +// message_opt);. To test strictly for the value true, use +// assert.strictEqual(true, guard, message_opt);. + +function ok(value, message) { + if (!value) fail(value, true, message, '==', assert.ok); +} +assert.ok = ok; + +// 5. The equality assertion tests shallow, coercive equality with +// ==. +// assert.equal(actual, expected, message_opt); + +assert.equal = function equal(actual, expected, message) { + if (actual != expected) fail(actual, expected, message, '==', assert.equal); +}; + +// 6. The non-equality assertion tests for whether two objects are not equal +// with != assert.notEqual(actual, expected, message_opt); + +assert.notEqual = function notEqual(actual, expected, message) { + if (actual == expected) { + fail(actual, expected, message, '!=', assert.notEqual); + } +}; + +// 7. The equivalence assertion tests a deep equality relation. +// assert.deepEqual(actual, expected, message_opt); + +assert.deepEqual = function deepEqual(actual, expected, message) { + if (!_deepEqual(actual, expected)) { + fail(actual, expected, message, 'deepEqual', assert.deepEqual); + } +}; + +function _deepEqual(actual, expected) { + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + + } else if (util.isBuffer(actual) && util.isBuffer(expected)) { + if (actual.length != expected.length) return false; + + for (var i = 0; i < actual.length; i++) { + if (actual[i] !== expected[i]) return false; + } + + return true; + + // 7.2. If the expected value is a Date object, the actual value is + // equivalent if it is also a Date object that refers to the same time. + } else if (util.isDate(actual) && util.isDate(expected)) { + return actual.getTime() === expected.getTime(); + + // 7.3 If the expected value is a RegExp object, the actual value is + // equivalent if it is also a RegExp object with the same source and + // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). + } else if (util.isRegExp(actual) && util.isRegExp(expected)) { + return actual.source === expected.source && + actual.global === expected.global && + actual.multiline === expected.multiline && + actual.lastIndex === expected.lastIndex && + actual.ignoreCase === expected.ignoreCase; + + // 7.4. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (!util.isObject(actual) && !util.isObject(expected)) { + return actual == expected; + + // 7.5 For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected); + } +} + +function isArguments(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +} + +function objEquiv(a, b) { + if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) + return false; + // an identical 'prototype' property. + if (a.prototype !== b.prototype) return false; + // if one is a primitive, the other must be same + if (util.isPrimitive(a) || util.isPrimitive(b)) { + return a === b; + } + var aIsArgs = isArguments(a), + bIsArgs = isArguments(b); + if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) + return false; + if (aIsArgs) { + a = pSlice.call(a); + b = pSlice.call(b); + return _deepEqual(a, b); + } + var ka = objectKeys(a), + kb = objectKeys(b), + key, i; + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!_deepEqual(a[key], b[key])) return false; + } + return true; +} + +// 8. The non-equivalence assertion tests for any deep inequality. +// assert.notDeepEqual(actual, expected, message_opt); + +assert.notDeepEqual = function notDeepEqual(actual, expected, message) { + if (_deepEqual(actual, expected)) { + fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); + } +}; + +// 9. The strict equality assertion tests strict equality, as determined by ===. +// assert.strictEqual(actual, expected, message_opt); + +assert.strictEqual = function strictEqual(actual, expected, message) { + if (actual !== expected) { + fail(actual, expected, message, '===', assert.strictEqual); + } +}; + +// 10. The strict non-equality assertion tests for strict inequality, as +// determined by !==. assert.notStrictEqual(actual, expected, message_opt); + +assert.notStrictEqual = function notStrictEqual(actual, expected, message) { + if (actual === expected) { + fail(actual, expected, message, '!==', assert.notStrictEqual); + } +}; + +function expectedException(actual, expected) { + if (!actual || !expected) { + return false; + } + + if (Object.prototype.toString.call(expected) == '[object RegExp]') { + return expected.test(actual); + } else if (actual instanceof expected) { + return true; + } else if (expected.call({}, actual) === true) { + return true; + } + + return false; +} + +function _throws(shouldThrow, block, expected, message) { + var actual; + + if (util.isString(expected)) { + message = expected; + expected = null; + } + + try { + block(); + } catch (e) { + actual = e; + } + + message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + + (message ? ' ' + message : '.'); + + if (shouldThrow && !actual) { + fail(actual, expected, 'Missing expected exception' + message); + } + + if (!shouldThrow && expectedException(actual, expected)) { + fail(actual, expected, 'Got unwanted exception' + message); + } + + if ((shouldThrow && actual && expected && + !expectedException(actual, expected)) || (!shouldThrow && actual)) { + throw actual; + } +} + +// 11. Expected to throw an error: +// assert.throws(block, Error_opt, message_opt); + +assert.throws = function(block, /*optional*/error, /*optional*/message) { + _throws.apply(this, [true].concat(pSlice.call(arguments))); +}; + +// EXTENSION! This is annoying to write outside this module. +assert.doesNotThrow = function(block, /*optional*/message) { + _throws.apply(this, [false].concat(pSlice.call(arguments))); +}; + +assert.ifError = function(err) { if (err) {throw err;}}; + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + if (hasOwn.call(obj, key)) keys.push(key); + } + return keys; +}; + +},{"util/":36}],3:[function(require,module,exports){ +arguments[4][1][0].apply(exports,arguments) +},{"dup":1}],4:[function(require,module,exports){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + +var base64 = require('base64-js') +var ieee754 = require('ieee754') +var isArray = require('is-array') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 // not used by this implementation + +var rootParent = {} + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Note: + * + * - Implementation must support adding new properties to `Uint8Array` instances. + * Firefox 4-29 lacked support, fixed in Firefox 30+. + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + * + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will + * get the Object implementation, which is slower but will work correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = (function () { + function Foo () {} + try { + var buf = new ArrayBuffer(0) + var arr = new Uint8Array(buf) + arr.foo = function () { return 42 } + arr.constructor = Foo + return arr.foo() === 42 && // typed array instances can be augmented + arr.constructor === Foo && // constructor can be set + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +})() + +function kMaxLength () { + return Buffer.TYPED_ARRAY_SUPPORT + ? 0x7fffffff + : 0x3fffffff +} + +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + */ +function Buffer (arg) { + if (!(this instanceof Buffer)) { + // Avoid going through an ArgumentsAdaptorTrampoline in the common case. + if (arguments.length > 1) return new Buffer(arg, arguments[1]) + return new Buffer(arg) + } + + this.length = 0 + this.parent = undefined + + // Common case. + if (typeof arg === 'number') { + return fromNumber(this, arg) + } + + // Slightly less common case. + if (typeof arg === 'string') { + return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') + } + + // Unusual. + return fromObject(this, arg) +} + +function fromNumber (that, length) { + that = allocate(that, length < 0 ? 0 : checked(length) | 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < length; i++) { + that[i] = 0 + } + } + return that +} + +function fromString (that, string, encoding) { + if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' + + // Assumption: byteLength() return value is always < kMaxLength. + var length = byteLength(string, encoding) | 0 + that = allocate(that, length) + + that.write(string, encoding) + return that +} + +function fromObject (that, object) { + if (Buffer.isBuffer(object)) return fromBuffer(that, object) + + if (isArray(object)) return fromArray(that, object) + + if (object == null) { + throw new TypeError('must start with number, buffer, array or string') + } + + if (typeof ArrayBuffer !== 'undefined' && object.buffer instanceof ArrayBuffer) { + return fromTypedArray(that, object) + } + + if (object.length) return fromArrayLike(that, object) + + return fromJsonObject(that, object) +} + +function fromBuffer (that, buffer) { + var length = checked(buffer.length) | 0 + that = allocate(that, length) + buffer.copy(that, 0, 0, length) + return that +} + +function fromArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Duplicate of fromArray() to keep fromArray() monomorphic. +function fromTypedArray (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + // Truncating the elements is probably not what people expect from typed + // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior + // of the old Buffer constructor. + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function fromArrayLike (that, array) { + var length = checked(array.length) | 0 + that = allocate(that, length) + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. +// Returns a zero-length buffer for inputs that don't conform to the spec. +function fromJsonObject (that, object) { + var array + var length = 0 + + if (object.type === 'Buffer' && isArray(object.data)) { + array = object.data + length = checked(array.length) | 0 + } + that = allocate(that, length) + + for (var i = 0; i < length; i += 1) { + that[i] = array[i] & 255 + } + return that +} + +function allocate (that, length) { + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Return an augmented `Uint8Array` instance, for best performance + that = Buffer._augment(new Uint8Array(length)) + } else { + // Fallback: Return an object instance of the Buffer class + that.length = length + that._isBuffer = true + } + + var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 + if (fromPool) that.parent = rootParent + + return that +} + +function checked (length) { + // Note: cannot use `length < kMaxLength` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= kMaxLength()) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + kMaxLength().toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (subject, encoding) { + if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) + + var buf = new Buffer(subject, encoding) + delete buf.parent + return buf +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + var i = 0 + var len = Math.min(x, y) + while (i < len) { + if (a[i] !== b[i]) break + + ++i + } + + if (i !== len) { + x = a[i] + y = b[i] + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'raw': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') + + if (list.length === 0) { + return new Buffer(0) + } else if (list.length === 1) { + return list[0] + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; i++) { + length += list[i].length + } + } + + var buf = new Buffer(length) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} + +function byteLength (string, encoding) { + if (typeof string !== 'string') string = '' + string + + var len = string.length + if (len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'binary': + // Deprecated + case 'raw': + case 'raws': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) return utf8ToBytes(string).length // assume utf8 + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +// pre-set for values that may exist in the future +Buffer.prototype.length = undefined +Buffer.prototype.parent = undefined + +function slowToString (encoding, start, end) { + var loweredCase = false + + start = start | 0 + end = end === undefined || end === Infinity ? this.length : end | 0 + + if (!encoding) encoding = 'utf8' + if (start < 0) start = 0 + if (end > this.length) end = this.length + if (end <= start) return '' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'binary': + return binarySlice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toString = function toString () { + var length = this.length | 0 + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '' +} + +Buffer.prototype.compare = function compare (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return 0 + return Buffer.compare(this, b) +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset) { + if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff + else if (byteOffset < -0x80000000) byteOffset = -0x80000000 + byteOffset >>= 0 + + if (this.length === 0) return -1 + if (byteOffset >= this.length) return -1 + + // Negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) + + if (typeof val === 'string') { + if (val.length === 0) return -1 // special case: looking for empty string always fails + return String.prototype.indexOf.call(this, val, byteOffset) + } + if (Buffer.isBuffer(val)) { + return arrayIndexOf(this, val, byteOffset) + } + if (typeof val === 'number') { + if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { + return Uint8Array.prototype.indexOf.call(this, val, byteOffset) + } + return arrayIndexOf(this, [ val ], byteOffset) + } + + function arrayIndexOf (arr, val, byteOffset) { + var foundIndex = -1 + for (var i = 0; byteOffset + i < arr.length; i++) { + if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex + } else { + foundIndex = -1 + } + } + return -1 + } + + throw new TypeError('val must be string, number or Buffer') +} + +// `get` will be removed in Node 0.13+ +Buffer.prototype.get = function get (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} + +// `set` will be removed in Node 0.13+ +Buffer.prototype.set = function set (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new Error('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) throw new Error('Invalid hex string') + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset | 0 + if (isFinite(length)) { + length = length | 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + // legacy write(string, encoding, offset, length) - remove in v0.13 + } else { + var swap = encoding + encoding = offset + offset = length | 0 + length = swap + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'binary': + return binaryWrite(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + var res = '' + var tmp = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + if (buf[i] <= 0x7F) { + res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) + tmp = '' + } else { + tmp += '%' + buf[i].toString(16) + } + } + + return res + decodeUtf8Char(tmp) +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function binarySlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + } + + if (newBuf.length) newBuf.parent = this.parent || this + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + byteLength = byteLength | 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = value + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = value + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = value + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = value + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = value + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = value + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset | 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = value + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') + if (offset < 0) throw new RangeError('index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < len; i++) { + target[i + targetStart] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), targetStart) + } + + return len +} + +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function fill (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + if (end < start) throw new RangeError('end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') + if (end < 0 || end > this.length) throw new RangeError('end out of bounds') + + var i + if (typeof value === 'number') { + for (i = start; i < end; i++) { + this[i] = value + } + } else { + var bytes = utf8ToBytes(value.toString()) + var len = bytes.length + for (i = start; i < end; i++) { + this[i] = bytes[i % len] + } + } + + return this +} + +/** + * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. + * Added in Node 0.12. Only available in browsers that support ArrayBuffer. + */ +Buffer.prototype.toArrayBuffer = function toArrayBuffer () { + if (typeof Uint8Array !== 'undefined') { + if (Buffer.TYPED_ARRAY_SUPPORT) { + return (new Buffer(this)).buffer + } else { + var buf = new Uint8Array(this.length) + for (var i = 0, len = buf.length; i < len; i += 1) { + buf[i] = this[i] + } + return buf.buffer + } + } else { + throw new TypeError('Buffer.toArrayBuffer not supported in this browser') + } +} + +// HELPER FUNCTIONS +// ================ + +var BP = Buffer.prototype + +/** + * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods + */ +Buffer._augment = function _augment (arr) { + arr.constructor = Buffer + arr._isBuffer = true + + // save reference to original Uint8Array set method before overwriting + arr._set = arr.set + + // deprecated, will be removed in node 0.13+ + arr.get = BP.get + arr.set = BP.set + + arr.write = BP.write + arr.toString = BP.toString + arr.toLocaleString = BP.toString + arr.toJSON = BP.toJSON + arr.equals = BP.equals + arr.compare = BP.compare + arr.indexOf = BP.indexOf + arr.copy = BP.copy + arr.slice = BP.slice + arr.readUIntLE = BP.readUIntLE + arr.readUIntBE = BP.readUIntBE + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + arr.readIntLE = BP.readIntLE + arr.readIntBE = BP.readIntBE + arr.readInt8 = BP.readInt8 + arr.readInt16LE = BP.readInt16LE + arr.readInt16BE = BP.readInt16BE + arr.readInt32LE = BP.readInt32LE + arr.readInt32BE = BP.readInt32BE + arr.readFloatLE = BP.readFloatLE + arr.readFloatBE = BP.readFloatBE + arr.readDoubleLE = BP.readDoubleLE + arr.readDoubleBE = BP.readDoubleBE + arr.writeUInt8 = BP.writeUInt8 + arr.writeUIntLE = BP.writeUIntLE + arr.writeUIntBE = BP.writeUIntBE + arr.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + arr.writeIntLE = BP.writeIntLE + arr.writeIntBE = BP.writeIntBE + arr.writeInt8 = BP.writeInt8 + arr.writeInt16LE = BP.writeInt16LE + arr.writeInt16BE = BP.writeInt16BE + arr.writeInt32LE = BP.writeInt32LE + arr.writeInt32BE = BP.writeInt32BE + arr.writeFloatLE = BP.writeFloatLE + arr.writeFloatBE = BP.writeFloatBE + arr.writeDoubleLE = BP.writeDoubleLE + arr.writeDoubleBE = BP.writeDoubleBE + arr.fill = BP.fill + arr.inspect = BP.inspect + arr.toArrayBuffer = BP.toArrayBuffer + + return arr +} + +var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + var i = 0 + + for (; i < length; i++) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (leadSurrogate) { + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } else { + // valid surrogate pair + codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 + leadSurrogate = null + } + } else { + // no lead yet + + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else { + // valid lead + leadSurrogate = codePoint + continue + } + } + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = null + } + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x200000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; i++) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +function decodeUtf8Char (str) { + try { + return decodeURIComponent(str) + } catch (err) { + return String.fromCharCode(0xFFFD) // UTF 8 invalid char + } +} + +},{"base64-js":5,"ieee754":6,"is-array":7}],5:[function(require,module,exports){ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],6:[function(require,module,exports){ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],7:[function(require,module,exports){ + +/** + * isArray + */ + +var isArray = Array.isArray; + +/** + * toString + */ + +var str = Object.prototype.toString; + +/** + * Whether or not the given `val` + * is an array. + * + * example: + * + * isArray([]); + * // > true + * isArray(arguments); + * // > false + * isArray(''); + * // > false + * + * @param {mixed} val + * @return {bool} + */ + +module.exports = isArray || function (val) { + return !! val && '[object Array]' == str.call(val); +}; + +},{}],8:[function(require,module,exports){ +// 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. + +function EventEmitter() { + this._events = this._events || {}; + this._maxListeners = this._maxListeners || undefined; +} +module.exports = EventEmitter; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +EventEmitter.defaultMaxListeners = 10; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function(n) { + if (!isNumber(n) || n < 0 || isNaN(n)) + throw TypeError('n must be a positive number'); + this._maxListeners = n; + return this; +}; + +EventEmitter.prototype.emit = function(type) { + var er, handler, len, args, i, listeners; + + if (!this._events) + this._events = {}; + + // If there is no 'error' event listener then throw. + if (type === 'error') { + if (!this._events.error || + (isObject(this._events.error) && !this._events.error.length)) { + er = arguments[1]; + if (er instanceof Error) { + throw er; // Unhandled 'error' event + } + throw TypeError('Uncaught, unspecified "error" event.'); + } + } + + handler = this._events[type]; + + if (isUndefined(handler)) + return false; + + if (isFunction(handler)) { + switch (arguments.length) { + // fast cases + case 1: + handler.call(this); + break; + case 2: + handler.call(this, arguments[1]); + break; + case 3: + handler.call(this, arguments[1], arguments[2]); + break; + // slower + default: + len = arguments.length; + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; + handler.apply(this, args); + } + } else if (isObject(handler)) { + len = arguments.length; + args = new Array(len - 1); + for (i = 1; i < len; i++) + args[i - 1] = arguments[i]; + + listeners = handler.slice(); + len = listeners.length; + for (i = 0; i < len; i++) + listeners[i].apply(this, args); + } + + return true; +}; + +EventEmitter.prototype.addListener = function(type, listener) { + var m; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events) + this._events = {}; + + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (this._events.newListener) + this.emit('newListener', type, + isFunction(listener.listener) ? + listener.listener : listener); + + if (!this._events[type]) + // Optimize the case of one listener. Don't need the extra array object. + this._events[type] = listener; + else if (isObject(this._events[type])) + // If we've already got an array, just append. + this._events[type].push(listener); + else + // Adding the second element, need to change to array. + this._events[type] = [this._events[type], listener]; + + // Check for listener leak + if (isObject(this._events[type]) && !this._events[type].warned) { + var m; + if (!isUndefined(this._maxListeners)) { + m = this._maxListeners; + } else { + m = EventEmitter.defaultMaxListeners; + } + + if (m && m > 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + if (typeof console.trace === 'function') { + // not supported in IE 10 + console.trace(); + } + } + } + + return this; +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + var fired = false; + + function g() { + this.removeListener(type, g); + + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } + + g.listener = listener; + this.on(type, g); + + return this; +}; + +// emits a 'removeListener' event iff the listener was removed +EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events || !this._events[type]) + return this; + + list = this._events[type]; + length = list.length; + position = -1; + + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { + delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); + + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; + break; + } + } + + if (position < 0) + return this; + + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } + + if (this._events.removeListener) + this.emit('removeListener', type, listener); + } + + return this; +}; + +EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + + if (!this._events) + return this; + + // not listening for removeListener, no need to emit + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + for (key in this._events) { + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = {}; + return this; + } + + listeners = this._events[type]; + + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; + + return this; +}; + +EventEmitter.prototype.listeners = function(type) { + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); + return ret; +}; + +EventEmitter.listenerCount = function(emitter, type) { + var ret; + if (!emitter._events || !emitter._events[type]) + ret = 0; + else if (isFunction(emitter._events[type])) + ret = 1; + else + ret = emitter._events[type].length; + return ret; +}; + +function isFunction(arg) { + return typeof arg === 'function'; +} + +function isNumber(arg) { + return typeof arg === 'number'; +} + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isUndefined(arg) { + return arg === void 0; +} + +},{}],9:[function(require,module,exports){ +var http = module.exports; +var EventEmitter = require('events').EventEmitter; +var Request = require('./lib/request'); +var url = require('url') + +http.request = function (params, cb) { + if (typeof params === 'string') { + params = url.parse(params) + } + if (!params) params = {}; + if (!params.host && !params.port) { + params.port = parseInt(window.location.port, 10); + } + if (!params.host && params.hostname) { + params.host = params.hostname; + } + + if (!params.protocol) { + if (params.scheme) { + params.protocol = params.scheme + ':'; + } else { + params.protocol = window.location.protocol; + } + } + + if (!params.host) { + params.host = window.location.hostname || window.location.host; + } + if (/:/.test(params.host)) { + if (!params.port) { + params.port = params.host.split(':')[1]; + } + params.host = params.host.split(':')[0]; + } + if (!params.port) params.port = params.protocol == 'https:' ? 443 : 80; + + var req = new Request(new xhrHttp, params); + if (cb) req.on('response', cb); + return req; +}; + +http.get = function (params, cb) { + params.method = 'GET'; + var req = http.request(params, cb); + req.end(); + return req; +}; + +http.Agent = function () {}; +http.Agent.defaultMaxSockets = 4; + +var xhrHttp = (function () { + if (typeof window === 'undefined') { + throw new Error('no window object present'); + } + else if (window.XMLHttpRequest) { + return window.XMLHttpRequest; + } + else if (window.ActiveXObject) { + var axs = [ + 'Msxml2.XMLHTTP.6.0', + 'Msxml2.XMLHTTP.3.0', + 'Microsoft.XMLHTTP' + ]; + for (var i = 0; i < axs.length; i++) { + try { + var ax = new(window.ActiveXObject)(axs[i]); + return function () { + if (ax) { + var ax_ = ax; + ax = null; + return ax_; + } + else { + return new(window.ActiveXObject)(axs[i]); + } + }; + } + catch (e) {} + } + throw new Error('ajax not supported in this browser') + } + else { + throw new Error('ajax not supported in this browser'); + } +})(); + +http.STATUS_CODES = { + 100 : 'Continue', + 101 : 'Switching Protocols', + 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918 + 200 : 'OK', + 201 : 'Created', + 202 : 'Accepted', + 203 : 'Non-Authoritative Information', + 204 : 'No Content', + 205 : 'Reset Content', + 206 : 'Partial Content', + 207 : 'Multi-Status', // RFC 4918 + 300 : 'Multiple Choices', + 301 : 'Moved Permanently', + 302 : 'Moved Temporarily', + 303 : 'See Other', + 304 : 'Not Modified', + 305 : 'Use Proxy', + 307 : 'Temporary Redirect', + 400 : 'Bad Request', + 401 : 'Unauthorized', + 402 : 'Payment Required', + 403 : 'Forbidden', + 404 : 'Not Found', + 405 : 'Method Not Allowed', + 406 : 'Not Acceptable', + 407 : 'Proxy Authentication Required', + 408 : 'Request Time-out', + 409 : 'Conflict', + 410 : 'Gone', + 411 : 'Length Required', + 412 : 'Precondition Failed', + 413 : 'Request Entity Too Large', + 414 : 'Request-URI Too Large', + 415 : 'Unsupported Media Type', + 416 : 'Requested Range Not Satisfiable', + 417 : 'Expectation Failed', + 418 : 'I\'m a teapot', // RFC 2324 + 422 : 'Unprocessable Entity', // RFC 4918 + 423 : 'Locked', // RFC 4918 + 424 : 'Failed Dependency', // RFC 4918 + 425 : 'Unordered Collection', // RFC 4918 + 426 : 'Upgrade Required', // RFC 2817 + 428 : 'Precondition Required', // RFC 6585 + 429 : 'Too Many Requests', // RFC 6585 + 431 : 'Request Header Fields Too Large',// RFC 6585 + 500 : 'Internal Server Error', + 501 : 'Not Implemented', + 502 : 'Bad Gateway', + 503 : 'Service Unavailable', + 504 : 'Gateway Time-out', + 505 : 'HTTP Version Not Supported', + 506 : 'Variant Also Negotiates', // RFC 2295 + 507 : 'Insufficient Storage', // RFC 4918 + 509 : 'Bandwidth Limit Exceeded', + 510 : 'Not Extended', // RFC 2774 + 511 : 'Network Authentication Required' // RFC 6585 +}; +},{"./lib/request":10,"events":8,"url":34}],10:[function(require,module,exports){ +var Stream = require('stream'); +var Response = require('./response'); +var Base64 = require('Base64'); +var inherits = require('inherits'); + +var Request = module.exports = function (xhr, params) { + var self = this; + self.writable = true; + self.xhr = xhr; + self.body = []; + + self.uri = (params.protocol || 'http:') + '//' + + params.host + + (params.port ? ':' + params.port : '') + + (params.path || '/') + ; + + if (typeof params.withCredentials === 'undefined') { + params.withCredentials = true; + } + + try { xhr.withCredentials = params.withCredentials } + catch (e) {} + + if (params.responseType) try { xhr.responseType = params.responseType } + catch (e) {} + + xhr.open( + params.method || 'GET', + self.uri, + true + ); + + xhr.onerror = function(event) { + self.emit('error', new Error('Network error')); + }; + + self._headers = {}; + + if (params.headers) { + var keys = objectKeys(params.headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!self.isSafeRequestHeader(key)) continue; + var value = params.headers[key]; + self.setHeader(key, value); + } + } + + if (params.auth) { + //basic auth + this.setHeader('Authorization', 'Basic ' + Base64.btoa(params.auth)); + } + + var res = new Response; + res.on('close', function () { + self.emit('close'); + }); + + res.on('ready', function () { + self.emit('response', res); + }); + + res.on('error', function (err) { + self.emit('error', err); + }); + + xhr.onreadystatechange = function () { + // Fix for IE9 bug + // SCRIPT575: Could not complete the operation due to error c00c023f + // It happens when a request is aborted, calling the success callback anyway with readyState === 4 + if (xhr.__aborted) return; + res.handle(xhr); + }; +}; + +inherits(Request, Stream); + +Request.prototype.setHeader = function (key, value) { + this._headers[key.toLowerCase()] = value +}; + +Request.prototype.getHeader = function (key) { + return this._headers[key.toLowerCase()] +}; + +Request.prototype.removeHeader = function (key) { + delete this._headers[key.toLowerCase()] +}; + +Request.prototype.write = function (s) { + this.body.push(s); +}; + +Request.prototype.destroy = function (s) { + this.xhr.__aborted = true; + this.xhr.abort(); + this.emit('close'); +}; + +Request.prototype.end = function (s) { + if (s !== undefined) this.body.push(s); + + var keys = objectKeys(this._headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = this._headers[key]; + if (isArray(value)) { + for (var j = 0; j < value.length; j++) { + this.xhr.setRequestHeader(key, value[j]); + } + } + else this.xhr.setRequestHeader(key, value) + } + + if (this.body.length === 0) { + this.xhr.send(''); + } + else if (typeof this.body[0] === 'string') { + this.xhr.send(this.body.join('')); + } + else if (isArray(this.body[0])) { + var body = []; + for (var i = 0; i < this.body.length; i++) { + body.push.apply(body, this.body[i]); + } + this.xhr.send(body); + } + else if (/Array/.test(Object.prototype.toString.call(this.body[0]))) { + var len = 0; + for (var i = 0; i < this.body.length; i++) { + len += this.body[i].length; + } + var body = new(this.body[0].constructor)(len); + var k = 0; + + for (var i = 0; i < this.body.length; i++) { + var b = this.body[i]; + for (var j = 0; j < b.length; j++) { + body[k++] = b[j]; + } + } + this.xhr.send(body); + } + else if (isXHR2Compatible(this.body[0])) { + this.xhr.send(this.body[0]); + } + else { + var body = ''; + for (var i = 0; i < this.body.length; i++) { + body += this.body[i].toString(); + } + this.xhr.send(body); + } +}; + +// Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html +Request.unsafeHeaders = [ + "accept-charset", + "accept-encoding", + "access-control-request-headers", + "access-control-request-method", + "connection", + "content-length", + "cookie", + "cookie2", + "content-transfer-encoding", + "date", + "expect", + "host", + "keep-alive", + "origin", + "referer", + "te", + "trailer", + "transfer-encoding", + "upgrade", + "user-agent", + "via" +]; + +Request.prototype.isSafeRequestHeader = function (headerName) { + if (!headerName) return false; + return indexOf(Request.unsafeHeaders, headerName.toLowerCase()) === -1; +}; + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +var indexOf = function (xs, x) { + if (xs.indexOf) return xs.indexOf(x); + for (var i = 0; i < xs.length; i++) { + if (xs[i] === x) return i; + } + return -1; +}; + +var isXHR2Compatible = function (obj) { + if (typeof Blob !== 'undefined' && obj instanceof Blob) return true; + if (typeof ArrayBuffer !== 'undefined' && obj instanceof ArrayBuffer) return true; + if (typeof FormData !== 'undefined' && obj instanceof FormData) return true; +}; + +},{"./response":11,"Base64":12,"inherits":13,"stream":32}],11:[function(require,module,exports){ +var Stream = require('stream'); +var util = require('util'); + +var Response = module.exports = function (res) { + this.offset = 0; + this.readable = true; +}; + +util.inherits(Response, Stream); + +var capable = { + streaming : true, + status2 : true +}; + +function parseHeaders (res) { + var lines = res.getAllResponseHeaders().split(/\r?\n/); + var headers = {}; + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + if (line === '') continue; + + var m = line.match(/^([^:]+):\s*(.*)/); + if (m) { + var key = m[1].toLowerCase(), value = m[2]; + + if (headers[key] !== undefined) { + + if (isArray(headers[key])) { + headers[key].push(value); + } + else { + headers[key] = [ headers[key], value ]; + } + } + else { + headers[key] = value; + } + } + else { + headers[line] = true; + } + } + return headers; +} + +Response.prototype.getResponse = function (xhr) { + var respType = String(xhr.responseType).toLowerCase(); + if (respType === 'blob') return xhr.responseBlob || xhr.response; + if (respType === 'arraybuffer') return xhr.response; + return xhr.responseText; +} + +Response.prototype.getHeader = function (key) { + return this.headers[key.toLowerCase()]; +}; + +Response.prototype.handle = function (res) { + if (res.readyState === 2 && capable.status2) { + try { + this.statusCode = res.status; + this.headers = parseHeaders(res); + } + catch (err) { + capable.status2 = false; + } + + if (capable.status2) { + this.emit('ready'); + } + } + else if (capable.streaming && res.readyState === 3) { + try { + if (!this.statusCode) { + this.statusCode = res.status; + this.headers = parseHeaders(res); + this.emit('ready'); + } + } + catch (err) {} + + try { + this._emitData(res); + } + catch (err) { + capable.streaming = false; + } + } + else if (res.readyState === 4) { + if (!this.statusCode) { + this.statusCode = res.status; + this.emit('ready'); + } + this._emitData(res); + + if (res.error) { + this.emit('error', this.getResponse(res)); + } + else this.emit('end'); + + this.emit('close'); + } +}; + +Response.prototype._emitData = function (res) { + var respBody = this.getResponse(res); + if (respBody.toString().match(/ArrayBuffer/)) { + this.emit('data', new Uint8Array(respBody, this.offset)); + this.offset = respBody.byteLength; + return; + } + if (respBody.length > this.offset) { + this.emit('data', respBody.slice(this.offset)); + this.offset = respBody.length; + } +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +},{"stream":32,"util":36}],12:[function(require,module,exports){ +;(function () { + + var object = typeof exports != 'undefined' ? exports : this; // #8: web workers + var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + function InvalidCharacterError(message) { + this.message = message; + } + InvalidCharacterError.prototype = new Error; + InvalidCharacterError.prototype.name = 'InvalidCharacterError'; + + // encoder + // [https://gist.github.com/999166] by [https://github.com/nignag] + object.btoa || ( + object.btoa = function (input) { + for ( + // initialize result and counter + var block, charCode, idx = 0, map = chars, output = ''; + // if the next input index does not exist: + // change the mapping table to "=" + // check if d has no fractional digits + input.charAt(idx | 0) || (map = '=', idx % 1); + // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 + output += map.charAt(63 & block >> 8 - idx % 1 * 8) + ) { + charCode = input.charCodeAt(idx += 3/4); + if (charCode > 0xFF) { + throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."); + } + block = block << 8 | charCode; + } + return output; + }); + + // decoder + // [https://gist.github.com/1020396] by [https://github.com/atk] + object.atob || ( + object.atob = function (input) { + input = input.replace(/=+$/, ''); + if (input.length % 4 == 1) { + throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded."); + } + for ( + // initialize result and counters + var bc = 0, bs, buffer, idx = 0, output = ''; + // get next character + buffer = input.charAt(idx++); + // character found in table? initialize bit storage and add its ascii value; + ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, + // and if not first of each 4 characters, + // convert the first 8 bits to one ascii character + bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 + ) { + // try to find character in table (0-63, not found => -1) + buffer = chars.indexOf(buffer); + } + return output; + }); + +}()); + +},{}],13:[function(require,module,exports){ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} + +},{}],14:[function(require,module,exports){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +},{}],15:[function(require,module,exports){ +exports.endianness = function () { return 'LE' }; + +exports.hostname = function () { + if (typeof location !== 'undefined') { + return location.hostname + } + else return ''; +}; + +exports.loadavg = function () { return [] }; + +exports.uptime = function () { return 0 }; + +exports.freemem = function () { + return Number.MAX_VALUE; +}; + +exports.totalmem = function () { + return Number.MAX_VALUE; +}; + +exports.cpus = function () { return [] }; + +exports.type = function () { return 'Browser' }; + +exports.release = function () { + if (typeof navigator !== 'undefined') { + return navigator.appVersion; + } + return ''; +}; + +exports.networkInterfaces += exports.getNetworkInterfaces += function () { return {} }; + +exports.arch = function () { return 'javascript' }; + +exports.platform = function () { return 'browser' }; + +exports.tmpdir = exports.tmpDir = function () { + return '/tmp'; +}; + +exports.EOL = '\n'; + +},{}],16:[function(require,module,exports){ +// shim for using process in browser + +var process = module.exports = {}; +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = setTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + currentQueue[queueIndex].run(); + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + clearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + setTimeout(drainQueue, 0); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],17:[function(require,module,exports){ +(function (global){ +/*! https://mths.be/punycode v1.3.2 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports && + !exports.nodeType && exports; + var freeModule = typeof module == 'object' && module && + !module.nodeType && module; + var freeGlobal = typeof global == 'object' && global; + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * http://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.3.2', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define('punycode', function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{}],18:[function(require,module,exports){ +// 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. + +'use strict'; + +// If obj.hasOwnProperty has been overridden, then calling +// obj.hasOwnProperty(prop) will break. +// See: https://github.com/joyent/node/issues/1707 +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +module.exports = function(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, vstr, k, v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +},{}],19:[function(require,module,exports){ +// 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. + +'use strict'; + +var stringifyPrimitive = function(v) { + switch (typeof v) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } +}; + +module.exports = function(obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; + } + + if (typeof obj === 'object') { + return map(objectKeys(obj), function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (isArray(obj[k])) { + return map(obj[k], function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + + } + + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + + encodeURIComponent(stringifyPrimitive(obj)); +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + return res; +} + +var objectKeys = Object.keys || function (obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + return res; +}; + +},{}],20:[function(require,module,exports){ +'use strict'; + +exports.decode = exports.parse = require('./decode'); +exports.encode = exports.stringify = require('./encode'); + +},{"./decode":18,"./encode":19}],21:[function(require,module,exports){ +module.exports = require("./lib/_stream_duplex.js") + +},{"./lib/_stream_duplex.js":22}],22:[function(require,module,exports){ +(function (process){ +// 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. + +module.exports = Duplex; + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +} +/**/ + + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +forEach(objectKeys(Writable.prototype), function(method) { + 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); + + if (options && options.readable === false) + this.readable = false; + + if (options && options.writable === false) + this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) + return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(this.end.bind(this)); +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +}).call(this,require('_process')) + +},{"./_stream_readable":24,"./_stream_writable":26,"_process":16,"core-util-is":27,"inherits":13}],23:[function(require,module,exports){ +// 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. + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.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); +}; + +},{"./_stream_transform":25,"core-util-is":27,"inherits":13}],24:[function(require,module,exports){ +(function (process){ +// 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. + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + + +/**/ +var Buffer = require('buffer').Buffer; +/**/ + +Readable.ReadableState = ReadableState; + +var EE = require('events').EventEmitter; + +/**/ +if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +var Stream = require('stream'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var StringDecoder; + + +/**/ +var debug = require('util'); +if (debug && debug.debuglog) { + debug = debug.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + + +util.inherits(Readable, Stream); + +function ReadableState(options, stream) { + var Duplex = require('./_stream_duplex'); + + options = options || {}; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var defaultHwm = options.objectMode ? 16 : 16 * 1024; + this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // 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; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + + // 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'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + var Duplex = require('./_stream_duplex'); + + if (!(this instanceof Readable)) + return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + + if (util.isString(chunk) && !state.objectMode) { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = new Buffer(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function(chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (util.isNullOrUndefined(chunk)) { + state.reading = false; + if (!state.ended) + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var e = new Error('stream.unshift() after end event'); + stream.emit('error', e); + } else { + if (state.decoder && !addToFront && !encoding) + chunk = state.decoder.write(chunk); + + if (!addToFront) + state.reading = false; + + // if we want the data now, just emit it. + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) + state.buffer.unshift(chunk); + else + state.buffer.push(chunk); + + if (state.needReadable) + emitReadable(stream); + } + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + + + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && + (state.needReadable || + state.length < state.highWaterMark || + state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 128MB +var MAX_HWM = 0x800000; +function roundUpToNextPowerOf2(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) + return 0; + + if (state.objectMode) + return n === 0 ? 0 : 1; + + if (isNaN(n) || util.isNull(n)) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) + return state.buffer[0].length; + else + return state.length; + } + + if (n <= 0) + return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) + state.highWaterMark = roundUpToNextPowerOf2(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else + return state.length; + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function(n) { + debug('read', n); + var state = this._readableState; + var nOrig = n; + + if (!util.isNumber(n) || n > 0) + state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && + state.needReadable && + (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) + endReadable(this); + else + emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } + + if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) + state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (doRead && !state.reading) + n = howMuchToRead(nOrig, state); + + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + + if (util.isNull(ret)) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) + state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended && state.length === 0) + endReadable(this); + + if (!util.isNull(ret)) + this.emit('data', ret); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!util.isBuffer(chunk) && + !util.isString(chunk) && + !util.isNullOrUndefined(chunk) && + !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + + +function onEofChunk(stream, state) { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) + process.nextTick(function() { + emitReadable_(stream); + }); + else + emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(function() { + maybeReadMore_(stream, state); + }); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && + state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + else + len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function(n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && + dest !== process.stdout && + dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + debug('onunpipe'); + if (readable === src) { + cleanup(); + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + src.removeListener('data', ondata); + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && + (!dest._writableState || dest._writableState.needDrain)) + ondrain(); + } + + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + if (false === ret) { + debug('false write response, pause', + src._readableState.awaitDrain); + src._readableState.awaitDrain++; + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EE.listenerCount(dest, 'error') === 0) + dest.emit('error', er); + } + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. + if (!dest._events || !dest._events.error) + dest.on('error', onerror); + else if (isArray(dest._events.error)) + dest._events.error.unshift(onerror); + else + dest._events.error = [onerror, dest._events.error]; + + + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function() { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) + state.awaitDrain--; + if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + + +Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) + return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) + return this; + + if (!dest) + dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) + dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) + dests[i].emit('unpipe', this); + return this; + } + + // try to find the right one. + var i = indexOf(state.pipes, dest); + if (i === -1) + return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + // If listening to data, and it has not explicitly been paused, + // then call resume to start the flow of data on the next tick. + if (ev === 'data' && false !== this._readableState.flowing) { + this.resume(); + } + + if (ev === 'readable' && this.readable) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + var self = this; + process.nextTick(function() { + debug('readable nexttick read 0'); + self.read(0); + }); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + if (!state.reading) { + debug('resume read 0'); + this.read(0); + } + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(function() { + resume_(stream, state); + }); + } +} + +function resume_(stream, state) { + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) + stream.read(0); +} + +Readable.prototype.pause = function() { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + if (state.flowing) { + do { + var chunk = stream.read(); + } while (null !== chunk && state.flowing); + } +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function() { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function(chunk) { + debug('wrapped data'); + if (state.decoder) + chunk = state.decoder.write(chunk); + if (!chunk || !state.objectMode && !chunk.length) + return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (util.isFunction(stream[i]) && util.isUndefined(this[i])) { + this[i] = function(method) { return function() { + return stream[method].apply(stream, arguments); + }}(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function(ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function(n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + + + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) + return null; + + if (length === 0) + ret = null; + else if (objectMode) + ret = list.shift(); + else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) + ret = list.join(''); + else + ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) + ret = ''; + else + ret = new Buffer(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var buf = list[0]; + var cpy = Math.min(n - c, buf.length); + + if (stringMode) + ret += buf.slice(0, cpy); + else + buf.copy(ret, c, 0, cpy); + + if (cpy < buf.length) + list[0] = buf.slice(cpy); + else + list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) + throw new Error('endReadable called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + process.nextTick(function() { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } + }); + } +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf (xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} + +}).call(this,require('_process')) + +},{"./_stream_duplex":22,"_process":16,"buffer":4,"core-util-is":27,"events":8,"inherits":13,"isarray":14,"stream":32,"string_decoder/":33,"util":3}],25:[function(require,module,exports){ +// 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. + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + + +function TransformState(options, stream) { + this.afterTransform = function(er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) + return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (!util.isNullOrUndefined(data)) + stream.push(data); + + if (cb) + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + + +function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + + Duplex.call(this, options); + + this._transformState = new TransformState(options, this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // 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; + + this.once('prefinish', function() { + if (util.isFunction(this._flush)) + this._flush(function(er) { + done(stream, er); + }); + else + done(stream); + }); +} + +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) { + throw new Error('not implemented'); +}; + +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 (!util.isNull(ts.writechunk) && ts.writecb && !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; + } +}; + + +function done(stream, er) { + if (er) + return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var ts = stream._transformState; + + if (ws.length) + throw new Error('calling transform done when ws.length != 0'); + + if (ts.transforming) + throw new Error('calling transform done when still transforming'); + + return stream.push(null); +} + +},{"./_stream_duplex":22,"core-util-is":27,"inherits":13}],26:[function(require,module,exports){ +(function (process){ +// 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, cb), and it'll handle all +// the drain event emission and buffering. + +module.exports = Writable; + +/**/ +var Buffer = require('buffer').Buffer; +/**/ + +Writable.WritableState = WritableState; + + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Stream = require('stream'); + +util.inherits(Writable, Stream); + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; +} + +function WritableState(options, stream) { + var Duplex = require('./_stream_duplex'); + + options = options || {}; + + // 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() + var hwm = options.highWaterMark; + var defaultHwm = options.objectMode ? 16 : 16 * 1024; + this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + 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; + + // 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.buffer = []; + + // 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; +} + +function Writable(options) { + var Duplex = require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof Duplex)) + return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function() { + this.emit('error', new Error('Cannot pipe. Not readable.')); +}; + + +function writeAfterEnd(stream, state, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + if (!util.isBuffer(chunk) && + !util.isString(chunk) && + !util.isNullOrUndefined(chunk) && + !state.objectMode) { + var er = new TypeError('Invalid non-string/buffer chunk'); + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); + valid = false; + } + return valid; +} + +Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (util.isFunction(encoding)) { + cb = encoding; + encoding = null; + } + + if (util.isBuffer(chunk)) + encoding = 'buffer'; + else if (!encoding) + encoding = state.defaultEncoding; + + if (!util.isFunction(cb)) + cb = function() {}; + + if (state.ended) + writeAfterEnd(this, state, cb); + else if (validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function() { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function() { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && + !state.corked && + !state.finished && + !state.bufferProcessing && + state.buffer.length) + clearBuffer(this, state); + } +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && + state.decodeStrings !== false && + util.isString(chunk)) { + chunk = new Buffer(chunk, encoding); + } + return chunk; +} + +// 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, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + if (util.isBuffer(chunk)) + encoding = 'buffer'; + 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) + state.buffer.push(new WriteReq(chunk, encoding, cb)); + 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 (writev) + stream._writev(chunk, state.onwrite); + else + stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + if (sync) + process.nextTick(function() { + state.pendingcb--; + cb(er); + }); + else { + state.pendingcb--; + cb(er); + } + + stream._writableState.errorEmitted = true; + stream.emit('error', er); +} + +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; + + 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(stream, state); + + if (!finished && + !state.corked && + !state.bufferProcessing && + state.buffer.length) { + clearBuffer(stream, state); + } + + if (sync) { + process.nextTick(function() { + 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; + + if (stream._writev && state.buffer.length > 1) { + // Fast case, write everything using _writev() + var cbs = []; + for (var c = 0; c < state.buffer.length; c++) + cbs.push(state.buffer[c].callback); + + // count the one we are adding, as well. + // TODO(isaacs) clean this up + state.pendingcb++; + doWrite(stream, state, true, state.length, state.buffer, '', function(err) { + for (var i = 0; i < cbs.length; i++) { + state.pendingcb--; + cbs[i](err); + } + }); + + // Clear buffer + state.buffer = []; + } else { + // Slow case, write chunks one-by-one + for (var c = 0; c < state.buffer.length; c++) { + var entry = state.buffer[c]; + 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); + + // 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) { + c++; + break; + } + } + + if (c < state.buffer.length) + state.buffer = state.buffer.slice(c); + else + state.buffer.length = 0; + } + + state.bufferProcessing = false; +} + +Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error('not implemented')); + +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + + if (util.isFunction(chunk)) { + cb = chunk; + chunk = null; + encoding = null; + } else if (util.isFunction(encoding)) { + cb = encoding; + encoding = null; + } + + if (!util.isNullOrUndefined(chunk)) + this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) + endWritable(this, state, cb); +}; + + +function needFinish(stream, state) { + return (state.ending && + state.length === 0 && + !state.finished && + !state.writing); +} + +function prefinish(stream, state) { + if (!state.prefinished) { + state.prefinished = true; + stream.emit('prefinish'); + } +} + +function finishMaybe(stream, state) { + var need = needFinish(stream, state); + if (need) { + if (state.pendingcb === 0) { + prefinish(stream, state); + state.finished = true; + stream.emit('finish'); + } else + prefinish(stream, state); + } + 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; +} + +}).call(this,require('_process')) + +},{"./_stream_duplex":22,"_process":16,"buffer":4,"core-util-is":27,"inherits":13,"stream":32}],27:[function(require,module,exports){ +(function (Buffer){ +// 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. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +function isBuffer(arg) { + return Buffer.isBuffer(arg); +} +exports.isBuffer = isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} +}).call(this,require("buffer").Buffer) + +},{"buffer":4}],28:[function(require,module,exports){ +module.exports = require("./lib/_stream_passthrough.js") + +},{"./lib/_stream_passthrough.js":23}],29:[function(require,module,exports){ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = require('stream'); +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'); + +},{"./lib/_stream_duplex.js":22,"./lib/_stream_passthrough.js":23,"./lib/_stream_readable.js":24,"./lib/_stream_transform.js":25,"./lib/_stream_writable.js":26,"stream":32}],30:[function(require,module,exports){ +module.exports = require("./lib/_stream_transform.js") + +},{"./lib/_stream_transform.js":25}],31:[function(require,module,exports){ +module.exports = require("./lib/_stream_writable.js") + +},{"./lib/_stream_writable.js":26}],32:[function(require,module,exports){ +// 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. + +module.exports = Stream; + +var EE = require('events').EventEmitter; +var inherits = require('inherits'); + +inherits(Stream, EE); +Stream.Readable = require('readable-stream/readable.js'); +Stream.Writable = require('readable-stream/writable.js'); +Stream.Duplex = require('readable-stream/duplex.js'); +Stream.Transform = require('readable-stream/transform.js'); +Stream.PassThrough = require('readable-stream/passthrough.js'); + +// Backwards-compat with node 0.4.x +Stream.Stream = Stream; + + + +// old-style streams. Note that the pipe method (the only relevant +// part of this class) is overridden in the Readable class. + +function Stream() { + EE.call(this); +} + +Stream.prototype.pipe = function(dest, options) { + var source = this; + + function ondata(chunk) { + if (dest.writable) { + if (false === dest.write(chunk) && source.pause) { + source.pause(); + } + } + } + + source.on('data', ondata); + + function ondrain() { + if (source.readable && source.resume) { + source.resume(); + } + } + + dest.on('drain', ondrain); + + // If the 'end' option is not supplied, dest.end() will be called when + // source gets the 'end' or 'close' events. Only dest.end() once. + if (!dest._isStdio && (!options || options.end !== false)) { + source.on('end', onend); + source.on('close', onclose); + } + + var didOnEnd = false; + function onend() { + if (didOnEnd) return; + didOnEnd = true; + + dest.end(); + } + + + function onclose() { + if (didOnEnd) return; + didOnEnd = true; + + if (typeof dest.destroy === 'function') dest.destroy(); + } + + // don't leave dangling pipes when there are errors. + function onerror(er) { + cleanup(); + if (EE.listenerCount(this, 'error') === 0) { + throw er; // Unhandled stream error in pipe. + } + } + + source.on('error', onerror); + dest.on('error', onerror); + + // remove all the event listeners that were added. + function cleanup() { + source.removeListener('data', ondata); + dest.removeListener('drain', ondrain); + + source.removeListener('end', onend); + source.removeListener('close', onclose); + + source.removeListener('error', onerror); + dest.removeListener('error', onerror); + + source.removeListener('end', cleanup); + source.removeListener('close', cleanup); + + dest.removeListener('close', cleanup); + } + + source.on('end', cleanup); + source.on('close', cleanup); + + dest.on('close', cleanup); + + dest.emit('pipe', source); + + // Allow for unix-like usage: A.pipe(B).pipe(C) + return dest; +}; + +},{"events":8,"inherits":13,"readable-stream/duplex.js":21,"readable-stream/passthrough.js":28,"readable-stream/readable.js":29,"readable-stream/transform.js":30,"readable-stream/writable.js":31}],33:[function(require,module,exports){ +// 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. + +var Buffer = require('buffer').Buffer; + +var isBufferEncoding = Buffer.isEncoding + || function(encoding) { + switch (encoding && encoding.toLowerCase()) { + case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; + default: return false; + } + } + + +function assertEncoding(encoding) { + if (encoding && !isBufferEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. +var StringDecoder = exports.StringDecoder = function(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { + case 'utf8': + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; + case 'ucs2': + case 'utf16le': + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; + default: + this.write = passThroughWrite; + return; + } + + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). + this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. + this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. + this.charLength = 0; +}; + + +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . +StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var available = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } + + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; + + // if there are no more bytes in this buffer, just emit our char + if (buffer.length === 0) { + return charStr; + } + break; + } + + // determine and set charLength / charReceived + this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; + } + + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + buffer.copy(this.charBuffer, 0, 0, size); + return charStr.substring(0, end); + } + + // or just emit the charStr + return charStr; +}; + +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; + + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; + + // See http://en.wikipedia.org/wiki/UTF-8#Description + + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } + + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } + + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + this.charReceived = i; +}; + +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } + + return res; +}; + +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} + +function utf16DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; +} + +function base64DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; +} + +},{"buffer":4}],34:[function(require,module,exports){ +// 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. + +var punycode = require('punycode'); + +exports.parse = urlParse; +exports.resolve = urlResolve; +exports.resolveObject = urlResolveObject; +exports.format = urlFormat; + +exports.Url = Url; + +function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; +} + +// Reference: RFC 3986, RFC 1808, RFC 2396 + +// define these here so at least they only have to be +// compiled once on the first module load. +var protocolPattern = /^([a-z0-9.+-]+:)/i, + portPattern = /:[0-9]*$/, + + // RFC 2396: characters reserved for delimiting URLs. + // We actually just auto-escape these. + delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], + + // RFC 2396: characters not allowed for various reasons. + unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), + + // Allowed by RFCs, but cause of XSS attacks. Always escape these. + autoEscape = ['\''].concat(unwise), + // Characters that are never ever allowed in a hostname. + // Note that any invalid chars are also handled, but these + // are the ones that are *expected* to be seen, so we fast-path + // them. + nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), + hostEndingChars = ['/', '?', '#'], + hostnameMaxLen = 255, + hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/, + // protocols that can allow "unsafe" and "unwise" chars. + unsafeProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that never have a hostname. + hostlessProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that always contain a // bit. + slashedProtocol = { + 'http': true, + 'https': true, + 'ftp': true, + 'gopher': true, + 'file': true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true + }, + querystring = require('querystring'); + +function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && isObject(url) && url instanceof Url) return url; + + var u = new Url; + u.parse(url, parseQueryString, slashesDenoteHost); + return u; +} + +Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + if (!isString(url)) { + throw new TypeError("Parameter 'url' must be a string, not " + typeof url); + } + + var rest = url; + + // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + rest = rest.trim(); + + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + this.protocol = lowerProto; + rest = rest.substr(proto.length); + } + + // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === '//'; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + + if (!hostlessProtocol[proto] && + (slashes || (proto && !slashedProtocol[proto]))) { + + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + + // find the first instance of any hostEndingChars + var hostEnd = -1; + for (var i = 0; i < hostEndingChars.length; i++) { + var hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + var auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } + + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (var i = 0; i < nonHostChars.length; i++) { + var hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) + hostEnd = rest.length; + + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + // pull out port. + this.parseHost(); + + // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + this.hostname = this.hostname || ''; + + // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + var ipv6Hostname = this.hostname[0] === '[' && + this.hostname[this.hostname.length - 1] === ']'; + + // validate a little. + if (!ipv6Hostname) { + var hostparts = this.hostname.split(/\./); + for (var i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) continue; + if (!part.match(hostnamePartPattern)) { + var newpart = ''; + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } + // we test again with ASCII char only + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = '/' + notHost.join('.') + rest; + } + this.hostname = validParts.join('.'); + break; + } + } + } + } + + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ''; + } else { + // hostnames are always lower case. + this.hostname = this.hostname.toLowerCase(); + } + + if (!ipv6Hostname) { + // IDNA Support: Returns a puny coded representation of "domain". + // It only converts the part of the domain name that + // has non ASCII characters. I.e. it dosent matter if + // you call it with a domain that already is in ASCII. + var domainArray = this.hostname.split('.'); + var newOut = []; + for (var i = 0; i < domainArray.length; ++i) { + var s = domainArray[i]; + newOut.push(s.match(/[^A-Za-z0-9_-]/) ? + 'xn--' + punycode.encode(s) : s); + } + this.hostname = newOut.join('.'); + } + + var p = this.port ? ':' + this.port : ''; + var h = this.hostname || ''; + this.host = h + p; + this.href += this.host; + + // strip [ and ] from the hostname + // the host field still retains them, though + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + if (rest[0] !== '/') { + rest = '/' + rest; + } + } + } + + // now rest is set to the post-host stuff. + // chop off any delim chars. + if (!unsafeProtocol[lowerProto]) { + + // First, make 100% sure that any "autoEscape" chars get + // escaped, even if encodeURIComponent doesn't think they + // need to be. + for (var i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + + + // chop off from the tail first. + var hash = rest.indexOf('#'); + if (hash !== -1) { + // got a fragment string. + this.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + var qm = rest.indexOf('?'); + if (qm !== -1) { + this.search = rest.substr(qm); + this.query = rest.substr(qm + 1); + if (parseQueryString) { + this.query = querystring.parse(this.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + // no query string, but parseQueryString still requested + this.search = ''; + this.query = {}; + } + if (rest) this.pathname = rest; + if (slashedProtocol[lowerProto] && + this.hostname && !this.pathname) { + this.pathname = '/'; + } + + //to support http.request + if (this.pathname || this.search) { + var p = this.pathname || ''; + var s = this.search || ''; + this.path = p + s; + } + + // finally, reconstruct the href based on what has been validated. + this.href = this.format(); + return this; +}; + +// format a parsed object into a url string +function urlFormat(obj) { + // ensure it's an object, and not a string url. + // If it's an obj, this is a no-op. + // this way, you can call url_format() on strings + // to clean up potentially wonky urls. + if (isString(obj)) obj = urlParse(obj); + if (!(obj instanceof Url)) return Url.prototype.format.call(obj); + return obj.format(); +} + +Url.prototype.format = function() { + var auth = this.auth || ''; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ':'); + auth += '@'; + } + + var protocol = this.protocol || '', + pathname = this.pathname || '', + hash = this.hash || '', + host = false, + query = ''; + + if (this.host) { + host = auth + this.host; + } else if (this.hostname) { + host = auth + (this.hostname.indexOf(':') === -1 ? + this.hostname : + '[' + this.hostname + ']'); + if (this.port) { + host += ':' + this.port; + } + } + + if (this.query && + isObject(this.query) && + Object.keys(this.query).length) { + query = querystring.stringify(this.query); + } + + var search = this.search || (query && ('?' + query)) || ''; + + if (protocol && protocol.substr(-1) !== ':') protocol += ':'; + + // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // unless they had them to begin with. + if (this.slashes || + (!protocol || slashedProtocol[protocol]) && host !== false) { + host = '//' + (host || ''); + if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; + } else if (!host) { + host = ''; + } + + if (hash && hash.charAt(0) !== '#') hash = '#' + hash; + if (search && search.charAt(0) !== '?') search = '?' + search; + + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace('#', '%23'); + + return protocol + host + pathname + search + hash; +}; + +function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); +} + +Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); +}; + +function urlResolveObject(source, relative) { + if (!source) return relative; + return urlParse(source, false, true).resolveObject(relative); +} + +Url.prototype.resolveObject = function(relative) { + if (isString(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + + var result = new Url(); + Object.keys(this).forEach(function(k) { + result[k] = this[k]; + }, this); + + // hash is always overridden, no matter what. + // even href="" will remove it. + result.hash = relative.hash; + + // if the relative url is empty, then there's nothing left to do here. + if (relative.href === '') { + result.href = result.format(); + return result; + } + + // hrefs like //foo/bar always cut to the protocol. + if (relative.slashes && !relative.protocol) { + // take everything except the protocol from relative + Object.keys(relative).forEach(function(k) { + if (k !== 'protocol') + result[k] = relative[k]; + }); + + //urlParse appends trailing / to urls like http://www.example.com + if (slashedProtocol[result.protocol] && + result.hostname && !result.pathname) { + result.path = result.pathname = '/'; + } + + result.href = result.format(); + return result; + } + + if (relative.protocol && relative.protocol !== result.protocol) { + // if it's a known url protocol, then changing + // the protocol does weird things + // first, if it's not file:, then we MUST have a host, + // and if there was a path + // to begin with, then we MUST have a path. + // if it is file:, then the host is dropped, + // because that's known to be hostless. + // anything else is assumed to be absolute. + if (!slashedProtocol[relative.protocol]) { + Object.keys(relative).forEach(function(k) { + result[k] = relative[k]; + }); + result.href = result.format(); + return result; + } + + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + var relPath = (relative.pathname || '').split('/'); + while (relPath.length && !(relative.host = relPath.shift())); + if (!relative.host) relative.host = ''; + if (!relative.hostname) relative.hostname = ''; + if (relPath[0] !== '') relPath.unshift(''); + if (relPath.length < 2) relPath.unshift(''); + result.pathname = relPath.join('/'); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ''; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + // to support http.request + if (result.pathname || result.search) { + var p = result.pathname || ''; + var s = result.search || ''; + result.path = p + s; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + + var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), + isRelAbs = ( + relative.host || + relative.pathname && relative.pathname.charAt(0) === '/' + ), + mustEndAbs = (isRelAbs || isSourceAbs || + (result.host && relative.pathname)), + removeAllDots = mustEndAbs, + srcPath = result.pathname && result.pathname.split('/') || [], + relPath = relative.pathname && relative.pathname.split('/') || [], + psychotic = result.protocol && !slashedProtocol[result.protocol]; + + // if the url is a non-slashed url, then relative + // links like ../.. should be able + // to crawl up to the hostname, as well. This is strange. + // result.protocol has already been set by now. + // Later on, put the first path part into the host field. + if (psychotic) { + result.hostname = ''; + result.port = null; + if (result.host) { + if (srcPath[0] === '') srcPath[0] = result.host; + else srcPath.unshift(result.host); + } + result.host = ''; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === '') relPath[0] = relative.host; + else relPath.unshift(relative.host); + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); + } + + if (isRelAbs) { + // it's absolute. + result.host = (relative.host || relative.host === '') ? + relative.host : result.host; + result.hostname = (relative.hostname || relative.hostname === '') ? + relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + // fall through to the dot-handling below. + } else if (relPath.length) { + // it's relative + // throw away the existing file, and take the new path instead. + if (!srcPath) srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!isNullOrUndefined(relative.search)) { + // just pull out the search. + // like href='?foo'. + // Put this after the other two cases because it simplifies the booleans + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + //occationaly the auth can get stuck only in host + //this especialy happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + //to support http.request + if (!isNull(result.pathname) || !isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.href = result.format(); + return result; + } + + if (!srcPath.length) { + // no path at all. easy. + // we've already handled the other stuff above. + result.pathname = null; + //to support http.request + if (result.search) { + result.path = '/' + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + + // if a url ENDs in . or .., then it must get a trailing slash. + // however, if it ends in anything else non-slashy, + // then it must NOT get a trailing slash. + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = ( + (result.host || relative.host) && (last === '.' || last === '..') || + last === ''); + + // strip single dots, resolve double dots to parent dir + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + if (last == '.') { + srcPath.splice(i, 1); + } else if (last === '..') { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift('..'); + } + } + + if (mustEndAbs && srcPath[0] !== '' && + (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { + srcPath.unshift(''); + } + + if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { + srcPath.push(''); + } + + var isAbsolute = srcPath[0] === '' || + (srcPath[0] && srcPath[0].charAt(0) === '/'); + + // put the host back + if (psychotic) { + result.hostname = result.host = isAbsolute ? '' : + srcPath.length ? srcPath.shift() : ''; + //occationaly the auth can get stuck only in host + //this especialy happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + mustEndAbs = mustEndAbs || (result.host && srcPath.length); + + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(''); + } + + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join('/'); + } + + //to support request.http + if (!isNull(result.pathname) || !isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; +}; + +Url.prototype.parseHost = function() { + var host = this.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ':') { + this.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) this.hostname = host; +}; + +function isString(arg) { + return typeof arg === "string"; +} + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isNull(arg) { + return arg === null; +} +function isNullOrUndefined(arg) { + return arg == null; +} + +},{"punycode":17,"querystring":20}],35:[function(require,module,exports){ +module.exports = function isBuffer(arg) { + return arg && typeof arg === 'object' + && typeof arg.copy === 'function' + && typeof arg.fill === 'function' + && typeof arg.readUInt8 === 'function'; +} +},{}],36:[function(require,module,exports){ +(function (process,global){ +// 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. + +var formatRegExp = /%[sdj%]/g; +exports.format = function(f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +}; + + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global.process)) { + return function() { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +}; + + +var debugs = {}; +var debugEnviron; +exports.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = process.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +}; + + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; + + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // IE doesn't make error fields non-enumerable + // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx + if (isError(value) + && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { + return formatError(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = require('./support/isBuffer'); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function() { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = require('inherits'); + +exports._extend = function(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"./support/isBuffer":35,"_process":16,"inherits":13}],37:[function(require,module,exports){ +(function (process){ +'use strict'; + +var stream = require('stream'); +var util = require('util'); +var formatRecord = require('./lib/format-record'); +var xtend = require('xtend'); + + +var Writable = stream.Writable; + +module.exports = BunyanFormatWritable; + +util.inherits(BunyanFormatWritable, Writable); + +/** + * Creates a writable stream that formats bunyan records written to it. + * + * @name BunyanFormatWritable + * @function + * @param opts {Options} passed to bunyan format function + * - outputMode: short|long|simple|json|bunyan + * - color (true): toggles colors in output + * - colorFromLevel: allows overriding log level colors + * @param out {Stream} (process.stdout) writable stream to write + * @return {WritableStream} that you can pipe bunyan output into + */ +function BunyanFormatWritable (opts, out) { + if (!(this instanceof BunyanFormatWritable)) return new BunyanFormatWritable(opts, out); + + opts = opts || {}; + opts.objectMode = true; + Writable.call(this, opts); + + this.opts = xtend({ + outputMode: 'short', + color: true, + colorFromLevel: { + 10: 'brightBlack', // TRACE + 20: 'brightBlack', // DEBUG + 30: 'green', // INFO + 40: 'magenta', // WARN + 50: 'red', // ERROR + 60: 'brightRed', // FATAL + } + }, opts); + this.out = out || process.stdout; +} + +BunyanFormatWritable.prototype._write = function (chunk, encoding, cb) { + var rec; + try { + rec = JSON.parse(chunk); + this.out.write(formatRecord(rec, this.opts)); + } catch (e) { + this.out.write(chunk); + } + cb(); +}; + +}).call(this,require('_process')) + +},{"./lib/format-record":38,"_process":16,"stream":32,"util":36,"xtend":42}],38:[function(require,module,exports){ +'use strict'; + +var util = require('util'); +var format = util.format; +var http = require('http'); +var xtend = require('xtend'); +var ansicolors = require('ansicolors'); +var ansistyles = require('ansistyles'); + +var styles = xtend(ansistyles, ansicolors); + +// Most of this code is lifted directly from the bunyan ./bin file and should be cleaned up once there is more time +var OM_LONG = 1; +var OM_JSON = 2; +var OM_INSPECT = 3; +var OM_SIMPLE = 4; +var OM_SHORT = 5; +var OM_BUNYAN = 6; +var OM_FROM_NAME = { + 'long': OM_LONG, + 'json': OM_JSON, + 'inspect': OM_INSPECT, + 'simple': OM_SIMPLE, + 'short': OM_SHORT, + 'bunyan': OM_BUNYAN +}; + +// Levels +var TRACE = 10; +var DEBUG = 20; +var INFO = 30; +var WARN = 40; +var ERROR = 50; +var FATAL = 60; + +var levelFromName = { + 'trace': TRACE, + 'debug': DEBUG, + 'info': INFO, + 'warn': WARN, + 'error': ERROR, + 'fatal': FATAL +}; +var nameFromLevel = {}; +var upperNameFromLevel = {}; +var upperPaddedNameFromLevel = {}; +Object.keys(levelFromName).forEach(function (name) { + var lvl = levelFromName[name]; + nameFromLevel[lvl] = name; + upperNameFromLevel[lvl] = name.toUpperCase(); + upperPaddedNameFromLevel[lvl] = ( + name.length === 4 ? ' ' : '') + name.toUpperCase(); +}); + + +/** + * Is this a valid Bunyan log record. + */ +function isValidRecord(rec) { + if (rec.v === null || + rec.level === null || + rec.name === null || + rec.hostname === null || + rec.pid === null || + rec.time === null || + rec.msg === null) { + // Not valid Bunyan log. + return false; + } else { + return true; + } +} + +function indent(s) { + return ' ' + s.split(/\r?\n/).join('\n '); +} + +function stylizeWithColor(s, color) { + if (!s) return ''; + var fn = styles[color]; + return fn ? fn(s) : s; +} + +function stylizeWithoutColor(str, color) { + return str; +} + +/** + * @param {int} level is the level of the record. + * @return The level value to its String representation. + * This is only used on json-related formats output and first suggested at + * https://github.com/trentm/node-bunyan/issues/194#issuecomment-64858117 + */ +function mapLevelToName(level) { + switch (level) { + case TRACE: + return 'TRACE'; + case DEBUG: + return 'DEBUG'; + case INFO: + return 'INFO'; + case WARN: + return 'WARN'; + case ERROR: + return 'ERROR'; + case FATAL: + return 'FATAL'; + } +} + +/** + * Print out a single result, considering input options. + */ +module.exports = function formatRecord(rec, opts) { + + function _res(res) { + var s = ''; + if (res.header) { + s += res.header.trimRight(); + } else if (res.headers) { + if (res.statusCode) { + s += format('HTTP/1.1 %s %s\n', res.statusCode, + http.STATUS_CODES[res.statusCode]); + } + var headers = res.headers; + s += Object.keys(headers).map( + function (h) { return h + ': ' + headers[h]; }).join('\n'); + } + delete res.header; + delete res.headers; + delete res.statusCode; + if (res.body) { + s += '\n\n' + (typeof (res.body) === 'object' + ? JSON.stringify(res.body, null, 2) : res.body); + delete res.body; + } + if (res.trailer) { + s += '\n' + res.trailer; + } + delete res.trailer; + if (s) { + details.push(indent(s)); + } + // E.g. for extra 'foo' field on 'res', add 'res.foo' at + // top-level. This *does* have the potential to stomp on a + // literal 'res.foo' key. + Object.keys(res).forEach(function (k) { + rec['res.' + k] = res[k]; + }); + } + + var short = false; + var time; + var line = rec.line; + var stylize = opts.color ? stylizeWithColor : stylizeWithoutColor; + var outputMode = isNaN(opts.outputMode) ? OM_FROM_NAME[opts.outputMode] : opts.outputMode; + + switch (outputMode) { + case OM_SHORT: + short = true; + /* falls through */ + case OM_LONG: + // [time] LEVEL: name[/comp]/pid on hostname (src): msg* (extras...) + // msg* + // -- + // long and multi-line extras + // ... + // If 'msg' is single-line, then it goes in the top line. + // If 'req', show the request. + // If 'res', show the response. + // If 'err' and 'err.stack' then show that. + if (!isValidRecord(rec)) { + return line + '\n'; + } + + delete rec.v; + + /* + * We assume the Date is formatted according to ISO8601, in which + * case we can safely chop off the date information. + */ + if (short && rec.time[10] == 'T') { + time = rec.time.substr(11); + time = stylize(time, 'brightBlack'); + } else { + time = stylize('[' + rec.time + ']', 'brightBlack'); + } + + delete rec.time; + + var nameStr = rec.name; + delete rec.name; + + if (rec.component) { + nameStr += '/' + rec.component; + } + delete rec.component; + + if (!short) + nameStr += '/' + rec.pid; + delete rec.pid; + + var level = (upperPaddedNameFromLevel[rec.level] || 'LVL' + rec.level); + if (opts.color) { + var colorFromLevel = opts.colorFromLevel || { + 10: 'brightBlack', // TRACE + 20: 'brightBlack', // DEBUG + 30: 'cyan', // INFO + 40: 'magenta', // WARN + 50: 'red', // ERROR + 60: 'inverse', // FATAL + }; + level = stylize(level, colorFromLevel[rec.level]); + } + delete rec.level; + + var src = ''; + var s; + var headers; + var hostHeaderLine = ''; + if (rec.src && rec.src.file) { + s = rec.src; + if (s.func) { + src = format(' (%s:%d in %s)', s.file, s.line, s.func); + } else { + src = format(' (%s:%d)', s.file, s.line); + } + src = stylize(src, 'green'); + } + delete rec.src; + + var hostname = rec.hostname; + delete rec.hostname; + + var extras = []; + var details = []; + + if (rec.req_id) { + extras.push('req_id=' + rec.req_id); + } + delete rec.req_id; + + var onelineMsg; + if (rec.msg.indexOf('\n') !== -1) { + onelineMsg = ''; + details.push(indent(stylize(rec.msg, 'cyan'))); + } else { + onelineMsg = ' ' + stylize(rec.msg, 'cyan'); + } + delete rec.msg; + + if (rec.req && typeof (rec.req) === 'object') { + var req = rec.req; + delete rec.req; + headers = req.headers; + s = format('%s %s HTTP/%s%s', req.method, + req.url, + req.httpVersion || '1.1', + (headers ? + '\n' + Object.keys(headers).map(function (h) { + return h + ': ' + headers[h]; + }).join('\n') : + '') + ); + delete req.url; + delete req.method; + delete req.httpVersion; + delete req.headers; + if (req.body) { + s += '\n\n' + (typeof (req.body) === 'object' + ? JSON.stringify(req.body, null, 2) : req.body); + delete req.body; + } + if (req.trailers && Object.keys(req.trailers) > 0) { + s += '\n' + Object.keys(req.trailers).map(function (t) { + return t + ': ' + req.trailers[t]; + }).join('\n'); + } + delete req.trailers; + details.push(indent(s)); + // E.g. for extra 'foo' field on 'req', add 'req.foo' at + // top-level. This *does* have the potential to stomp on a + // literal 'req.foo' key. + Object.keys(req).forEach(function (k) { + rec['req.' + k] = req[k]; + }) + } + + if (rec.client_req && typeof (rec.client_req) === 'object') { + var client_req = rec.client_req; + delete rec.client_req; + headers = client_req.headers; + s = ''; + if (client_req.address) { + hostHeaderLine = 'Host: ' + client_req.address; + if (client_req.port) + hostHeaderLine += ':' + client_req.port; + hostHeaderLine += '\n'; + } + delete client_req.headers; + delete client_req.address; + delete client_req.port; + s += format('%s %s HTTP/%s\n%s%s', client_req.method, + client_req.url, + client_req.httpVersion || '1.1', + hostHeaderLine, + (headers ? + Object.keys(headers).map( + function (h) { + return h + ': ' + headers[h]; + }).join('\n') : + '')); + delete client_req.method; + delete client_req.url; + delete client_req.httpVersion; + if (client_req.body) { + s += '\n\n' + (typeof (client_req.body) === 'object' ? + JSON.stringify(client_req.body, null, 2) : + client_req.body); + delete client_req.body; + } + // E.g. for extra 'foo' field on 'client_req', add + // 'client_req.foo' at top-level. This *does* have the potential + // to stomp on a literal 'client_req.foo' key. + Object.keys(client_req).forEach(function (k) { + rec['client_req.' + k] = client_req[k]; + }) + details.push(indent(s)); + } + + + if (rec.res && typeof (rec.res) === 'object') { + _res(rec.res); + delete rec.res; + } + if (rec.client_res && typeof (rec.client_res) === 'object') { + _res(rec.client_res); + delete rec.res; + } + + if (rec.err && rec.err.stack) { + details.push(indent(rec.err.stack)); + delete rec.err; + } + + var leftover = Object.keys(rec); + for (var i = 0; i < leftover.length; i++) { + var key = leftover[i]; + var value = rec[key]; + var stringified = false; + if (typeof (value) !== 'string') { + value = JSON.stringify(value, null, 2); + stringified = true; + } + if (value.indexOf('\n') !== -1 || value.length > 50) { + details.push(indent(key + ': ' + value)); + } else if (!stringified && (value.indexOf(' ') != -1 || + value.length === 0)) + { + extras.push(key + '=' + JSON.stringify(value)); + } else { + extras.push(key + '=' + value); + } + } + + extras = stylize( + (extras.length ? ' (' + extras.join(', ') + ')' : ''), 'brightBlack'); + details = stylize( + (details.length ? details.join('\n --\n') + '\n' : ''), 'brightBlack'); + if (!short) + return format('%s %s: %s on %s%s:%s%s\n%s', + time, + level, + nameStr, + hostname || '', + src, + onelineMsg, + extras, + details); + else + return format('%s %s %s:%s%s\n%s', + time, + level, + nameStr, + onelineMsg, + extras, + details); + break; + + case OM_INSPECT: + return util.inspect(rec, false, Infinity, true) + '\n'; + + case OM_BUNYAN: + if (opts.levelInString) { + rec.level = mapLevelToName(rec.level); + } + return JSON.stringify(rec, null, 0) + '\n'; + + case OM_JSON: + if (opts.levelInString) { + rec.level = mapLevelToName(rec.level); + } + return JSON.stringify(rec, null, opts.jsonIndent) + '\n'; + + case OM_SIMPLE: + /* JSSTYLED */ + // + if (!isValidRecord(rec)) { + return line + '\n'; + } + return format('%s - %s\n', + upperNameFromLevel[rec.level] || 'LVL' + rec.level, + rec.msg); + default: + throw new Error('unknown output mode: '+opts.outputMode); + } +} + + +},{"ansicolors":39,"ansistyles":40,"http":9,"util":36,"xtend":42}],39:[function(require,module,exports){ +// ColorCodes explained: http://www.termsys.demon.co.uk/vtansi.htm +'use strict'; + +var colorNums = { + white : 37 + , black : 30 + , blue : 34 + , cyan : 36 + , green : 32 + , magenta : 35 + , red : 31 + , yellow : 33 + , brightBlack : 90 + , brightRed : 91 + , brightGreen : 92 + , brightYellow : 93 + , brightBlue : 94 + , brightMagenta : 95 + , brightCyan : 96 + , brightWhite : 97 + } + , backgroundColorNums = { + bgBlack : 40 + , bgRed : 41 + , bgGreen : 42 + , bgYellow : 43 + , bgBlue : 44 + , bgMagenta : 45 + , bgCyan : 46 + , bgWhite : 47 + , bgBrightBlack : 100 + , bgBrightRed : 101 + , bgBrightGreen : 102 + , bgBrightYellow : 103 + , bgBrightBlue : 104 + , bgBrightMagenta : 105 + , bgBrightCyan : 106 + , bgBrightWhite : 107 + } + , colors = {}; + + +Object.keys(colorNums).forEach(function (k) { + colors[k] = function (s) { + return '\u001b[' + colorNums[k] + 'm' + s + '\u001b[39m'; + }; +}); + +Object.keys(backgroundColorNums).forEach(function (k) { + colors[k] = function (s) { + return '\u001b[' + backgroundColorNums[k] + 'm' + s + '\u001b[49m'; + }; +}); + +module.exports = colors; + +},{}],40:[function(require,module,exports){ +'use strict'; + +/* + * Info: http://www.termsys.demon.co.uk/vtansi.htm#colors + * Following caveats + * bright - brightens the color (bold-blue is same as brigthtBlue) + * dim - nothing on Mac or Linux + * italic - nothing on Mac or Linux + * underline - underlines string + * blink - nothing on Mac or linux + * inverse - background becomes foreground and vice versa + * + * In summary, the only styles that work are: + * - bright, underline and inverse + * - the others are only included for completeness + */ + +var styleNums = { + reset : [0, 22] + , bright : [1, 22] + , dim : [2, 22] + , italic : [3, 23] + , underline : [4, 24] + , blink : [5, 25] + , inverse : [7, 27] + } + , styles = {} + ; + +Object.keys(styleNums).forEach(function (k) { + styles[k] = function (s) { + var open = styleNums[k][0] + , close = styleNums[k][1]; + return '\u001b[' + open + 'm' + s + '\u001b[' + close + 'm'; + }; +}); + +module.exports = styles; + +},{}],41:[function(require,module,exports){ +module.exports = hasKeys + +function hasKeys(source) { + return source !== null && + (typeof source === "object" || + typeof source === "function") +} + +},{}],42:[function(require,module,exports){ +var Keys = require("object-keys") +var hasKeys = require("./has-keys") + +module.exports = extend + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + if (!hasKeys(source)) { + continue + } + + var keys = Keys(source) + + for (var j = 0; j < keys.length; j++) { + var name = keys[j] + target[name] = source[name] + } + } + + return target +} + +},{"./has-keys":41,"object-keys":44}],43:[function(require,module,exports){ +var hasOwn = Object.prototype.hasOwnProperty; +var toString = Object.prototype.toString; + +var isFunction = function (fn) { + var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; + if (!isFunc && typeof window !== 'undefined') { + isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; + } + return isFunc; +}; + +module.exports = function forEach(obj, fn) { + if (!isFunction(fn)) { + throw new TypeError('iterator must be a function'); + } + var i, k, + isString = typeof obj === 'string', + l = obj.length, + context = arguments.length > 2 ? arguments[2] : null; + if (l === +l) { + for (i = 0; i < l; i++) { + if (context === null) { + fn(isString ? obj.charAt(i) : obj[i], i, obj); + } else { + fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); + } + } + } else { + for (k in obj) { + if (hasOwn.call(obj, k)) { + if (context === null) { + fn(obj[k], k, obj); + } else { + fn.call(context, obj[k], k, obj); + } + } + } + } +}; + + +},{}],44:[function(require,module,exports){ +module.exports = Object.keys || require('./shim'); + + +},{"./shim":46}],45:[function(require,module,exports){ +var toString = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toString.call(value); + var isArguments = str === '[object Arguments]'; + if (!isArguments) { + isArguments = str !== '[object Array]' + && value !== null + && typeof value === 'object' + && typeof value.length === 'number' + && value.length >= 0 + && toString.call(value.callee) === '[object Function]'; + } + return isArguments; +}; + + +},{}],46:[function(require,module,exports){ +(function () { + "use strict"; + + // modified from https://github.com/kriskowal/es5-shim + var has = Object.prototype.hasOwnProperty, + toString = Object.prototype.toString, + forEach = require('./foreach'), + isArgs = require('./isArguments'), + hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), + hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ], + keysShim; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object', + isFunction = toString.call(object) === '[object Function]', + isArguments = isArgs(object), + theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + + if (isArguments) { + forEach(object, function (value) { + theKeys.push(value); + }); + } else { + var name, + skipProto = hasProtoEnumBug && isFunction; + + for (name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(name); + } + } + } + + if (hasDontEnumBug) { + var ctor = object.constructor, + skipConstructor = ctor && ctor.prototype === object; + + forEach(dontEnums, function (dontEnum) { + if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { + theKeys.push(dontEnum); + } + }); + } + return theKeys; + }; + + module.exports = keysShim; +}()); + + +},{"./foreach":43,"./isArguments":45}],47:[function(require,module,exports){ +(function (process,Buffer){ +/** + * Copyright (c) 2014 Trent Mick. All rights reserved. + * Copyright (c) 2014 Joyent Inc. All rights reserved. + * + * The bunyan logging library for node.js. + * + * -*- mode: js -*- + * vim: expandtab:ts=4:sw=4 + */ + +var VERSION = '1.4.0'; + +// Bunyan log format version. This becomes the 'v' field on all log records. +// `0` is until I release a version '1.0.0' of node-bunyan. Thereafter, +// starting with `1`, this will be incremented if there is any backward +// incompatible change to the log record format. Details will be in +// 'CHANGES.md' (the change log). +var LOG_VERSION = 0; + + +var xxx = function xxx(s) { // internal dev/debug logging + var args = ['XX' + 'X: '+s].concat( + Array.prototype.slice.call(arguments, 1)); + console.error.apply(this, args); +}; +var xxx = function xxx() {}; // comment out to turn on debug logging + + +var os = require('os'); +var fs = require('fs'); +var util = require('util'); +var assert = require('assert'); +try { + /* Use `+ ''` to hide this import from browserify. */ + var dtrace = require('dtrace-provider' + ''); +} catch (e) { + dtrace = null; +} +var EventEmitter = require('events').EventEmitter; + +try { + var safeJsonStringify = require('safe-json-stringify'); +} catch (e) { + safeJsonStringify = null; +} +if (process.env.BUNYAN_TEST_NO_SAFE_JSON_STRINGIFY) { + safeJsonStringify = null; +} + +// The 'mv' module is required for rotating-file stream support. +try { + /* Use `+ ''` to hide this import from browserify. */ + var mv = require('mv' + ''); +} catch (e) { + mv = null; +} + +// Are we in the browser (e.g. running via browserify)? +var isBrowser = function () { + return typeof (window) !== 'undefined' && this === window; }(); + +try { + /* Use `+ ''` to hide this import from browserify. */ + var sourceMapSupport = require('source-map-support' + ''); +} catch (_) { + sourceMapSupport = null; +} + + + +//---- Internal support stuff + +/** + * A shallow copy of an object. Bunyan logging attempts to never cause + * exceptions, so this function attempts to handle non-objects gracefully. + */ +function objCopy(obj) { + if (obj == null) { // null or undefined + return obj; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else if (typeof (obj) === 'object') { + var copy = {}; + Object.keys(obj).forEach(function (k) { + copy[k] = obj[k]; + }); + return copy; + } else { + return obj; + } +} + +var format = util.format; +if (!format) { + // If node < 0.6, then use its `util.format`: + // : + var inspect = util.inspect; + var formatRegExp = /%[sdj%]/g; + format = function format(f) { + if (typeof (f) !== 'string') { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function (x) { + if (i >= len) + return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': return JSON.stringify(args[i++], safeCycles()); + case '%%': return '%'; + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (x === null || typeof (x) !== 'object') { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; + }; +} + + +/** + * Gather some caller info 3 stack levels up. + * See . + */ +function getCaller3Info() { + var obj = {}; + var saveLimit = Error.stackTraceLimit; + var savePrepare = Error.prepareStackTrace; + Error.stackTraceLimit = 3; + Error.captureStackTrace(this, getCaller3Info); + + Error.prepareStackTrace = function (_, stack) { + var caller = stack[2]; + if (sourceMapSupport) { + caller = sourceMapSupport.wrapCallSite(caller); + } + obj.file = caller.getFileName(); + obj.line = caller.getLineNumber(); + var func = caller.getFunctionName(); + if (func) + obj.func = func; + }; + this.stack; + Error.stackTraceLimit = saveLimit; + Error.prepareStackTrace = savePrepare; + return obj; +} + + +function _indent(s, indent) { + if (!indent) indent = ' '; + var lines = s.split(/\r?\n/g); + return indent + lines.join('\n' + indent); +} + + +/** + * Warn about an bunyan processing error. + * + * @param msg {String} Message with which to warn. + * @param dedupKey {String} Optional. A short string key for this warning to + * have its warning only printed once. + */ +function _warn(msg, dedupKey) { + assert.ok(msg); + if (dedupKey) { + if (_warned[dedupKey]) { + return; + } + _warned[dedupKey] = true; + } + process.stderr.write(msg + '\n'); +} +function _haveWarned(dedupKey) { + return _warned[dedupKey]; +} +var _warned = {}; + + +function ConsoleRawStream() {} +ConsoleRawStream.prototype.write = function (rec) { + if (rec.level < INFO) { + console.log(rec); + } else if (rec.level < WARN) { + console.info(rec); + } else if (rec.level < ERROR) { + console.warn(rec); + } else { + console.error(rec); + } +}; + + +//---- Levels + +var TRACE = 10; +var DEBUG = 20; +var INFO = 30; +var WARN = 40; +var ERROR = 50; +var FATAL = 60; + +var levelFromName = { + 'trace': TRACE, + 'debug': DEBUG, + 'info': INFO, + 'warn': WARN, + 'error': ERROR, + 'fatal': FATAL +}; +var nameFromLevel = {}; +Object.keys(levelFromName).forEach(function (name) { + nameFromLevel[levelFromName[name]] = name; +}); + +// Dtrace probes. +var dtp = undefined; +var probes = dtrace && {}; + +/** + * Resolve a level number, name (upper or lowercase) to a level number value. + * + * @api public + */ +function resolveLevel(nameOrNum) { + var level = (typeof (nameOrNum) === 'string' + ? levelFromName[nameOrNum.toLowerCase()] + : nameOrNum); + return level; +} + + + +//---- Logger class + +/** + * Create a Logger instance. + * + * @param options {Object} See documentation for full details. At minimum + * this must include a 'name' string key. Configuration keys: + * - `streams`: specify the logger output streams. This is an array of + * objects with these fields: + * - `type`: The stream type. See README.md for full details. + * Often this is implied by the other fields. Examples are + * 'file', 'stream' and "raw". + * - `level`: Defaults to 'info'. + * - `path` or `stream`: The specify the file path or writeable + * stream to which log records are written. E.g. + * `stream: process.stdout`. + * - `closeOnExit` (boolean): Optional. Default is true for a + * 'file' stream when `path` is given, false otherwise. + * See README.md for full details. + * - `level`: set the level for a single output stream (cannot be used + * with `streams`) + * - `stream`: the output stream for a logger with just one, e.g. + * `process.stdout` (cannot be used with `streams`) + * - `serializers`: object mapping log record field names to + * serializing functions. See README.md for details. + * - `src`: Boolean (default false). Set true to enable 'src' automatic + * field with log call source info. + * All other keys are log record fields. + * + * An alternative *internal* call signature is used for creating a child: + * new Logger(, [, ]); + * + * @param _childSimple (Boolean) An assertion that the given `_childOptions` + * (a) only add fields (no config) and (b) no serialization handling is + * required for them. IOW, this is a fast path for frequent child + * creation. + */ +function Logger(options, _childOptions, _childSimple) { + xxx('Logger start:', options) + if (!(this instanceof Logger)) { + return new Logger(options, _childOptions); + } + + // Input arg validation. + var parent; + if (_childOptions !== undefined) { + parent = options; + options = _childOptions; + if (!(parent instanceof Logger)) { + throw new TypeError( + 'invalid Logger creation: do not pass a second arg'); + } + } + if (!options) { + throw new TypeError('options (object) is required'); + } + if (!parent) { + if (!options.name) { + throw new TypeError('options.name (string) is required'); + } + } else { + if (options.name) { + throw new TypeError( + 'invalid options.name: child cannot set logger name'); + } + } + if (options.stream && options.streams) { + throw new TypeError('cannot mix "streams" and "stream" options'); + } + if (options.streams && !Array.isArray(options.streams)) { + throw new TypeError('invalid options.streams: must be an array') + } + if (options.serializers && (typeof (options.serializers) !== 'object' || + Array.isArray(options.serializers))) { + throw new TypeError('invalid options.serializers: must be an object') + } + + EventEmitter.call(this); + + // Fast path for simple child creation. + if (parent && _childSimple) { + // `_isSimpleChild` is a signal to stream close handling that this child + // owns none of its streams. + this._isSimpleChild = true; + + this._level = parent._level; + this.streams = parent.streams; + this.serializers = parent.serializers; + this.src = parent.src; + var fields = this.fields = {}; + var parentFieldNames = Object.keys(parent.fields); + for (var i = 0; i < parentFieldNames.length; i++) { + var name = parentFieldNames[i]; + fields[name] = parent.fields[name]; + } + var names = Object.keys(options); + for (var i = 0; i < names.length; i++) { + var name = names[i]; + fields[name] = options[name]; + } + return; + } + + // Null values. + var self = this; + if (parent) { + this._level = parent._level; + this.streams = []; + for (var i = 0; i < parent.streams.length; i++) { + var s = objCopy(parent.streams[i]); + s.closeOnExit = false; // Don't own parent stream. + this.streams.push(s); + } + this.serializers = objCopy(parent.serializers); + this.src = parent.src; + this.fields = objCopy(parent.fields); + if (options.level) { + this.level(options.level); + } + } else { + this._level = Number.POSITIVE_INFINITY; + this.streams = []; + this.serializers = null; + this.src = false; + this.fields = {}; + } + + if (!dtp && dtrace) { + dtp = dtrace.createDTraceProvider('bunyan'); + + for (var level in levelFromName) { + var probe; + + probes[levelFromName[level]] = probe = + dtp.addProbe('log-' + level, 'char *'); + + // Explicitly add a reference to dtp to prevent it from being GC'd + probe.dtp = dtp; + } + + dtp.enable(); + } + + // Handle *config* options (i.e. options that are not just plain data + // for log records). + if (options.stream) { + self.addStream({ + type: 'stream', + stream: options.stream, + closeOnExit: false, + level: options.level + }); + } else if (options.streams) { + options.streams.forEach(function (s) { + self.addStream(s, options.level); + }); + } else if (parent && options.level) { + this.level(options.level); + } else if (!parent) { + if (isBrowser) { + /* + * In the browser we'll be emitting to console.log by default. + * Any console.log worth its salt these days can nicely render + * and introspect objects (e.g. the Firefox and Chrome console) + * so let's emit the raw log record. Are there browsers for which + * that breaks things? + */ + self.addStream({ + type: 'raw', + stream: new ConsoleRawStream(), + closeOnExit: false, + level: options.level + }); + } else { + self.addStream({ + type: 'stream', + stream: process.stdout, + closeOnExit: false, + level: options.level + }); + } + } + if (options.serializers) { + self.addSerializers(options.serializers); + } + if (options.src) { + this.src = true; + } + xxx('Logger: ', self) + + // Fields. + // These are the default fields for log records (minus the attributes + // removed in this constructor). To allow storing raw log records + // (unrendered), `this.fields` must never be mutated. Create a copy for + // any changes. + var fields = objCopy(options); + delete fields.stream; + delete fields.level; + delete fields.streams; + delete fields.serializers; + delete fields.src; + if (this.serializers) { + this._applySerializers(fields); + } + if (!fields.hostname) { + fields.hostname = os.hostname(); + } + if (!fields.pid) { + fields.pid = process.pid; + } + Object.keys(fields).forEach(function (k) { + self.fields[k] = fields[k]; + }); +} + +util.inherits(Logger, EventEmitter); + + +/** + * Add a stream + * + * @param stream {Object}. Object with these fields: + * - `type`: The stream type. See README.md for full details. + * Often this is implied by the other fields. Examples are + * 'file', 'stream' and "raw". + * - `path` or `stream`: The specify the file path or writeable + * stream to which log records are written. E.g. + * `stream: process.stdout`. + * - `level`: Optional. Falls back to `defaultLevel`. + * - `closeOnExit` (boolean): Optional. Default is true for a + * 'file' stream when `path` is given, false otherwise. + * See README.md for full details. + * @param defaultLevel {Number|String} Optional. A level to use if + * `stream.level` is not set. If neither is given, this defaults to INFO. + */ +Logger.prototype.addStream = function addStream(s, defaultLevel) { + var self = this; + if (defaultLevel === null || defaultLevel === undefined) { + defaultLevel = INFO; + } + + s = objCopy(s); + + // Implicit 'type' from other args. + var type = s.type; + if (!s.type) { + if (s.stream) { + s.type = 'stream'; + } else if (s.path) { + s.type = 'file' + } + } + s.raw = (s.type === 'raw'); // PERF: Allow for faster check in `_emit`. + + if (s.level) { + s.level = resolveLevel(s.level); + } else { + s.level = resolveLevel(defaultLevel); + } + if (s.level < self._level) { + self._level = s.level; + } + + switch (s.type) { + case 'stream': + if (!s.closeOnExit) { + s.closeOnExit = false; + } + break; + case 'file': + if (!s.stream) { + s.stream = fs.createWriteStream(s.path, + {flags: 'a', encoding: 'utf8'}); + s.stream.on('error', function (err) { + self.emit('error', err, s); + }); + if (!s.closeOnExit) { + s.closeOnExit = true; + } + } else { + if (!s.closeOnExit) { + s.closeOnExit = false; + } + } + break; + case 'rotating-file': + assert.ok(!s.stream, + '"rotating-file" stream should not give a "stream"'); + assert.ok(s.path); + assert.ok(mv, '"rotating-file" stream type is not supported: ' + + 'missing "mv" module'); + s.stream = new RotatingFileStream(s); + if (!s.closeOnExit) { + s.closeOnExit = true; + } + break; + case 'raw': + if (!s.closeOnExit) { + s.closeOnExit = false; + } + break; + default: + throw new TypeError('unknown stream type "' + s.type + '"'); + } + + self.streams.push(s); + delete self.haveNonRawStreams; // reset +} + + +/** + * Add serializers + * + * @param serializers {Object} Optional. Object mapping log record field names + * to serializing functions. See README.md for details. + */ +Logger.prototype.addSerializers = function addSerializers(serializers) { + var self = this; + + if (!self.serializers) { + self.serializers = {}; + } + Object.keys(serializers).forEach(function (field) { + var serializer = serializers[field]; + if (typeof (serializer) !== 'function') { + throw new TypeError(format( + 'invalid serializer for "%s" field: must be a function', + field)); + } else { + self.serializers[field] = serializer; + } + }); +} + + + +/** + * Create a child logger, typically to add a few log record fields. + * + * This can be useful when passing a logger to a sub-component, e.g. a + * 'wuzzle' component of your service: + * + * var wuzzleLog = log.child({component: 'wuzzle'}) + * var wuzzle = new Wuzzle({..., log: wuzzleLog}) + * + * Then log records from the wuzzle code will have the same structure as + * the app log, *plus the component='wuzzle' field*. + * + * @param options {Object} Optional. Set of options to apply to the child. + * All of the same options for a new Logger apply here. Notes: + * - The parent's streams are inherited and cannot be removed in this + * call. Any given `streams` are *added* to the set inherited from + * the parent. + * - The parent's serializers are inherited, though can effectively be + * overwritten by using duplicate keys. + * - Can use `level` to set the level of the streams inherited from + * the parent. The level for the parent is NOT affected. + * @param simple {Boolean} Optional. Set to true to assert that `options` + * (a) only add fields (no config) and (b) no serialization handling is + * required for them. IOW, this is a fast path for frequent child + * creation. See 'tools/timechild.js' for numbers. + */ +Logger.prototype.child = function (options, simple) { + return new (this.constructor)(this, options || {}, simple); +} + + +/** + * A convenience method to reopen 'file' streams on a logger. This can be + * useful with external log rotation utilities that move and re-open log files + * (e.g. logrotate on Linux, logadm on SmartOS/Illumos). Those utilities + * typically have rotation options to copy-and-truncate the log file, but + * you may not want to use that. An alternative is to do this in your + * application: + * + * var log = bunyan.createLogger(...); + * ... + * process.on('SIGUSR2', function () { + * log.reopenFileStreams(); + * }); + * ... + * + * See . + */ +Logger.prototype.reopenFileStreams = function () { + var self = this; + self.streams.forEach(function (s) { + if (s.type === 'file') { + if (s.stream) { + // Not sure if typically would want this, or more immediate + // `s.stream.destroy()`. + s.stream.end(); + s.stream.destroySoon(); + delete s.stream; + } + s.stream = fs.createWriteStream(s.path, + {flags: 'a', encoding: 'utf8'}); + s.stream.on('error', function (err) { + self.emit('error', err, s); + }); + } + }); +}; + + +/* BEGIN JSSTYLED */ +/** + * Close this logger. + * + * This closes streams (that it owns, as per 'endOnClose' attributes on + * streams), etc. Typically you **don't** need to bother calling this. +Logger.prototype.close = function () { + if (this._closed) { + return; + } + if (!this._isSimpleChild) { + self.streams.forEach(function (s) { + if (s.endOnClose) { + xxx('closing stream s:', s); + s.stream.end(); + s.endOnClose = false; + } + }); + } + this._closed = true; +} + */ +/* END JSSTYLED */ + + +/** + * Get/set the level of all streams on this logger. + * + * Get Usage: + * // Returns the current log level (lowest level of all its streams). + * log.level() -> INFO + * + * Set Usage: + * log.level(INFO) // set all streams to level INFO + * log.level('info') // can use 'info' et al aliases + */ +Logger.prototype.level = function level(value) { + if (value === undefined) { + return this._level; + } + var newLevel = resolveLevel(value); + var len = this.streams.length; + for (var i = 0; i < len; i++) { + this.streams[i].level = newLevel; + } + this._level = newLevel; +} + + +/** + * Get/set the level of a particular stream on this logger. + * + * Get Usage: + * // Returns an array of the levels of each stream. + * log.levels() -> [TRACE, INFO] + * + * // Returns a level of the identified stream. + * log.levels(0) -> TRACE // level of stream at index 0 + * log.levels('foo') // level of stream with name 'foo' + * + * Set Usage: + * log.levels(0, INFO) // set level of stream 0 to INFO + * log.levels(0, 'info') // can use 'info' et al aliases + * log.levels('foo', WARN) // set stream named 'foo' to WARN + * + * Stream names: When streams are defined, they can optionally be given + * a name. For example, + * log = new Logger({ + * streams: [ + * { + * name: 'foo', + * path: '/var/log/my-service/foo.log' + * level: 'trace' + * }, + * ... + * + * @param name {String|Number} The stream index or name. + * @param value {Number|String} The level value (INFO) or alias ('info'). + * If not given, this is a 'get' operation. + * @throws {Error} If there is no stream with the given name. + */ +Logger.prototype.levels = function levels(name, value) { + if (name === undefined) { + assert.equal(value, undefined); + return this.streams.map( + function (s) { return s.level }); + } + var stream; + if (typeof (name) === 'number') { + stream = this.streams[name]; + if (stream === undefined) { + throw new Error('invalid stream index: ' + name); + } + } else { + var len = this.streams.length; + for (var i = 0; i < len; i++) { + var s = this.streams[i]; + if (s.name === name) { + stream = s; + break; + } + } + if (!stream) { + throw new Error(format('no stream with name "%s"', name)); + } + } + if (value === undefined) { + return stream.level; + } else { + var newLevel = resolveLevel(value); + stream.level = newLevel; + if (newLevel < this._level) { + this._level = newLevel; + } + } +} + + +/** + * Apply registered serializers to the appropriate keys in the given fields. + * + * Pre-condition: This is only called if there is at least one serializer. + * + * @param fields (Object) The log record fields. + * @param excludeFields (Object) Optional mapping of keys to `true` for + * keys to NOT apply a serializer. + */ +Logger.prototype._applySerializers = function (fields, excludeFields) { + var self = this; + + xxx('_applySerializers: excludeFields', excludeFields); + + // Check each serializer against these (presuming number of serializers + // is typically less than number of fields). + Object.keys(this.serializers).forEach(function (name) { + if (fields[name] === undefined || + (excludeFields && excludeFields[name])) + { + return; + } + xxx('_applySerializers; apply to "%s" key', name) + try { + fields[name] = self.serializers[name](fields[name]); + } catch (err) { + _warn(format('bunyan: ERROR: Exception thrown from the "%s" ' + + 'Bunyan serializer. This should never happen. This is a bug' + + 'in that serializer function.\n%s', + name, err.stack || err)); + fields[name] = format('(Error in Bunyan log "%s" serializer ' + + 'broke field. See stderr for details.)', name); + } + }); +} + + +/** + * Emit a log record. + * + * @param rec {log record} + * @param noemit {Boolean} Optional. Set to true to skip emission + * and just return the JSON string. + */ +Logger.prototype._emit = function (rec, noemit) { + var i; + + // Lazily determine if this Logger has non-'raw' streams. If there are + // any, then we need to stringify the log record. + if (this.haveNonRawStreams === undefined) { + this.haveNonRawStreams = false; + for (i = 0; i < this.streams.length; i++) { + if (!this.streams[i].raw) { + this.haveNonRawStreams = true; + break; + } + } + } + + // Stringify the object. Attempt to warn/recover on error. + var str; + if (noemit || this.haveNonRawStreams) { + try { + str = JSON.stringify(rec, safeCycles()) + '\n'; + } catch (e) { + if (safeJsonStringify) { + str = safeJsonStringify(rec) + '\n'; + } else { + var dedupKey = e.stack.split(/\n/g, 2).join('\n'); + _warn('bunyan: ERROR: Exception in ' + + '`JSON.stringify(rec)`. You can install the ' + + '"safe-json-stringify" module to have Bunyan fallback ' + + 'to safer stringification. Record:\n' + + _indent(format('%s\n%s', util.inspect(rec), e.stack)), + dedupKey); + str = format('(Exception in JSON.stringify(rec): %j. ' + + 'See stderr for details.)\n', e.message); + } + } + } + + if (noemit) + return str; + + var level = rec.level; + for (i = 0; i < this.streams.length; i++) { + var s = this.streams[i]; + if (s.level <= level) { + xxx('writing log rec "%s" to "%s" stream (%d <= %d): %j', + rec.msg, s.type, s.level, level, rec); + s.stream.write(s.raw ? rec : str); + } + }; + + return str; +} + + +/** + * Build a log emitter function for level minLevel. I.e. this is the + * creator of `log.info`, `log.error`, etc. + */ +function mkLogEmitter(minLevel) { + return function () { + var log = this; + + function mkRecord(args) { + var excludeFields; + if (args[0] instanceof Error) { + // `log.(err, ...)` + fields = { + // Use this Logger's err serializer, if defined. + err: (log.serializers && log.serializers.err + ? log.serializers.err(args[0]) + : Logger.stdSerializers.err(args[0])) + }; + excludeFields = {err: true}; + if (args.length === 1) { + msgArgs = [fields.err.message]; + } else { + msgArgs = Array.prototype.slice.call(args, 1); + } + } else if (typeof (args[0]) !== 'object' && args[0] !== null || + Array.isArray(args[0])) { + // `log.(msg, ...)` + fields = null; + msgArgs = Array.prototype.slice.call(args); + } else if (Buffer.isBuffer(args[0])) { // `log.(buf, ...)` + // Almost certainly an error, show `inspect(buf)`. See bunyan + // issue #35. + fields = null; + msgArgs = Array.prototype.slice.call(args); + msgArgs[0] = util.inspect(msgArgs[0]); + } else { // `log.(fields, msg, ...)` + fields = args[0]; + msgArgs = Array.prototype.slice.call(args, 1); + } + + // Build up the record object. + var rec = objCopy(log.fields); + var level = rec.level = minLevel; + var recFields = (fields ? objCopy(fields) : null); + if (recFields) { + if (log.serializers) { + log._applySerializers(recFields, excludeFields); + } + Object.keys(recFields).forEach(function (k) { + rec[k] = recFields[k]; + }); + } + rec.msg = format.apply(log, msgArgs); + if (!rec.time) { + rec.time = (new Date()); + } + // Get call source info + if (log.src && !rec.src) { + rec.src = getCaller3Info() + } + rec.v = LOG_VERSION; + + return rec; + }; + + var fields = null; + var msgArgs = arguments; + var str = null; + var rec = null; + if (! this._emit) { + /* + * Show this invalid Bunyan usage warning *once*. + * + * See for + * an example of how this can happen. + */ + var dedupKey = 'unbound'; + if (!_haveWarned[dedupKey]) { + var caller = getCaller3Info(); + _warn(format('bunyan usage error: %s:%s: attempt to log ' + + 'with an unbound log method: `this` is: %s', + caller.file, caller.line, util.inspect(this)), + dedupKey); + } + return; + } else if (arguments.length === 0) { // `log.()` + return (this._level <= minLevel); + } else if (this._level > minLevel) { + /* pass through */ + } else { + rec = mkRecord(msgArgs); + str = this._emit(rec); + } + probes && probes[minLevel].fire(function () { + return [ str || + (rec && log._emit(rec, true)) || + log._emit(mkRecord(msgArgs), true) ]; + }); + } +} + + +/** + * The functions below log a record at a specific level. + * + * Usages: + * log.() -> boolean is-trace-enabled + * log.( err, [ msg, ...]) + * log.( msg, ...) + * log.( fields, msg, ...) + * + * where is the lowercase version of the log level. E.g.: + * + * log.info() + * + * @params fields {Object} Optional set of additional fields to log. + * @params msg {String} Log message. This can be followed by additional + * arguments that are handled like + * [util.format](http://nodejs.org/docs/latest/api/all.html#util.format). + */ +Logger.prototype.trace = mkLogEmitter(TRACE); +Logger.prototype.debug = mkLogEmitter(DEBUG); +Logger.prototype.info = mkLogEmitter(INFO); +Logger.prototype.warn = mkLogEmitter(WARN); +Logger.prototype.error = mkLogEmitter(ERROR); +Logger.prototype.fatal = mkLogEmitter(FATAL); + + + +//---- Standard serializers +// A serializer is a function that serializes a JavaScript object to a +// JSON representation for logging. There is a standard set of presumed +// interesting objects in node.js-land. + +Logger.stdSerializers = {}; + +// Serialize an HTTP request. +Logger.stdSerializers.req = function req(req) { + if (!req || !req.connection) + return req; + return { + method: req.method, + url: req.url, + headers: req.headers, + remoteAddress: req.connection.remoteAddress, + remotePort: req.connection.remotePort + }; + // Trailers: Skipping for speed. If you need trailers in your app, then + // make a custom serializer. + //if (Object.keys(trailers).length > 0) { + // obj.trailers = req.trailers; + //} +}; + +// Serialize an HTTP response. +Logger.stdSerializers.res = function res(res) { + if (!res || !res.statusCode) + return res; + return { + statusCode: res.statusCode, + header: res._header + } +}; + + +/* + * This function dumps long stack traces for exceptions having a cause() + * method. The error classes from + * [verror](https://github.com/davepacheco/node-verror) and + * [restify v2.0](https://github.com/mcavage/node-restify) are examples. + * + * Based on `dumpException` in + * https://github.com/davepacheco/node-extsprintf/blob/master/lib/extsprintf.js + */ +function getFullErrorStack(ex) +{ + var ret = ex.stack || ex.toString(); + if (ex.cause && typeof (ex.cause) === 'function') { + var cex = ex.cause(); + if (cex) { + ret += '\nCaused by: ' + getFullErrorStack(cex); + } + } + return (ret); +} + +// Serialize an Error object +// (Core error properties are enumerable in node 0.4, not in 0.6). +var errSerializer = Logger.stdSerializers.err = function err(err) { + if (!err || !err.stack) + return err; + var obj = { + message: err.message, + name: err.name, + stack: getFullErrorStack(err), + code: err.code, + signal: err.signal + } + return obj; +}; + + +// A JSON stringifier that handles cycles safely. +// Usage: JSON.stringify(obj, safeCycles()) +function safeCycles() { + var seen = []; + return function (key, val) { + if (!val || typeof (val) !== 'object') { + return val; + } + if (seen.indexOf(val) !== -1) { + return '[Circular]'; + } + seen.push(val); + return val; + }; +} + + +/** + * XXX + */ +if (mv) { + +function RotatingFileStream(options) { + this.path = options.path; + this.stream = fs.createWriteStream(this.path, + {flags: 'a', encoding: 'utf8'}); + this.count = (options.count == null ? 10 : options.count); + assert.equal(typeof (this.count), 'number', + format('rotating-file stream "count" is not a number: %j (%s) in %j', + this.count, typeof (this.count), this)); + assert.ok(this.count >= 0, + format('rotating-file stream "count" is not >= 0: %j in %j', + this.count, this)); + + // Parse `options.period`. + if (options.period) { + // where scope is: + // h hours (at the start of the hour) + // d days (at the start of the day, i.e. just after midnight) + // w weeks (at the start of Sunday) + // m months (on the first of the month) + // y years (at the start of Jan 1st) + // with special values 'hourly' (1h), 'daily' (1d), "weekly" (1w), + // 'monthly' (1m) and 'yearly' (1y) + var period = { + 'hourly': '1h', + 'daily': '1d', + 'weekly': '1w', + 'monthly': '1m', + 'yearly': '1y' + }[options.period] || options.period; + var m = /^([1-9][0-9]*)([hdwmy]|ms)$/.exec(period); + if (!m) { + throw new Error(format('invalid period: "%s"', options.period)); + } + this.periodNum = Number(m[1]); + this.periodScope = m[2]; + } else { + this.periodNum = 1; + this.periodScope = 'd'; + } + + // TODO: template support for backup files + // template: + // default is %P.%n + // '/var/log/archive/foo.log' -> foo.log.%n + // '/var/log/archive/foo.log.%n' + // codes: + // XXX support strftime codes (per node version of those) + // or whatever module. Pick non-colliding for extra + // codes + // %P `path` base value + // %n integer number of rotated log (1,2,3,...) + // %d datetime in YYYY-MM-DD_HH-MM-SS + // XXX what should default date format be? + // prior art? Want to avoid ':' in + // filenames (illegal on Windows for one). + + this.rotQueue = []; + this.rotating = false; + this._setupNextRot(); +} + +util.inherits(RotatingFileStream, EventEmitter); + +RotatingFileStream.prototype._setupNextRot = function () { + var self = this; + this.rotAt = this._nextRotTime(); + var delay = this.rotAt - Date.now(); + // Cap timeout to Node's max setTimeout, see + // . + var TIMEOUT_MAX = 2147483647; // 2^31-1 + if (delay > TIMEOUT_MAX) { + delay = TIMEOUT_MAX; + } + this.timeout = setTimeout( + function () { self.rotate(); }, + delay); + if (typeof (this.timeout.unref) === 'function') { + this.timeout.unref(); + } +} + +RotatingFileStream.prototype._nextRotTime = function _nextRotTime(first) { + var _DEBUG = false; + if (_DEBUG) + console.log('-- _nextRotTime: %s%s', this.periodNum, this.periodScope); + var d = new Date(); + + if (_DEBUG) console.log(' now local: %s', d); + if (_DEBUG) console.log(' now utc: %s', d.toISOString()); + var rotAt; + switch (this.periodScope) { + case 'ms': + // Hidden millisecond period for debugging. + if (this.rotAt) { + rotAt = this.rotAt + this.periodNum; + } else { + rotAt = Date.now() + this.periodNum; + } + break; + case 'h': + if (this.rotAt) { + rotAt = this.rotAt + this.periodNum * 60 * 60 * 1000; + } else { + // First time: top of the next hour. + rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), + d.getUTCDate(), d.getUTCHours() + 1); + } + break; + case 'd': + if (this.rotAt) { + rotAt = this.rotAt + this.periodNum * 24 * 60 * 60 * 1000; + } else { + // First time: start of tomorrow (i.e. at the coming midnight) UTC. + rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), + d.getUTCDate() + 1); + } + break; + case 'w': + // Currently, always on Sunday morning at 00:00:00 (UTC). + if (this.rotAt) { + rotAt = this.rotAt + this.periodNum * 7 * 24 * 60 * 60 * 1000; + } else { + // First time: this coming Sunday. + rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), + d.getUTCDate() + (7 - d.getUTCDay())); + } + break; + case 'm': + if (this.rotAt) { + rotAt = Date.UTC(d.getUTCFullYear(), + d.getUTCMonth() + this.periodNum, 1); + } else { + // First time: the start of the next month. + rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth() + 1, 1); + } + break; + case 'y': + if (this.rotAt) { + rotAt = Date.UTC(d.getUTCFullYear() + this.periodNum, 0, 1); + } else { + // First time: the start of the next year. + rotAt = Date.UTC(d.getUTCFullYear() + 1, 0, 1); + } + break; + default: + assert.fail(format('invalid period scope: "%s"', this.periodScope)); + } + + if (_DEBUG) { + console.log(' **rotAt**: %s (utc: %s)', rotAt, + new Date(rotAt).toUTCString()); + var now = Date.now(); + console.log(' now: %s (%sms == %smin == %sh to go)', + now, + rotAt - now, + (rotAt-now)/1000/60, + (rotAt-now)/1000/60/60); + } + return rotAt; +}; + +RotatingFileStream.prototype.rotate = function rotate() { + // XXX What about shutdown? + var self = this; + var _DEBUG = false; + + // If rotation period is > ~25 days, we have to break into multiple + // setTimeout's. See . + if (self.rotAt && self.rotAt > Date.now()) { + return self._setupNextRot(); + } + + if (_DEBUG) { + console.log('-- [%s, pid=%s] rotating %s', + new Date(), process.pid, self.path); + } + if (self.rotating) { + throw new TypeError('cannot start a rotation when already rotating'); + } + self.rotating = true; + + self.stream.end(); // XXX can do moves sync after this? test at high rate + + function del() { + var toDel = self.path + '.' + String(n - 1); + if (n === 0) { + toDel = self.path; + } + n -= 1; + if (_DEBUG) console.log('rm %s', toDel); + fs.unlink(toDel, function (delErr) { + //XXX handle err other than not exists + moves(); + }); + } + + function moves() { + if (self.count === 0 || n < 0) { + return finish(); + } + var before = self.path; + var after = self.path + '.' + String(n); + if (n > 0) { + before += '.' + String(n - 1); + } + n -= 1; + fs.exists(before, function (exists) { + if (!exists) { + moves(); + } else { + if (_DEBUG) { + console.log('[pid %s] mv %s %s', + process.pid, before, after); + } + mv(before, after, function (mvErr) { + if (mvErr) { + self.emit('error', mvErr); + finish(); // XXX finish here? + } else { + moves(); + } + }); + } + }) + } + + function finish() { + if (_DEBUG) console.log('[pid %s] open %s', process.pid, self.path); + self.stream = fs.createWriteStream(self.path, + {flags: 'a', encoding: 'utf8'}); + var q = self.rotQueue, len = q.length; + for (var i = 0; i < len; i++) { + self.stream.write(q[i]); + } + self.rotQueue = []; + self.rotating = false; + self.emit('drain'); + self._setupNextRot(); + } + + var n = this.count; + del(); +}; + +RotatingFileStream.prototype.write = function write(s) { + if (this.rotating) { + this.rotQueue.push(s); + return false; + } else { + return this.stream.write(s); + } +}; + +RotatingFileStream.prototype.end = function end(s) { + this.stream.end(); +}; + +RotatingFileStream.prototype.destroy = function destroy(s) { + this.stream.destroy(); +}; + +RotatingFileStream.prototype.destroySoon = function destroySoon(s) { + this.stream.destroySoon(); +}; + +} /* if (mv) */ + + + +/** + * RingBuffer is a Writable Stream that just stores the last N records in + * memory. + * + * @param options {Object}, with the following fields: + * + * - limit: number of records to keep in memory + */ +function RingBuffer(options) { + this.limit = options && options.limit ? options.limit : 100; + this.writable = true; + this.records = []; + EventEmitter.call(this); +} + +util.inherits(RingBuffer, EventEmitter); + +RingBuffer.prototype.write = function (record) { + if (!this.writable) + throw (new Error('RingBuffer has been ended already')); + + this.records.push(record); + + if (this.records.length > this.limit) + this.records.shift(); + + return (true); +}; + +RingBuffer.prototype.end = function () { + if (arguments.length > 0) + this.write.apply(this, Array.prototype.slice.call(arguments)); + this.writable = false; +}; + +RingBuffer.prototype.destroy = function () { + this.writable = false; + this.emit('close'); +}; + +RingBuffer.prototype.destroySoon = function () { + this.destroy(); +}; + + +//---- Exports + +module.exports = Logger; + +module.exports.TRACE = TRACE; +module.exports.DEBUG = DEBUG; +module.exports.INFO = INFO; +module.exports.WARN = WARN; +module.exports.ERROR = ERROR; +module.exports.FATAL = FATAL; +module.exports.resolveLevel = resolveLevel; +module.exports.levelFromName = levelFromName; +module.exports.nameFromLevel = nameFromLevel; + +module.exports.VERSION = VERSION; +module.exports.LOG_VERSION = LOG_VERSION; + +module.exports.createLogger = function createLogger(options) { + return new Logger(options); +}; + +module.exports.RingBuffer = RingBuffer; +module.exports.RotatingFileStream = RotatingFileStream; + +// Useful for custom `type == 'raw'` streams that may do JSON stringification +// of log records themselves. Usage: +// var str = JSON.stringify(rec, bunyan.safeCycles()); +module.exports.safeCycles = safeCycles; + +}).call(this,require('_process'),require("buffer").Buffer) + +},{"_process":16,"assert":2,"buffer":4,"events":8,"fs":1,"os":15,"safe-json-stringify":48,"util":36}],48:[function(require,module,exports){ +var hasProp = Object.prototype.hasOwnProperty; + +function throwsMessage(err) { + return '[Throws: ' + (err ? err.message : '?') + ']'; +} + +function safeGetValueFromPropertyOnObject(obj, property) { + if (hasProp.call(obj, property)) { + try { + return obj[property]; + } + catch (err) { + return throwsMessage(err); + } + } + + return obj[property]; +} + +function ensureProperties(obj) { + var seen = [ ]; // store references to objects we have seen before + + function visit(obj) { + if (obj === null || typeof obj !== 'object') { + return obj; + } + + if (seen.indexOf(obj) !== -1) { + return '[Circular]'; + } + seen.push(obj); + + if (typeof obj.toJSON === 'function') { + try { + return visit(obj.toJSON()); + } catch(err) { + return throwsMessage(err); + } + } + + if (Array.isArray(obj)) { + return obj.map(visit); + } + + return Object.keys(obj).reduce(function(result, prop) { + // prevent faulty defined getter properties + result[prop] = visit(safeGetValueFromPropertyOnObject(obj, prop)); + return result; + }, {}); + }; + + return visit(obj); +} + +module.exports = function(data) { + return JSON.stringify(ensureProperties(data)); +} + +module.exports.ensureProperties = ensureProperties; + +},{}],49:[function(require,module,exports){ +(function() { + var exportedLog, ffSupport, formats, getOrderedMatches, hasMatches, isFF, isIE, isOpera, isSafari, log, makeArray, operaSupport, safariSupport, stringToArgs, _log; + + if (!(window.console && window.console.log)) { + return; + } + + log = function() { + var args; + args = []; + makeArray(arguments).forEach(function(arg) { + if (typeof arg === 'string') { + return args = args.concat(stringToArgs(arg)); + } else { + return args.push(arg); + } + }); + return _log.apply(window, args); + }; + + _log = function() { + return console.log.apply(console, makeArray(arguments)); + }; + + makeArray = function(arrayLikeThing) { + return Array.prototype.slice.call(arrayLikeThing); + }; + + formats = [ + { + regex: /\*([^\*]+)\*/, + replacer: function(m, p1) { + return "%c" + p1 + "%c"; + }, + styles: function() { + return ['font-style: italic', '']; + } + }, { + regex: /\_([^\_]+)\_/, + replacer: function(m, p1) { + return "%c" + p1 + "%c"; + }, + styles: function() { + return ['font-weight: bold', '']; + } + }, { + regex: /\`([^\`]+)\`/, + replacer: function(m, p1) { + return "%c" + p1 + "%c"; + }, + styles: function() { + return ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', '']; + } + }, { + regex: /\[c\=(?:\"|\')?((?:(?!(?:\"|\')\]).)*)(?:\"|\')?\]((?:(?!\[c\]).)*)\[c\]/, + replacer: function(m, p1, p2) { + return "%c" + p2 + "%c"; + }, + styles: function(match) { + return [match[1], '']; + } + } + ]; + + hasMatches = function(str) { + var _hasMatches; + _hasMatches = false; + formats.forEach(function(format) { + if (format.regex.test(str)) { + return _hasMatches = true; + } + }); + return _hasMatches; + }; + + getOrderedMatches = function(str) { + var matches; + matches = []; + formats.forEach(function(format) { + var match; + match = str.match(format.regex); + if (match) { + return matches.push({ + format: format, + match: match + }); + } + }); + return matches.sort(function(a, b) { + return a.match.index - b.match.index; + }); + }; + + stringToArgs = function(str) { + var firstMatch, matches, styles; + styles = []; + while (hasMatches(str)) { + matches = getOrderedMatches(str); + firstMatch = matches[0]; + str = str.replace(firstMatch.format.regex, firstMatch.format.replacer); + styles = styles.concat(firstMatch.format.styles(firstMatch.match)); + } + return [str].concat(styles); + }; + + isSafari = function() { + return /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor); + }; + + isOpera = function() { + return /OPR/.test(navigator.userAgent) && /Opera/.test(navigator.vendor); + }; + + isFF = function() { + return /Firefox/.test(navigator.userAgent); + }; + + isIE = function() { + return /MSIE/.test(navigator.userAgent); + }; + + safariSupport = function() { + var m; + m = navigator.userAgent.match(/AppleWebKit\/(\d+)\.(\d+)(\.|\+|\s)/); + if (!m) { + return false; + } + return 537.38 <= parseInt(m[1], 10) + (parseInt(m[2], 10) / 100); + }; + + operaSupport = function() { + var m; + m = navigator.userAgent.match(/OPR\/(\d+)\./); + if (!m) { + return false; + } + return 15 <= parseInt(m[1], 10); + }; + + ffSupport = function() { + return window.console.firebug || window.console.exception; + }; + + if (isIE() || (isFF() && !ffSupport()) || (isOpera() && !operaSupport()) || (isSafari() && !safariSupport())) { + exportedLog = _log; + } else { + exportedLog = log; + } + + exportedLog.l = _log; + + if (typeof define === 'function' && define.amd) { + define(exportedLog); + } else if (typeof exports !== 'undefined') { + module.exports = exportedLog; + } else { + window.log = exportedLog; + } + +}).call(this); + +},{}],50:[function(require,module,exports){ +arguments[4][16][0].apply(exports,arguments) +},{"dup":16}],51:[function(require,module,exports){ +(function (process){ +RotatingFileStream = null; // see: https://github.com/trentm/node-bunyan/issues/223 +bunyan = require('bunyan'); +bunyanFormat = require('bunyan-format'); + +var WritableStream = require('stream').Writable; +var inherits = require('util').inherits; +var logStyle = require('log-with-style'); + +inherits(BrowserStdout, WritableStream); + +function BrowserStdout() { + if (!(this instanceof BrowserStdout)) { + return new BrowserStdout(); + } + WritableStream.call(this); +} + +BrowserStdout.prototype._write = function(chunks, encoding, cb) { + var output = JSON.parse(chunks.toString ? chunks.toString() : chunks); + var color = '[c="color: green"]'; + var level = 'INFO'; + if (output.level > 40) { + color = '[c="color: red"]'; + if (output.level === 60) { + level = 'FATAL'; + } else { + level = 'ERROR'; + } + } else if (output.level === 40) { + color = '[c="color: orange"]'; + level = 'WARNING'; + } else if (output.level === 20) { + level = 'DEBUG'; + } else if (output.level === 10) { + level = 'TRACE'; + } + logStyle(color + level + '[c] ' + '[c="color: blue"]' + output.name + '[c] ' + output.msg); + process.nextTick(cb); +}; + +// Import process.stdout and process.stderr +process = require('process'); +process.stdout = BrowserStdout(); +process.stderr = BrowserStdout(); + +orion.logFormatter = BrowserStdout(); + +}).call(this,require('_process')) + +},{"_process":16,"bunyan":47,"bunyan-format":37,"log-with-style":49,"process":50,"stream":32,"util":36}]},{},[51]) +//# sourceMappingURL=orionjs:logging/logging_client.browserify.js diff --git a/packages/logging/logging_client.browserify.js.map b/packages/logging/logging_client.browserify.js.map new file mode 100644 index 0000000..294e27b --- /dev/null +++ b/packages/logging/logging_client.browserify.js.map @@ -0,0 +1,111 @@ +{ + "version": 3, + "sources": [ + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/browser-pack/_prelude.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/lib/_empty.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/assert/assert.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/index.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/ieee754/index.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/is-array/index.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/events/events.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/index.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/lib/request.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/lib/response.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/base64.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/inherits/inherits_browser.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/isarray/index.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/os-browserify/browser.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/process/browser.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/punycode/punycode.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/decode.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/encode.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/index.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/duplex.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_duplex.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_passthrough.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_transform.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/lib/util.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/passthrough.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/readable.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/transform.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/writable.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/stream-browserify/index.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/string_decoder/index.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/url/url.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/util/support/isBufferBrowser.js", + "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/util/util.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/index.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/lib/format-record.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/ansicolors.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/ansistyles.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/has-keys.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/index.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/foreach.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/index.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/isArguments.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/shim.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan/lib/bunyan.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/index.js", + "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/log-with-style/log.js", + "_stream_0.js" + ], + "names": [], + "mappings": "AAAA;ACAA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC75CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AClhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;;ACJA;AACA;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACv7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC7dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1GA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;;ACDA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnsBA;AACA;AACA;AACA;AACA;AACA;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC1kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC15CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", + "file": "generated.js", + "sourceRoot": "", + "sourcesContent": [ + "(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// when used in node, this will actually load the util module we depend on\n// versus loading the builtin util module as happens otherwise\n// this is a bug in node module loading as far as I am concerned\nvar util = require('util/');\n\nvar pSlice = Array.prototype.slice;\nvar hasOwn = Object.prototype.hasOwnProperty;\n\n// 1. The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\n\n// 2. The AssertionError is defined in assert.\n// new assert.AssertionError({ message: message,\n// actual: actual,\n// expected: expected })\n\nassert.AssertionError = function AssertionError(options) {\n this.name = 'AssertionError';\n this.actual = options.actual;\n this.expected = options.expected;\n this.operator = options.operator;\n if (options.message) {\n this.message = options.message;\n this.generatedMessage = false;\n } else {\n this.message = getMessage(this);\n this.generatedMessage = true;\n }\n var stackStartFunction = options.stackStartFunction || fail;\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, stackStartFunction);\n }\n else {\n // non v8 browsers so we can have a stacktrace\n var err = new Error();\n if (err.stack) {\n var out = err.stack;\n\n // try to strip useless frames\n var fn_name = stackStartFunction.name;\n var idx = out.indexOf('\\n' + fn_name);\n if (idx >= 0) {\n // once we have located the function frame\n // we need to strip out everything before it (and its line)\n var next_line = out.indexOf('\\n', idx + 1);\n out = out.substring(next_line + 1);\n }\n\n this.stack = out;\n }\n }\n};\n\n// assert.AssertionError instanceof Error\nutil.inherits(assert.AssertionError, Error);\n\nfunction replacer(key, value) {\n if (util.isUndefined(value)) {\n return '' + value;\n }\n if (util.isNumber(value) && !isFinite(value)) {\n return value.toString();\n }\n if (util.isFunction(value) || util.isRegExp(value)) {\n return value.toString();\n }\n return value;\n}\n\nfunction truncate(s, n) {\n if (util.isString(s)) {\n return s.length < n ? s : s.slice(0, n);\n } else {\n return s;\n }\n}\n\nfunction getMessage(self) {\n return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' +\n self.operator + ' ' +\n truncate(JSON.stringify(self.expected, replacer), 128);\n}\n\n// At present only the three keys mentioned above are used and\n// understood by the spec. Implementations or sub modules can pass\n// other keys to the AssertionError's constructor - they will be\n// ignored.\n\n// 3. All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction fail(actual, expected, message, operator, stackStartFunction) {\n throw new assert.AssertionError({\n message: message,\n actual: actual,\n expected: expected,\n operator: operator,\n stackStartFunction: stackStartFunction\n });\n}\n\n// EXTENSION! allows for well behaved errors defined elsewhere.\nassert.fail = fail;\n\n// 4. Pure assertion tests whether a value is truthy, as determined\n// by !!guard.\n// assert.ok(guard, message_opt);\n// This statement is equivalent to assert.equal(true, !!guard,\n// message_opt);. To test strictly for the value true, use\n// assert.strictEqual(true, guard, message_opt);.\n\nfunction ok(value, message) {\n if (!value) fail(value, true, message, '==', assert.ok);\n}\nassert.ok = ok;\n\n// 5. The equality assertion tests shallow, coercive equality with\n// ==.\n// assert.equal(actual, expected, message_opt);\n\nassert.equal = function equal(actual, expected, message) {\n if (actual != expected) fail(actual, expected, message, '==', assert.equal);\n};\n\n// 6. The non-equality assertion tests for whether two objects are not equal\n// with != assert.notEqual(actual, expected, message_opt);\n\nassert.notEqual = function notEqual(actual, expected, message) {\n if (actual == expected) {\n fail(actual, expected, message, '!=', assert.notEqual);\n }\n};\n\n// 7. The equivalence assertion tests a deep equality relation.\n// assert.deepEqual(actual, expected, message_opt);\n\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (!_deepEqual(actual, expected)) {\n fail(actual, expected, message, 'deepEqual', assert.deepEqual);\n }\n};\n\nfunction _deepEqual(actual, expected) {\n // 7.1. All identical values are equivalent, as determined by ===.\n if (actual === expected) {\n return true;\n\n } else if (util.isBuffer(actual) && util.isBuffer(expected)) {\n if (actual.length != expected.length) return false;\n\n for (var i = 0; i < actual.length; i++) {\n if (actual[i] !== expected[i]) return false;\n }\n\n return true;\n\n // 7.2. If the expected value is a Date object, the actual value is\n // equivalent if it is also a Date object that refers to the same time.\n } else if (util.isDate(actual) && util.isDate(expected)) {\n return actual.getTime() === expected.getTime();\n\n // 7.3 If the expected value is a RegExp object, the actual value is\n // equivalent if it is also a RegExp object with the same source and\n // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).\n } else if (util.isRegExp(actual) && util.isRegExp(expected)) {\n return actual.source === expected.source &&\n actual.global === expected.global &&\n actual.multiline === expected.multiline &&\n actual.lastIndex === expected.lastIndex &&\n actual.ignoreCase === expected.ignoreCase;\n\n // 7.4. Other pairs that do not both pass typeof value == 'object',\n // equivalence is determined by ==.\n } else if (!util.isObject(actual) && !util.isObject(expected)) {\n return actual == expected;\n\n // 7.5 For all other Object pairs, including Array objects, equivalence is\n // determined by having the same number of owned properties (as verified\n // with Object.prototype.hasOwnProperty.call), the same set of keys\n // (although not necessarily the same order), equivalent values for every\n // corresponding key, and an identical 'prototype' property. Note: this\n // accounts for both named and indexed properties on Arrays.\n } else {\n return objEquiv(actual, expected);\n }\n}\n\nfunction isArguments(object) {\n return Object.prototype.toString.call(object) == '[object Arguments]';\n}\n\nfunction objEquiv(a, b) {\n if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b))\n return false;\n // an identical 'prototype' property.\n if (a.prototype !== b.prototype) return false;\n // if one is a primitive, the other must be same\n if (util.isPrimitive(a) || util.isPrimitive(b)) {\n return a === b;\n }\n var aIsArgs = isArguments(a),\n bIsArgs = isArguments(b);\n if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs))\n return false;\n if (aIsArgs) {\n a = pSlice.call(a);\n b = pSlice.call(b);\n return _deepEqual(a, b);\n }\n var ka = objectKeys(a),\n kb = objectKeys(b),\n key, i;\n // having the same number of owned properties (keys incorporates\n // hasOwnProperty)\n if (ka.length != kb.length)\n return false;\n //the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n //~~~cheap key test\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] != kb[i])\n return false;\n }\n //equivalent values for every corresponding key, and\n //~~~possibly expensive deep test\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!_deepEqual(a[key], b[key])) return false;\n }\n return true;\n}\n\n// 8. The non-equivalence assertion tests for any deep inequality.\n// assert.notDeepEqual(actual, expected, message_opt);\n\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (_deepEqual(actual, expected)) {\n fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);\n }\n};\n\n// 9. The strict equality assertion tests strict equality, as determined by ===.\n// assert.strictEqual(actual, expected, message_opt);\n\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (actual !== expected) {\n fail(actual, expected, message, '===', assert.strictEqual);\n }\n};\n\n// 10. The strict non-equality assertion tests for strict inequality, as\n// determined by !==. assert.notStrictEqual(actual, expected, message_opt);\n\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (actual === expected) {\n fail(actual, expected, message, '!==', assert.notStrictEqual);\n }\n};\n\nfunction expectedException(actual, expected) {\n if (!actual || !expected) {\n return false;\n }\n\n if (Object.prototype.toString.call(expected) == '[object RegExp]') {\n return expected.test(actual);\n } else if (actual instanceof expected) {\n return true;\n } else if (expected.call({}, actual) === true) {\n return true;\n }\n\n return false;\n}\n\nfunction _throws(shouldThrow, block, expected, message) {\n var actual;\n\n if (util.isString(expected)) {\n message = expected;\n expected = null;\n }\n\n try {\n block();\n } catch (e) {\n actual = e;\n }\n\n message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +\n (message ? ' ' + message : '.');\n\n if (shouldThrow && !actual) {\n fail(actual, expected, 'Missing expected exception' + message);\n }\n\n if (!shouldThrow && expectedException(actual, expected)) {\n fail(actual, expected, 'Got unwanted exception' + message);\n }\n\n if ((shouldThrow && actual && expected &&\n !expectedException(actual, expected)) || (!shouldThrow && actual)) {\n throw actual;\n }\n}\n\n// 11. Expected to throw an error:\n// assert.throws(block, Error_opt, message_opt);\n\nassert.throws = function(block, /*optional*/error, /*optional*/message) {\n _throws.apply(this, [true].concat(pSlice.call(arguments)));\n};\n\n// EXTENSION! This is annoying to write outside this module.\nassert.doesNotThrow = function(block, /*optional*/message) {\n _throws.apply(this, [false].concat(pSlice.call(arguments)));\n};\n\nassert.ifError = function(err) { if (err) {throw err;}};\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) {\n if (hasOwn.call(obj, key)) keys.push(key);\n }\n return keys;\n};\n", + "/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('is-array')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\nBuffer.poolSize = 8192 // not used by this implementation\n\nvar rootParent = {}\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Note:\n *\n * - Implementation must support adding new properties to `Uint8Array` instances.\n * Firefox 4-29 lacked support, fixed in Firefox 30+.\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n *\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will\n * get the Object implementation, which is slower but will work correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = (function () {\n function Foo () {}\n try {\n var buf = new ArrayBuffer(0)\n var arr = new Uint8Array(buf)\n arr.foo = function () { return 42 }\n arr.constructor = Foo\n return arr.foo() === 42 && // typed array instances can be augmented\n arr.constructor === Foo && // constructor can be set\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n})()\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\n/**\n * Class: Buffer\n * =============\n *\n * The Buffer constructor returns instances of `Uint8Array` that are augmented\n * with function properties for all the node `Buffer` API functions. We use\n * `Uint8Array` so that square bracket notation works as expected -- it returns\n * a single octet.\n *\n * By augmenting the instances, we can avoid modifying the `Uint8Array`\n * prototype.\n */\nfunction Buffer (arg) {\n if (!(this instanceof Buffer)) {\n // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\n if (arguments.length > 1) return new Buffer(arg, arguments[1])\n return new Buffer(arg)\n }\n\n this.length = 0\n this.parent = undefined\n\n // Common case.\n if (typeof arg === 'number') {\n return fromNumber(this, arg)\n }\n\n // Slightly less common case.\n if (typeof arg === 'string') {\n return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\n }\n\n // Unusual.\n return fromObject(this, arg)\n}\n\nfunction fromNumber (that, length) {\n that = allocate(that, length < 0 ? 0 : checked(length) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < length; i++) {\n that[i] = 0\n }\n }\n return that\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8'\n\n // Assumption: byteLength() return value is always < kMaxLength.\n var length = byteLength(string, encoding) | 0\n that = allocate(that, length)\n\n that.write(string, encoding)\n return that\n}\n\nfunction fromObject (that, object) {\n if (Buffer.isBuffer(object)) return fromBuffer(that, object)\n\n if (isArray(object)) return fromArray(that, object)\n\n if (object == null) {\n throw new TypeError('must start with number, buffer, array or string')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && object.buffer instanceof ArrayBuffer) {\n return fromTypedArray(that, object)\n }\n\n if (object.length) return fromArrayLike(that, object)\n\n return fromJsonObject(that, object)\n}\n\nfunction fromBuffer (that, buffer) {\n var length = checked(buffer.length) | 0\n that = allocate(that, length)\n buffer.copy(that, 0, 0, length)\n return that\n}\n\nfunction fromArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\n// Duplicate of fromArray() to keep fromArray() monomorphic.\nfunction fromTypedArray (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n // Truncating the elements is probably not what people expect from typed\n // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\n // of the old Buffer constructor.\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = checked(array.length) | 0\n that = allocate(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\n// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object.\n// Returns a zero-length buffer for inputs that don't conform to the spec.\nfunction fromJsonObject (that, object) {\n var array\n var length = 0\n\n if (object.type === 'Buffer' && isArray(object.data)) {\n array = object.data\n length = checked(array.length) | 0\n }\n that = allocate(that, length)\n\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction allocate (that, length) {\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = Buffer._augment(new Uint8Array(length))\n } else {\n // Fallback: Return an object instance of the Buffer class\n that.length = length\n that._isBuffer = true\n }\n\n var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1\n if (fromPool) that.parent = rootParent\n\n return that\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (subject, encoding) {\n if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding)\n\n var buf = new Buffer(subject, encoding)\n delete buf.parent\n return buf\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n var i = 0\n var len = Math.min(x, y)\n while (i < len) {\n if (a[i] !== b[i]) break\n\n ++i\n }\n\n if (i !== len) {\n x = a[i]\n y = b[i]\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'binary':\n case 'base64':\n case 'raw':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.')\n\n if (list.length === 0) {\n return new Buffer(0)\n } else if (list.length === 1) {\n return list[0]\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; i++) {\n length += list[i].length\n }\n }\n\n var buf = new Buffer(length)\n var pos = 0\n for (i = 0; i < list.length; i++) {\n var item = list[i]\n item.copy(buf, pos)\n pos += item.length\n }\n return buf\n}\n\nfunction byteLength (string, encoding) {\n if (typeof string !== 'string') string = '' + string\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'binary':\n // Deprecated\n case 'raw':\n case 'raws':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\n// pre-set for values that may exist in the future\nBuffer.prototype.length = undefined\nBuffer.prototype.parent = undefined\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n start = start | 0\n end = end === undefined || end === Infinity ? this.length : end | 0\n\n if (!encoding) encoding = 'utf8'\n if (start < 0) start = 0\n if (end > this.length) end = this.length\n if (end <= start) return ''\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'binary':\n return binarySlice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return ''\n}\n\nBuffer.prototype.compare = function compare (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return 0\n return Buffer.compare(this, b)\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset) {\n if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff\n else if (byteOffset < -0x80000000) byteOffset = -0x80000000\n byteOffset >>= 0\n\n if (this.length === 0) return -1\n if (byteOffset >= this.length) return -1\n\n // Negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)\n\n if (typeof val === 'string') {\n if (val.length === 0) return -1 // special case: looking for empty string always fails\n return String.prototype.indexOf.call(this, val, byteOffset)\n }\n if (Buffer.isBuffer(val)) {\n return arrayIndexOf(this, val, byteOffset)\n }\n if (typeof val === 'number') {\n if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {\n return Uint8Array.prototype.indexOf.call(this, val, byteOffset)\n }\n return arrayIndexOf(this, [ val ], byteOffset)\n }\n\n function arrayIndexOf (arr, val, byteOffset) {\n var foundIndex = -1\n for (var i = 0; byteOffset + i < arr.length; i++) {\n if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex\n } else {\n foundIndex = -1\n }\n }\n return -1\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\n// `get` will be removed in Node 0.13+\nBuffer.prototype.get = function get (offset) {\n console.log('.get() is deprecated. Access using array indexes instead.')\n return this.readUInt8(offset)\n}\n\n// `set` will be removed in Node 0.13+\nBuffer.prototype.set = function set (v, offset) {\n console.log('.set() is deprecated. Access using array indexes instead.')\n return this.writeUInt8(v, offset)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new Error('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; i++) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) throw new Error('Invalid hex string')\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction binaryWrite (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n var swap = encoding\n encoding = offset\n offset = length | 0\n length = swap\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'binary':\n return binaryWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n var res = ''\n var tmp = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; i++) {\n if (buf[i] <= 0x7F) {\n res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i])\n tmp = ''\n } else {\n tmp += '%' + buf[i].toString(16)\n }\n }\n\n return res + decodeUtf8Char(tmp)\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; i++) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction binarySlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; i++) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; i++) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = Buffer._augment(this.subarray(start, end))\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; i++) {\n newBuf[i] = this[i + start]\n }\n }\n\n if (newBuf.length) newBuf.parent = this.parent || this\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('value is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = value\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = value\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = value\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = value\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = value < 0 ? 1 : 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = value < 0 ? 1 : 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = value\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = value\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = value\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (value > max || value < min) throw new RangeError('value is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('index out of range')\n if (offset < 0) throw new RangeError('index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n\n if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < len; i++) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n target._set(this.subarray(start, start + len), targetStart)\n }\n\n return len\n}\n\n// fill(value, start=0, end=buffer.length)\nBuffer.prototype.fill = function fill (value, start, end) {\n if (!value) value = 0\n if (!start) start = 0\n if (!end) end = this.length\n\n if (end < start) throw new RangeError('end < start')\n\n // Fill 0 bytes; we're done\n if (end === start) return\n if (this.length === 0) return\n\n if (start < 0 || start >= this.length) throw new RangeError('start out of bounds')\n if (end < 0 || end > this.length) throw new RangeError('end out of bounds')\n\n var i\n if (typeof value === 'number') {\n for (i = start; i < end; i++) {\n this[i] = value\n }\n } else {\n var bytes = utf8ToBytes(value.toString())\n var len = bytes.length\n for (i = start; i < end; i++) {\n this[i] = bytes[i % len]\n }\n }\n\n return this\n}\n\n/**\n * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.\n * Added in Node 0.12. Only available in browsers that support ArrayBuffer.\n */\nBuffer.prototype.toArrayBuffer = function toArrayBuffer () {\n if (typeof Uint8Array !== 'undefined') {\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n return (new Buffer(this)).buffer\n } else {\n var buf = new Uint8Array(this.length)\n for (var i = 0, len = buf.length; i < len; i += 1) {\n buf[i] = this[i]\n }\n return buf.buffer\n }\n } else {\n throw new TypeError('Buffer.toArrayBuffer not supported in this browser')\n }\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar BP = Buffer.prototype\n\n/**\n * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods\n */\nBuffer._augment = function _augment (arr) {\n arr.constructor = Buffer\n arr._isBuffer = true\n\n // save reference to original Uint8Array set method before overwriting\n arr._set = arr.set\n\n // deprecated, will be removed in node 0.13+\n arr.get = BP.get\n arr.set = BP.set\n\n arr.write = BP.write\n arr.toString = BP.toString\n arr.toLocaleString = BP.toString\n arr.toJSON = BP.toJSON\n arr.equals = BP.equals\n arr.compare = BP.compare\n arr.indexOf = BP.indexOf\n arr.copy = BP.copy\n arr.slice = BP.slice\n arr.readUIntLE = BP.readUIntLE\n arr.readUIntBE = BP.readUIntBE\n arr.readUInt8 = BP.readUInt8\n arr.readUInt16LE = BP.readUInt16LE\n arr.readUInt16BE = BP.readUInt16BE\n arr.readUInt32LE = BP.readUInt32LE\n arr.readUInt32BE = BP.readUInt32BE\n arr.readIntLE = BP.readIntLE\n arr.readIntBE = BP.readIntBE\n arr.readInt8 = BP.readInt8\n arr.readInt16LE = BP.readInt16LE\n arr.readInt16BE = BP.readInt16BE\n arr.readInt32LE = BP.readInt32LE\n arr.readInt32BE = BP.readInt32BE\n arr.readFloatLE = BP.readFloatLE\n arr.readFloatBE = BP.readFloatBE\n arr.readDoubleLE = BP.readDoubleLE\n arr.readDoubleBE = BP.readDoubleBE\n arr.writeUInt8 = BP.writeUInt8\n arr.writeUIntLE = BP.writeUIntLE\n arr.writeUIntBE = BP.writeUIntBE\n arr.writeUInt16LE = BP.writeUInt16LE\n arr.writeUInt16BE = BP.writeUInt16BE\n arr.writeUInt32LE = BP.writeUInt32LE\n arr.writeUInt32BE = BP.writeUInt32BE\n arr.writeIntLE = BP.writeIntLE\n arr.writeIntBE = BP.writeIntBE\n arr.writeInt8 = BP.writeInt8\n arr.writeInt16LE = BP.writeInt16LE\n arr.writeInt16BE = BP.writeInt16BE\n arr.writeInt32LE = BP.writeInt32LE\n arr.writeInt32BE = BP.writeInt32BE\n arr.writeFloatLE = BP.writeFloatLE\n arr.writeFloatBE = BP.writeFloatBE\n arr.writeDoubleLE = BP.writeDoubleLE\n arr.writeDoubleBE = BP.writeDoubleBE\n arr.fill = BP.fill\n arr.inspect = BP.inspect\n arr.toArrayBuffer = BP.toArrayBuffer\n\n return arr\n}\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-z\\-]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n var i = 0\n\n for (; i < length; i++) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (leadSurrogate) {\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n } else {\n // valid surrogate pair\n codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000\n leadSurrogate = null\n }\n } else {\n // no lead yet\n\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else {\n // valid lead\n leadSurrogate = codePoint\n continue\n }\n }\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = null\n }\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x200000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; i++) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; i++) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; i++) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction decodeUtf8Char (str) {\n try {\n return decodeURIComponent(str)\n } catch (err) {\n return String.fromCharCode(0xFFFD) // UTF 8 invalid char\n }\n}\n", + "var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n;(function (exports) {\n\t'use strict';\n\n var Arr = (typeof Uint8Array !== 'undefined')\n ? Uint8Array\n : Array\n\n\tvar PLUS = '+'.charCodeAt(0)\n\tvar SLASH = '/'.charCodeAt(0)\n\tvar NUMBER = '0'.charCodeAt(0)\n\tvar LOWER = 'a'.charCodeAt(0)\n\tvar UPPER = 'A'.charCodeAt(0)\n\tvar PLUS_URL_SAFE = '-'.charCodeAt(0)\n\tvar SLASH_URL_SAFE = '_'.charCodeAt(0)\n\n\tfunction decode (elt) {\n\t\tvar code = elt.charCodeAt(0)\n\t\tif (code === PLUS ||\n\t\t code === PLUS_URL_SAFE)\n\t\t\treturn 62 // '+'\n\t\tif (code === SLASH ||\n\t\t code === SLASH_URL_SAFE)\n\t\t\treturn 63 // '/'\n\t\tif (code < NUMBER)\n\t\t\treturn -1 //no match\n\t\tif (code < NUMBER + 10)\n\t\t\treturn code - NUMBER + 26 + 26\n\t\tif (code < UPPER + 26)\n\t\t\treturn code - UPPER\n\t\tif (code < LOWER + 26)\n\t\t\treturn code - LOWER + 26\n\t}\n\n\tfunction b64ToByteArray (b64) {\n\t\tvar i, j, l, tmp, placeHolders, arr\n\n\t\tif (b64.length % 4 > 0) {\n\t\t\tthrow new Error('Invalid string. Length must be a multiple of 4')\n\t\t}\n\n\t\t// the number of equal signs (place holders)\n\t\t// if there are two placeholders, than the two characters before it\n\t\t// represent one byte\n\t\t// if there is only one, then the three characters before it represent 2 bytes\n\t\t// this is just a cheap hack to not do indexOf twice\n\t\tvar len = b64.length\n\t\tplaceHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0\n\n\t\t// base64 is 4/3 + up to two characters of the original data\n\t\tarr = new Arr(b64.length * 3 / 4 - placeHolders)\n\n\t\t// if there are placeholders, only get up to the last complete 4 chars\n\t\tl = placeHolders > 0 ? b64.length - 4 : b64.length\n\n\t\tvar L = 0\n\n\t\tfunction push (v) {\n\t\t\tarr[L++] = v\n\t\t}\n\n\t\tfor (i = 0, j = 0; i < l; i += 4, j += 3) {\n\t\t\ttmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))\n\t\t\tpush((tmp & 0xFF0000) >> 16)\n\t\t\tpush((tmp & 0xFF00) >> 8)\n\t\t\tpush(tmp & 0xFF)\n\t\t}\n\n\t\tif (placeHolders === 2) {\n\t\t\ttmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)\n\t\t\tpush(tmp & 0xFF)\n\t\t} else if (placeHolders === 1) {\n\t\t\ttmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)\n\t\t\tpush((tmp >> 8) & 0xFF)\n\t\t\tpush(tmp & 0xFF)\n\t\t}\n\n\t\treturn arr\n\t}\n\n\tfunction uint8ToBase64 (uint8) {\n\t\tvar i,\n\t\t\textraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes\n\t\t\toutput = \"\",\n\t\t\ttemp, length\n\n\t\tfunction encode (num) {\n\t\t\treturn lookup.charAt(num)\n\t\t}\n\n\t\tfunction tripletToBase64 (num) {\n\t\t\treturn encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)\n\t\t}\n\n\t\t// go through the array every three bytes, we'll deal with trailing stuff later\n\t\tfor (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {\n\t\t\ttemp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\n\t\t\toutput += tripletToBase64(temp)\n\t\t}\n\n\t\t// pad the end with zeros, but make sure to not forget the extra bytes\n\t\tswitch (extraBytes) {\n\t\t\tcase 1:\n\t\t\t\ttemp = uint8[uint8.length - 1]\n\t\t\t\toutput += encode(temp >> 2)\n\t\t\t\toutput += encode((temp << 4) & 0x3F)\n\t\t\t\toutput += '=='\n\t\t\t\tbreak\n\t\t\tcase 2:\n\t\t\t\ttemp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])\n\t\t\t\toutput += encode(temp >> 10)\n\t\t\t\toutput += encode((temp >> 4) & 0x3F)\n\t\t\t\toutput += encode((temp << 2) & 0x3F)\n\t\t\t\toutput += '='\n\t\t\t\tbreak\n\t\t}\n\n\t\treturn output\n\t}\n\n\texports.toByteArray = b64ToByteArray\n\texports.fromByteArray = uint8ToBase64\n}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))\n", + "exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n", + "\n/**\n * isArray\n */\n\nvar isArray = Array.isArray;\n\n/**\n * toString\n */\n\nvar str = Object.prototype.toString;\n\n/**\n * Whether or not the given `val`\n * is an array.\n *\n * example:\n *\n * isArray([]);\n * // > true\n * isArray(arguments);\n * // > false\n * isArray('');\n * // > false\n *\n * @param {mixed} val\n * @return {bool}\n */\n\nmodule.exports = isArray || function (val) {\n return !! val && '[object Array]' == str.call(val);\n};\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n }\n throw TypeError('Uncaught, unspecified \"error\" event.');\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n len = arguments.length;\n args = new Array(len - 1);\n for (i = 1; i < len; i++)\n args[i - 1] = arguments[i];\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n len = arguments.length;\n args = new Array(len - 1);\n for (i = 1; i < len; i++)\n args[i - 1] = arguments[i];\n\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n var m;\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n var ret;\n if (!emitter._events || !emitter._events[type])\n ret = 0;\n else if (isFunction(emitter._events[type]))\n ret = 1;\n else\n ret = emitter._events[type].length;\n return ret;\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n", + "var http = module.exports;\nvar EventEmitter = require('events').EventEmitter;\nvar Request = require('./lib/request');\nvar url = require('url')\n\nhttp.request = function (params, cb) {\n if (typeof params === 'string') {\n params = url.parse(params)\n }\n if (!params) params = {};\n if (!params.host && !params.port) {\n params.port = parseInt(window.location.port, 10);\n }\n if (!params.host && params.hostname) {\n params.host = params.hostname;\n }\n\n if (!params.protocol) {\n if (params.scheme) {\n params.protocol = params.scheme + ':';\n } else {\n params.protocol = window.location.protocol;\n }\n }\n\n if (!params.host) {\n params.host = window.location.hostname || window.location.host;\n }\n if (/:/.test(params.host)) {\n if (!params.port) {\n params.port = params.host.split(':')[1];\n }\n params.host = params.host.split(':')[0];\n }\n if (!params.port) params.port = params.protocol == 'https:' ? 443 : 80;\n \n var req = new Request(new xhrHttp, params);\n if (cb) req.on('response', cb);\n return req;\n};\n\nhttp.get = function (params, cb) {\n params.method = 'GET';\n var req = http.request(params, cb);\n req.end();\n return req;\n};\n\nhttp.Agent = function () {};\nhttp.Agent.defaultMaxSockets = 4;\n\nvar xhrHttp = (function () {\n if (typeof window === 'undefined') {\n throw new Error('no window object present');\n }\n else if (window.XMLHttpRequest) {\n return window.XMLHttpRequest;\n }\n else if (window.ActiveXObject) {\n var axs = [\n 'Msxml2.XMLHTTP.6.0',\n 'Msxml2.XMLHTTP.3.0',\n 'Microsoft.XMLHTTP'\n ];\n for (var i = 0; i < axs.length; i++) {\n try {\n var ax = new(window.ActiveXObject)(axs[i]);\n return function () {\n if (ax) {\n var ax_ = ax;\n ax = null;\n return ax_;\n }\n else {\n return new(window.ActiveXObject)(axs[i]);\n }\n };\n }\n catch (e) {}\n }\n throw new Error('ajax not supported in this browser')\n }\n else {\n throw new Error('ajax not supported in this browser');\n }\n})();\n\nhttp.STATUS_CODES = {\n 100 : 'Continue',\n 101 : 'Switching Protocols',\n 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918\n 200 : 'OK',\n 201 : 'Created',\n 202 : 'Accepted',\n 203 : 'Non-Authoritative Information',\n 204 : 'No Content',\n 205 : 'Reset Content',\n 206 : 'Partial Content',\n 207 : 'Multi-Status', // RFC 4918\n 300 : 'Multiple Choices',\n 301 : 'Moved Permanently',\n 302 : 'Moved Temporarily',\n 303 : 'See Other',\n 304 : 'Not Modified',\n 305 : 'Use Proxy',\n 307 : 'Temporary Redirect',\n 400 : 'Bad Request',\n 401 : 'Unauthorized',\n 402 : 'Payment Required',\n 403 : 'Forbidden',\n 404 : 'Not Found',\n 405 : 'Method Not Allowed',\n 406 : 'Not Acceptable',\n 407 : 'Proxy Authentication Required',\n 408 : 'Request Time-out',\n 409 : 'Conflict',\n 410 : 'Gone',\n 411 : 'Length Required',\n 412 : 'Precondition Failed',\n 413 : 'Request Entity Too Large',\n 414 : 'Request-URI Too Large',\n 415 : 'Unsupported Media Type',\n 416 : 'Requested Range Not Satisfiable',\n 417 : 'Expectation Failed',\n 418 : 'I\\'m a teapot', // RFC 2324\n 422 : 'Unprocessable Entity', // RFC 4918\n 423 : 'Locked', // RFC 4918\n 424 : 'Failed Dependency', // RFC 4918\n 425 : 'Unordered Collection', // RFC 4918\n 426 : 'Upgrade Required', // RFC 2817\n 428 : 'Precondition Required', // RFC 6585\n 429 : 'Too Many Requests', // RFC 6585\n 431 : 'Request Header Fields Too Large',// RFC 6585\n 500 : 'Internal Server Error',\n 501 : 'Not Implemented',\n 502 : 'Bad Gateway',\n 503 : 'Service Unavailable',\n 504 : 'Gateway Time-out',\n 505 : 'HTTP Version Not Supported',\n 506 : 'Variant Also Negotiates', // RFC 2295\n 507 : 'Insufficient Storage', // RFC 4918\n 509 : 'Bandwidth Limit Exceeded',\n 510 : 'Not Extended', // RFC 2774\n 511 : 'Network Authentication Required' // RFC 6585\n};", + "var Stream = require('stream');\nvar Response = require('./response');\nvar Base64 = require('Base64');\nvar inherits = require('inherits');\n\nvar Request = module.exports = function (xhr, params) {\n var self = this;\n self.writable = true;\n self.xhr = xhr;\n self.body = [];\n \n self.uri = (params.protocol || 'http:') + '//'\n + params.host\n + (params.port ? ':' + params.port : '')\n + (params.path || '/')\n ;\n \n if (typeof params.withCredentials === 'undefined') {\n params.withCredentials = true;\n }\n\n try { xhr.withCredentials = params.withCredentials }\n catch (e) {}\n \n if (params.responseType) try { xhr.responseType = params.responseType }\n catch (e) {}\n \n xhr.open(\n params.method || 'GET',\n self.uri,\n true\n );\n\n xhr.onerror = function(event) {\n self.emit('error', new Error('Network error'));\n };\n\n self._headers = {};\n \n if (params.headers) {\n var keys = objectKeys(params.headers);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!self.isSafeRequestHeader(key)) continue;\n var value = params.headers[key];\n self.setHeader(key, value);\n }\n }\n \n if (params.auth) {\n //basic auth\n this.setHeader('Authorization', 'Basic ' + Base64.btoa(params.auth));\n }\n\n var res = new Response;\n res.on('close', function () {\n self.emit('close');\n });\n \n res.on('ready', function () {\n self.emit('response', res);\n });\n\n res.on('error', function (err) {\n self.emit('error', err);\n });\n \n xhr.onreadystatechange = function () {\n // Fix for IE9 bug\n // SCRIPT575: Could not complete the operation due to error c00c023f\n // It happens when a request is aborted, calling the success callback anyway with readyState === 4\n if (xhr.__aborted) return;\n res.handle(xhr);\n };\n};\n\ninherits(Request, Stream);\n\nRequest.prototype.setHeader = function (key, value) {\n this._headers[key.toLowerCase()] = value\n};\n\nRequest.prototype.getHeader = function (key) {\n return this._headers[key.toLowerCase()]\n};\n\nRequest.prototype.removeHeader = function (key) {\n delete this._headers[key.toLowerCase()]\n};\n\nRequest.prototype.write = function (s) {\n this.body.push(s);\n};\n\nRequest.prototype.destroy = function (s) {\n this.xhr.__aborted = true;\n this.xhr.abort();\n this.emit('close');\n};\n\nRequest.prototype.end = function (s) {\n if (s !== undefined) this.body.push(s);\n\n var keys = objectKeys(this._headers);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = this._headers[key];\n if (isArray(value)) {\n for (var j = 0; j < value.length; j++) {\n this.xhr.setRequestHeader(key, value[j]);\n }\n }\n else this.xhr.setRequestHeader(key, value)\n }\n\n if (this.body.length === 0) {\n this.xhr.send('');\n }\n else if (typeof this.body[0] === 'string') {\n this.xhr.send(this.body.join(''));\n }\n else if (isArray(this.body[0])) {\n var body = [];\n for (var i = 0; i < this.body.length; i++) {\n body.push.apply(body, this.body[i]);\n }\n this.xhr.send(body);\n }\n else if (/Array/.test(Object.prototype.toString.call(this.body[0]))) {\n var len = 0;\n for (var i = 0; i < this.body.length; i++) {\n len += this.body[i].length;\n }\n var body = new(this.body[0].constructor)(len);\n var k = 0;\n \n for (var i = 0; i < this.body.length; i++) {\n var b = this.body[i];\n for (var j = 0; j < b.length; j++) {\n body[k++] = b[j];\n }\n }\n this.xhr.send(body);\n }\n else if (isXHR2Compatible(this.body[0])) {\n this.xhr.send(this.body[0]);\n }\n else {\n var body = '';\n for (var i = 0; i < this.body.length; i++) {\n body += this.body[i].toString();\n }\n this.xhr.send(body);\n }\n};\n\n// Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html\nRequest.unsafeHeaders = [\n \"accept-charset\",\n \"accept-encoding\",\n \"access-control-request-headers\",\n \"access-control-request-method\",\n \"connection\",\n \"content-length\",\n \"cookie\",\n \"cookie2\",\n \"content-transfer-encoding\",\n \"date\",\n \"expect\",\n \"host\",\n \"keep-alive\",\n \"origin\",\n \"referer\",\n \"te\",\n \"trailer\",\n \"transfer-encoding\",\n \"upgrade\",\n \"user-agent\",\n \"via\"\n];\n\nRequest.prototype.isSafeRequestHeader = function (headerName) {\n if (!headerName) return false;\n return indexOf(Request.unsafeHeaders, headerName.toLowerCase()) === -1;\n};\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nvar indexOf = function (xs, x) {\n if (xs.indexOf) return xs.indexOf(x);\n for (var i = 0; i < xs.length; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n};\n\nvar isXHR2Compatible = function (obj) {\n if (typeof Blob !== 'undefined' && obj instanceof Blob) return true;\n if (typeof ArrayBuffer !== 'undefined' && obj instanceof ArrayBuffer) return true;\n if (typeof FormData !== 'undefined' && obj instanceof FormData) return true;\n};\n", + "var Stream = require('stream');\nvar util = require('util');\n\nvar Response = module.exports = function (res) {\n this.offset = 0;\n this.readable = true;\n};\n\nutil.inherits(Response, Stream);\n\nvar capable = {\n streaming : true,\n status2 : true\n};\n\nfunction parseHeaders (res) {\n var lines = res.getAllResponseHeaders().split(/\\r?\\n/);\n var headers = {};\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n if (line === '') continue;\n \n var m = line.match(/^([^:]+):\\s*(.*)/);\n if (m) {\n var key = m[1].toLowerCase(), value = m[2];\n \n if (headers[key] !== undefined) {\n \n if (isArray(headers[key])) {\n headers[key].push(value);\n }\n else {\n headers[key] = [ headers[key], value ];\n }\n }\n else {\n headers[key] = value;\n }\n }\n else {\n headers[line] = true;\n }\n }\n return headers;\n}\n\nResponse.prototype.getResponse = function (xhr) {\n var respType = String(xhr.responseType).toLowerCase();\n if (respType === 'blob') return xhr.responseBlob || xhr.response;\n if (respType === 'arraybuffer') return xhr.response;\n return xhr.responseText;\n}\n\nResponse.prototype.getHeader = function (key) {\n return this.headers[key.toLowerCase()];\n};\n\nResponse.prototype.handle = function (res) {\n if (res.readyState === 2 && capable.status2) {\n try {\n this.statusCode = res.status;\n this.headers = parseHeaders(res);\n }\n catch (err) {\n capable.status2 = false;\n }\n \n if (capable.status2) {\n this.emit('ready');\n }\n }\n else if (capable.streaming && res.readyState === 3) {\n try {\n if (!this.statusCode) {\n this.statusCode = res.status;\n this.headers = parseHeaders(res);\n this.emit('ready');\n }\n }\n catch (err) {}\n \n try {\n this._emitData(res);\n }\n catch (err) {\n capable.streaming = false;\n }\n }\n else if (res.readyState === 4) {\n if (!this.statusCode) {\n this.statusCode = res.status;\n this.emit('ready');\n }\n this._emitData(res);\n \n if (res.error) {\n this.emit('error', this.getResponse(res));\n }\n else this.emit('end');\n \n this.emit('close');\n }\n};\n\nResponse.prototype._emitData = function (res) {\n var respBody = this.getResponse(res);\n if (respBody.toString().match(/ArrayBuffer/)) {\n this.emit('data', new Uint8Array(respBody, this.offset));\n this.offset = respBody.byteLength;\n return;\n }\n if (respBody.length > this.offset) {\n this.emit('data', respBody.slice(this.offset));\n this.offset = respBody.length;\n }\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n", + ";(function () {\n\n var object = typeof exports != 'undefined' ? exports : this; // #8: web workers\n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n function InvalidCharacterError(message) {\n this.message = message;\n }\n InvalidCharacterError.prototype = new Error;\n InvalidCharacterError.prototype.name = 'InvalidCharacterError';\n\n // encoder\n // [https://gist.github.com/999166] by [https://github.com/nignag]\n object.btoa || (\n object.btoa = function (input) {\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars, output = '';\n // if the next input index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n input.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = input.charCodeAt(idx += 3/4);\n if (charCode > 0xFF) {\n throw new InvalidCharacterError(\"'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.\");\n }\n block = block << 8 | charCode;\n }\n return output;\n });\n\n // decoder\n // [https://gist.github.com/1020396] by [https://github.com/atk]\n object.atob || (\n object.atob = function (input) {\n input = input.replace(/=+$/, '');\n if (input.length % 4 == 1) {\n throw new InvalidCharacterError(\"'atob' failed: The string to be decoded is not correctly encoded.\");\n }\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = '';\n // get next character\n buffer = input.charAt(idx++);\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n return output;\n });\n\n}());\n", + "if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n", + "module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n", + "exports.endianness = function () { return 'LE' };\n\nexports.hostname = function () {\n if (typeof location !== 'undefined') {\n return location.hostname\n }\n else return '';\n};\n\nexports.loadavg = function () { return [] };\n\nexports.uptime = function () { return 0 };\n\nexports.freemem = function () {\n return Number.MAX_VALUE;\n};\n\nexports.totalmem = function () {\n return Number.MAX_VALUE;\n};\n\nexports.cpus = function () { return [] };\n\nexports.type = function () { return 'Browser' };\n\nexports.release = function () {\n if (typeof navigator !== 'undefined') {\n return navigator.appVersion;\n }\n return '';\n};\n\nexports.networkInterfaces\n= exports.getNetworkInterfaces\n= function () { return {} };\n\nexports.arch = function () { return 'javascript' };\n\nexports.platform = function () { return 'browser' };\n\nexports.tmpdir = exports.tmpDir = function () {\n return '/tmp';\n};\n\nexports.EOL = '\\n';\n", + "// shim for using process in browser\n\nvar process = module.exports = {};\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = setTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n currentQueue[queueIndex].run();\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n clearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n setTimeout(drainQueue, 0);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n", + "/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n", + "'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n", + "module.exports = require(\"./lib/_stream_duplex.js\")\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\nmodule.exports = Duplex;\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n}\n/**/\n\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\nforEach(objectKeys(Writable.prototype), function(method) {\n if (!Duplex.prototype[method])\n Duplex.prototype[method] = Writable.prototype[method];\n});\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex))\n return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false)\n this.readable = false;\n\n if (options && options.writable === false)\n this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false)\n this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended)\n return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n process.nextTick(this.end.bind(this));\n}\n\nfunction forEach (xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough))\n return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function(chunk, encoding, cb) {\n cb(null, chunk);\n};\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Readable;\n\n/**/\nvar isArray = require('isarray');\n/**/\n\n\n/**/\nvar Buffer = require('buffer').Buffer;\n/**/\n\nReadable.ReadableState = ReadableState;\n\nvar EE = require('events').EventEmitter;\n\n/**/\nif (!EE.listenerCount) EE.listenerCount = function(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\nvar Stream = require('stream');\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nvar StringDecoder;\n\n\n/**/\nvar debug = require('util');\nif (debug && debug.debuglog) {\n debug = debug.debuglog('stream');\n} else {\n debug = function () {};\n}\n/**/\n\n\nutil.inherits(Readable, Stream);\n\nfunction ReadableState(options, stream) {\n var Duplex = require('./_stream_duplex');\n\n options = options || {};\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var defaultHwm = options.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~~this.highWaterMark;\n\n this.buffer = [];\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex)\n this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // when piping, we only care about 'readable' events that happen\n // after read()ing all the bytes and not getting any pushback.\n this.ranOut = false;\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n if (!StringDecoder)\n StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n var Duplex = require('./_stream_duplex');\n\n if (!(this instanceof Readable))\n return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n Stream.call(this);\n}\n\n// Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\nReadable.prototype.push = function(chunk, encoding) {\n var state = this._readableState;\n\n if (util.isString(chunk) && !state.objectMode) {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = new Buffer(chunk, encoding);\n encoding = '';\n }\n }\n\n return readableAddChunk(this, state, chunk, encoding, false);\n};\n\n// Unshift should *always* be something directly out of read()\nReadable.prototype.unshift = function(chunk) {\n var state = this._readableState;\n return readableAddChunk(this, state, chunk, '', true);\n};\n\nfunction readableAddChunk(stream, state, chunk, encoding, addToFront) {\n var er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (util.isNullOrUndefined(chunk)) {\n state.reading = false;\n if (!state.ended)\n onEofChunk(stream, state);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (state.ended && !addToFront) {\n var e = new Error('stream.push() after EOF');\n stream.emit('error', e);\n } else if (state.endEmitted && addToFront) {\n var e = new Error('stream.unshift() after end event');\n stream.emit('error', e);\n } else {\n if (state.decoder && !addToFront && !encoding)\n chunk = state.decoder.write(chunk);\n\n if (!addToFront)\n state.reading = false;\n\n // if we want the data now, just emit it.\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront)\n state.buffer.unshift(chunk);\n else\n state.buffer.push(chunk);\n\n if (state.needReadable)\n emitReadable(stream);\n }\n\n maybeReadMore(stream, state);\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n\n return needMoreData(state);\n}\n\n\n\n// if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\nfunction needMoreData(state) {\n return !state.ended &&\n (state.needReadable ||\n state.length < state.highWaterMark ||\n state.length === 0);\n}\n\n// backwards compatibility.\nReadable.prototype.setEncoding = function(enc) {\n if (!StringDecoder)\n StringDecoder = require('string_decoder/').StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n};\n\n// Don't raise the hwm > 128MB\nvar MAX_HWM = 0x800000;\nfunction roundUpToNextPowerOf2(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2\n n--;\n for (var p = 1; p < 32; p <<= 1) n |= n >> p;\n n++;\n }\n return n;\n}\n\nfunction howMuchToRead(n, state) {\n if (state.length === 0 && state.ended)\n return 0;\n\n if (state.objectMode)\n return n === 0 ? 0 : 1;\n\n if (isNaN(n) || util.isNull(n)) {\n // only flow one buffer at a time\n if (state.flowing && state.buffer.length)\n return state.buffer[0].length;\n else\n return state.length;\n }\n\n if (n <= 0)\n return 0;\n\n // If we're asking for more than the target buffer level,\n // then raise the water mark. Bump up to the next highest\n // power of 2, to prevent increasing it excessively in tiny\n // amounts.\n if (n > state.highWaterMark)\n state.highWaterMark = roundUpToNextPowerOf2(n);\n\n // don't have that much. return null, unless we've ended.\n if (n > state.length) {\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n } else\n return state.length;\n }\n\n return n;\n}\n\n// you can override either this method, or the async _read(n) below.\nReadable.prototype.read = function(n) {\n debug('read', n);\n var state = this._readableState;\n var nOrig = n;\n\n if (!util.isNumber(n) || n > 0)\n state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 &&\n state.needReadable &&\n (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended)\n endReadable(this);\n else\n emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0)\n endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n }\n\n if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0)\n state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n }\n\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (doRead && !state.reading)\n n = howMuchToRead(nOrig, state);\n\n var ret;\n if (n > 0)\n ret = fromList(n, state);\n else\n ret = null;\n\n if (util.isNull(ret)) {\n state.needReadable = true;\n n = 0;\n }\n\n state.length -= n;\n\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (state.length === 0 && !state.ended)\n state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended && state.length === 0)\n endReadable(this);\n\n if (!util.isNull(ret))\n this.emit('data', ret);\n\n return ret;\n};\n\nfunction chunkInvalid(state, chunk) {\n var er = null;\n if (!util.isBuffer(chunk) &&\n !util.isString(chunk) &&\n !util.isNullOrUndefined(chunk) &&\n !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n}\n\n\nfunction onEofChunk(stream, state) {\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n}\n\n// Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync)\n process.nextTick(function() {\n emitReadable_(stream);\n });\n else\n emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n}\n\n\n// at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n process.nextTick(function() {\n maybeReadMore_(stream, state);\n });\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended &&\n state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;\n else\n len = state.length;\n }\n state.readingMore = false;\n}\n\n// abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\nReadable.prototype._read = function(n) {\n this.emit('error', new Error('not implemented'));\n};\n\nReadable.prototype.pipe = function(dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false) &&\n dest !== process.stdout &&\n dest !== process.stderr;\n\n var endFn = doEnd ? onend : cleanup;\n if (state.endEmitted)\n process.nextTick(endFn);\n else\n src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable) {\n debug('onunpipe');\n if (readable === src) {\n cleanup();\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', cleanup);\n src.removeListener('data', ondata);\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain &&\n (!dest._writableState || dest._writableState.needDrain))\n ondrain();\n }\n\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n var ret = dest.write(chunk);\n if (false === ret) {\n debug('false write response, pause',\n src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EE.listenerCount(dest, 'error') === 0)\n dest.emit('error', er);\n }\n // This is a brutally ugly hack to make sure that our error handler\n // is attached before any userland ones. NEVER DO THIS.\n if (!dest._events || !dest._events.error)\n dest.on('error', onerror);\n else if (isArray(dest._events.error))\n dest._events.error.unshift(onerror);\n else\n dest._events.error = [onerror, dest._events.error];\n\n\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function() {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain)\n state.awaitDrain--;\n if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\n\nReadable.prototype.unpipe = function(dest) {\n var state = this._readableState;\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0)\n return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes)\n return this;\n\n if (!dest)\n dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest)\n dest.emit('unpipe', this);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++)\n dests[i].emit('unpipe', this);\n return this;\n }\n\n // try to find the right one.\n var i = indexOf(state.pipes, dest);\n if (i === -1)\n return this;\n\n state.pipes.splice(i, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1)\n state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this);\n\n return this;\n};\n\n// set up data events if they are asked for\n// Ensure readable listeners eventually get something\nReadable.prototype.on = function(ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n // If listening to data, and it has not explicitly been paused,\n // then call resume to start the flow of data on the next tick.\n if (ev === 'data' && false !== this._readableState.flowing) {\n this.resume();\n }\n\n if (ev === 'readable' && this.readable) {\n var state = this._readableState;\n if (!state.readableListening) {\n state.readableListening = true;\n state.emittedReadable = false;\n state.needReadable = true;\n if (!state.reading) {\n var self = this;\n process.nextTick(function() {\n debug('readable nexttick read 0');\n self.read(0);\n });\n } else if (state.length) {\n emitReadable(this, state);\n }\n }\n }\n\n return res;\n};\nReadable.prototype.addListener = Readable.prototype.on;\n\n// pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\nReadable.prototype.resume = function() {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n if (!state.reading) {\n debug('resume read 0');\n this.read(0);\n }\n resume(this, state);\n }\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n process.nextTick(function() {\n resume_(stream, state);\n });\n }\n}\n\nfunction resume_(stream, state) {\n state.resumeScheduled = false;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading)\n stream.read(0);\n}\n\nReadable.prototype.pause = function() {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n if (state.flowing) {\n do {\n var chunk = stream.read();\n } while (null !== chunk && state.flowing);\n }\n}\n\n// wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\nReadable.prototype.wrap = function(stream) {\n var state = this._readableState;\n var paused = false;\n\n var self = this;\n stream.on('end', function() {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length)\n self.push(chunk);\n }\n\n self.push(null);\n });\n\n stream.on('data', function(chunk) {\n debug('wrapped data');\n if (state.decoder)\n chunk = state.decoder.write(chunk);\n if (!chunk || !state.objectMode && !chunk.length)\n return;\n\n var ret = self.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (util.isFunction(stream[i]) && util.isUndefined(this[i])) {\n this[i] = function(method) { return function() {\n return stream[method].apply(stream, arguments);\n }}(i);\n }\n }\n\n // proxy certain important events.\n var events = ['error', 'close', 'destroy', 'pause', 'resume'];\n forEach(events, function(ev) {\n stream.on(ev, self.emit.bind(self, ev));\n });\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n self._read = function(n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return self;\n};\n\n\n\n// exposed for testing purposes only.\nReadable._fromList = fromList;\n\n// Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\nfunction fromList(n, state) {\n var list = state.buffer;\n var length = state.length;\n var stringMode = !!state.decoder;\n var objectMode = !!state.objectMode;\n var ret;\n\n // nothing in the list, definitely empty.\n if (list.length === 0)\n return null;\n\n if (length === 0)\n ret = null;\n else if (objectMode)\n ret = list.shift();\n else if (!n || n >= length) {\n // read it all, truncate the array.\n if (stringMode)\n ret = list.join('');\n else\n ret = Buffer.concat(list, length);\n list.length = 0;\n } else {\n // read just some of it.\n if (n < list[0].length) {\n // just take a part of the first list item.\n // slice is the same for buffers and strings.\n var buf = list[0];\n ret = buf.slice(0, n);\n list[0] = buf.slice(n);\n } else if (n === list[0].length) {\n // first list is a perfect match\n ret = list.shift();\n } else {\n // complex case.\n // we have enough to cover it, but it spans past the first buffer.\n if (stringMode)\n ret = '';\n else\n ret = new Buffer(n);\n\n var c = 0;\n for (var i = 0, l = list.length; i < l && c < n; i++) {\n var buf = list[0];\n var cpy = Math.min(n - c, buf.length);\n\n if (stringMode)\n ret += buf.slice(0, cpy);\n else\n buf.copy(ret, c, 0, cpy);\n\n if (cpy < buf.length)\n list[0] = buf.slice(cpy);\n else\n list.shift();\n\n c += cpy;\n }\n }\n }\n\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0)\n throw new Error('endReadable called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n process.nextTick(function() {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n });\n }\n}\n\nfunction forEach (xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n\nfunction indexOf (xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n}\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(Transform, Duplex);\n\n\nfunction TransformState(options, stream) {\n this.afterTransform = function(er, data) {\n return afterTransform(stream, er, data);\n };\n\n this.needTransform = false;\n this.transforming = false;\n this.writecb = null;\n this.writechunk = null;\n}\n\nfunction afterTransform(stream, er, data) {\n var ts = stream._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb)\n return stream.emit('error', new Error('no writecb in Transform class'));\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (!util.isNullOrUndefined(data))\n stream.push(data);\n\n if (cb)\n cb(er);\n\n var rs = stream._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n stream._read(rs.highWaterMark);\n }\n}\n\n\nfunction Transform(options) {\n if (!(this instanceof Transform))\n return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = new TransformState(options, this);\n\n // when the writable side finishes, then flush out anything remaining.\n var stream = this;\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n this.once('prefinish', function() {\n if (util.isFunction(this._flush))\n this._flush(function(er) {\n done(stream, er);\n });\n else\n done(stream);\n });\n}\n\nTransform.prototype.push = function(chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n};\n\n// This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\nTransform.prototype._transform = function(chunk, encoding, cb) {\n throw new Error('not implemented');\n};\n\nTransform.prototype._write = function(chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform ||\n rs.needReadable ||\n rs.length < rs.highWaterMark)\n this._read(rs.highWaterMark);\n }\n};\n\n// Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\nTransform.prototype._read = function(n) {\n var ts = this._transformState;\n\n if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\n\nfunction done(stream, er) {\n if (er)\n return stream.emit('error', er);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n var ws = stream._writableState;\n var ts = stream._transformState;\n\n if (ws.length)\n throw new Error('calling transform done when ws.length != 0');\n\n if (ts.transforming)\n throw new Error('calling transform done when still transforming');\n\n return stream.push(null);\n}\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, cb), and it'll handle all\n// the drain event emission and buffering.\n\nmodule.exports = Writable;\n\n/**/\nvar Buffer = require('buffer').Buffer;\n/**/\n\nWritable.WritableState = WritableState;\n\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nvar Stream = require('stream');\n\nutil.inherits(Writable, Stream);\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n}\n\nfunction WritableState(options, stream) {\n var Duplex = require('./_stream_duplex');\n\n options = options || {};\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var defaultHwm = options.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm;\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex)\n this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // cast to ints.\n this.highWaterMark = ~~this.highWaterMark;\n\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function(er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.buffer = [];\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n}\n\nfunction Writable(options) {\n var Duplex = require('./_stream_duplex');\n\n // Writable ctor is applied to Duplexes, though they're not\n // instanceof Writable, they're instanceof Readable.\n if (!(this instanceof Writable) && !(this instanceof Duplex))\n return new Writable(options);\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n Stream.call(this);\n}\n\n// Otherwise people can pipe Writable streams, which is just wrong.\nWritable.prototype.pipe = function() {\n this.emit('error', new Error('Cannot pipe. Not readable.'));\n};\n\n\nfunction writeAfterEnd(stream, state, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n process.nextTick(function() {\n cb(er);\n });\n}\n\n// If we get something that is not a buffer, string, null, or undefined,\n// and we're not in objectMode, then that's an error.\n// Otherwise stream chunks are all considered to be of length=1, and the\n// watermarks determine how many objects to keep in the buffer, rather than\n// how many bytes or characters.\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n if (!util.isBuffer(chunk) &&\n !util.isString(chunk) &&\n !util.isNullOrUndefined(chunk) &&\n !state.objectMode) {\n var er = new TypeError('Invalid non-string/buffer chunk');\n stream.emit('error', er);\n process.nextTick(function() {\n cb(er);\n });\n valid = false;\n }\n return valid;\n}\n\nWritable.prototype.write = function(chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n if (util.isFunction(encoding)) {\n cb = encoding;\n encoding = null;\n }\n\n if (util.isBuffer(chunk))\n encoding = 'buffer';\n else if (!encoding)\n encoding = state.defaultEncoding;\n\n if (!util.isFunction(cb))\n cb = function() {};\n\n if (state.ended)\n writeAfterEnd(this, state, cb);\n else if (validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, chunk, encoding, cb);\n }\n\n return ret;\n};\n\nWritable.prototype.cork = function() {\n var state = this._writableState;\n\n state.corked++;\n};\n\nWritable.prototype.uncork = function() {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing &&\n !state.corked &&\n !state.finished &&\n !state.bufferProcessing &&\n state.buffer.length)\n clearBuffer(this, state);\n }\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode &&\n state.decodeStrings !== false &&\n util.isString(chunk)) {\n chunk = new Buffer(chunk, encoding);\n }\n return chunk;\n}\n\n// if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\nfunction writeOrBuffer(stream, state, chunk, encoding, cb) {\n chunk = decodeChunk(state, chunk, encoding);\n if (util.isBuffer(chunk))\n encoding = 'buffer';\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret)\n state.needDrain = true;\n\n if (state.writing || state.corked)\n state.buffer.push(new WriteReq(chunk, encoding, cb));\n else\n doWrite(stream, state, false, len, chunk, encoding, cb);\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev)\n stream._writev(chunk, state.onwrite);\n else\n stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n if (sync)\n process.nextTick(function() {\n state.pendingcb--;\n cb(er);\n });\n else {\n state.pendingcb--;\n cb(er);\n }\n\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er)\n onwriteError(stream, state, sync, er, cb);\n else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(stream, state);\n\n if (!finished &&\n !state.corked &&\n !state.bufferProcessing &&\n state.buffer.length) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n process.nextTick(function() {\n afterWrite(stream, state, finished, cb);\n });\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished)\n onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n}\n\n// Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n}\n\n\n// if there's something in the buffer waiting, then process it\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n\n if (stream._writev && state.buffer.length > 1) {\n // Fast case, write everything using _writev()\n var cbs = [];\n for (var c = 0; c < state.buffer.length; c++)\n cbs.push(state.buffer[c].callback);\n\n // count the one we are adding, as well.\n // TODO(isaacs) clean this up\n state.pendingcb++;\n doWrite(stream, state, true, state.length, state.buffer, '', function(err) {\n for (var i = 0; i < cbs.length; i++) {\n state.pendingcb--;\n cbs[i](err);\n }\n });\n\n // Clear buffer\n state.buffer = [];\n } else {\n // Slow case, write chunks one-by-one\n for (var c = 0; c < state.buffer.length; c++) {\n var entry = state.buffer[c];\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n c++;\n break;\n }\n }\n\n if (c < state.buffer.length)\n state.buffer = state.buffer.slice(c);\n else\n state.buffer.length = 0;\n }\n\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function(chunk, encoding, cb) {\n cb(new Error('not implemented'));\n\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function(chunk, encoding, cb) {\n var state = this._writableState;\n\n if (util.isFunction(chunk)) {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (util.isFunction(encoding)) {\n cb = encoding;\n encoding = null;\n }\n\n if (!util.isNullOrUndefined(chunk))\n this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished)\n endWritable(this, state, cb);\n};\n\n\nfunction needFinish(stream, state) {\n return (state.ending &&\n state.length === 0 &&\n !state.finished &&\n !state.writing);\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished) {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(stream, state);\n if (need) {\n if (state.pendingcb === 0) {\n prefinish(stream, state);\n state.finished = true;\n stream.emit('finish');\n } else\n prefinish(stream, state);\n }\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished)\n process.nextTick(cb);\n else\n stream.once('finish', cb);\n }\n state.ended = true;\n}\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nfunction isBuffer(arg) {\n return Buffer.isBuffer(arg);\n}\nexports.isBuffer = isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}", + "module.exports = require(\"./lib/_stream_passthrough.js\")\n", + "exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = require('stream');\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');\n", + "module.exports = require(\"./lib/_stream_transform.js\")\n", + "module.exports = require(\"./lib/_stream_writable.js\")\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar Buffer = require('buffer').Buffer;\n\nvar isBufferEncoding = Buffer.isEncoding\n || function(encoding) {\n switch (encoding && encoding.toLowerCase()) {\n case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;\n default: return false;\n }\n }\n\n\nfunction assertEncoding(encoding) {\n if (encoding && !isBufferEncoding(encoding)) {\n throw new Error('Unknown encoding: ' + encoding);\n }\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters. CESU-8 is handled as part of the UTF-8 encoding.\n//\n// @TODO Handling all encodings inside a single object makes it very difficult\n// to reason about this code, so it should be split up in the future.\n// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code\n// points as used by CESU-8.\nvar StringDecoder = exports.StringDecoder = function(encoding) {\n this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');\n assertEncoding(encoding);\n switch (this.encoding) {\n case 'utf8':\n // CESU-8 represents each of Surrogate Pair by 3-bytes\n this.surrogateSize = 3;\n break;\n case 'ucs2':\n case 'utf16le':\n // UTF-16 represents each of Surrogate Pair by 2-bytes\n this.surrogateSize = 2;\n this.detectIncompleteChar = utf16DetectIncompleteChar;\n break;\n case 'base64':\n // Base-64 stores 3 bytes in 4 chars, and pads the remainder.\n this.surrogateSize = 3;\n this.detectIncompleteChar = base64DetectIncompleteChar;\n break;\n default:\n this.write = passThroughWrite;\n return;\n }\n\n // Enough space to store all bytes of a single character. UTF-8 needs 4\n // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\n this.charBuffer = new Buffer(6);\n // Number of bytes received for the current incomplete multi-byte character.\n this.charReceived = 0;\n // Number of bytes expected for the current incomplete multi-byte character.\n this.charLength = 0;\n};\n\n\n// write decodes the given buffer and returns it as JS string that is\n// guaranteed to not contain any partial multi-byte characters. Any partial\n// character found at the end of the buffer is buffered up, and will be\n// returned when calling write again with the remaining bytes.\n//\n// Note: Converting a Buffer containing an orphan surrogate to a String\n// currently works, but converting a String to a Buffer (via `new Buffer`, or\n// Buffer#write) will replace incomplete surrogates with the unicode\n// replacement character. See https://codereview.chromium.org/121173009/ .\nStringDecoder.prototype.write = function(buffer) {\n var charStr = '';\n // if our last write ended with an incomplete multibyte character\n while (this.charLength) {\n // determine how many remaining bytes this buffer has to offer for this char\n var available = (buffer.length >= this.charLength - this.charReceived) ?\n this.charLength - this.charReceived :\n buffer.length;\n\n // add the new bytes to the char buffer\n buffer.copy(this.charBuffer, this.charReceived, 0, available);\n this.charReceived += available;\n\n if (this.charReceived < this.charLength) {\n // still not enough chars in this buffer? wait for more ...\n return '';\n }\n\n // remove bytes belonging to the current character from the buffer\n buffer = buffer.slice(available, buffer.length);\n\n // get the character that was split\n charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);\n\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n var charCode = charStr.charCodeAt(charStr.length - 1);\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n this.charLength += this.surrogateSize;\n charStr = '';\n continue;\n }\n this.charReceived = this.charLength = 0;\n\n // if there are no more bytes in this buffer, just emit our char\n if (buffer.length === 0) {\n return charStr;\n }\n break;\n }\n\n // determine and set charLength / charReceived\n this.detectIncompleteChar(buffer);\n\n var end = buffer.length;\n if (this.charLength) {\n // buffer the incomplete character bytes we got\n buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);\n end -= this.charReceived;\n }\n\n charStr += buffer.toString(this.encoding, 0, end);\n\n var end = charStr.length - 1;\n var charCode = charStr.charCodeAt(end);\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n var size = this.surrogateSize;\n this.charLength += size;\n this.charReceived += size;\n this.charBuffer.copy(this.charBuffer, size, 0, size);\n buffer.copy(this.charBuffer, 0, 0, size);\n return charStr.substring(0, end);\n }\n\n // or just emit the charStr\n return charStr;\n};\n\n// detectIncompleteChar determines if there is an incomplete UTF-8 character at\n// the end of the given buffer. If so, it sets this.charLength to the byte\n// length that character, and sets this.charReceived to the number of bytes\n// that are available for this character.\nStringDecoder.prototype.detectIncompleteChar = function(buffer) {\n // determine how many bytes we have to check at the end of this buffer\n var i = (buffer.length >= 3) ? 3 : buffer.length;\n\n // Figure out if one of the last i bytes of our buffer announces an\n // incomplete char.\n for (; i > 0; i--) {\n var c = buffer[buffer.length - i];\n\n // See http://en.wikipedia.org/wiki/UTF-8#Description\n\n // 110XXXXX\n if (i == 1 && c >> 5 == 0x06) {\n this.charLength = 2;\n break;\n }\n\n // 1110XXXX\n if (i <= 2 && c >> 4 == 0x0E) {\n this.charLength = 3;\n break;\n }\n\n // 11110XXX\n if (i <= 3 && c >> 3 == 0x1E) {\n this.charLength = 4;\n break;\n }\n }\n this.charReceived = i;\n};\n\nStringDecoder.prototype.end = function(buffer) {\n var res = '';\n if (buffer && buffer.length)\n res = this.write(buffer);\n\n if (this.charReceived) {\n var cr = this.charReceived;\n var buf = this.charBuffer;\n var enc = this.encoding;\n res += buf.slice(0, cr).toString(enc);\n }\n\n return res;\n};\n\nfunction passThroughWrite(buffer) {\n return buffer.toString(this.encoding);\n}\n\nfunction utf16DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 2;\n this.charLength = this.charReceived ? 2 : 0;\n}\n\nfunction base64DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 3;\n this.charLength = this.charReceived ? 3 : 0;\n}\n", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar punycode = require('punycode');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a puny coded representation of \"domain\".\n // It only converts the part of the domain name that\n // has non ASCII characters. I.e. it dosent matter if\n // you call it with a domain that already is in ASCII.\n var domainArray = this.hostname.split('.');\n var newOut = [];\n for (var i = 0; i < domainArray.length; ++i) {\n var s = domainArray[i];\n newOut.push(s.match(/[^A-Za-z0-9_-]/) ?\n 'xn--' + punycode.encode(s) : s);\n }\n this.hostname = newOut.join('.');\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n Object.keys(this).forEach(function(k) {\n result[k] = this[k];\n }, this);\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n Object.keys(relative).forEach(function(k) {\n if (k !== 'protocol')\n result[k] = relative[k];\n });\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n Object.keys(relative).forEach(function(k) {\n result[k] = relative[k];\n });\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especialy happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!isNull(result.pathname) || !isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host) && (last === '.' || last === '..') ||\n last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last == '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especialy happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!isNull(result.pathname) || !isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n\nfunction isString(arg) {\n return typeof arg === \"string\";\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isNull(arg) {\n return arg === null;\n}\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\n", + "module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}", + "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n", + "'use strict';\n\nvar stream = require('stream');\nvar util = require('util');\nvar formatRecord = require('./lib/format-record');\nvar xtend = require('xtend');\n\n\nvar Writable = stream.Writable;\n\nmodule.exports = BunyanFormatWritable;\n\nutil.inherits(BunyanFormatWritable, Writable);\n\n/**\n * Creates a writable stream that formats bunyan records written to it.\n * \n * @name BunyanFormatWritable\n * @function\n * @param opts {Options} passed to bunyan format function\n * - outputMode: short|long|simple|json|bunyan\n * - color (true): toggles colors in output\n * - colorFromLevel: allows overriding log level colors\n * @param out {Stream} (process.stdout) writable stream to write \n * @return {WritableStream} that you can pipe bunyan output into\n */\nfunction BunyanFormatWritable (opts, out) {\n if (!(this instanceof BunyanFormatWritable)) return new BunyanFormatWritable(opts, out);\n\n opts = opts || {};\n opts.objectMode = true;\n Writable.call(this, opts);\n\n this.opts = xtend({ \n outputMode: 'short', \n color: true,\n colorFromLevel: {\n 10: 'brightBlack', // TRACE\n 20: 'brightBlack', // DEBUG\n 30: 'green', // INFO\n 40: 'magenta', // WARN\n 50: 'red', // ERROR\n 60: 'brightRed', // FATAL\n }\n }, opts);\n this.out = out || process.stdout;\n}\n\nBunyanFormatWritable.prototype._write = function (chunk, encoding, cb) {\n var rec;\n try { \n rec = JSON.parse(chunk);\n this.out.write(formatRecord(rec, this.opts));\n } catch (e) {\n this.out.write(chunk);\n }\n cb();\n};\n", + "'use strict';\n\nvar util = require('util');\nvar format = util.format;\nvar http = require('http');\nvar xtend = require('xtend');\nvar ansicolors = require('ansicolors');\nvar ansistyles = require('ansistyles');\n\nvar styles = xtend(ansistyles, ansicolors);\n\n// Most of this code is lifted directly from the bunyan ./bin file and should be cleaned up once there is more time\nvar OM_LONG = 1;\nvar OM_JSON = 2;\nvar OM_INSPECT = 3;\nvar OM_SIMPLE = 4;\nvar OM_SHORT = 5;\nvar OM_BUNYAN = 6;\nvar OM_FROM_NAME = {\n 'long': OM_LONG,\n 'json': OM_JSON,\n 'inspect': OM_INSPECT,\n 'simple': OM_SIMPLE,\n 'short': OM_SHORT,\n 'bunyan': OM_BUNYAN\n};\n\n// Levels\nvar TRACE = 10;\nvar DEBUG = 20;\nvar INFO = 30;\nvar WARN = 40;\nvar ERROR = 50;\nvar FATAL = 60;\n\nvar levelFromName = {\n 'trace': TRACE,\n 'debug': DEBUG,\n 'info': INFO,\n 'warn': WARN,\n 'error': ERROR,\n 'fatal': FATAL\n};\nvar nameFromLevel = {};\nvar upperNameFromLevel = {};\nvar upperPaddedNameFromLevel = {};\nObject.keys(levelFromName).forEach(function (name) {\n var lvl = levelFromName[name];\n nameFromLevel[lvl] = name;\n upperNameFromLevel[lvl] = name.toUpperCase();\n upperPaddedNameFromLevel[lvl] = (\n name.length === 4 ? ' ' : '') + name.toUpperCase();\n});\n\n\n/**\n * Is this a valid Bunyan log record.\n */\nfunction isValidRecord(rec) {\n if (rec.v === null ||\n rec.level === null ||\n rec.name === null ||\n rec.hostname === null ||\n rec.pid === null ||\n rec.time === null ||\n rec.msg === null) {\n // Not valid Bunyan log.\n return false;\n } else {\n return true;\n }\n}\n\nfunction indent(s) {\n return ' ' + s.split(/\\r?\\n/).join('\\n ');\n}\n\nfunction stylizeWithColor(s, color) {\n if (!s) return '';\n var fn = styles[color];\n return fn ? fn(s) : s;\n}\n\nfunction stylizeWithoutColor(str, color) {\n return str;\n}\n\n/**\n * @param {int} level is the level of the record.\n * @return The level value to its String representation.\n * This is only used on json-related formats output and first suggested at \n * https://github.com/trentm/node-bunyan/issues/194#issuecomment-64858117\n */\nfunction mapLevelToName(level) {\n switch (level) {\n case TRACE:\n return 'TRACE';\n case DEBUG:\n return 'DEBUG';\n case INFO:\n return 'INFO';\n case WARN:\n return 'WARN';\n case ERROR:\n return 'ERROR';\n case FATAL:\n return 'FATAL';\n }\n}\n\n/**\n * Print out a single result, considering input options.\n */\nmodule.exports = function formatRecord(rec, opts) {\n\n function _res(res) {\n var s = '';\n if (res.header) {\n s += res.header.trimRight();\n } else if (res.headers) {\n if (res.statusCode) {\n s += format('HTTP/1.1 %s %s\\n', res.statusCode,\n http.STATUS_CODES[res.statusCode]);\n }\n var headers = res.headers;\n s += Object.keys(headers).map(\n function (h) { return h + ': ' + headers[h]; }).join('\\n');\n }\n delete res.header;\n delete res.headers;\n delete res.statusCode;\n if (res.body) {\n s += '\\n\\n' + (typeof (res.body) === 'object'\n ? JSON.stringify(res.body, null, 2) : res.body);\n delete res.body;\n }\n if (res.trailer) {\n s += '\\n' + res.trailer;\n }\n delete res.trailer;\n if (s) {\n details.push(indent(s));\n }\n // E.g. for extra 'foo' field on 'res', add 'res.foo' at\n // top-level. This *does* have the potential to stomp on a\n // literal 'res.foo' key.\n Object.keys(res).forEach(function (k) {\n rec['res.' + k] = res[k];\n });\n }\n\n var short = false;\n var time;\n var line = rec.line;\n var stylize = opts.color ? stylizeWithColor : stylizeWithoutColor;\n var outputMode = isNaN(opts.outputMode) ? OM_FROM_NAME[opts.outputMode] : opts.outputMode; \n\n switch (outputMode) {\n case OM_SHORT:\n short = true;\n /* falls through */\n case OM_LONG:\n // [time] LEVEL: name[/comp]/pid on hostname (src): msg* (extras...)\n // msg*\n // --\n // long and multi-line extras\n // ...\n // If 'msg' is single-line, then it goes in the top line.\n // If 'req', show the request.\n // If 'res', show the response.\n // If 'err' and 'err.stack' then show that.\n if (!isValidRecord(rec)) {\n return line + '\\n';\n }\n\n delete rec.v;\n\n /*\n * We assume the Date is formatted according to ISO8601, in which\n * case we can safely chop off the date information.\n */\n if (short && rec.time[10] == 'T') {\n time = rec.time.substr(11);\n time = stylize(time, 'brightBlack');\n } else {\n time = stylize('[' + rec.time + ']', 'brightBlack');\n }\n\n delete rec.time;\n\n var nameStr = rec.name;\n delete rec.name;\n\n if (rec.component) {\n nameStr += '/' + rec.component;\n }\n delete rec.component;\n\n if (!short)\n nameStr += '/' + rec.pid;\n delete rec.pid;\n\n var level = (upperPaddedNameFromLevel[rec.level] || 'LVL' + rec.level);\n if (opts.color) {\n var colorFromLevel = opts.colorFromLevel || {\n 10: 'brightBlack', // TRACE\n 20: 'brightBlack', // DEBUG\n 30: 'cyan', // INFO\n 40: 'magenta', // WARN\n 50: 'red', // ERROR\n 60: 'inverse', // FATAL\n };\n level = stylize(level, colorFromLevel[rec.level]);\n }\n delete rec.level;\n\n var src = '';\n var s;\n var headers;\n var hostHeaderLine = '';\n if (rec.src && rec.src.file) {\n s = rec.src;\n if (s.func) {\n src = format(' (%s:%d in %s)', s.file, s.line, s.func);\n } else {\n src = format(' (%s:%d)', s.file, s.line);\n }\n src = stylize(src, 'green');\n }\n delete rec.src;\n\n var hostname = rec.hostname;\n delete rec.hostname;\n\n var extras = [];\n var details = [];\n\n if (rec.req_id) {\n extras.push('req_id=' + rec.req_id);\n }\n delete rec.req_id;\n\n var onelineMsg;\n if (rec.msg.indexOf('\\n') !== -1) {\n onelineMsg = '';\n details.push(indent(stylize(rec.msg, 'cyan')));\n } else {\n onelineMsg = ' ' + stylize(rec.msg, 'cyan');\n }\n delete rec.msg;\n\n if (rec.req && typeof (rec.req) === 'object') {\n var req = rec.req;\n delete rec.req;\n headers = req.headers;\n s = format('%s %s HTTP/%s%s', req.method,\n req.url,\n req.httpVersion || '1.1',\n (headers ?\n '\\n' + Object.keys(headers).map(function (h) {\n return h + ': ' + headers[h];\n }).join('\\n') :\n '')\n );\n delete req.url;\n delete req.method;\n delete req.httpVersion;\n delete req.headers;\n if (req.body) {\n s += '\\n\\n' + (typeof (req.body) === 'object'\n ? JSON.stringify(req.body, null, 2) : req.body);\n delete req.body;\n }\n if (req.trailers && Object.keys(req.trailers) > 0) {\n s += '\\n' + Object.keys(req.trailers).map(function (t) {\n return t + ': ' + req.trailers[t];\n }).join('\\n');\n }\n delete req.trailers;\n details.push(indent(s));\n // E.g. for extra 'foo' field on 'req', add 'req.foo' at\n // top-level. This *does* have the potential to stomp on a\n // literal 'req.foo' key.\n Object.keys(req).forEach(function (k) {\n rec['req.' + k] = req[k];\n })\n }\n\n if (rec.client_req && typeof (rec.client_req) === 'object') {\n var client_req = rec.client_req;\n delete rec.client_req;\n headers = client_req.headers;\n s = '';\n if (client_req.address) {\n hostHeaderLine = 'Host: ' + client_req.address;\n if (client_req.port)\n hostHeaderLine += ':' + client_req.port;\n hostHeaderLine += '\\n';\n }\n delete client_req.headers;\n delete client_req.address;\n delete client_req.port;\n s += format('%s %s HTTP/%s\\n%s%s', client_req.method,\n client_req.url,\n client_req.httpVersion || '1.1',\n hostHeaderLine,\n (headers ?\n Object.keys(headers).map(\n function (h) {\n return h + ': ' + headers[h];\n }).join('\\n') :\n ''));\n delete client_req.method;\n delete client_req.url;\n delete client_req.httpVersion;\n if (client_req.body) {\n s += '\\n\\n' + (typeof (client_req.body) === 'object' ?\n JSON.stringify(client_req.body, null, 2) :\n client_req.body);\n delete client_req.body;\n }\n // E.g. for extra 'foo' field on 'client_req', add\n // 'client_req.foo' at top-level. This *does* have the potential\n // to stomp on a literal 'client_req.foo' key.\n Object.keys(client_req).forEach(function (k) {\n rec['client_req.' + k] = client_req[k];\n })\n details.push(indent(s));\n }\n\n\n if (rec.res && typeof (rec.res) === 'object') {\n _res(rec.res);\n delete rec.res;\n }\n if (rec.client_res && typeof (rec.client_res) === 'object') {\n _res(rec.client_res);\n delete rec.res;\n }\n\n if (rec.err && rec.err.stack) {\n details.push(indent(rec.err.stack));\n delete rec.err;\n }\n\n var leftover = Object.keys(rec);\n for (var i = 0; i < leftover.length; i++) {\n var key = leftover[i];\n var value = rec[key];\n var stringified = false;\n if (typeof (value) !== 'string') {\n value = JSON.stringify(value, null, 2);\n stringified = true;\n }\n if (value.indexOf('\\n') !== -1 || value.length > 50) {\n details.push(indent(key + ': ' + value));\n } else if (!stringified && (value.indexOf(' ') != -1 ||\n value.length === 0))\n {\n extras.push(key + '=' + JSON.stringify(value));\n } else {\n extras.push(key + '=' + value);\n }\n }\n\n extras = stylize(\n (extras.length ? ' (' + extras.join(', ') + ')' : ''), 'brightBlack');\n details = stylize(\n (details.length ? details.join('\\n --\\n') + '\\n' : ''), 'brightBlack');\n if (!short)\n return format('%s %s: %s on %s%s:%s%s\\n%s',\n time,\n level,\n nameStr,\n hostname || '',\n src,\n onelineMsg,\n extras,\n details);\n else\n return format('%s %s %s:%s%s\\n%s',\n time,\n level,\n nameStr,\n onelineMsg,\n extras,\n details);\n break;\n\n case OM_INSPECT:\n return util.inspect(rec, false, Infinity, true) + '\\n';\n\n case OM_BUNYAN:\n if (opts.levelInString) {\n rec.level = mapLevelToName(rec.level);\n }\n return JSON.stringify(rec, null, 0) + '\\n';\n\n case OM_JSON:\n if (opts.levelInString) {\n rec.level = mapLevelToName(rec.level);\n }\n return JSON.stringify(rec, null, opts.jsonIndent) + '\\n';\n\n case OM_SIMPLE:\n /* JSSTYLED */\n // \n if (!isValidRecord(rec)) {\n return line + '\\n';\n }\n return format('%s - %s\\n',\n upperNameFromLevel[rec.level] || 'LVL' + rec.level,\n rec.msg);\n default:\n throw new Error('unknown output mode: '+opts.outputMode);\n }\n}\n\n", + "// ColorCodes explained: http://www.termsys.demon.co.uk/vtansi.htm\n'use strict';\n\nvar colorNums = {\n white : 37\n , black : 30\n , blue : 34\n , cyan : 36\n , green : 32\n , magenta : 35\n , red : 31\n , yellow : 33\n , brightBlack : 90\n , brightRed : 91\n , brightGreen : 92\n , brightYellow : 93\n , brightBlue : 94\n , brightMagenta : 95\n , brightCyan : 96\n , brightWhite : 97\n }\n , backgroundColorNums = {\n bgBlack : 40\n , bgRed : 41\n , bgGreen : 42\n , bgYellow : 43\n , bgBlue : 44\n , bgMagenta : 45\n , bgCyan : 46\n , bgWhite : 47\n , bgBrightBlack : 100\n , bgBrightRed : 101\n , bgBrightGreen : 102\n , bgBrightYellow : 103\n , bgBrightBlue : 104\n , bgBrightMagenta : 105\n , bgBrightCyan : 106\n , bgBrightWhite : 107\n } \n , colors = {};\n\n\nObject.keys(colorNums).forEach(function (k) {\n colors[k] = function (s) { \n return '\\u001b[' + colorNums[k] + 'm' + s + '\\u001b[39m';\n };\n});\n\nObject.keys(backgroundColorNums).forEach(function (k) {\n colors[k] = function (s) { \n return '\\u001b[' + backgroundColorNums[k] + 'm' + s + '\\u001b[49m';\n };\n});\n\nmodule.exports = colors;\n", + "'use strict';\n\n/*\n * Info: http://www.termsys.demon.co.uk/vtansi.htm#colors \n * Following caveats\n * bright - brightens the color (bold-blue is same as brigthtBlue)\n * dim - nothing on Mac or Linux\n * italic - nothing on Mac or Linux\n * underline - underlines string\n * blink - nothing on Mac or linux\n * inverse - background becomes foreground and vice versa\n *\n * In summary, the only styles that work are:\n * - bright, underline and inverse\n * - the others are only included for completeness\n */\n\nvar styleNums = {\n reset : [0, 22]\n , bright : [1, 22]\n , dim : [2, 22]\n , italic : [3, 23]\n , underline : [4, 24]\n , blink : [5, 25]\n , inverse : [7, 27]\n }\n , styles = {}\n ;\n\nObject.keys(styleNums).forEach(function (k) {\n styles[k] = function (s) { \n var open = styleNums[k][0]\n , close = styleNums[k][1];\n return '\\u001b[' + open + 'm' + s + '\\u001b[' + close + 'm';\n };\n});\n\nmodule.exports = styles;\n", + "module.exports = hasKeys\n\nfunction hasKeys(source) {\n return source !== null &&\n (typeof source === \"object\" ||\n typeof source === \"function\")\n}\n", + "var Keys = require(\"object-keys\")\nvar hasKeys = require(\"./has-keys\")\n\nmodule.exports = extend\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n if (!hasKeys(source)) {\n continue\n }\n\n var keys = Keys(source)\n\n for (var j = 0; j < keys.length; j++) {\n var name = keys[j]\n target[name] = source[name]\n }\n }\n\n return target\n}\n", + "var hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nvar isFunction = function (fn) {\n\tvar isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]';\n\tif (!isFunc && typeof window !== 'undefined') {\n\t\tisFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt;\n\t}\n\treturn isFunc;\n};\n\nmodule.exports = function forEach(obj, fn) {\n\tif (!isFunction(fn)) {\n\t\tthrow new TypeError('iterator must be a function');\n\t}\n\tvar i, k,\n\t\tisString = typeof obj === 'string',\n\t\tl = obj.length,\n\t\tcontext = arguments.length > 2 ? arguments[2] : null;\n\tif (l === +l) {\n\t\tfor (i = 0; i < l; i++) {\n\t\t\tif (context === null) {\n\t\t\t\tfn(isString ? obj.charAt(i) : obj[i], i, obj);\n\t\t\t} else {\n\t\t\t\tfn.call(context, isString ? obj.charAt(i) : obj[i], i, obj);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (k in obj) {\n\t\t\tif (hasOwn.call(obj, k)) {\n\t\t\t\tif (context === null) {\n\t\t\t\t\tfn(obj[k], k, obj);\n\t\t\t\t} else {\n\t\t\t\t\tfn.call(context, obj[k], k, obj);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n", + "module.exports = Object.keys || require('./shim');\n\n", + "var toString = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toString.call(value);\n\tvar isArguments = str === '[object Arguments]';\n\tif (!isArguments) {\n\t\tisArguments = str !== '[object Array]'\n\t\t\t&& value !== null\n\t\t\t&& typeof value === 'object'\n\t\t\t&& typeof value.length === 'number'\n\t\t\t&& value.length >= 0\n\t\t\t&& toString.call(value.callee) === '[object Function]';\n\t}\n\treturn isArguments;\n};\n\n", + "(function () {\n\t\"use strict\";\n\n\t// modified from https://github.com/kriskowal/es5-shim\n\tvar has = Object.prototype.hasOwnProperty,\n\t\ttoString = Object.prototype.toString,\n\t\tforEach = require('./foreach'),\n\t\tisArgs = require('./isArguments'),\n\t\thasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),\n\t\thasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'),\n\t\tdontEnums = [\n\t\t\t\"toString\",\n\t\t\t\"toLocaleString\",\n\t\t\t\"valueOf\",\n\t\t\t\"hasOwnProperty\",\n\t\t\t\"isPrototypeOf\",\n\t\t\t\"propertyIsEnumerable\",\n\t\t\t\"constructor\"\n\t\t],\n\t\tkeysShim;\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object',\n\t\t\tisFunction = toString.call(object) === '[object Function]',\n\t\t\tisArguments = isArgs(object),\n\t\t\ttheKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError(\"Object.keys called on a non-object\");\n\t\t}\n\n\t\tif (isArguments) {\n\t\t\tforEach(object, function (value) {\n\t\t\t\ttheKeys.push(value);\n\t\t\t});\n\t\t} else {\n\t\t\tvar name,\n\t\t\t\tskipProto = hasProtoEnumBug && isFunction;\n\n\t\t\tfor (name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar ctor = object.constructor,\n\t\t\t\tskipConstructor = ctor && ctor.prototype === object;\n\n\t\t\tforEach(dontEnums, function (dontEnum) {\n\t\t\t\tif (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) {\n\t\t\t\t\ttheKeys.push(dontEnum);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn theKeys;\n\t};\n\n\tmodule.exports = keysShim;\n}());\n\n", + "/**\n * Copyright (c) 2014 Trent Mick. All rights reserved.\n * Copyright (c) 2014 Joyent Inc. All rights reserved.\n *\n * The bunyan logging library for node.js.\n *\n * -*- mode: js -*-\n * vim: expandtab:ts=4:sw=4\n */\n\nvar VERSION = '1.4.0';\n\n// Bunyan log format version. This becomes the 'v' field on all log records.\n// `0` is until I release a version '1.0.0' of node-bunyan. Thereafter,\n// starting with `1`, this will be incremented if there is any backward\n// incompatible change to the log record format. Details will be in\n// 'CHANGES.md' (the change log).\nvar LOG_VERSION = 0;\n\n\nvar xxx = function xxx(s) { // internal dev/debug logging\n var args = ['XX' + 'X: '+s].concat(\n Array.prototype.slice.call(arguments, 1));\n console.error.apply(this, args);\n};\nvar xxx = function xxx() {}; // comment out to turn on debug logging\n\n\nvar os = require('os');\nvar fs = require('fs');\nvar util = require('util');\nvar assert = require('assert');\ntry {\n /* Use `+ ''` to hide this import from browserify. */\n var dtrace = require('dtrace-provider' + '');\n} catch (e) {\n dtrace = null;\n}\nvar EventEmitter = require('events').EventEmitter;\n\ntry {\n var safeJsonStringify = require('safe-json-stringify');\n} catch (e) {\n safeJsonStringify = null;\n}\nif (process.env.BUNYAN_TEST_NO_SAFE_JSON_STRINGIFY) {\n safeJsonStringify = null;\n}\n\n// The 'mv' module is required for rotating-file stream support.\ntry {\n /* Use `+ ''` to hide this import from browserify. */\n var mv = require('mv' + '');\n} catch (e) {\n mv = null;\n}\n\n// Are we in the browser (e.g. running via browserify)?\nvar isBrowser = function () {\n return typeof (window) !== 'undefined' && this === window; }();\n\ntry {\n /* Use `+ ''` to hide this import from browserify. */\n var sourceMapSupport = require('source-map-support' + '');\n} catch (_) {\n sourceMapSupport = null;\n}\n\n\n\n//---- Internal support stuff\n\n/**\n * A shallow copy of an object. Bunyan logging attempts to never cause\n * exceptions, so this function attempts to handle non-objects gracefully.\n */\nfunction objCopy(obj) {\n if (obj == null) { // null or undefined\n return obj;\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else if (typeof (obj) === 'object') {\n var copy = {};\n Object.keys(obj).forEach(function (k) {\n copy[k] = obj[k];\n });\n return copy;\n } else {\n return obj;\n }\n}\n\nvar format = util.format;\nif (!format) {\n // If node < 0.6, then use its `util.format`:\n // :\n var inspect = util.inspect;\n var formatRegExp = /%[sdj%]/g;\n format = function format(f) {\n if (typeof (f) !== 'string') {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function (x) {\n if (i >= len)\n return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j': return JSON.stringify(args[i++], safeCycles());\n case '%%': return '%';\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (x === null || typeof (x) !== 'object') {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n };\n}\n\n\n/**\n * Gather some caller info 3 stack levels up.\n * See .\n */\nfunction getCaller3Info() {\n var obj = {};\n var saveLimit = Error.stackTraceLimit;\n var savePrepare = Error.prepareStackTrace;\n Error.stackTraceLimit = 3;\n Error.captureStackTrace(this, getCaller3Info);\n\n Error.prepareStackTrace = function (_, stack) {\n var caller = stack[2];\n if (sourceMapSupport) {\n caller = sourceMapSupport.wrapCallSite(caller);\n }\n obj.file = caller.getFileName();\n obj.line = caller.getLineNumber();\n var func = caller.getFunctionName();\n if (func)\n obj.func = func;\n };\n this.stack;\n Error.stackTraceLimit = saveLimit;\n Error.prepareStackTrace = savePrepare;\n return obj;\n}\n\n\nfunction _indent(s, indent) {\n if (!indent) indent = ' ';\n var lines = s.split(/\\r?\\n/g);\n return indent + lines.join('\\n' + indent);\n}\n\n\n/**\n * Warn about an bunyan processing error.\n *\n * @param msg {String} Message with which to warn.\n * @param dedupKey {String} Optional. A short string key for this warning to\n * have its warning only printed once.\n */\nfunction _warn(msg, dedupKey) {\n assert.ok(msg);\n if (dedupKey) {\n if (_warned[dedupKey]) {\n return;\n }\n _warned[dedupKey] = true;\n }\n process.stderr.write(msg + '\\n');\n}\nfunction _haveWarned(dedupKey) {\n return _warned[dedupKey];\n}\nvar _warned = {};\n\n\nfunction ConsoleRawStream() {}\nConsoleRawStream.prototype.write = function (rec) {\n if (rec.level < INFO) {\n console.log(rec);\n } else if (rec.level < WARN) {\n console.info(rec);\n } else if (rec.level < ERROR) {\n console.warn(rec);\n } else {\n console.error(rec);\n }\n};\n\n\n//---- Levels\n\nvar TRACE = 10;\nvar DEBUG = 20;\nvar INFO = 30;\nvar WARN = 40;\nvar ERROR = 50;\nvar FATAL = 60;\n\nvar levelFromName = {\n 'trace': TRACE,\n 'debug': DEBUG,\n 'info': INFO,\n 'warn': WARN,\n 'error': ERROR,\n 'fatal': FATAL\n};\nvar nameFromLevel = {};\nObject.keys(levelFromName).forEach(function (name) {\n nameFromLevel[levelFromName[name]] = name;\n});\n\n// Dtrace probes.\nvar dtp = undefined;\nvar probes = dtrace && {};\n\n/**\n * Resolve a level number, name (upper or lowercase) to a level number value.\n *\n * @api public\n */\nfunction resolveLevel(nameOrNum) {\n var level = (typeof (nameOrNum) === 'string'\n ? levelFromName[nameOrNum.toLowerCase()]\n : nameOrNum);\n return level;\n}\n\n\n\n//---- Logger class\n\n/**\n * Create a Logger instance.\n *\n * @param options {Object} See documentation for full details. At minimum\n * this must include a 'name' string key. Configuration keys:\n * - `streams`: specify the logger output streams. This is an array of\n * objects with these fields:\n * - `type`: The stream type. See README.md for full details.\n * Often this is implied by the other fields. Examples are\n * 'file', 'stream' and \"raw\".\n * - `level`: Defaults to 'info'.\n * - `path` or `stream`: The specify the file path or writeable\n * stream to which log records are written. E.g.\n * `stream: process.stdout`.\n * - `closeOnExit` (boolean): Optional. Default is true for a\n * 'file' stream when `path` is given, false otherwise.\n * See README.md for full details.\n * - `level`: set the level for a single output stream (cannot be used\n * with `streams`)\n * - `stream`: the output stream for a logger with just one, e.g.\n * `process.stdout` (cannot be used with `streams`)\n * - `serializers`: object mapping log record field names to\n * serializing functions. See README.md for details.\n * - `src`: Boolean (default false). Set true to enable 'src' automatic\n * field with log call source info.\n * All other keys are log record fields.\n *\n * An alternative *internal* call signature is used for creating a child:\n * new Logger(, [, ]);\n *\n * @param _childSimple (Boolean) An assertion that the given `_childOptions`\n * (a) only add fields (no config) and (b) no serialization handling is\n * required for them. IOW, this is a fast path for frequent child\n * creation.\n */\nfunction Logger(options, _childOptions, _childSimple) {\n xxx('Logger start:', options)\n if (!(this instanceof Logger)) {\n return new Logger(options, _childOptions);\n }\n\n // Input arg validation.\n var parent;\n if (_childOptions !== undefined) {\n parent = options;\n options = _childOptions;\n if (!(parent instanceof Logger)) {\n throw new TypeError(\n 'invalid Logger creation: do not pass a second arg');\n }\n }\n if (!options) {\n throw new TypeError('options (object) is required');\n }\n if (!parent) {\n if (!options.name) {\n throw new TypeError('options.name (string) is required');\n }\n } else {\n if (options.name) {\n throw new TypeError(\n 'invalid options.name: child cannot set logger name');\n }\n }\n if (options.stream && options.streams) {\n throw new TypeError('cannot mix \"streams\" and \"stream\" options');\n }\n if (options.streams && !Array.isArray(options.streams)) {\n throw new TypeError('invalid options.streams: must be an array')\n }\n if (options.serializers && (typeof (options.serializers) !== 'object' ||\n Array.isArray(options.serializers))) {\n throw new TypeError('invalid options.serializers: must be an object')\n }\n\n EventEmitter.call(this);\n\n // Fast path for simple child creation.\n if (parent && _childSimple) {\n // `_isSimpleChild` is a signal to stream close handling that this child\n // owns none of its streams.\n this._isSimpleChild = true;\n\n this._level = parent._level;\n this.streams = parent.streams;\n this.serializers = parent.serializers;\n this.src = parent.src;\n var fields = this.fields = {};\n var parentFieldNames = Object.keys(parent.fields);\n for (var i = 0; i < parentFieldNames.length; i++) {\n var name = parentFieldNames[i];\n fields[name] = parent.fields[name];\n }\n var names = Object.keys(options);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n fields[name] = options[name];\n }\n return;\n }\n\n // Null values.\n var self = this;\n if (parent) {\n this._level = parent._level;\n this.streams = [];\n for (var i = 0; i < parent.streams.length; i++) {\n var s = objCopy(parent.streams[i]);\n s.closeOnExit = false; // Don't own parent stream.\n this.streams.push(s);\n }\n this.serializers = objCopy(parent.serializers);\n this.src = parent.src;\n this.fields = objCopy(parent.fields);\n if (options.level) {\n this.level(options.level);\n }\n } else {\n this._level = Number.POSITIVE_INFINITY;\n this.streams = [];\n this.serializers = null;\n this.src = false;\n this.fields = {};\n }\n\n if (!dtp && dtrace) {\n dtp = dtrace.createDTraceProvider('bunyan');\n\n for (var level in levelFromName) {\n var probe;\n\n probes[levelFromName[level]] = probe =\n dtp.addProbe('log-' + level, 'char *');\n\n // Explicitly add a reference to dtp to prevent it from being GC'd\n probe.dtp = dtp;\n }\n\n dtp.enable();\n }\n\n // Handle *config* options (i.e. options that are not just plain data\n // for log records).\n if (options.stream) {\n self.addStream({\n type: 'stream',\n stream: options.stream,\n closeOnExit: false,\n level: options.level\n });\n } else if (options.streams) {\n options.streams.forEach(function (s) {\n self.addStream(s, options.level);\n });\n } else if (parent && options.level) {\n this.level(options.level);\n } else if (!parent) {\n if (isBrowser) {\n /*\n * In the browser we'll be emitting to console.log by default.\n * Any console.log worth its salt these days can nicely render\n * and introspect objects (e.g. the Firefox and Chrome console)\n * so let's emit the raw log record. Are there browsers for which\n * that breaks things?\n */\n self.addStream({\n type: 'raw',\n stream: new ConsoleRawStream(),\n closeOnExit: false,\n level: options.level\n });\n } else {\n self.addStream({\n type: 'stream',\n stream: process.stdout,\n closeOnExit: false,\n level: options.level\n });\n }\n }\n if (options.serializers) {\n self.addSerializers(options.serializers);\n }\n if (options.src) {\n this.src = true;\n }\n xxx('Logger: ', self)\n\n // Fields.\n // These are the default fields for log records (minus the attributes\n // removed in this constructor). To allow storing raw log records\n // (unrendered), `this.fields` must never be mutated. Create a copy for\n // any changes.\n var fields = objCopy(options);\n delete fields.stream;\n delete fields.level;\n delete fields.streams;\n delete fields.serializers;\n delete fields.src;\n if (this.serializers) {\n this._applySerializers(fields);\n }\n if (!fields.hostname) {\n fields.hostname = os.hostname();\n }\n if (!fields.pid) {\n fields.pid = process.pid;\n }\n Object.keys(fields).forEach(function (k) {\n self.fields[k] = fields[k];\n });\n}\n\nutil.inherits(Logger, EventEmitter);\n\n\n/**\n * Add a stream\n *\n * @param stream {Object}. Object with these fields:\n * - `type`: The stream type. See README.md for full details.\n * Often this is implied by the other fields. Examples are\n * 'file', 'stream' and \"raw\".\n * - `path` or `stream`: The specify the file path or writeable\n * stream to which log records are written. E.g.\n * `stream: process.stdout`.\n * - `level`: Optional. Falls back to `defaultLevel`.\n * - `closeOnExit` (boolean): Optional. Default is true for a\n * 'file' stream when `path` is given, false otherwise.\n * See README.md for full details.\n * @param defaultLevel {Number|String} Optional. A level to use if\n * `stream.level` is not set. If neither is given, this defaults to INFO.\n */\nLogger.prototype.addStream = function addStream(s, defaultLevel) {\n var self = this;\n if (defaultLevel === null || defaultLevel === undefined) {\n defaultLevel = INFO;\n }\n\n s = objCopy(s);\n\n // Implicit 'type' from other args.\n var type = s.type;\n if (!s.type) {\n if (s.stream) {\n s.type = 'stream';\n } else if (s.path) {\n s.type = 'file'\n }\n }\n s.raw = (s.type === 'raw'); // PERF: Allow for faster check in `_emit`.\n\n if (s.level) {\n s.level = resolveLevel(s.level);\n } else {\n s.level = resolveLevel(defaultLevel);\n }\n if (s.level < self._level) {\n self._level = s.level;\n }\n\n switch (s.type) {\n case 'stream':\n if (!s.closeOnExit) {\n s.closeOnExit = false;\n }\n break;\n case 'file':\n if (!s.stream) {\n s.stream = fs.createWriteStream(s.path,\n {flags: 'a', encoding: 'utf8'});\n s.stream.on('error', function (err) {\n self.emit('error', err, s);\n });\n if (!s.closeOnExit) {\n s.closeOnExit = true;\n }\n } else {\n if (!s.closeOnExit) {\n s.closeOnExit = false;\n }\n }\n break;\n case 'rotating-file':\n assert.ok(!s.stream,\n '\"rotating-file\" stream should not give a \"stream\"');\n assert.ok(s.path);\n assert.ok(mv, '\"rotating-file\" stream type is not supported: '\n + 'missing \"mv\" module');\n s.stream = new RotatingFileStream(s);\n if (!s.closeOnExit) {\n s.closeOnExit = true;\n }\n break;\n case 'raw':\n if (!s.closeOnExit) {\n s.closeOnExit = false;\n }\n break;\n default:\n throw new TypeError('unknown stream type \"' + s.type + '\"');\n }\n\n self.streams.push(s);\n delete self.haveNonRawStreams; // reset\n}\n\n\n/**\n * Add serializers\n *\n * @param serializers {Object} Optional. Object mapping log record field names\n * to serializing functions. See README.md for details.\n */\nLogger.prototype.addSerializers = function addSerializers(serializers) {\n var self = this;\n\n if (!self.serializers) {\n self.serializers = {};\n }\n Object.keys(serializers).forEach(function (field) {\n var serializer = serializers[field];\n if (typeof (serializer) !== 'function') {\n throw new TypeError(format(\n 'invalid serializer for \"%s\" field: must be a function',\n field));\n } else {\n self.serializers[field] = serializer;\n }\n });\n}\n\n\n\n/**\n * Create a child logger, typically to add a few log record fields.\n *\n * This can be useful when passing a logger to a sub-component, e.g. a\n * 'wuzzle' component of your service:\n *\n * var wuzzleLog = log.child({component: 'wuzzle'})\n * var wuzzle = new Wuzzle({..., log: wuzzleLog})\n *\n * Then log records from the wuzzle code will have the same structure as\n * the app log, *plus the component='wuzzle' field*.\n *\n * @param options {Object} Optional. Set of options to apply to the child.\n * All of the same options for a new Logger apply here. Notes:\n * - The parent's streams are inherited and cannot be removed in this\n * call. Any given `streams` are *added* to the set inherited from\n * the parent.\n * - The parent's serializers are inherited, though can effectively be\n * overwritten by using duplicate keys.\n * - Can use `level` to set the level of the streams inherited from\n * the parent. The level for the parent is NOT affected.\n * @param simple {Boolean} Optional. Set to true to assert that `options`\n * (a) only add fields (no config) and (b) no serialization handling is\n * required for them. IOW, this is a fast path for frequent child\n * creation. See 'tools/timechild.js' for numbers.\n */\nLogger.prototype.child = function (options, simple) {\n return new (this.constructor)(this, options || {}, simple);\n}\n\n\n/**\n * A convenience method to reopen 'file' streams on a logger. This can be\n * useful with external log rotation utilities that move and re-open log files\n * (e.g. logrotate on Linux, logadm on SmartOS/Illumos). Those utilities\n * typically have rotation options to copy-and-truncate the log file, but\n * you may not want to use that. An alternative is to do this in your\n * application:\n *\n * var log = bunyan.createLogger(...);\n * ...\n * process.on('SIGUSR2', function () {\n * log.reopenFileStreams();\n * });\n * ...\n *\n * See .\n */\nLogger.prototype.reopenFileStreams = function () {\n var self = this;\n self.streams.forEach(function (s) {\n if (s.type === 'file') {\n if (s.stream) {\n // Not sure if typically would want this, or more immediate\n // `s.stream.destroy()`.\n s.stream.end();\n s.stream.destroySoon();\n delete s.stream;\n }\n s.stream = fs.createWriteStream(s.path,\n {flags: 'a', encoding: 'utf8'});\n s.stream.on('error', function (err) {\n self.emit('error', err, s);\n });\n }\n });\n};\n\n\n/* BEGIN JSSTYLED */\n/**\n * Close this logger.\n *\n * This closes streams (that it owns, as per 'endOnClose' attributes on\n * streams), etc. Typically you **don't** need to bother calling this.\nLogger.prototype.close = function () {\n if (this._closed) {\n return;\n }\n if (!this._isSimpleChild) {\n self.streams.forEach(function (s) {\n if (s.endOnClose) {\n xxx('closing stream s:', s);\n s.stream.end();\n s.endOnClose = false;\n }\n });\n }\n this._closed = true;\n}\n */\n/* END JSSTYLED */\n\n\n/**\n * Get/set the level of all streams on this logger.\n *\n * Get Usage:\n * // Returns the current log level (lowest level of all its streams).\n * log.level() -> INFO\n *\n * Set Usage:\n * log.level(INFO) // set all streams to level INFO\n * log.level('info') // can use 'info' et al aliases\n */\nLogger.prototype.level = function level(value) {\n if (value === undefined) {\n return this._level;\n }\n var newLevel = resolveLevel(value);\n var len = this.streams.length;\n for (var i = 0; i < len; i++) {\n this.streams[i].level = newLevel;\n }\n this._level = newLevel;\n}\n\n\n/**\n * Get/set the level of a particular stream on this logger.\n *\n * Get Usage:\n * // Returns an array of the levels of each stream.\n * log.levels() -> [TRACE, INFO]\n *\n * // Returns a level of the identified stream.\n * log.levels(0) -> TRACE // level of stream at index 0\n * log.levels('foo') // level of stream with name 'foo'\n *\n * Set Usage:\n * log.levels(0, INFO) // set level of stream 0 to INFO\n * log.levels(0, 'info') // can use 'info' et al aliases\n * log.levels('foo', WARN) // set stream named 'foo' to WARN\n *\n * Stream names: When streams are defined, they can optionally be given\n * a name. For example,\n * log = new Logger({\n * streams: [\n * {\n * name: 'foo',\n * path: '/var/log/my-service/foo.log'\n * level: 'trace'\n * },\n * ...\n *\n * @param name {String|Number} The stream index or name.\n * @param value {Number|String} The level value (INFO) or alias ('info').\n * If not given, this is a 'get' operation.\n * @throws {Error} If there is no stream with the given name.\n */\nLogger.prototype.levels = function levels(name, value) {\n if (name === undefined) {\n assert.equal(value, undefined);\n return this.streams.map(\n function (s) { return s.level });\n }\n var stream;\n if (typeof (name) === 'number') {\n stream = this.streams[name];\n if (stream === undefined) {\n throw new Error('invalid stream index: ' + name);\n }\n } else {\n var len = this.streams.length;\n for (var i = 0; i < len; i++) {\n var s = this.streams[i];\n if (s.name === name) {\n stream = s;\n break;\n }\n }\n if (!stream) {\n throw new Error(format('no stream with name \"%s\"', name));\n }\n }\n if (value === undefined) {\n return stream.level;\n } else {\n var newLevel = resolveLevel(value);\n stream.level = newLevel;\n if (newLevel < this._level) {\n this._level = newLevel;\n }\n }\n}\n\n\n/**\n * Apply registered serializers to the appropriate keys in the given fields.\n *\n * Pre-condition: This is only called if there is at least one serializer.\n *\n * @param fields (Object) The log record fields.\n * @param excludeFields (Object) Optional mapping of keys to `true` for\n * keys to NOT apply a serializer.\n */\nLogger.prototype._applySerializers = function (fields, excludeFields) {\n var self = this;\n\n xxx('_applySerializers: excludeFields', excludeFields);\n\n // Check each serializer against these (presuming number of serializers\n // is typically less than number of fields).\n Object.keys(this.serializers).forEach(function (name) {\n if (fields[name] === undefined ||\n (excludeFields && excludeFields[name]))\n {\n return;\n }\n xxx('_applySerializers; apply to \"%s\" key', name)\n try {\n fields[name] = self.serializers[name](fields[name]);\n } catch (err) {\n _warn(format('bunyan: ERROR: Exception thrown from the \"%s\" '\n + 'Bunyan serializer. This should never happen. This is a bug'\n + 'in that serializer function.\\n%s',\n name, err.stack || err));\n fields[name] = format('(Error in Bunyan log \"%s\" serializer '\n + 'broke field. See stderr for details.)', name);\n }\n });\n}\n\n\n/**\n * Emit a log record.\n *\n * @param rec {log record}\n * @param noemit {Boolean} Optional. Set to true to skip emission\n * and just return the JSON string.\n */\nLogger.prototype._emit = function (rec, noemit) {\n var i;\n\n // Lazily determine if this Logger has non-'raw' streams. If there are\n // any, then we need to stringify the log record.\n if (this.haveNonRawStreams === undefined) {\n this.haveNonRawStreams = false;\n for (i = 0; i < this.streams.length; i++) {\n if (!this.streams[i].raw) {\n this.haveNonRawStreams = true;\n break;\n }\n }\n }\n\n // Stringify the object. Attempt to warn/recover on error.\n var str;\n if (noemit || this.haveNonRawStreams) {\n try {\n str = JSON.stringify(rec, safeCycles()) + '\\n';\n } catch (e) {\n if (safeJsonStringify) {\n str = safeJsonStringify(rec) + '\\n';\n } else {\n var dedupKey = e.stack.split(/\\n/g, 2).join('\\n');\n _warn('bunyan: ERROR: Exception in '\n + '`JSON.stringify(rec)`. You can install the '\n + '\"safe-json-stringify\" module to have Bunyan fallback '\n + 'to safer stringification. Record:\\n'\n + _indent(format('%s\\n%s', util.inspect(rec), e.stack)),\n dedupKey);\n str = format('(Exception in JSON.stringify(rec): %j. '\n + 'See stderr for details.)\\n', e.message);\n }\n }\n }\n\n if (noemit)\n return str;\n\n var level = rec.level;\n for (i = 0; i < this.streams.length; i++) {\n var s = this.streams[i];\n if (s.level <= level) {\n xxx('writing log rec \"%s\" to \"%s\" stream (%d <= %d): %j',\n rec.msg, s.type, s.level, level, rec);\n s.stream.write(s.raw ? rec : str);\n }\n };\n\n return str;\n}\n\n\n/**\n * Build a log emitter function for level minLevel. I.e. this is the\n * creator of `log.info`, `log.error`, etc.\n */\nfunction mkLogEmitter(minLevel) {\n return function () {\n var log = this;\n\n function mkRecord(args) {\n var excludeFields;\n if (args[0] instanceof Error) {\n // `log.(err, ...)`\n fields = {\n // Use this Logger's err serializer, if defined.\n err: (log.serializers && log.serializers.err\n ? log.serializers.err(args[0])\n : Logger.stdSerializers.err(args[0]))\n };\n excludeFields = {err: true};\n if (args.length === 1) {\n msgArgs = [fields.err.message];\n } else {\n msgArgs = Array.prototype.slice.call(args, 1);\n }\n } else if (typeof (args[0]) !== 'object' && args[0] !== null ||\n Array.isArray(args[0])) {\n // `log.(msg, ...)`\n fields = null;\n msgArgs = Array.prototype.slice.call(args);\n } else if (Buffer.isBuffer(args[0])) { // `log.(buf, ...)`\n // Almost certainly an error, show `inspect(buf)`. See bunyan\n // issue #35.\n fields = null;\n msgArgs = Array.prototype.slice.call(args);\n msgArgs[0] = util.inspect(msgArgs[0]);\n } else { // `log.(fields, msg, ...)`\n fields = args[0];\n msgArgs = Array.prototype.slice.call(args, 1);\n }\n\n // Build up the record object.\n var rec = objCopy(log.fields);\n var level = rec.level = minLevel;\n var recFields = (fields ? objCopy(fields) : null);\n if (recFields) {\n if (log.serializers) {\n log._applySerializers(recFields, excludeFields);\n }\n Object.keys(recFields).forEach(function (k) {\n rec[k] = recFields[k];\n });\n }\n rec.msg = format.apply(log, msgArgs);\n if (!rec.time) {\n rec.time = (new Date());\n }\n // Get call source info\n if (log.src && !rec.src) {\n rec.src = getCaller3Info()\n }\n rec.v = LOG_VERSION;\n\n return rec;\n };\n\n var fields = null;\n var msgArgs = arguments;\n var str = null;\n var rec = null;\n if (! this._emit) {\n /*\n * Show this invalid Bunyan usage warning *once*.\n *\n * See for\n * an example of how this can happen.\n */\n var dedupKey = 'unbound';\n if (!_haveWarned[dedupKey]) {\n var caller = getCaller3Info();\n _warn(format('bunyan usage error: %s:%s: attempt to log '\n + 'with an unbound log method: `this` is: %s',\n caller.file, caller.line, util.inspect(this)),\n dedupKey);\n }\n return;\n } else if (arguments.length === 0) { // `log.()`\n return (this._level <= minLevel);\n } else if (this._level > minLevel) {\n /* pass through */\n } else {\n rec = mkRecord(msgArgs);\n str = this._emit(rec);\n }\n probes && probes[minLevel].fire(function () {\n return [ str ||\n (rec && log._emit(rec, true)) ||\n log._emit(mkRecord(msgArgs), true) ];\n });\n }\n}\n\n\n/**\n * The functions below log a record at a specific level.\n *\n * Usages:\n * log.() -> boolean is-trace-enabled\n * log.( err, [ msg, ...])\n * log.( msg, ...)\n * log.( fields, msg, ...)\n *\n * where is the lowercase version of the log level. E.g.:\n *\n * log.info()\n *\n * @params fields {Object} Optional set of additional fields to log.\n * @params msg {String} Log message. This can be followed by additional\n * arguments that are handled like\n * [util.format](http://nodejs.org/docs/latest/api/all.html#util.format).\n */\nLogger.prototype.trace = mkLogEmitter(TRACE);\nLogger.prototype.debug = mkLogEmitter(DEBUG);\nLogger.prototype.info = mkLogEmitter(INFO);\nLogger.prototype.warn = mkLogEmitter(WARN);\nLogger.prototype.error = mkLogEmitter(ERROR);\nLogger.prototype.fatal = mkLogEmitter(FATAL);\n\n\n\n//---- Standard serializers\n// A serializer is a function that serializes a JavaScript object to a\n// JSON representation for logging. There is a standard set of presumed\n// interesting objects in node.js-land.\n\nLogger.stdSerializers = {};\n\n// Serialize an HTTP request.\nLogger.stdSerializers.req = function req(req) {\n if (!req || !req.connection)\n return req;\n return {\n method: req.method,\n url: req.url,\n headers: req.headers,\n remoteAddress: req.connection.remoteAddress,\n remotePort: req.connection.remotePort\n };\n // Trailers: Skipping for speed. If you need trailers in your app, then\n // make a custom serializer.\n //if (Object.keys(trailers).length > 0) {\n // obj.trailers = req.trailers;\n //}\n};\n\n// Serialize an HTTP response.\nLogger.stdSerializers.res = function res(res) {\n if (!res || !res.statusCode)\n return res;\n return {\n statusCode: res.statusCode,\n header: res._header\n }\n};\n\n\n/*\n * This function dumps long stack traces for exceptions having a cause()\n * method. The error classes from\n * [verror](https://github.com/davepacheco/node-verror) and\n * [restify v2.0](https://github.com/mcavage/node-restify) are examples.\n *\n * Based on `dumpException` in\n * https://github.com/davepacheco/node-extsprintf/blob/master/lib/extsprintf.js\n */\nfunction getFullErrorStack(ex)\n{\n var ret = ex.stack || ex.toString();\n if (ex.cause && typeof (ex.cause) === 'function') {\n var cex = ex.cause();\n if (cex) {\n ret += '\\nCaused by: ' + getFullErrorStack(cex);\n }\n }\n return (ret);\n}\n\n// Serialize an Error object\n// (Core error properties are enumerable in node 0.4, not in 0.6).\nvar errSerializer = Logger.stdSerializers.err = function err(err) {\n if (!err || !err.stack)\n return err;\n var obj = {\n message: err.message,\n name: err.name,\n stack: getFullErrorStack(err),\n code: err.code,\n signal: err.signal\n }\n return obj;\n};\n\n\n// A JSON stringifier that handles cycles safely.\n// Usage: JSON.stringify(obj, safeCycles())\nfunction safeCycles() {\n var seen = [];\n return function (key, val) {\n if (!val || typeof (val) !== 'object') {\n return val;\n }\n if (seen.indexOf(val) !== -1) {\n return '[Circular]';\n }\n seen.push(val);\n return val;\n };\n}\n\n\n/**\n * XXX\n */\nif (mv) {\n\nfunction RotatingFileStream(options) {\n this.path = options.path;\n this.stream = fs.createWriteStream(this.path,\n {flags: 'a', encoding: 'utf8'});\n this.count = (options.count == null ? 10 : options.count);\n assert.equal(typeof (this.count), 'number',\n format('rotating-file stream \"count\" is not a number: %j (%s) in %j',\n this.count, typeof (this.count), this));\n assert.ok(this.count >= 0,\n format('rotating-file stream \"count\" is not >= 0: %j in %j',\n this.count, this));\n\n // Parse `options.period`.\n if (options.period) {\n // where scope is:\n // h hours (at the start of the hour)\n // d days (at the start of the day, i.e. just after midnight)\n // w weeks (at the start of Sunday)\n // m months (on the first of the month)\n // y years (at the start of Jan 1st)\n // with special values 'hourly' (1h), 'daily' (1d), \"weekly\" (1w),\n // 'monthly' (1m) and 'yearly' (1y)\n var period = {\n 'hourly': '1h',\n 'daily': '1d',\n 'weekly': '1w',\n 'monthly': '1m',\n 'yearly': '1y'\n }[options.period] || options.period;\n var m = /^([1-9][0-9]*)([hdwmy]|ms)$/.exec(period);\n if (!m) {\n throw new Error(format('invalid period: \"%s\"', options.period));\n }\n this.periodNum = Number(m[1]);\n this.periodScope = m[2];\n } else {\n this.periodNum = 1;\n this.periodScope = 'd';\n }\n\n // TODO: template support for backup files\n // template: \n // default is %P.%n\n // '/var/log/archive/foo.log' -> foo.log.%n\n // '/var/log/archive/foo.log.%n'\n // codes:\n // XXX support strftime codes (per node version of those)\n // or whatever module. Pick non-colliding for extra\n // codes\n // %P `path` base value\n // %n integer number of rotated log (1,2,3,...)\n // %d datetime in YYYY-MM-DD_HH-MM-SS\n // XXX what should default date format be?\n // prior art? Want to avoid ':' in\n // filenames (illegal on Windows for one).\n\n this.rotQueue = [];\n this.rotating = false;\n this._setupNextRot();\n}\n\nutil.inherits(RotatingFileStream, EventEmitter);\n\nRotatingFileStream.prototype._setupNextRot = function () {\n var self = this;\n this.rotAt = this._nextRotTime();\n var delay = this.rotAt - Date.now();\n // Cap timeout to Node's max setTimeout, see\n // .\n var TIMEOUT_MAX = 2147483647; // 2^31-1\n if (delay > TIMEOUT_MAX) {\n delay = TIMEOUT_MAX;\n }\n this.timeout = setTimeout(\n function () { self.rotate(); },\n delay);\n if (typeof (this.timeout.unref) === 'function') {\n this.timeout.unref();\n }\n}\n\nRotatingFileStream.prototype._nextRotTime = function _nextRotTime(first) {\n var _DEBUG = false;\n if (_DEBUG)\n console.log('-- _nextRotTime: %s%s', this.periodNum, this.periodScope);\n var d = new Date();\n\n if (_DEBUG) console.log(' now local: %s', d);\n if (_DEBUG) console.log(' now utc: %s', d.toISOString());\n var rotAt;\n switch (this.periodScope) {\n case 'ms':\n // Hidden millisecond period for debugging.\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum;\n } else {\n rotAt = Date.now() + this.periodNum;\n }\n break;\n case 'h':\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum * 60 * 60 * 1000;\n } else {\n // First time: top of the next hour.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(),\n d.getUTCDate(), d.getUTCHours() + 1);\n }\n break;\n case 'd':\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum * 24 * 60 * 60 * 1000;\n } else {\n // First time: start of tomorrow (i.e. at the coming midnight) UTC.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(),\n d.getUTCDate() + 1);\n }\n break;\n case 'w':\n // Currently, always on Sunday morning at 00:00:00 (UTC).\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum * 7 * 24 * 60 * 60 * 1000;\n } else {\n // First time: this coming Sunday.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(),\n d.getUTCDate() + (7 - d.getUTCDay()));\n }\n break;\n case 'm':\n if (this.rotAt) {\n rotAt = Date.UTC(d.getUTCFullYear(),\n d.getUTCMonth() + this.periodNum, 1);\n } else {\n // First time: the start of the next month.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth() + 1, 1);\n }\n break;\n case 'y':\n if (this.rotAt) {\n rotAt = Date.UTC(d.getUTCFullYear() + this.periodNum, 0, 1);\n } else {\n // First time: the start of the next year.\n rotAt = Date.UTC(d.getUTCFullYear() + 1, 0, 1);\n }\n break;\n default:\n assert.fail(format('invalid period scope: \"%s\"', this.periodScope));\n }\n\n if (_DEBUG) {\n console.log(' **rotAt**: %s (utc: %s)', rotAt,\n new Date(rotAt).toUTCString());\n var now = Date.now();\n console.log(' now: %s (%sms == %smin == %sh to go)',\n now,\n rotAt - now,\n (rotAt-now)/1000/60,\n (rotAt-now)/1000/60/60);\n }\n return rotAt;\n};\n\nRotatingFileStream.prototype.rotate = function rotate() {\n // XXX What about shutdown?\n var self = this;\n var _DEBUG = false;\n\n // If rotation period is > ~25 days, we have to break into multiple\n // setTimeout's. See .\n if (self.rotAt && self.rotAt > Date.now()) {\n return self._setupNextRot();\n }\n\n if (_DEBUG) {\n console.log('-- [%s, pid=%s] rotating %s',\n new Date(), process.pid, self.path);\n }\n if (self.rotating) {\n throw new TypeError('cannot start a rotation when already rotating');\n }\n self.rotating = true;\n\n self.stream.end(); // XXX can do moves sync after this? test at high rate\n\n function del() {\n var toDel = self.path + '.' + String(n - 1);\n if (n === 0) {\n toDel = self.path;\n }\n n -= 1;\n if (_DEBUG) console.log('rm %s', toDel);\n fs.unlink(toDel, function (delErr) {\n //XXX handle err other than not exists\n moves();\n });\n }\n\n function moves() {\n if (self.count === 0 || n < 0) {\n return finish();\n }\n var before = self.path;\n var after = self.path + '.' + String(n);\n if (n > 0) {\n before += '.' + String(n - 1);\n }\n n -= 1;\n fs.exists(before, function (exists) {\n if (!exists) {\n moves();\n } else {\n if (_DEBUG) {\n console.log('[pid %s] mv %s %s',\n process.pid, before, after);\n }\n mv(before, after, function (mvErr) {\n if (mvErr) {\n self.emit('error', mvErr);\n finish(); // XXX finish here?\n } else {\n moves();\n }\n });\n }\n })\n }\n\n function finish() {\n if (_DEBUG) console.log('[pid %s] open %s', process.pid, self.path);\n self.stream = fs.createWriteStream(self.path,\n {flags: 'a', encoding: 'utf8'});\n var q = self.rotQueue, len = q.length;\n for (var i = 0; i < len; i++) {\n self.stream.write(q[i]);\n }\n self.rotQueue = [];\n self.rotating = false;\n self.emit('drain');\n self._setupNextRot();\n }\n\n var n = this.count;\n del();\n};\n\nRotatingFileStream.prototype.write = function write(s) {\n if (this.rotating) {\n this.rotQueue.push(s);\n return false;\n } else {\n return this.stream.write(s);\n }\n};\n\nRotatingFileStream.prototype.end = function end(s) {\n this.stream.end();\n};\n\nRotatingFileStream.prototype.destroy = function destroy(s) {\n this.stream.destroy();\n};\n\nRotatingFileStream.prototype.destroySoon = function destroySoon(s) {\n this.stream.destroySoon();\n};\n\n} /* if (mv) */\n\n\n\n/**\n * RingBuffer is a Writable Stream that just stores the last N records in\n * memory.\n *\n * @param options {Object}, with the following fields:\n *\n * - limit: number of records to keep in memory\n */\nfunction RingBuffer(options) {\n this.limit = options && options.limit ? options.limit : 100;\n this.writable = true;\n this.records = [];\n EventEmitter.call(this);\n}\n\nutil.inherits(RingBuffer, EventEmitter);\n\nRingBuffer.prototype.write = function (record) {\n if (!this.writable)\n throw (new Error('RingBuffer has been ended already'));\n\n this.records.push(record);\n\n if (this.records.length > this.limit)\n this.records.shift();\n\n return (true);\n};\n\nRingBuffer.prototype.end = function () {\n if (arguments.length > 0)\n this.write.apply(this, Array.prototype.slice.call(arguments));\n this.writable = false;\n};\n\nRingBuffer.prototype.destroy = function () {\n this.writable = false;\n this.emit('close');\n};\n\nRingBuffer.prototype.destroySoon = function () {\n this.destroy();\n};\n\n\n//---- Exports\n\nmodule.exports = Logger;\n\nmodule.exports.TRACE = TRACE;\nmodule.exports.DEBUG = DEBUG;\nmodule.exports.INFO = INFO;\nmodule.exports.WARN = WARN;\nmodule.exports.ERROR = ERROR;\nmodule.exports.FATAL = FATAL;\nmodule.exports.resolveLevel = resolveLevel;\nmodule.exports.levelFromName = levelFromName;\nmodule.exports.nameFromLevel = nameFromLevel;\n\nmodule.exports.VERSION = VERSION;\nmodule.exports.LOG_VERSION = LOG_VERSION;\n\nmodule.exports.createLogger = function createLogger(options) {\n return new Logger(options);\n};\n\nmodule.exports.RingBuffer = RingBuffer;\nmodule.exports.RotatingFileStream = RotatingFileStream;\n\n// Useful for custom `type == 'raw'` streams that may do JSON stringification\n// of log records themselves. Usage:\n// var str = JSON.stringify(rec, bunyan.safeCycles());\nmodule.exports.safeCycles = safeCycles;\n", + "var hasProp = Object.prototype.hasOwnProperty;\n\nfunction throwsMessage(err) {\n\treturn '[Throws: ' + (err ? err.message : '?') + ']';\n}\n\nfunction safeGetValueFromPropertyOnObject(obj, property) {\n\tif (hasProp.call(obj, property)) {\n\t\ttry {\n\t\t\treturn obj[property];\n\t\t}\n\t\tcatch (err) {\n\t\t\treturn throwsMessage(err);\n\t\t}\n\t}\n\n\treturn obj[property];\n}\n\nfunction ensureProperties(obj) {\n\tvar seen = [ ]; // store references to objects we have seen before\n\n\tfunction visit(obj) {\n\t\tif (obj === null || typeof obj !== 'object') {\n\t\t\treturn obj;\n\t\t}\n\n\t\tif (seen.indexOf(obj) !== -1) {\n\t\t\treturn '[Circular]';\n\t\t}\n\t\tseen.push(obj);\n\n\t\tif (typeof obj.toJSON === 'function') {\n\t\t\ttry {\n\t\t\t\treturn visit(obj.toJSON());\n\t\t\t} catch(err) {\n\t\t\t\treturn throwsMessage(err);\n\t\t\t}\n\t\t}\n\n\t\tif (Array.isArray(obj)) {\n\t\t\treturn obj.map(visit);\n\t\t}\n\n\t\treturn Object.keys(obj).reduce(function(result, prop) {\n\t\t\t// prevent faulty defined getter properties\n\t\t\tresult[prop] = visit(safeGetValueFromPropertyOnObject(obj, prop));\n\t\t\treturn result;\n\t\t}, {});\n\t};\n\n\treturn visit(obj);\n}\n\nmodule.exports = function(data) {\n\treturn JSON.stringify(ensureProperties(data));\n}\n\nmodule.exports.ensureProperties = ensureProperties;\n", + "(function() {\n var exportedLog, ffSupport, formats, getOrderedMatches, hasMatches, isFF, isIE, isOpera, isSafari, log, makeArray, operaSupport, safariSupport, stringToArgs, _log;\n\n if (!(window.console && window.console.log)) {\n return;\n }\n\n log = function() {\n var args;\n args = [];\n makeArray(arguments).forEach(function(arg) {\n if (typeof arg === 'string') {\n return args = args.concat(stringToArgs(arg));\n } else {\n return args.push(arg);\n }\n });\n return _log.apply(window, args);\n };\n\n _log = function() {\n return console.log.apply(console, makeArray(arguments));\n };\n\n makeArray = function(arrayLikeThing) {\n return Array.prototype.slice.call(arrayLikeThing);\n };\n\n formats = [\n {\n regex: /\\*([^\\*]+)\\*/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['font-style: italic', ''];\n }\n }, {\n regex: /\\_([^\\_]+)\\_/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['font-weight: bold', ''];\n }\n }, {\n regex: /\\`([^\\`]+)\\`/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', ''];\n }\n }, {\n regex: /\\[c\\=(?:\\\"|\\')?((?:(?!(?:\\\"|\\')\\]).)*)(?:\\\"|\\')?\\]((?:(?!\\[c\\]).)*)\\[c\\]/,\n replacer: function(m, p1, p2) {\n return \"%c\" + p2 + \"%c\";\n },\n styles: function(match) {\n return [match[1], ''];\n }\n }\n ];\n\n hasMatches = function(str) {\n var _hasMatches;\n _hasMatches = false;\n formats.forEach(function(format) {\n if (format.regex.test(str)) {\n return _hasMatches = true;\n }\n });\n return _hasMatches;\n };\n\n getOrderedMatches = function(str) {\n var matches;\n matches = [];\n formats.forEach(function(format) {\n var match;\n match = str.match(format.regex);\n if (match) {\n return matches.push({\n format: format,\n match: match\n });\n }\n });\n return matches.sort(function(a, b) {\n return a.match.index - b.match.index;\n });\n };\n\n stringToArgs = function(str) {\n var firstMatch, matches, styles;\n styles = [];\n while (hasMatches(str)) {\n matches = getOrderedMatches(str);\n firstMatch = matches[0];\n str = str.replace(firstMatch.format.regex, firstMatch.format.replacer);\n styles = styles.concat(firstMatch.format.styles(firstMatch.match));\n }\n return [str].concat(styles);\n };\n\n isSafari = function() {\n return /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);\n };\n\n isOpera = function() {\n return /OPR/.test(navigator.userAgent) && /Opera/.test(navigator.vendor);\n };\n\n isFF = function() {\n return /Firefox/.test(navigator.userAgent);\n };\n\n isIE = function() {\n return /MSIE/.test(navigator.userAgent);\n };\n\n safariSupport = function() {\n var m;\n m = navigator.userAgent.match(/AppleWebKit\\/(\\d+)\\.(\\d+)(\\.|\\+|\\s)/);\n if (!m) {\n return false;\n }\n return 537.38 <= parseInt(m[1], 10) + (parseInt(m[2], 10) / 100);\n };\n\n operaSupport = function() {\n var m;\n m = navigator.userAgent.match(/OPR\\/(\\d+)\\./);\n if (!m) {\n return false;\n }\n return 15 <= parseInt(m[1], 10);\n };\n\n ffSupport = function() {\n return window.console.firebug || window.console.exception;\n };\n\n if (isIE() || (isFF() && !ffSupport()) || (isOpera() && !operaSupport()) || (isSafari() && !safariSupport())) {\n exportedLog = _log;\n } else {\n exportedLog = log;\n }\n\n exportedLog.l = _log;\n\n if (typeof define === 'function' && define.amd) {\n define(exportedLog);\n } else if (typeof exports !== 'undefined') {\n module.exports = exportedLog;\n } else {\n window.log = exportedLog;\n }\n\n}).call(this);\n", + "RotatingFileStream = null; // see: https://github.com/trentm/node-bunyan/issues/223\nbunyan = require('bunyan');\nbunyanFormat = require('bunyan-format');\n\nvar WritableStream = require('stream').Writable;\nvar inherits = require('util').inherits;\nvar logStyle = require('log-with-style');\n\ninherits(BrowserStdout, WritableStream);\n\nfunction BrowserStdout() {\n if (!(this instanceof BrowserStdout)) {\n return new BrowserStdout();\n }\n WritableStream.call(this);\n}\n\nBrowserStdout.prototype._write = function(chunks, encoding, cb) {\n var output = JSON.parse(chunks.toString ? chunks.toString() : chunks);\n var color = '[c=\"color: green\"]';\n var level = 'INFO';\n if (output.level > 40) {\n color = '[c=\"color: red\"]';\n if (output.level === 60) {\n level = 'FATAL';\n } else {\n level = 'ERROR';\n }\n } else if (output.level === 40) {\n color = '[c=\"color: orange\"]';\n level = 'WARNING';\n } else if (output.level === 20) {\n level = 'DEBUG';\n } else if (output.level === 10) {\n level = 'TRACE';\n }\n logStyle(color + level + '[c] ' + '[c=\"color: blue\"]' + output.name + '[c] ' + output.msg);\n process.nextTick(cb);\n};\n\n// Import process.stdout and process.stderr\nprocess = require('process');\nprocess.stdout = BrowserStdout();\nprocess.stderr = BrowserStdout();\n\norion.logFormatter = BrowserStdout();\n" + ] +} \ No newline at end of file diff --git a/packages/logging/logging_server.js b/packages/logging/logging_server.js new file mode 100644 index 0000000..e055ad2 --- /dev/null +++ b/packages/logging/logging_server.js @@ -0,0 +1,5 @@ +bunyan = Npm.require('bunyan'); +bunyanFormat = Npm.require('bunyan-format'); + +// Formatter +orion.logFormatter = bunyanFormat({outputMode: 'short', color: true}); diff --git a/packages/logging/package.js b/packages/logging/package.js new file mode 100644 index 0000000..9393362 --- /dev/null +++ b/packages/logging/package.js @@ -0,0 +1,34 @@ +Package.describe({ + name: 'orionjs:logging', + version: '1.4.0', + summary: 'Orion - Logger', + git: 'https://github.com/orionjs/orion', + documentation: 'README.md' +}); + +Package.onUse(function(api) { + // Meteor version compatibility + api.versionsFrom('1.0'); + + // NPM modules + Npm.depends({ + 'bunyan': '1.4.0', + 'bunyan-format': '0.2.1', + 'process': '0.11.1', + 'log-with-style': '0.1.5' + }); + + // Exported dependencies + api.use(['cosmos:browserify@0.5.0'], 'client'); + api.use('orionjs:namespace'); + + // Exported files + api.addFiles('logging_client.browserify.js', 'client'); + api.addFiles('logging_server.js', 'server'); + api.addFiles('logging_both.js'); + + // Exported variables + api.export(['orion', 'bunyan', 'formatter']); + api.export('process', 'client'); + api.export('bunyanFormat', 'server'); +}); diff --git a/packages/namespace/README.md b/packages/namespace/README.md new file mode 100644 index 0000000..daa7e82 --- /dev/null +++ b/packages/namespace/README.md @@ -0,0 +1,2 @@ +# OrionJS - Namespace +Provide a global namespace for all OrionJS's packages. diff --git a/packages/namespace/init.js b/packages/namespace/init.js new file mode 100644 index 0000000..a6b527c --- /dev/null +++ b/packages/namespace/init.js @@ -0,0 +1,2 @@ +// Initiate a global namespace +orion = {}; diff --git a/packages/namespace/package.js b/packages/namespace/package.js new file mode 100644 index 0000000..e7c06dd --- /dev/null +++ b/packages/namespace/package.js @@ -0,0 +1,20 @@ +Package.describe({ + name: 'orionjs:namespace', + version: '1.3.0', + summary: 'Orion - Namespace', + git: 'https://github.com/orionjs/orion', + documentation: 'README.md' +}); + +Package.onUse(function(api) { + // Meteor version compatibility + api.versionsFrom('1.0'); + + // Exported files + api.addFiles([ + 'init.js', + ]); + + // Exported variables + api.export('orion'); +}); From 6cf2347ff6e91b796393b9290ee3e4d10f49b8dd Mon Sep 17 00:00:00 2001 From: PEM-- Date: Sat, 15 Aug 2015 12:32:24 +0200 Subject: [PATCH 3/8] Namespace & Logging package --- packages/logging/package.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/logging/package.js b/packages/logging/package.js index 9393362..64b4e4f 100644 --- a/packages/logging/package.js +++ b/packages/logging/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'orionjs:logging', - version: '1.4.0', + version: '1.3.0', summary: 'Orion - Logger', git: 'https://github.com/orionjs/orion', documentation: 'README.md' From f8400a6da8a05aad7a377fb4ffbcc0b58dc3dd0d Mon Sep 17 00:00:00 2001 From: PEM-- Date: Sat, 15 Aug 2015 13:07:50 +0200 Subject: [PATCH 4/8] Namespace & Logging package --- packages/attributes/attributes.js | 4 ---- packages/base/package.js | 19 +++---------------- packages/logging/package.js | 2 +- packages/relationships/relationships.js | 6 ------ 4 files changed, 4 insertions(+), 27 deletions(-) diff --git a/packages/attributes/attributes.js b/packages/attributes/attributes.js index 0a806e3..0c725ef 100644 --- a/packages/attributes/attributes.js +++ b/packages/attributes/attributes.js @@ -112,8 +112,4 @@ orion.attributes.registerAttribute = function(name, attribute) { }); }); } -<<<<<<< d7b5207b4790c1b09545c50e7a26a40156fec7a3 -} -======= }; ->>>>>>> Linting & Hoisting & package bumped diff --git a/packages/base/package.js b/packages/base/package.js index 377001e..b692153 100644 --- a/packages/base/package.js +++ b/packages/base/package.js @@ -1,15 +1,7 @@ Package.describe({ name: 'orionjs:base', summary: 'Orion', -<<<<<<< e053de23a3f5383f8c48dcfe848e2d32757f4a94 -<<<<<<< d7b5207b4790c1b09545c50e7a26a40156fec7a3 - version: '1.4.1', -======= - version: '1.3.1', ->>>>>>> Linting & Hoisting & package bumped -======= - version: '1.3.2', ->>>>>>> Namespace & Logging package + version: '1.4.2', git: 'https://github.com/orionjs/orion' }); @@ -24,13 +16,8 @@ Package.onUse(function(api) { 'nicolaslopezj:roles@1.2.0', 'nicolaslopezj:router-layer@0.0.8', 'aldeed:simple-schema@1.3.3', -<<<<<<< d7b5207b4790c1b09545c50e7a26a40156fec7a3 - 'orionjs:lang-en@1.4.0' -======= - 'zimme:active-route@2.3.0', - 'orionjs:logging@1.3.0', - 'orionjs:lang-en@1.3.1' ->>>>>>> Linting & Hoisting & package bumped + 'orionjs:lang-en@1.4.0', + 'orionjs:logging@1.4.0' ]); api.imply([ diff --git a/packages/logging/package.js b/packages/logging/package.js index 64b4e4f..9393362 100644 --- a/packages/logging/package.js +++ b/packages/logging/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'orionjs:logging', - version: '1.3.0', + version: '1.4.0', summary: 'Orion - Logger', git: 'https://github.com/orionjs/orion', documentation: 'README.md' diff --git a/packages/relationships/relationships.js b/packages/relationships/relationships.js index 10c7e44..0595bcd 100644 --- a/packages/relationships/relationships.js +++ b/packages/relationships/relationships.js @@ -15,15 +15,9 @@ var initSelect = function(template, dataContext, schema, options) { var onRendered = function() { var template = this; template.autorun(function() { -<<<<<<< d7b5207b4790c1b09545c50e7a26a40156fec7a3 RouterLayer.isActiveRoute('admin'); - template.$('select')[0].selectize && template.$('select')[0].selectize.destroy(); - }) -======= - Router.current(); if (template.$('select')[0].selectize !== null) template.$('select')[0].selectize.destroy(); }); ->>>>>>> Linting & Hoisting & package bumped template.autorun(function () { var dataContext = Template.currentData(); var schema = AutoForm.getSchemaForField(dataContext.name); From 9869dcdfc6db850aafc0fd43398f31db9340067c Mon Sep 17 00:00:00 2001 From: PEM-- Date: Sat, 15 Aug 2015 13:14:11 +0200 Subject: [PATCH 5/8] Namespace & Logging package & Linting --- packages/accounts/create/admin.js | 8 ++++---- packages/collections/collections_client.js | 12 ++++++------ packages/config/config_server.js | 4 ++-- packages/dictionary/dictionary_server.js | 2 +- packages/file-attribute/file.js | 2 +- packages/froala/froala.js | 2 +- packages/image-attribute/image.js | 2 +- packages/image-attribute/images.js | 2 +- packages/summernote/summernote.js | 2 +- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/accounts/create/admin.js b/packages/accounts/create/admin.js index 524cfaf..a5601e6 100644 --- a/packages/accounts/create/admin.js +++ b/packages/accounts/create/admin.js @@ -47,7 +47,7 @@ if (Meteor.isClient) { orion.accounts.invitations.insert({ roles: roles, email: email }, function(error, result) { if (error) { alert(error.reason); - console.log(error); + orion.log.error(error); } else { Session.set('accounts.create.invitationId', result); } @@ -69,7 +69,7 @@ if (Meteor.isClient) { Meteor.call('accountsCreateUser', options, function(error, result) { if (error) { alert(error.reason); - console.log(error); + orion.log.error(error); } else { RouterLayer.go('accounts.index'); } @@ -144,12 +144,12 @@ if (Meteor.isClient) { }, function(error, result) { if (error) { Session.set('registerWithInvitationError', error.reason); - console.log(error); + orion.log.error(error); } else { Meteor.loginWithPassword(email, password, function(error) { if (error) { Session.set('registerWithInvitationError', error.reason); - console.log(error); + orion.log.error(error); } else { RouterLayer.go('admin'); } diff --git a/packages/collections/collections_client.js b/packages/collections/collections_client.js index 1e2b0c9..0c1f89b 100644 --- a/packages/collections/collections_client.js +++ b/packages/collections/collections_client.js @@ -17,12 +17,12 @@ orion.collections.onCreated(function() { var getCollection = function() { var collection = null; try { - collection = orion.collections.list[RouterLayer.getPath().split('/')[2]] + collection = orion.collections.list[RouterLayer.getPath().split('/')[2]]; } catch (e) { - console.log('Error getting collection', e); + orion.log.error('Error getting collection', e); } return collection; - } + }; ReactiveTemplates.helpers('collections.' + self.name + '.index', { collection: function() { @@ -45,7 +45,7 @@ orion.collections.onCreated(function() { ReactiveTemplates.helpers('collections.' + self.name + '.update', { collection: function() { - return getCollection() + return getCollection(); }, item: function() { return getCollection().findOne(RouterLayer.getParam('_id')); @@ -73,7 +73,7 @@ orion.collections.onCreated(function() { var objectId = RouterLayer.getParam('_id'); self.remove(objectId, function(error, result) { if (error) { - console.warn('Error while deleting', objectId, 'in collection', getCollection().name, ':', error); + orion.log.warn('Error while deleting', objectId, 'in collection', getCollection().name, ':', error); } // Only go back to index in case the deletion has been properly achieved if (result === 1) { @@ -82,4 +82,4 @@ orion.collections.onCreated(function() { }); } }); -}) +}); diff --git a/packages/config/config_server.js b/packages/config/config_server.js index 359c061..8758425 100644 --- a/packages/config/config_server.js +++ b/packages/config/config_server.js @@ -4,7 +4,7 @@ orion.config.collection.after.update(function (userId, doc, fieldNames, modifier, options) { // Timeout is necessary to no enter a infinit loop of restarts Meteor.setTimeout(function () { - console.log('Updating Orion config'); + orion.log.info('Updating Orion config'); process.exit(); }, 500); }); @@ -14,7 +14,7 @@ orion.config.collection.after.update(function (userId, doc, fieldNames, modifier */ if (orion.config.collection.find().count() === 0) { orion.config.collection.insert({}, function(){ - console.log("Orion config initialized"); + orion.log.info("Orion config initialized"); }); } diff --git a/packages/dictionary/dictionary_server.js b/packages/dictionary/dictionary_server.js index d9da5b0..4605702 100644 --- a/packages/dictionary/dictionary_server.js +++ b/packages/dictionary/dictionary_server.js @@ -4,7 +4,7 @@ if (orion.dictionary.find().count() != 1) { orion.dictionary.remove({}); orion.dictionary.insert({}, function(){ - console.log("Orion dictionary initialized"); + orion.log.info('Orion dictionary initialized'); }); } diff --git a/packages/file-attribute/file.js b/packages/file-attribute/file.js index e7defd6..aae3750 100644 --- a/packages/file-attribute/file.js +++ b/packages/file-attribute/file.js @@ -24,7 +24,7 @@ ReactiveTemplates.events('attribute.file', { if (upload.ready()) { if (upload.error) { Session.set('file' + self.name, null); - console.log(upload.error); + orion.log.error(upload.error); alert(upload.error.reason); } else { Session.set('file' + self.name, { diff --git a/packages/froala/froala.js b/packages/froala/froala.js index 1b123f1..a7e69a3 100644 --- a/packages/froala/froala.js +++ b/packages/froala/froala.js @@ -24,7 +24,7 @@ ReactiveTemplates.onRendered('attribute.froala', function () { Tracker.autorun(function () { if (upload.ready()) { if (upload.error) { - console.log(upload.error, "error uploading file"); + orion.log.error(upload.error, 'error uploading file'); } else { element.editable("insertHTML", "", true); } diff --git a/packages/image-attribute/image.js b/packages/image-attribute/image.js index ceb0f28..2309275 100644 --- a/packages/image-attribute/image.js +++ b/packages/image-attribute/image.js @@ -52,7 +52,7 @@ ReactiveTemplates.events('attribute.image', { if (upload.ready()) { if (upload.error) { Session.set('image' + self.name, null); - console.log(upload.error); + orion.log.error(upload.error); alert(upload.error.reason); } else { var information = orion.helpers.analizeColorFromBase64(base64); diff --git a/packages/image-attribute/images.js b/packages/image-attribute/images.js index 0e2e34b..58d3964 100644 --- a/packages/image-attribute/images.js +++ b/packages/image-attribute/images.js @@ -44,7 +44,7 @@ ReactiveTemplates.events('attribute.images', { Tracker.autorun(function () { if (upload.ready()) { if (upload.error) { - console.log(upload.error); + orion.log.error(upload.error); alert(upload.error.reason); } else { var information = orion.helpers.analizeColorFromBase64(base64); diff --git a/packages/summernote/summernote.js b/packages/summernote/summernote.js index be6ba8e..5512fdd 100644 --- a/packages/summernote/summernote.js +++ b/packages/summernote/summernote.js @@ -15,7 +15,7 @@ ReactiveTemplates.onRendered('attribute.summernote', function() { Tracker.autorun(function () { if (upload.ready()) { if (upload.error) { - console.log(upload.error); + orion.log.error(upload.error); alert(upload.error.reason); } else { editor.insertImage($editable, upload.url); From 631b38237296113e6742860c9dd1adf388731615 Mon Sep 17 00:00:00 2001 From: PEM-- Date: Sat, 15 Aug 2015 13:32:01 +0200 Subject: [PATCH 6/8] Package number updated for easier publishing --- packages/accounts/package.js | 4 ++-- packages/attributes/package.js | 4 ++-- packages/base/package.js | 1 + packages/bootstrap/package.js | 4 ++-- packages/collections/package.js | 4 ++-- packages/config/package.js | 4 ++-- packages/core/package.js | 10 +++++----- packages/dictionary/package.js | 4 ++-- packages/file-attribute/package.js | 8 ++++---- packages/filesystem/package.js | 4 ++-- packages/froala/package.js | 8 ++++---- packages/image-attribute/package.js | 8 ++++---- packages/materialize/package.js | 4 ++-- packages/namespace/package.js | 2 +- packages/pages/package.js | 4 ++-- packages/relationships/package.js | 6 +++--- packages/s3/package.js | 8 ++++---- packages/summernote/package.js | 8 ++++---- 18 files changed, 48 insertions(+), 47 deletions(-) diff --git a/packages/accounts/package.js b/packages/accounts/package.js index afcaf43..7e13efc 100644 --- a/packages/accounts/package.js +++ b/packages/accounts/package.js @@ -9,8 +9,8 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.0', - 'orionjs:attributes@1.4.0', + 'orionjs:base@1.4.2', + 'orionjs:attributes@1.4.1', 'accounts-base', 'accounts-password', 'useraccounts:core@1.12.0', diff --git a/packages/attributes/package.js b/packages/attributes/package.js index adaf660..711b60e 100644 --- a/packages/attributes/package.js +++ b/packages/attributes/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:attributes', summary: 'Orion attributes', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/orion' }); @@ -9,7 +9,7 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.0', + 'orionjs:base@1.4.2', 'aldeed:collection2@2.3.3', 'aldeed:autoform@5.4.0', 'momentjs:moment@2.10.6' diff --git a/packages/base/package.js b/packages/base/package.js index b692153..8bb5607 100644 --- a/packages/base/package.js +++ b/packages/base/package.js @@ -16,6 +16,7 @@ Package.onUse(function(api) { 'nicolaslopezj:roles@1.2.0', 'nicolaslopezj:router-layer@0.0.8', 'aldeed:simple-schema@1.3.3', + 'orionjs:namespace@1.4.0', 'orionjs:lang-en@1.4.0', 'orionjs:logging@1.4.0' ]); diff --git a/packages/bootstrap/package.js b/packages/bootstrap/package.js index e2b06a0..829af08 100644 --- a/packages/bootstrap/package.js +++ b/packages/bootstrap/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:bootstrap', summary: 'A simple theme for orion', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/orion' }); @@ -10,7 +10,7 @@ Package.onUse(function(api) { api.use([ 'meteor-platform', - 'orionjs:core@1.4.0', + 'orionjs:core@1.4.1', 'less', 'aldeed:autoform@5.4.0', 'aldeed:tabular@1.2.0', diff --git a/packages/collections/package.js b/packages/collections/package.js index 190aa11..70b4b9a 100755 --- a/packages/collections/package.js +++ b/packages/collections/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:collections', summary: 'Meteor collection with some magic', - version: '1.4.1', + version: '1.4.2', git: 'https://github.com/orionjs/orion' }); @@ -9,7 +9,7 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.1', + 'orionjs:base@1.4.2', 'underscore', 'aldeed:simple-schema@1.3.3', 'aldeed:collection2@2.3.3', diff --git a/packages/config/package.js b/packages/config/package.js index 40ab75e..317cc20 100644 --- a/packages/config/package.js +++ b/packages/config/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:config', summary: 'Orion Filesystem', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/orion' }); @@ -10,7 +10,7 @@ Package.onUse(function(api) { api.use([ 'orionjs:lang-en@1.4.0', - 'orionjs:base@1.4.0', + 'orionjs:base@1.4.2', 'aldeed:simple-schema@1.3.3', 'aldeed:collection2@2.3.3', 'matb33:collection-hooks@0.7.13', diff --git a/packages/core/package.js b/packages/core/package.js index b3550ea..63fd68e 100644 --- a/packages/core/package.js +++ b/packages/core/package.js @@ -9,12 +9,12 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.0', + 'orionjs:base@1.4.2', 'orionjs:accounts@1.4.3', - 'orionjs:config@1.4.0', - 'orionjs:collections@1.4.0', - 'orionjs:dictionary@1.4.0', - 'orionjs:attributes@1.4.0', + 'orionjs:config@1.4.1', + 'orionjs:collections@1.4.2', + 'orionjs:dictionary@1.4.1', + 'orionjs:attributes@1.4.1', 'orionjs:lang-en@1.4.0' ]); diff --git a/packages/dictionary/package.js b/packages/dictionary/package.js index 40c46e0..cbc3b81 100644 --- a/packages/dictionary/package.js +++ b/packages/dictionary/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:dictionary', summary: 'Meteor collection with some magic', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/orion' }); @@ -9,7 +9,7 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.0', + 'orionjs:base@1.4.2', 'aldeed:simple-schema@1.3.3', 'aldeed:collection2@2.3.3', ]); diff --git a/packages/file-attribute/package.js b/packages/file-attribute/package.js index 86985f9..3ae2b2a 100644 --- a/packages/file-attribute/package.js +++ b/packages/file-attribute/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:file-attribute', summary: 'File attribute for orion', - version: '1.4.0', + version: '1.4.1', git: 'http://github.com/orionjs/orion' }); @@ -9,9 +9,9 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.0', - 'orionjs:attributes@1.4.0', - 'orionjs:filesystem@1.4.0', + 'orionjs:base@1.4.2', + 'orionjs:attributes@1.4.1', + 'orionjs:filesystem@1.4.1', 'less' ]); diff --git a/packages/filesystem/package.js b/packages/filesystem/package.js index ccf45ca..39d3ecd 100644 --- a/packages/filesystem/package.js +++ b/packages/filesystem/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:filesystem', summary: 'Orion Filesystem', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/orion' }); @@ -9,7 +9,7 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.0', + 'orionjs:base@1.4.2', 'aldeed:collection2@2.3.3' ]); diff --git a/packages/froala/package.js b/packages/froala/package.js index e348efc..349257e 100644 --- a/packages/froala/package.js +++ b/packages/froala/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:froala', summary: 'Froala editor for orion', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/orion' }); @@ -9,10 +9,10 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.0', - 'orionjs:attributes@1.4.0', + 'orionjs:base@1.4.2', + 'orionjs:attributes@1.4.1', 'less', - 'orionjs:filesystem@1.4.0', + 'orionjs:filesystem@1.4.1', 'froala:editor@1.2.8', ]); diff --git a/packages/image-attribute/package.js b/packages/image-attribute/package.js index 99f8884..b57a5b8 100644 --- a/packages/image-attribute/package.js +++ b/packages/image-attribute/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:image-attribute', summary: 'Image attribute for orion', - version: '1.4.0', + version: '1.4.1', git: 'http://github.com/orionjs/orion' }); @@ -9,9 +9,9 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.0', - 'orionjs:attributes@1.4.0', - 'orionjs:filesystem@1.4.0', + 'orionjs:base@1.4.2', + 'orionjs:attributes@1.4.1', + 'orionjs:filesystem@1.4.1', 'less' ]); diff --git a/packages/materialize/package.js b/packages/materialize/package.js index 2c03611..83c6592 100644 --- a/packages/materialize/package.js +++ b/packages/materialize/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:materialize', summary: 'Materialize theme for orion admin', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/orion' }); @@ -10,7 +10,7 @@ Package.onUse(function(api) { api.use([ 'meteor-platform', - 'orionjs:core@1.4.0', + 'orionjs:core@1.4.1', 'less', 'aldeed:autoform@5.4.0', 'nicolaslopezj:tabular-materialize@1.2.1', diff --git a/packages/namespace/package.js b/packages/namespace/package.js index e7c06dd..b32f2d6 100644 --- a/packages/namespace/package.js +++ b/packages/namespace/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'orionjs:namespace', - version: '1.3.0', + version: '1.4.0', summary: 'Orion - Namespace', git: 'https://github.com/orionjs/orion', documentation: 'README.md' diff --git a/packages/pages/package.js b/packages/pages/package.js index 3de1b39..c675bdd 100644 --- a/packages/pages/package.js +++ b/packages/pages/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:pages', summary: 'Pages for Orion CMS', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/pages' }); @@ -10,7 +10,7 @@ Package.onUse(function(api) { api.use([ 'meteor-platform', - 'orionjs:base@1.4.0', + 'orionjs:base@1.4.2', 'aldeed:collection2@2.3.3', 'aldeed:autoform@5.4.0' ]); diff --git a/packages/relationships/package.js b/packages/relationships/package.js index 504aa10..e6300cc 100644 --- a/packages/relationships/package.js +++ b/packages/relationships/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:relationships', summary: 'Define and use relationships between meteor collections, entities and the dictionary', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/orion' }); @@ -9,8 +9,8 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.0', - 'orionjs:attributes@1.4.0', + 'orionjs:base@1.4.2', + 'orionjs:attributes@1.4.1', 'less', 'jeremy:selectize@0.12.1_3' ]); diff --git a/packages/s3/package.js b/packages/s3/package.js index c7ba9eb..c688ac8 100644 --- a/packages/s3/package.js +++ b/packages/s3/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:s3', summary: 'S3 storage for orion:filesystem', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/s3' }); @@ -9,9 +9,9 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:core@1.4.0', - 'orionjs:filesystem@1.4.0', - 'orionjs:config@1.4.0', + 'orionjs:core@1.4.1', + 'orionjs:filesystem@1.4.1', + 'orionjs:config@1.4.1', 'lepozepo:s3@5.1.1' ]); diff --git a/packages/summernote/package.js b/packages/summernote/package.js index e963fdd..bfea5d5 100644 --- a/packages/summernote/package.js +++ b/packages/summernote/package.js @@ -1,7 +1,7 @@ Package.describe({ name: 'orionjs:summernote', summary: 'Summernote editor for orion', - version: '1.4.0', + version: '1.4.1', git: 'https://github.com/orionjs/orion' }); @@ -9,9 +9,9 @@ Package.onUse(function(api) { api.versionsFrom('1.0'); api.use([ - 'orionjs:base@1.4.0', - 'orionjs:attributes@1.4.0', - 'orionjs:filesystem@1.4.0', + 'orionjs:base@1.4.2', + 'orionjs:attributes@1.4.1', + 'orionjs:filesystem@1.4.1', 'less', 'summernote:standalone@0.6.15', 'jquery' From 598a350cac54689ab071e92e0d036076d7c3b55e Mon Sep 17 00:00:00 2001 From: PEM-- Date: Sat, 15 Aug 2015 14:19:31 +0200 Subject: [PATCH 7/8] Some usefull documentation --- packages/logging/README.md | 20 ++++ .../logging/logging_client.browserify.js.map | 106 +++++++++--------- 2 files changed, 73 insertions(+), 53 deletions(-) diff --git a/packages/logging/README.md b/packages/logging/README.md index fa5357b..ddd54c0 100644 --- a/packages/logging/README.md +++ b/packages/logging/README.md @@ -28,6 +28,26 @@ myAppLog.error('Error level logs'); ... ``` +## Commands +### Remove all logs from Orion +```js +orion.log.level('none'); +``` +> This is also applicable to your own logs. + +### Set a specific level of logs for Orion +```js +// For debug level and aboves +orion.log.level('debug'); +... +// For info level and above +orion.log.level('info'); +... +// For fatal only level +orion.log.level('fatal'); +``` +> This is also applicable to your own logs. + ## Links * Inspired from [Ongoworks's Bunyan](https://github.com/ongoworks/meteor-bunyan) * [Bunyan](https://github.com/trentm/node-bunyan) diff --git a/packages/logging/logging_client.browserify.js.map b/packages/logging/logging_client.browserify.js.map index 294e27b..fb2d4b7 100644 --- a/packages/logging/logging_client.browserify.js.map +++ b/packages/logging/logging_client.browserify.js.map @@ -1,59 +1,59 @@ { "version": 3, "sources": [ - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/browser-pack/_prelude.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/lib/_empty.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/assert/assert.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/index.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/ieee754/index.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/is-array/index.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/events/events.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/index.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/lib/request.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/lib/response.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/base64.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/inherits/inherits_browser.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/isarray/index.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/os-browserify/browser.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/process/browser.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/punycode/punycode.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/decode.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/encode.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/index.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/duplex.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_duplex.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_passthrough.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_transform.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/lib/util.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/passthrough.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/readable.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/transform.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/writable.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/stream-browserify/index.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/string_decoder/index.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/url/url.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/util/support/isBufferBrowser.js", - "../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/util/util.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/index.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/lib/format-record.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/ansicolors.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/ansistyles.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/has-keys.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/index.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/foreach.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/index.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/isArguments.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/shim.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan/lib/bunyan.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/index.js", - "../../../../../../Projects/orion/packages/logging/.npm/package/node_modules/log-with-style/log.js", - "_stream_0.js" + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/browser-pack/_prelude.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/lib/_empty.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/assert/assert.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/index.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/base64-js/lib/b64.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/ieee754/index.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/is-array/index.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/events/events.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/index.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/lib/request.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/lib/response.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/base64.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/inherits/inherits_browser.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/isarray/index.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/os-browserify/browser.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/process/browser.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/punycode/punycode.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/decode.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/encode.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/index.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/duplex.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_duplex.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_passthrough.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_readable.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_transform.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_writable.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/node_modules/core-util-is/lib/util.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/passthrough.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/readable.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/transform.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/writable.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/stream-browserify/index.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/string_decoder/index.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/url/url.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/util/support/isBufferBrowser.js", + "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/util/util.js", + "_stream_0.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/index.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/lib/format-record.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/ansicolors.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/ansistyles.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/has-keys.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/index.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/foreach.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/index.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/isArguments.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/shim.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan/lib/bunyan.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/index.js", + "../../../../../../orion/packages/logging/.npm/package/node_modules/log-with-style/log.js" ], "names": [], - "mappings": "AAAA;ACAA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC75CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AClhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;;ACJA;AACA;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACv7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC7dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1GA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;;ACDA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnsBA;AACA;AACA;AACA;AACA;AACA;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC1kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC15CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", + "mappings": "AAAA;ACAA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC75CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AClhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;;ACJA;AACA;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACv7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC7dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1GA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;;ACDA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnsBA;AACA;AACA;AACA;AACA;AACA;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC1kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC15CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", "file": "generated.js", "sourceRoot": "", "sourcesContent": [ @@ -93,6 +93,7 @@ "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar punycode = require('punycode');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a puny coded representation of \"domain\".\n // It only converts the part of the domain name that\n // has non ASCII characters. I.e. it dosent matter if\n // you call it with a domain that already is in ASCII.\n var domainArray = this.hostname.split('.');\n var newOut = [];\n for (var i = 0; i < domainArray.length; ++i) {\n var s = domainArray[i];\n newOut.push(s.match(/[^A-Za-z0-9_-]/) ?\n 'xn--' + punycode.encode(s) : s);\n }\n this.hostname = newOut.join('.');\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n Object.keys(this).forEach(function(k) {\n result[k] = this[k];\n }, this);\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n Object.keys(relative).forEach(function(k) {\n if (k !== 'protocol')\n result[k] = relative[k];\n });\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n Object.keys(relative).forEach(function(k) {\n result[k] = relative[k];\n });\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especialy happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!isNull(result.pathname) || !isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host) && (last === '.' || last === '..') ||\n last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last == '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especialy happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!isNull(result.pathname) || !isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n\nfunction isString(arg) {\n return typeof arg === \"string\";\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isNull(arg) {\n return arg === null;\n}\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\n", "module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n", + "RotatingFileStream = null; // see: https://github.com/trentm/node-bunyan/issues/223\nbunyan = require('bunyan');\nbunyanFormat = require('bunyan-format');\n\nvar WritableStream = require('stream').Writable;\nvar inherits = require('util').inherits;\nvar logStyle = require('log-with-style');\n\ninherits(BrowserStdout, WritableStream);\n\nfunction BrowserStdout() {\n if (!(this instanceof BrowserStdout)) {\n return new BrowserStdout();\n }\n WritableStream.call(this);\n}\n\nBrowserStdout.prototype._write = function(chunks, encoding, cb) {\n var output = JSON.parse(chunks.toString ? chunks.toString() : chunks);\n var color = '[c=\"color: green\"]';\n var level = 'INFO';\n if (output.level > 40) {\n color = '[c=\"color: red\"]';\n if (output.level === 60) {\n level = 'FATAL';\n } else {\n level = 'ERROR';\n }\n } else if (output.level === 40) {\n color = '[c=\"color: orange\"]';\n level = 'WARNING';\n } else if (output.level === 20) {\n level = 'DEBUG';\n } else if (output.level === 10) {\n level = 'TRACE';\n }\n logStyle(color + level + '[c] ' + '[c=\"color: blue\"]' + output.name + '[c] ' + output.msg);\n process.nextTick(cb);\n};\n\n// Import process.stdout and process.stderr\nprocess = require('process');\nprocess.stdout = BrowserStdout();\nprocess.stderr = BrowserStdout();\n\norion.logFormatter = BrowserStdout();\n", "'use strict';\n\nvar stream = require('stream');\nvar util = require('util');\nvar formatRecord = require('./lib/format-record');\nvar xtend = require('xtend');\n\n\nvar Writable = stream.Writable;\n\nmodule.exports = BunyanFormatWritable;\n\nutil.inherits(BunyanFormatWritable, Writable);\n\n/**\n * Creates a writable stream that formats bunyan records written to it.\n * \n * @name BunyanFormatWritable\n * @function\n * @param opts {Options} passed to bunyan format function\n * - outputMode: short|long|simple|json|bunyan\n * - color (true): toggles colors in output\n * - colorFromLevel: allows overriding log level colors\n * @param out {Stream} (process.stdout) writable stream to write \n * @return {WritableStream} that you can pipe bunyan output into\n */\nfunction BunyanFormatWritable (opts, out) {\n if (!(this instanceof BunyanFormatWritable)) return new BunyanFormatWritable(opts, out);\n\n opts = opts || {};\n opts.objectMode = true;\n Writable.call(this, opts);\n\n this.opts = xtend({ \n outputMode: 'short', \n color: true,\n colorFromLevel: {\n 10: 'brightBlack', // TRACE\n 20: 'brightBlack', // DEBUG\n 30: 'green', // INFO\n 40: 'magenta', // WARN\n 50: 'red', // ERROR\n 60: 'brightRed', // FATAL\n }\n }, opts);\n this.out = out || process.stdout;\n}\n\nBunyanFormatWritable.prototype._write = function (chunk, encoding, cb) {\n var rec;\n try { \n rec = JSON.parse(chunk);\n this.out.write(formatRecord(rec, this.opts));\n } catch (e) {\n this.out.write(chunk);\n }\n cb();\n};\n", "'use strict';\n\nvar util = require('util');\nvar format = util.format;\nvar http = require('http');\nvar xtend = require('xtend');\nvar ansicolors = require('ansicolors');\nvar ansistyles = require('ansistyles');\n\nvar styles = xtend(ansistyles, ansicolors);\n\n// Most of this code is lifted directly from the bunyan ./bin file and should be cleaned up once there is more time\nvar OM_LONG = 1;\nvar OM_JSON = 2;\nvar OM_INSPECT = 3;\nvar OM_SIMPLE = 4;\nvar OM_SHORT = 5;\nvar OM_BUNYAN = 6;\nvar OM_FROM_NAME = {\n 'long': OM_LONG,\n 'json': OM_JSON,\n 'inspect': OM_INSPECT,\n 'simple': OM_SIMPLE,\n 'short': OM_SHORT,\n 'bunyan': OM_BUNYAN\n};\n\n// Levels\nvar TRACE = 10;\nvar DEBUG = 20;\nvar INFO = 30;\nvar WARN = 40;\nvar ERROR = 50;\nvar FATAL = 60;\n\nvar levelFromName = {\n 'trace': TRACE,\n 'debug': DEBUG,\n 'info': INFO,\n 'warn': WARN,\n 'error': ERROR,\n 'fatal': FATAL\n};\nvar nameFromLevel = {};\nvar upperNameFromLevel = {};\nvar upperPaddedNameFromLevel = {};\nObject.keys(levelFromName).forEach(function (name) {\n var lvl = levelFromName[name];\n nameFromLevel[lvl] = name;\n upperNameFromLevel[lvl] = name.toUpperCase();\n upperPaddedNameFromLevel[lvl] = (\n name.length === 4 ? ' ' : '') + name.toUpperCase();\n});\n\n\n/**\n * Is this a valid Bunyan log record.\n */\nfunction isValidRecord(rec) {\n if (rec.v === null ||\n rec.level === null ||\n rec.name === null ||\n rec.hostname === null ||\n rec.pid === null ||\n rec.time === null ||\n rec.msg === null) {\n // Not valid Bunyan log.\n return false;\n } else {\n return true;\n }\n}\n\nfunction indent(s) {\n return ' ' + s.split(/\\r?\\n/).join('\\n ');\n}\n\nfunction stylizeWithColor(s, color) {\n if (!s) return '';\n var fn = styles[color];\n return fn ? fn(s) : s;\n}\n\nfunction stylizeWithoutColor(str, color) {\n return str;\n}\n\n/**\n * @param {int} level is the level of the record.\n * @return The level value to its String representation.\n * This is only used on json-related formats output and first suggested at \n * https://github.com/trentm/node-bunyan/issues/194#issuecomment-64858117\n */\nfunction mapLevelToName(level) {\n switch (level) {\n case TRACE:\n return 'TRACE';\n case DEBUG:\n return 'DEBUG';\n case INFO:\n return 'INFO';\n case WARN:\n return 'WARN';\n case ERROR:\n return 'ERROR';\n case FATAL:\n return 'FATAL';\n }\n}\n\n/**\n * Print out a single result, considering input options.\n */\nmodule.exports = function formatRecord(rec, opts) {\n\n function _res(res) {\n var s = '';\n if (res.header) {\n s += res.header.trimRight();\n } else if (res.headers) {\n if (res.statusCode) {\n s += format('HTTP/1.1 %s %s\\n', res.statusCode,\n http.STATUS_CODES[res.statusCode]);\n }\n var headers = res.headers;\n s += Object.keys(headers).map(\n function (h) { return h + ': ' + headers[h]; }).join('\\n');\n }\n delete res.header;\n delete res.headers;\n delete res.statusCode;\n if (res.body) {\n s += '\\n\\n' + (typeof (res.body) === 'object'\n ? JSON.stringify(res.body, null, 2) : res.body);\n delete res.body;\n }\n if (res.trailer) {\n s += '\\n' + res.trailer;\n }\n delete res.trailer;\n if (s) {\n details.push(indent(s));\n }\n // E.g. for extra 'foo' field on 'res', add 'res.foo' at\n // top-level. This *does* have the potential to stomp on a\n // literal 'res.foo' key.\n Object.keys(res).forEach(function (k) {\n rec['res.' + k] = res[k];\n });\n }\n\n var short = false;\n var time;\n var line = rec.line;\n var stylize = opts.color ? stylizeWithColor : stylizeWithoutColor;\n var outputMode = isNaN(opts.outputMode) ? OM_FROM_NAME[opts.outputMode] : opts.outputMode; \n\n switch (outputMode) {\n case OM_SHORT:\n short = true;\n /* falls through */\n case OM_LONG:\n // [time] LEVEL: name[/comp]/pid on hostname (src): msg* (extras...)\n // msg*\n // --\n // long and multi-line extras\n // ...\n // If 'msg' is single-line, then it goes in the top line.\n // If 'req', show the request.\n // If 'res', show the response.\n // If 'err' and 'err.stack' then show that.\n if (!isValidRecord(rec)) {\n return line + '\\n';\n }\n\n delete rec.v;\n\n /*\n * We assume the Date is formatted according to ISO8601, in which\n * case we can safely chop off the date information.\n */\n if (short && rec.time[10] == 'T') {\n time = rec.time.substr(11);\n time = stylize(time, 'brightBlack');\n } else {\n time = stylize('[' + rec.time + ']', 'brightBlack');\n }\n\n delete rec.time;\n\n var nameStr = rec.name;\n delete rec.name;\n\n if (rec.component) {\n nameStr += '/' + rec.component;\n }\n delete rec.component;\n\n if (!short)\n nameStr += '/' + rec.pid;\n delete rec.pid;\n\n var level = (upperPaddedNameFromLevel[rec.level] || 'LVL' + rec.level);\n if (opts.color) {\n var colorFromLevel = opts.colorFromLevel || {\n 10: 'brightBlack', // TRACE\n 20: 'brightBlack', // DEBUG\n 30: 'cyan', // INFO\n 40: 'magenta', // WARN\n 50: 'red', // ERROR\n 60: 'inverse', // FATAL\n };\n level = stylize(level, colorFromLevel[rec.level]);\n }\n delete rec.level;\n\n var src = '';\n var s;\n var headers;\n var hostHeaderLine = '';\n if (rec.src && rec.src.file) {\n s = rec.src;\n if (s.func) {\n src = format(' (%s:%d in %s)', s.file, s.line, s.func);\n } else {\n src = format(' (%s:%d)', s.file, s.line);\n }\n src = stylize(src, 'green');\n }\n delete rec.src;\n\n var hostname = rec.hostname;\n delete rec.hostname;\n\n var extras = [];\n var details = [];\n\n if (rec.req_id) {\n extras.push('req_id=' + rec.req_id);\n }\n delete rec.req_id;\n\n var onelineMsg;\n if (rec.msg.indexOf('\\n') !== -1) {\n onelineMsg = '';\n details.push(indent(stylize(rec.msg, 'cyan')));\n } else {\n onelineMsg = ' ' + stylize(rec.msg, 'cyan');\n }\n delete rec.msg;\n\n if (rec.req && typeof (rec.req) === 'object') {\n var req = rec.req;\n delete rec.req;\n headers = req.headers;\n s = format('%s %s HTTP/%s%s', req.method,\n req.url,\n req.httpVersion || '1.1',\n (headers ?\n '\\n' + Object.keys(headers).map(function (h) {\n return h + ': ' + headers[h];\n }).join('\\n') :\n '')\n );\n delete req.url;\n delete req.method;\n delete req.httpVersion;\n delete req.headers;\n if (req.body) {\n s += '\\n\\n' + (typeof (req.body) === 'object'\n ? JSON.stringify(req.body, null, 2) : req.body);\n delete req.body;\n }\n if (req.trailers && Object.keys(req.trailers) > 0) {\n s += '\\n' + Object.keys(req.trailers).map(function (t) {\n return t + ': ' + req.trailers[t];\n }).join('\\n');\n }\n delete req.trailers;\n details.push(indent(s));\n // E.g. for extra 'foo' field on 'req', add 'req.foo' at\n // top-level. This *does* have the potential to stomp on a\n // literal 'req.foo' key.\n Object.keys(req).forEach(function (k) {\n rec['req.' + k] = req[k];\n })\n }\n\n if (rec.client_req && typeof (rec.client_req) === 'object') {\n var client_req = rec.client_req;\n delete rec.client_req;\n headers = client_req.headers;\n s = '';\n if (client_req.address) {\n hostHeaderLine = 'Host: ' + client_req.address;\n if (client_req.port)\n hostHeaderLine += ':' + client_req.port;\n hostHeaderLine += '\\n';\n }\n delete client_req.headers;\n delete client_req.address;\n delete client_req.port;\n s += format('%s %s HTTP/%s\\n%s%s', client_req.method,\n client_req.url,\n client_req.httpVersion || '1.1',\n hostHeaderLine,\n (headers ?\n Object.keys(headers).map(\n function (h) {\n return h + ': ' + headers[h];\n }).join('\\n') :\n ''));\n delete client_req.method;\n delete client_req.url;\n delete client_req.httpVersion;\n if (client_req.body) {\n s += '\\n\\n' + (typeof (client_req.body) === 'object' ?\n JSON.stringify(client_req.body, null, 2) :\n client_req.body);\n delete client_req.body;\n }\n // E.g. for extra 'foo' field on 'client_req', add\n // 'client_req.foo' at top-level. This *does* have the potential\n // to stomp on a literal 'client_req.foo' key.\n Object.keys(client_req).forEach(function (k) {\n rec['client_req.' + k] = client_req[k];\n })\n details.push(indent(s));\n }\n\n\n if (rec.res && typeof (rec.res) === 'object') {\n _res(rec.res);\n delete rec.res;\n }\n if (rec.client_res && typeof (rec.client_res) === 'object') {\n _res(rec.client_res);\n delete rec.res;\n }\n\n if (rec.err && rec.err.stack) {\n details.push(indent(rec.err.stack));\n delete rec.err;\n }\n\n var leftover = Object.keys(rec);\n for (var i = 0; i < leftover.length; i++) {\n var key = leftover[i];\n var value = rec[key];\n var stringified = false;\n if (typeof (value) !== 'string') {\n value = JSON.stringify(value, null, 2);\n stringified = true;\n }\n if (value.indexOf('\\n') !== -1 || value.length > 50) {\n details.push(indent(key + ': ' + value));\n } else if (!stringified && (value.indexOf(' ') != -1 ||\n value.length === 0))\n {\n extras.push(key + '=' + JSON.stringify(value));\n } else {\n extras.push(key + '=' + value);\n }\n }\n\n extras = stylize(\n (extras.length ? ' (' + extras.join(', ') + ')' : ''), 'brightBlack');\n details = stylize(\n (details.length ? details.join('\\n --\\n') + '\\n' : ''), 'brightBlack');\n if (!short)\n return format('%s %s: %s on %s%s:%s%s\\n%s',\n time,\n level,\n nameStr,\n hostname || '',\n src,\n onelineMsg,\n extras,\n details);\n else\n return format('%s %s %s:%s%s\\n%s',\n time,\n level,\n nameStr,\n onelineMsg,\n extras,\n details);\n break;\n\n case OM_INSPECT:\n return util.inspect(rec, false, Infinity, true) + '\\n';\n\n case OM_BUNYAN:\n if (opts.levelInString) {\n rec.level = mapLevelToName(rec.level);\n }\n return JSON.stringify(rec, null, 0) + '\\n';\n\n case OM_JSON:\n if (opts.levelInString) {\n rec.level = mapLevelToName(rec.level);\n }\n return JSON.stringify(rec, null, opts.jsonIndent) + '\\n';\n\n case OM_SIMPLE:\n /* JSSTYLED */\n // \n if (!isValidRecord(rec)) {\n return line + '\\n';\n }\n return format('%s - %s\\n',\n upperNameFromLevel[rec.level] || 'LVL' + rec.level,\n rec.msg);\n default:\n throw new Error('unknown output mode: '+opts.outputMode);\n }\n}\n\n", "// ColorCodes explained: http://www.termsys.demon.co.uk/vtansi.htm\n'use strict';\n\nvar colorNums = {\n white : 37\n , black : 30\n , blue : 34\n , cyan : 36\n , green : 32\n , magenta : 35\n , red : 31\n , yellow : 33\n , brightBlack : 90\n , brightRed : 91\n , brightGreen : 92\n , brightYellow : 93\n , brightBlue : 94\n , brightMagenta : 95\n , brightCyan : 96\n , brightWhite : 97\n }\n , backgroundColorNums = {\n bgBlack : 40\n , bgRed : 41\n , bgGreen : 42\n , bgYellow : 43\n , bgBlue : 44\n , bgMagenta : 45\n , bgCyan : 46\n , bgWhite : 47\n , bgBrightBlack : 100\n , bgBrightRed : 101\n , bgBrightGreen : 102\n , bgBrightYellow : 103\n , bgBrightBlue : 104\n , bgBrightMagenta : 105\n , bgBrightCyan : 106\n , bgBrightWhite : 107\n } \n , colors = {};\n\n\nObject.keys(colorNums).forEach(function (k) {\n colors[k] = function (s) { \n return '\\u001b[' + colorNums[k] + 'm' + s + '\\u001b[39m';\n };\n});\n\nObject.keys(backgroundColorNums).forEach(function (k) {\n colors[k] = function (s) { \n return '\\u001b[' + backgroundColorNums[k] + 'm' + s + '\\u001b[49m';\n };\n});\n\nmodule.exports = colors;\n", @@ -105,7 +106,6 @@ "(function () {\n\t\"use strict\";\n\n\t// modified from https://github.com/kriskowal/es5-shim\n\tvar has = Object.prototype.hasOwnProperty,\n\t\ttoString = Object.prototype.toString,\n\t\tforEach = require('./foreach'),\n\t\tisArgs = require('./isArguments'),\n\t\thasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),\n\t\thasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'),\n\t\tdontEnums = [\n\t\t\t\"toString\",\n\t\t\t\"toLocaleString\",\n\t\t\t\"valueOf\",\n\t\t\t\"hasOwnProperty\",\n\t\t\t\"isPrototypeOf\",\n\t\t\t\"propertyIsEnumerable\",\n\t\t\t\"constructor\"\n\t\t],\n\t\tkeysShim;\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object',\n\t\t\tisFunction = toString.call(object) === '[object Function]',\n\t\t\tisArguments = isArgs(object),\n\t\t\ttheKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError(\"Object.keys called on a non-object\");\n\t\t}\n\n\t\tif (isArguments) {\n\t\t\tforEach(object, function (value) {\n\t\t\t\ttheKeys.push(value);\n\t\t\t});\n\t\t} else {\n\t\t\tvar name,\n\t\t\t\tskipProto = hasProtoEnumBug && isFunction;\n\n\t\t\tfor (name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar ctor = object.constructor,\n\t\t\t\tskipConstructor = ctor && ctor.prototype === object;\n\n\t\t\tforEach(dontEnums, function (dontEnum) {\n\t\t\t\tif (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) {\n\t\t\t\t\ttheKeys.push(dontEnum);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn theKeys;\n\t};\n\n\tmodule.exports = keysShim;\n}());\n\n", "/**\n * Copyright (c) 2014 Trent Mick. All rights reserved.\n * Copyright (c) 2014 Joyent Inc. All rights reserved.\n *\n * The bunyan logging library for node.js.\n *\n * -*- mode: js -*-\n * vim: expandtab:ts=4:sw=4\n */\n\nvar VERSION = '1.4.0';\n\n// Bunyan log format version. This becomes the 'v' field on all log records.\n// `0` is until I release a version '1.0.0' of node-bunyan. Thereafter,\n// starting with `1`, this will be incremented if there is any backward\n// incompatible change to the log record format. Details will be in\n// 'CHANGES.md' (the change log).\nvar LOG_VERSION = 0;\n\n\nvar xxx = function xxx(s) { // internal dev/debug logging\n var args = ['XX' + 'X: '+s].concat(\n Array.prototype.slice.call(arguments, 1));\n console.error.apply(this, args);\n};\nvar xxx = function xxx() {}; // comment out to turn on debug logging\n\n\nvar os = require('os');\nvar fs = require('fs');\nvar util = require('util');\nvar assert = require('assert');\ntry {\n /* Use `+ ''` to hide this import from browserify. */\n var dtrace = require('dtrace-provider' + '');\n} catch (e) {\n dtrace = null;\n}\nvar EventEmitter = require('events').EventEmitter;\n\ntry {\n var safeJsonStringify = require('safe-json-stringify');\n} catch (e) {\n safeJsonStringify = null;\n}\nif (process.env.BUNYAN_TEST_NO_SAFE_JSON_STRINGIFY) {\n safeJsonStringify = null;\n}\n\n// The 'mv' module is required for rotating-file stream support.\ntry {\n /* Use `+ ''` to hide this import from browserify. */\n var mv = require('mv' + '');\n} catch (e) {\n mv = null;\n}\n\n// Are we in the browser (e.g. running via browserify)?\nvar isBrowser = function () {\n return typeof (window) !== 'undefined' && this === window; }();\n\ntry {\n /* Use `+ ''` to hide this import from browserify. */\n var sourceMapSupport = require('source-map-support' + '');\n} catch (_) {\n sourceMapSupport = null;\n}\n\n\n\n//---- Internal support stuff\n\n/**\n * A shallow copy of an object. Bunyan logging attempts to never cause\n * exceptions, so this function attempts to handle non-objects gracefully.\n */\nfunction objCopy(obj) {\n if (obj == null) { // null or undefined\n return obj;\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else if (typeof (obj) === 'object') {\n var copy = {};\n Object.keys(obj).forEach(function (k) {\n copy[k] = obj[k];\n });\n return copy;\n } else {\n return obj;\n }\n}\n\nvar format = util.format;\nif (!format) {\n // If node < 0.6, then use its `util.format`:\n // :\n var inspect = util.inspect;\n var formatRegExp = /%[sdj%]/g;\n format = function format(f) {\n if (typeof (f) !== 'string') {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function (x) {\n if (i >= len)\n return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j': return JSON.stringify(args[i++], safeCycles());\n case '%%': return '%';\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (x === null || typeof (x) !== 'object') {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n };\n}\n\n\n/**\n * Gather some caller info 3 stack levels up.\n * See .\n */\nfunction getCaller3Info() {\n var obj = {};\n var saveLimit = Error.stackTraceLimit;\n var savePrepare = Error.prepareStackTrace;\n Error.stackTraceLimit = 3;\n Error.captureStackTrace(this, getCaller3Info);\n\n Error.prepareStackTrace = function (_, stack) {\n var caller = stack[2];\n if (sourceMapSupport) {\n caller = sourceMapSupport.wrapCallSite(caller);\n }\n obj.file = caller.getFileName();\n obj.line = caller.getLineNumber();\n var func = caller.getFunctionName();\n if (func)\n obj.func = func;\n };\n this.stack;\n Error.stackTraceLimit = saveLimit;\n Error.prepareStackTrace = savePrepare;\n return obj;\n}\n\n\nfunction _indent(s, indent) {\n if (!indent) indent = ' ';\n var lines = s.split(/\\r?\\n/g);\n return indent + lines.join('\\n' + indent);\n}\n\n\n/**\n * Warn about an bunyan processing error.\n *\n * @param msg {String} Message with which to warn.\n * @param dedupKey {String} Optional. A short string key for this warning to\n * have its warning only printed once.\n */\nfunction _warn(msg, dedupKey) {\n assert.ok(msg);\n if (dedupKey) {\n if (_warned[dedupKey]) {\n return;\n }\n _warned[dedupKey] = true;\n }\n process.stderr.write(msg + '\\n');\n}\nfunction _haveWarned(dedupKey) {\n return _warned[dedupKey];\n}\nvar _warned = {};\n\n\nfunction ConsoleRawStream() {}\nConsoleRawStream.prototype.write = function (rec) {\n if (rec.level < INFO) {\n console.log(rec);\n } else if (rec.level < WARN) {\n console.info(rec);\n } else if (rec.level < ERROR) {\n console.warn(rec);\n } else {\n console.error(rec);\n }\n};\n\n\n//---- Levels\n\nvar TRACE = 10;\nvar DEBUG = 20;\nvar INFO = 30;\nvar WARN = 40;\nvar ERROR = 50;\nvar FATAL = 60;\n\nvar levelFromName = {\n 'trace': TRACE,\n 'debug': DEBUG,\n 'info': INFO,\n 'warn': WARN,\n 'error': ERROR,\n 'fatal': FATAL\n};\nvar nameFromLevel = {};\nObject.keys(levelFromName).forEach(function (name) {\n nameFromLevel[levelFromName[name]] = name;\n});\n\n// Dtrace probes.\nvar dtp = undefined;\nvar probes = dtrace && {};\n\n/**\n * Resolve a level number, name (upper or lowercase) to a level number value.\n *\n * @api public\n */\nfunction resolveLevel(nameOrNum) {\n var level = (typeof (nameOrNum) === 'string'\n ? levelFromName[nameOrNum.toLowerCase()]\n : nameOrNum);\n return level;\n}\n\n\n\n//---- Logger class\n\n/**\n * Create a Logger instance.\n *\n * @param options {Object} See documentation for full details. At minimum\n * this must include a 'name' string key. Configuration keys:\n * - `streams`: specify the logger output streams. This is an array of\n * objects with these fields:\n * - `type`: The stream type. See README.md for full details.\n * Often this is implied by the other fields. Examples are\n * 'file', 'stream' and \"raw\".\n * - `level`: Defaults to 'info'.\n * - `path` or `stream`: The specify the file path or writeable\n * stream to which log records are written. E.g.\n * `stream: process.stdout`.\n * - `closeOnExit` (boolean): Optional. Default is true for a\n * 'file' stream when `path` is given, false otherwise.\n * See README.md for full details.\n * - `level`: set the level for a single output stream (cannot be used\n * with `streams`)\n * - `stream`: the output stream for a logger with just one, e.g.\n * `process.stdout` (cannot be used with `streams`)\n * - `serializers`: object mapping log record field names to\n * serializing functions. See README.md for details.\n * - `src`: Boolean (default false). Set true to enable 'src' automatic\n * field with log call source info.\n * All other keys are log record fields.\n *\n * An alternative *internal* call signature is used for creating a child:\n * new Logger(, [, ]);\n *\n * @param _childSimple (Boolean) An assertion that the given `_childOptions`\n * (a) only add fields (no config) and (b) no serialization handling is\n * required for them. IOW, this is a fast path for frequent child\n * creation.\n */\nfunction Logger(options, _childOptions, _childSimple) {\n xxx('Logger start:', options)\n if (!(this instanceof Logger)) {\n return new Logger(options, _childOptions);\n }\n\n // Input arg validation.\n var parent;\n if (_childOptions !== undefined) {\n parent = options;\n options = _childOptions;\n if (!(parent instanceof Logger)) {\n throw new TypeError(\n 'invalid Logger creation: do not pass a second arg');\n }\n }\n if (!options) {\n throw new TypeError('options (object) is required');\n }\n if (!parent) {\n if (!options.name) {\n throw new TypeError('options.name (string) is required');\n }\n } else {\n if (options.name) {\n throw new TypeError(\n 'invalid options.name: child cannot set logger name');\n }\n }\n if (options.stream && options.streams) {\n throw new TypeError('cannot mix \"streams\" and \"stream\" options');\n }\n if (options.streams && !Array.isArray(options.streams)) {\n throw new TypeError('invalid options.streams: must be an array')\n }\n if (options.serializers && (typeof (options.serializers) !== 'object' ||\n Array.isArray(options.serializers))) {\n throw new TypeError('invalid options.serializers: must be an object')\n }\n\n EventEmitter.call(this);\n\n // Fast path for simple child creation.\n if (parent && _childSimple) {\n // `_isSimpleChild` is a signal to stream close handling that this child\n // owns none of its streams.\n this._isSimpleChild = true;\n\n this._level = parent._level;\n this.streams = parent.streams;\n this.serializers = parent.serializers;\n this.src = parent.src;\n var fields = this.fields = {};\n var parentFieldNames = Object.keys(parent.fields);\n for (var i = 0; i < parentFieldNames.length; i++) {\n var name = parentFieldNames[i];\n fields[name] = parent.fields[name];\n }\n var names = Object.keys(options);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n fields[name] = options[name];\n }\n return;\n }\n\n // Null values.\n var self = this;\n if (parent) {\n this._level = parent._level;\n this.streams = [];\n for (var i = 0; i < parent.streams.length; i++) {\n var s = objCopy(parent.streams[i]);\n s.closeOnExit = false; // Don't own parent stream.\n this.streams.push(s);\n }\n this.serializers = objCopy(parent.serializers);\n this.src = parent.src;\n this.fields = objCopy(parent.fields);\n if (options.level) {\n this.level(options.level);\n }\n } else {\n this._level = Number.POSITIVE_INFINITY;\n this.streams = [];\n this.serializers = null;\n this.src = false;\n this.fields = {};\n }\n\n if (!dtp && dtrace) {\n dtp = dtrace.createDTraceProvider('bunyan');\n\n for (var level in levelFromName) {\n var probe;\n\n probes[levelFromName[level]] = probe =\n dtp.addProbe('log-' + level, 'char *');\n\n // Explicitly add a reference to dtp to prevent it from being GC'd\n probe.dtp = dtp;\n }\n\n dtp.enable();\n }\n\n // Handle *config* options (i.e. options that are not just plain data\n // for log records).\n if (options.stream) {\n self.addStream({\n type: 'stream',\n stream: options.stream,\n closeOnExit: false,\n level: options.level\n });\n } else if (options.streams) {\n options.streams.forEach(function (s) {\n self.addStream(s, options.level);\n });\n } else if (parent && options.level) {\n this.level(options.level);\n } else if (!parent) {\n if (isBrowser) {\n /*\n * In the browser we'll be emitting to console.log by default.\n * Any console.log worth its salt these days can nicely render\n * and introspect objects (e.g. the Firefox and Chrome console)\n * so let's emit the raw log record. Are there browsers for which\n * that breaks things?\n */\n self.addStream({\n type: 'raw',\n stream: new ConsoleRawStream(),\n closeOnExit: false,\n level: options.level\n });\n } else {\n self.addStream({\n type: 'stream',\n stream: process.stdout,\n closeOnExit: false,\n level: options.level\n });\n }\n }\n if (options.serializers) {\n self.addSerializers(options.serializers);\n }\n if (options.src) {\n this.src = true;\n }\n xxx('Logger: ', self)\n\n // Fields.\n // These are the default fields for log records (minus the attributes\n // removed in this constructor). To allow storing raw log records\n // (unrendered), `this.fields` must never be mutated. Create a copy for\n // any changes.\n var fields = objCopy(options);\n delete fields.stream;\n delete fields.level;\n delete fields.streams;\n delete fields.serializers;\n delete fields.src;\n if (this.serializers) {\n this._applySerializers(fields);\n }\n if (!fields.hostname) {\n fields.hostname = os.hostname();\n }\n if (!fields.pid) {\n fields.pid = process.pid;\n }\n Object.keys(fields).forEach(function (k) {\n self.fields[k] = fields[k];\n });\n}\n\nutil.inherits(Logger, EventEmitter);\n\n\n/**\n * Add a stream\n *\n * @param stream {Object}. Object with these fields:\n * - `type`: The stream type. See README.md for full details.\n * Often this is implied by the other fields. Examples are\n * 'file', 'stream' and \"raw\".\n * - `path` or `stream`: The specify the file path or writeable\n * stream to which log records are written. E.g.\n * `stream: process.stdout`.\n * - `level`: Optional. Falls back to `defaultLevel`.\n * - `closeOnExit` (boolean): Optional. Default is true for a\n * 'file' stream when `path` is given, false otherwise.\n * See README.md for full details.\n * @param defaultLevel {Number|String} Optional. A level to use if\n * `stream.level` is not set. If neither is given, this defaults to INFO.\n */\nLogger.prototype.addStream = function addStream(s, defaultLevel) {\n var self = this;\n if (defaultLevel === null || defaultLevel === undefined) {\n defaultLevel = INFO;\n }\n\n s = objCopy(s);\n\n // Implicit 'type' from other args.\n var type = s.type;\n if (!s.type) {\n if (s.stream) {\n s.type = 'stream';\n } else if (s.path) {\n s.type = 'file'\n }\n }\n s.raw = (s.type === 'raw'); // PERF: Allow for faster check in `_emit`.\n\n if (s.level) {\n s.level = resolveLevel(s.level);\n } else {\n s.level = resolveLevel(defaultLevel);\n }\n if (s.level < self._level) {\n self._level = s.level;\n }\n\n switch (s.type) {\n case 'stream':\n if (!s.closeOnExit) {\n s.closeOnExit = false;\n }\n break;\n case 'file':\n if (!s.stream) {\n s.stream = fs.createWriteStream(s.path,\n {flags: 'a', encoding: 'utf8'});\n s.stream.on('error', function (err) {\n self.emit('error', err, s);\n });\n if (!s.closeOnExit) {\n s.closeOnExit = true;\n }\n } else {\n if (!s.closeOnExit) {\n s.closeOnExit = false;\n }\n }\n break;\n case 'rotating-file':\n assert.ok(!s.stream,\n '\"rotating-file\" stream should not give a \"stream\"');\n assert.ok(s.path);\n assert.ok(mv, '\"rotating-file\" stream type is not supported: '\n + 'missing \"mv\" module');\n s.stream = new RotatingFileStream(s);\n if (!s.closeOnExit) {\n s.closeOnExit = true;\n }\n break;\n case 'raw':\n if (!s.closeOnExit) {\n s.closeOnExit = false;\n }\n break;\n default:\n throw new TypeError('unknown stream type \"' + s.type + '\"');\n }\n\n self.streams.push(s);\n delete self.haveNonRawStreams; // reset\n}\n\n\n/**\n * Add serializers\n *\n * @param serializers {Object} Optional. Object mapping log record field names\n * to serializing functions. See README.md for details.\n */\nLogger.prototype.addSerializers = function addSerializers(serializers) {\n var self = this;\n\n if (!self.serializers) {\n self.serializers = {};\n }\n Object.keys(serializers).forEach(function (field) {\n var serializer = serializers[field];\n if (typeof (serializer) !== 'function') {\n throw new TypeError(format(\n 'invalid serializer for \"%s\" field: must be a function',\n field));\n } else {\n self.serializers[field] = serializer;\n }\n });\n}\n\n\n\n/**\n * Create a child logger, typically to add a few log record fields.\n *\n * This can be useful when passing a logger to a sub-component, e.g. a\n * 'wuzzle' component of your service:\n *\n * var wuzzleLog = log.child({component: 'wuzzle'})\n * var wuzzle = new Wuzzle({..., log: wuzzleLog})\n *\n * Then log records from the wuzzle code will have the same structure as\n * the app log, *plus the component='wuzzle' field*.\n *\n * @param options {Object} Optional. Set of options to apply to the child.\n * All of the same options for a new Logger apply here. Notes:\n * - The parent's streams are inherited and cannot be removed in this\n * call. Any given `streams` are *added* to the set inherited from\n * the parent.\n * - The parent's serializers are inherited, though can effectively be\n * overwritten by using duplicate keys.\n * - Can use `level` to set the level of the streams inherited from\n * the parent. The level for the parent is NOT affected.\n * @param simple {Boolean} Optional. Set to true to assert that `options`\n * (a) only add fields (no config) and (b) no serialization handling is\n * required for them. IOW, this is a fast path for frequent child\n * creation. See 'tools/timechild.js' for numbers.\n */\nLogger.prototype.child = function (options, simple) {\n return new (this.constructor)(this, options || {}, simple);\n}\n\n\n/**\n * A convenience method to reopen 'file' streams on a logger. This can be\n * useful with external log rotation utilities that move and re-open log files\n * (e.g. logrotate on Linux, logadm on SmartOS/Illumos). Those utilities\n * typically have rotation options to copy-and-truncate the log file, but\n * you may not want to use that. An alternative is to do this in your\n * application:\n *\n * var log = bunyan.createLogger(...);\n * ...\n * process.on('SIGUSR2', function () {\n * log.reopenFileStreams();\n * });\n * ...\n *\n * See .\n */\nLogger.prototype.reopenFileStreams = function () {\n var self = this;\n self.streams.forEach(function (s) {\n if (s.type === 'file') {\n if (s.stream) {\n // Not sure if typically would want this, or more immediate\n // `s.stream.destroy()`.\n s.stream.end();\n s.stream.destroySoon();\n delete s.stream;\n }\n s.stream = fs.createWriteStream(s.path,\n {flags: 'a', encoding: 'utf8'});\n s.stream.on('error', function (err) {\n self.emit('error', err, s);\n });\n }\n });\n};\n\n\n/* BEGIN JSSTYLED */\n/**\n * Close this logger.\n *\n * This closes streams (that it owns, as per 'endOnClose' attributes on\n * streams), etc. Typically you **don't** need to bother calling this.\nLogger.prototype.close = function () {\n if (this._closed) {\n return;\n }\n if (!this._isSimpleChild) {\n self.streams.forEach(function (s) {\n if (s.endOnClose) {\n xxx('closing stream s:', s);\n s.stream.end();\n s.endOnClose = false;\n }\n });\n }\n this._closed = true;\n}\n */\n/* END JSSTYLED */\n\n\n/**\n * Get/set the level of all streams on this logger.\n *\n * Get Usage:\n * // Returns the current log level (lowest level of all its streams).\n * log.level() -> INFO\n *\n * Set Usage:\n * log.level(INFO) // set all streams to level INFO\n * log.level('info') // can use 'info' et al aliases\n */\nLogger.prototype.level = function level(value) {\n if (value === undefined) {\n return this._level;\n }\n var newLevel = resolveLevel(value);\n var len = this.streams.length;\n for (var i = 0; i < len; i++) {\n this.streams[i].level = newLevel;\n }\n this._level = newLevel;\n}\n\n\n/**\n * Get/set the level of a particular stream on this logger.\n *\n * Get Usage:\n * // Returns an array of the levels of each stream.\n * log.levels() -> [TRACE, INFO]\n *\n * // Returns a level of the identified stream.\n * log.levels(0) -> TRACE // level of stream at index 0\n * log.levels('foo') // level of stream with name 'foo'\n *\n * Set Usage:\n * log.levels(0, INFO) // set level of stream 0 to INFO\n * log.levels(0, 'info') // can use 'info' et al aliases\n * log.levels('foo', WARN) // set stream named 'foo' to WARN\n *\n * Stream names: When streams are defined, they can optionally be given\n * a name. For example,\n * log = new Logger({\n * streams: [\n * {\n * name: 'foo',\n * path: '/var/log/my-service/foo.log'\n * level: 'trace'\n * },\n * ...\n *\n * @param name {String|Number} The stream index or name.\n * @param value {Number|String} The level value (INFO) or alias ('info').\n * If not given, this is a 'get' operation.\n * @throws {Error} If there is no stream with the given name.\n */\nLogger.prototype.levels = function levels(name, value) {\n if (name === undefined) {\n assert.equal(value, undefined);\n return this.streams.map(\n function (s) { return s.level });\n }\n var stream;\n if (typeof (name) === 'number') {\n stream = this.streams[name];\n if (stream === undefined) {\n throw new Error('invalid stream index: ' + name);\n }\n } else {\n var len = this.streams.length;\n for (var i = 0; i < len; i++) {\n var s = this.streams[i];\n if (s.name === name) {\n stream = s;\n break;\n }\n }\n if (!stream) {\n throw new Error(format('no stream with name \"%s\"', name));\n }\n }\n if (value === undefined) {\n return stream.level;\n } else {\n var newLevel = resolveLevel(value);\n stream.level = newLevel;\n if (newLevel < this._level) {\n this._level = newLevel;\n }\n }\n}\n\n\n/**\n * Apply registered serializers to the appropriate keys in the given fields.\n *\n * Pre-condition: This is only called if there is at least one serializer.\n *\n * @param fields (Object) The log record fields.\n * @param excludeFields (Object) Optional mapping of keys to `true` for\n * keys to NOT apply a serializer.\n */\nLogger.prototype._applySerializers = function (fields, excludeFields) {\n var self = this;\n\n xxx('_applySerializers: excludeFields', excludeFields);\n\n // Check each serializer against these (presuming number of serializers\n // is typically less than number of fields).\n Object.keys(this.serializers).forEach(function (name) {\n if (fields[name] === undefined ||\n (excludeFields && excludeFields[name]))\n {\n return;\n }\n xxx('_applySerializers; apply to \"%s\" key', name)\n try {\n fields[name] = self.serializers[name](fields[name]);\n } catch (err) {\n _warn(format('bunyan: ERROR: Exception thrown from the \"%s\" '\n + 'Bunyan serializer. This should never happen. This is a bug'\n + 'in that serializer function.\\n%s',\n name, err.stack || err));\n fields[name] = format('(Error in Bunyan log \"%s\" serializer '\n + 'broke field. See stderr for details.)', name);\n }\n });\n}\n\n\n/**\n * Emit a log record.\n *\n * @param rec {log record}\n * @param noemit {Boolean} Optional. Set to true to skip emission\n * and just return the JSON string.\n */\nLogger.prototype._emit = function (rec, noemit) {\n var i;\n\n // Lazily determine if this Logger has non-'raw' streams. If there are\n // any, then we need to stringify the log record.\n if (this.haveNonRawStreams === undefined) {\n this.haveNonRawStreams = false;\n for (i = 0; i < this.streams.length; i++) {\n if (!this.streams[i].raw) {\n this.haveNonRawStreams = true;\n break;\n }\n }\n }\n\n // Stringify the object. Attempt to warn/recover on error.\n var str;\n if (noemit || this.haveNonRawStreams) {\n try {\n str = JSON.stringify(rec, safeCycles()) + '\\n';\n } catch (e) {\n if (safeJsonStringify) {\n str = safeJsonStringify(rec) + '\\n';\n } else {\n var dedupKey = e.stack.split(/\\n/g, 2).join('\\n');\n _warn('bunyan: ERROR: Exception in '\n + '`JSON.stringify(rec)`. You can install the '\n + '\"safe-json-stringify\" module to have Bunyan fallback '\n + 'to safer stringification. Record:\\n'\n + _indent(format('%s\\n%s', util.inspect(rec), e.stack)),\n dedupKey);\n str = format('(Exception in JSON.stringify(rec): %j. '\n + 'See stderr for details.)\\n', e.message);\n }\n }\n }\n\n if (noemit)\n return str;\n\n var level = rec.level;\n for (i = 0; i < this.streams.length; i++) {\n var s = this.streams[i];\n if (s.level <= level) {\n xxx('writing log rec \"%s\" to \"%s\" stream (%d <= %d): %j',\n rec.msg, s.type, s.level, level, rec);\n s.stream.write(s.raw ? rec : str);\n }\n };\n\n return str;\n}\n\n\n/**\n * Build a log emitter function for level minLevel. I.e. this is the\n * creator of `log.info`, `log.error`, etc.\n */\nfunction mkLogEmitter(minLevel) {\n return function () {\n var log = this;\n\n function mkRecord(args) {\n var excludeFields;\n if (args[0] instanceof Error) {\n // `log.(err, ...)`\n fields = {\n // Use this Logger's err serializer, if defined.\n err: (log.serializers && log.serializers.err\n ? log.serializers.err(args[0])\n : Logger.stdSerializers.err(args[0]))\n };\n excludeFields = {err: true};\n if (args.length === 1) {\n msgArgs = [fields.err.message];\n } else {\n msgArgs = Array.prototype.slice.call(args, 1);\n }\n } else if (typeof (args[0]) !== 'object' && args[0] !== null ||\n Array.isArray(args[0])) {\n // `log.(msg, ...)`\n fields = null;\n msgArgs = Array.prototype.slice.call(args);\n } else if (Buffer.isBuffer(args[0])) { // `log.(buf, ...)`\n // Almost certainly an error, show `inspect(buf)`. See bunyan\n // issue #35.\n fields = null;\n msgArgs = Array.prototype.slice.call(args);\n msgArgs[0] = util.inspect(msgArgs[0]);\n } else { // `log.(fields, msg, ...)`\n fields = args[0];\n msgArgs = Array.prototype.slice.call(args, 1);\n }\n\n // Build up the record object.\n var rec = objCopy(log.fields);\n var level = rec.level = minLevel;\n var recFields = (fields ? objCopy(fields) : null);\n if (recFields) {\n if (log.serializers) {\n log._applySerializers(recFields, excludeFields);\n }\n Object.keys(recFields).forEach(function (k) {\n rec[k] = recFields[k];\n });\n }\n rec.msg = format.apply(log, msgArgs);\n if (!rec.time) {\n rec.time = (new Date());\n }\n // Get call source info\n if (log.src && !rec.src) {\n rec.src = getCaller3Info()\n }\n rec.v = LOG_VERSION;\n\n return rec;\n };\n\n var fields = null;\n var msgArgs = arguments;\n var str = null;\n var rec = null;\n if (! this._emit) {\n /*\n * Show this invalid Bunyan usage warning *once*.\n *\n * See for\n * an example of how this can happen.\n */\n var dedupKey = 'unbound';\n if (!_haveWarned[dedupKey]) {\n var caller = getCaller3Info();\n _warn(format('bunyan usage error: %s:%s: attempt to log '\n + 'with an unbound log method: `this` is: %s',\n caller.file, caller.line, util.inspect(this)),\n dedupKey);\n }\n return;\n } else if (arguments.length === 0) { // `log.()`\n return (this._level <= minLevel);\n } else if (this._level > minLevel) {\n /* pass through */\n } else {\n rec = mkRecord(msgArgs);\n str = this._emit(rec);\n }\n probes && probes[minLevel].fire(function () {\n return [ str ||\n (rec && log._emit(rec, true)) ||\n log._emit(mkRecord(msgArgs), true) ];\n });\n }\n}\n\n\n/**\n * The functions below log a record at a specific level.\n *\n * Usages:\n * log.() -> boolean is-trace-enabled\n * log.( err, [ msg, ...])\n * log.( msg, ...)\n * log.( fields, msg, ...)\n *\n * where is the lowercase version of the log level. E.g.:\n *\n * log.info()\n *\n * @params fields {Object} Optional set of additional fields to log.\n * @params msg {String} Log message. This can be followed by additional\n * arguments that are handled like\n * [util.format](http://nodejs.org/docs/latest/api/all.html#util.format).\n */\nLogger.prototype.trace = mkLogEmitter(TRACE);\nLogger.prototype.debug = mkLogEmitter(DEBUG);\nLogger.prototype.info = mkLogEmitter(INFO);\nLogger.prototype.warn = mkLogEmitter(WARN);\nLogger.prototype.error = mkLogEmitter(ERROR);\nLogger.prototype.fatal = mkLogEmitter(FATAL);\n\n\n\n//---- Standard serializers\n// A serializer is a function that serializes a JavaScript object to a\n// JSON representation for logging. There is a standard set of presumed\n// interesting objects in node.js-land.\n\nLogger.stdSerializers = {};\n\n// Serialize an HTTP request.\nLogger.stdSerializers.req = function req(req) {\n if (!req || !req.connection)\n return req;\n return {\n method: req.method,\n url: req.url,\n headers: req.headers,\n remoteAddress: req.connection.remoteAddress,\n remotePort: req.connection.remotePort\n };\n // Trailers: Skipping for speed. If you need trailers in your app, then\n // make a custom serializer.\n //if (Object.keys(trailers).length > 0) {\n // obj.trailers = req.trailers;\n //}\n};\n\n// Serialize an HTTP response.\nLogger.stdSerializers.res = function res(res) {\n if (!res || !res.statusCode)\n return res;\n return {\n statusCode: res.statusCode,\n header: res._header\n }\n};\n\n\n/*\n * This function dumps long stack traces for exceptions having a cause()\n * method. The error classes from\n * [verror](https://github.com/davepacheco/node-verror) and\n * [restify v2.0](https://github.com/mcavage/node-restify) are examples.\n *\n * Based on `dumpException` in\n * https://github.com/davepacheco/node-extsprintf/blob/master/lib/extsprintf.js\n */\nfunction getFullErrorStack(ex)\n{\n var ret = ex.stack || ex.toString();\n if (ex.cause && typeof (ex.cause) === 'function') {\n var cex = ex.cause();\n if (cex) {\n ret += '\\nCaused by: ' + getFullErrorStack(cex);\n }\n }\n return (ret);\n}\n\n// Serialize an Error object\n// (Core error properties are enumerable in node 0.4, not in 0.6).\nvar errSerializer = Logger.stdSerializers.err = function err(err) {\n if (!err || !err.stack)\n return err;\n var obj = {\n message: err.message,\n name: err.name,\n stack: getFullErrorStack(err),\n code: err.code,\n signal: err.signal\n }\n return obj;\n};\n\n\n// A JSON stringifier that handles cycles safely.\n// Usage: JSON.stringify(obj, safeCycles())\nfunction safeCycles() {\n var seen = [];\n return function (key, val) {\n if (!val || typeof (val) !== 'object') {\n return val;\n }\n if (seen.indexOf(val) !== -1) {\n return '[Circular]';\n }\n seen.push(val);\n return val;\n };\n}\n\n\n/**\n * XXX\n */\nif (mv) {\n\nfunction RotatingFileStream(options) {\n this.path = options.path;\n this.stream = fs.createWriteStream(this.path,\n {flags: 'a', encoding: 'utf8'});\n this.count = (options.count == null ? 10 : options.count);\n assert.equal(typeof (this.count), 'number',\n format('rotating-file stream \"count\" is not a number: %j (%s) in %j',\n this.count, typeof (this.count), this));\n assert.ok(this.count >= 0,\n format('rotating-file stream \"count\" is not >= 0: %j in %j',\n this.count, this));\n\n // Parse `options.period`.\n if (options.period) {\n // where scope is:\n // h hours (at the start of the hour)\n // d days (at the start of the day, i.e. just after midnight)\n // w weeks (at the start of Sunday)\n // m months (on the first of the month)\n // y years (at the start of Jan 1st)\n // with special values 'hourly' (1h), 'daily' (1d), \"weekly\" (1w),\n // 'monthly' (1m) and 'yearly' (1y)\n var period = {\n 'hourly': '1h',\n 'daily': '1d',\n 'weekly': '1w',\n 'monthly': '1m',\n 'yearly': '1y'\n }[options.period] || options.period;\n var m = /^([1-9][0-9]*)([hdwmy]|ms)$/.exec(period);\n if (!m) {\n throw new Error(format('invalid period: \"%s\"', options.period));\n }\n this.periodNum = Number(m[1]);\n this.periodScope = m[2];\n } else {\n this.periodNum = 1;\n this.periodScope = 'd';\n }\n\n // TODO: template support for backup files\n // template: \n // default is %P.%n\n // '/var/log/archive/foo.log' -> foo.log.%n\n // '/var/log/archive/foo.log.%n'\n // codes:\n // XXX support strftime codes (per node version of those)\n // or whatever module. Pick non-colliding for extra\n // codes\n // %P `path` base value\n // %n integer number of rotated log (1,2,3,...)\n // %d datetime in YYYY-MM-DD_HH-MM-SS\n // XXX what should default date format be?\n // prior art? Want to avoid ':' in\n // filenames (illegal on Windows for one).\n\n this.rotQueue = [];\n this.rotating = false;\n this._setupNextRot();\n}\n\nutil.inherits(RotatingFileStream, EventEmitter);\n\nRotatingFileStream.prototype._setupNextRot = function () {\n var self = this;\n this.rotAt = this._nextRotTime();\n var delay = this.rotAt - Date.now();\n // Cap timeout to Node's max setTimeout, see\n // .\n var TIMEOUT_MAX = 2147483647; // 2^31-1\n if (delay > TIMEOUT_MAX) {\n delay = TIMEOUT_MAX;\n }\n this.timeout = setTimeout(\n function () { self.rotate(); },\n delay);\n if (typeof (this.timeout.unref) === 'function') {\n this.timeout.unref();\n }\n}\n\nRotatingFileStream.prototype._nextRotTime = function _nextRotTime(first) {\n var _DEBUG = false;\n if (_DEBUG)\n console.log('-- _nextRotTime: %s%s', this.periodNum, this.periodScope);\n var d = new Date();\n\n if (_DEBUG) console.log(' now local: %s', d);\n if (_DEBUG) console.log(' now utc: %s', d.toISOString());\n var rotAt;\n switch (this.periodScope) {\n case 'ms':\n // Hidden millisecond period for debugging.\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum;\n } else {\n rotAt = Date.now() + this.periodNum;\n }\n break;\n case 'h':\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum * 60 * 60 * 1000;\n } else {\n // First time: top of the next hour.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(),\n d.getUTCDate(), d.getUTCHours() + 1);\n }\n break;\n case 'd':\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum * 24 * 60 * 60 * 1000;\n } else {\n // First time: start of tomorrow (i.e. at the coming midnight) UTC.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(),\n d.getUTCDate() + 1);\n }\n break;\n case 'w':\n // Currently, always on Sunday morning at 00:00:00 (UTC).\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum * 7 * 24 * 60 * 60 * 1000;\n } else {\n // First time: this coming Sunday.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(),\n d.getUTCDate() + (7 - d.getUTCDay()));\n }\n break;\n case 'm':\n if (this.rotAt) {\n rotAt = Date.UTC(d.getUTCFullYear(),\n d.getUTCMonth() + this.periodNum, 1);\n } else {\n // First time: the start of the next month.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth() + 1, 1);\n }\n break;\n case 'y':\n if (this.rotAt) {\n rotAt = Date.UTC(d.getUTCFullYear() + this.periodNum, 0, 1);\n } else {\n // First time: the start of the next year.\n rotAt = Date.UTC(d.getUTCFullYear() + 1, 0, 1);\n }\n break;\n default:\n assert.fail(format('invalid period scope: \"%s\"', this.periodScope));\n }\n\n if (_DEBUG) {\n console.log(' **rotAt**: %s (utc: %s)', rotAt,\n new Date(rotAt).toUTCString());\n var now = Date.now();\n console.log(' now: %s (%sms == %smin == %sh to go)',\n now,\n rotAt - now,\n (rotAt-now)/1000/60,\n (rotAt-now)/1000/60/60);\n }\n return rotAt;\n};\n\nRotatingFileStream.prototype.rotate = function rotate() {\n // XXX What about shutdown?\n var self = this;\n var _DEBUG = false;\n\n // If rotation period is > ~25 days, we have to break into multiple\n // setTimeout's. See .\n if (self.rotAt && self.rotAt > Date.now()) {\n return self._setupNextRot();\n }\n\n if (_DEBUG) {\n console.log('-- [%s, pid=%s] rotating %s',\n new Date(), process.pid, self.path);\n }\n if (self.rotating) {\n throw new TypeError('cannot start a rotation when already rotating');\n }\n self.rotating = true;\n\n self.stream.end(); // XXX can do moves sync after this? test at high rate\n\n function del() {\n var toDel = self.path + '.' + String(n - 1);\n if (n === 0) {\n toDel = self.path;\n }\n n -= 1;\n if (_DEBUG) console.log('rm %s', toDel);\n fs.unlink(toDel, function (delErr) {\n //XXX handle err other than not exists\n moves();\n });\n }\n\n function moves() {\n if (self.count === 0 || n < 0) {\n return finish();\n }\n var before = self.path;\n var after = self.path + '.' + String(n);\n if (n > 0) {\n before += '.' + String(n - 1);\n }\n n -= 1;\n fs.exists(before, function (exists) {\n if (!exists) {\n moves();\n } else {\n if (_DEBUG) {\n console.log('[pid %s] mv %s %s',\n process.pid, before, after);\n }\n mv(before, after, function (mvErr) {\n if (mvErr) {\n self.emit('error', mvErr);\n finish(); // XXX finish here?\n } else {\n moves();\n }\n });\n }\n })\n }\n\n function finish() {\n if (_DEBUG) console.log('[pid %s] open %s', process.pid, self.path);\n self.stream = fs.createWriteStream(self.path,\n {flags: 'a', encoding: 'utf8'});\n var q = self.rotQueue, len = q.length;\n for (var i = 0; i < len; i++) {\n self.stream.write(q[i]);\n }\n self.rotQueue = [];\n self.rotating = false;\n self.emit('drain');\n self._setupNextRot();\n }\n\n var n = this.count;\n del();\n};\n\nRotatingFileStream.prototype.write = function write(s) {\n if (this.rotating) {\n this.rotQueue.push(s);\n return false;\n } else {\n return this.stream.write(s);\n }\n};\n\nRotatingFileStream.prototype.end = function end(s) {\n this.stream.end();\n};\n\nRotatingFileStream.prototype.destroy = function destroy(s) {\n this.stream.destroy();\n};\n\nRotatingFileStream.prototype.destroySoon = function destroySoon(s) {\n this.stream.destroySoon();\n};\n\n} /* if (mv) */\n\n\n\n/**\n * RingBuffer is a Writable Stream that just stores the last N records in\n * memory.\n *\n * @param options {Object}, with the following fields:\n *\n * - limit: number of records to keep in memory\n */\nfunction RingBuffer(options) {\n this.limit = options && options.limit ? options.limit : 100;\n this.writable = true;\n this.records = [];\n EventEmitter.call(this);\n}\n\nutil.inherits(RingBuffer, EventEmitter);\n\nRingBuffer.prototype.write = function (record) {\n if (!this.writable)\n throw (new Error('RingBuffer has been ended already'));\n\n this.records.push(record);\n\n if (this.records.length > this.limit)\n this.records.shift();\n\n return (true);\n};\n\nRingBuffer.prototype.end = function () {\n if (arguments.length > 0)\n this.write.apply(this, Array.prototype.slice.call(arguments));\n this.writable = false;\n};\n\nRingBuffer.prototype.destroy = function () {\n this.writable = false;\n this.emit('close');\n};\n\nRingBuffer.prototype.destroySoon = function () {\n this.destroy();\n};\n\n\n//---- Exports\n\nmodule.exports = Logger;\n\nmodule.exports.TRACE = TRACE;\nmodule.exports.DEBUG = DEBUG;\nmodule.exports.INFO = INFO;\nmodule.exports.WARN = WARN;\nmodule.exports.ERROR = ERROR;\nmodule.exports.FATAL = FATAL;\nmodule.exports.resolveLevel = resolveLevel;\nmodule.exports.levelFromName = levelFromName;\nmodule.exports.nameFromLevel = nameFromLevel;\n\nmodule.exports.VERSION = VERSION;\nmodule.exports.LOG_VERSION = LOG_VERSION;\n\nmodule.exports.createLogger = function createLogger(options) {\n return new Logger(options);\n};\n\nmodule.exports.RingBuffer = RingBuffer;\nmodule.exports.RotatingFileStream = RotatingFileStream;\n\n// Useful for custom `type == 'raw'` streams that may do JSON stringification\n// of log records themselves. Usage:\n// var str = JSON.stringify(rec, bunyan.safeCycles());\nmodule.exports.safeCycles = safeCycles;\n", "var hasProp = Object.prototype.hasOwnProperty;\n\nfunction throwsMessage(err) {\n\treturn '[Throws: ' + (err ? err.message : '?') + ']';\n}\n\nfunction safeGetValueFromPropertyOnObject(obj, property) {\n\tif (hasProp.call(obj, property)) {\n\t\ttry {\n\t\t\treturn obj[property];\n\t\t}\n\t\tcatch (err) {\n\t\t\treturn throwsMessage(err);\n\t\t}\n\t}\n\n\treturn obj[property];\n}\n\nfunction ensureProperties(obj) {\n\tvar seen = [ ]; // store references to objects we have seen before\n\n\tfunction visit(obj) {\n\t\tif (obj === null || typeof obj !== 'object') {\n\t\t\treturn obj;\n\t\t}\n\n\t\tif (seen.indexOf(obj) !== -1) {\n\t\t\treturn '[Circular]';\n\t\t}\n\t\tseen.push(obj);\n\n\t\tif (typeof obj.toJSON === 'function') {\n\t\t\ttry {\n\t\t\t\treturn visit(obj.toJSON());\n\t\t\t} catch(err) {\n\t\t\t\treturn throwsMessage(err);\n\t\t\t}\n\t\t}\n\n\t\tif (Array.isArray(obj)) {\n\t\t\treturn obj.map(visit);\n\t\t}\n\n\t\treturn Object.keys(obj).reduce(function(result, prop) {\n\t\t\t// prevent faulty defined getter properties\n\t\t\tresult[prop] = visit(safeGetValueFromPropertyOnObject(obj, prop));\n\t\t\treturn result;\n\t\t}, {});\n\t};\n\n\treturn visit(obj);\n}\n\nmodule.exports = function(data) {\n\treturn JSON.stringify(ensureProperties(data));\n}\n\nmodule.exports.ensureProperties = ensureProperties;\n", - "(function() {\n var exportedLog, ffSupport, formats, getOrderedMatches, hasMatches, isFF, isIE, isOpera, isSafari, log, makeArray, operaSupport, safariSupport, stringToArgs, _log;\n\n if (!(window.console && window.console.log)) {\n return;\n }\n\n log = function() {\n var args;\n args = [];\n makeArray(arguments).forEach(function(arg) {\n if (typeof arg === 'string') {\n return args = args.concat(stringToArgs(arg));\n } else {\n return args.push(arg);\n }\n });\n return _log.apply(window, args);\n };\n\n _log = function() {\n return console.log.apply(console, makeArray(arguments));\n };\n\n makeArray = function(arrayLikeThing) {\n return Array.prototype.slice.call(arrayLikeThing);\n };\n\n formats = [\n {\n regex: /\\*([^\\*]+)\\*/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['font-style: italic', ''];\n }\n }, {\n regex: /\\_([^\\_]+)\\_/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['font-weight: bold', ''];\n }\n }, {\n regex: /\\`([^\\`]+)\\`/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', ''];\n }\n }, {\n regex: /\\[c\\=(?:\\\"|\\')?((?:(?!(?:\\\"|\\')\\]).)*)(?:\\\"|\\')?\\]((?:(?!\\[c\\]).)*)\\[c\\]/,\n replacer: function(m, p1, p2) {\n return \"%c\" + p2 + \"%c\";\n },\n styles: function(match) {\n return [match[1], ''];\n }\n }\n ];\n\n hasMatches = function(str) {\n var _hasMatches;\n _hasMatches = false;\n formats.forEach(function(format) {\n if (format.regex.test(str)) {\n return _hasMatches = true;\n }\n });\n return _hasMatches;\n };\n\n getOrderedMatches = function(str) {\n var matches;\n matches = [];\n formats.forEach(function(format) {\n var match;\n match = str.match(format.regex);\n if (match) {\n return matches.push({\n format: format,\n match: match\n });\n }\n });\n return matches.sort(function(a, b) {\n return a.match.index - b.match.index;\n });\n };\n\n stringToArgs = function(str) {\n var firstMatch, matches, styles;\n styles = [];\n while (hasMatches(str)) {\n matches = getOrderedMatches(str);\n firstMatch = matches[0];\n str = str.replace(firstMatch.format.regex, firstMatch.format.replacer);\n styles = styles.concat(firstMatch.format.styles(firstMatch.match));\n }\n return [str].concat(styles);\n };\n\n isSafari = function() {\n return /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);\n };\n\n isOpera = function() {\n return /OPR/.test(navigator.userAgent) && /Opera/.test(navigator.vendor);\n };\n\n isFF = function() {\n return /Firefox/.test(navigator.userAgent);\n };\n\n isIE = function() {\n return /MSIE/.test(navigator.userAgent);\n };\n\n safariSupport = function() {\n var m;\n m = navigator.userAgent.match(/AppleWebKit\\/(\\d+)\\.(\\d+)(\\.|\\+|\\s)/);\n if (!m) {\n return false;\n }\n return 537.38 <= parseInt(m[1], 10) + (parseInt(m[2], 10) / 100);\n };\n\n operaSupport = function() {\n var m;\n m = navigator.userAgent.match(/OPR\\/(\\d+)\\./);\n if (!m) {\n return false;\n }\n return 15 <= parseInt(m[1], 10);\n };\n\n ffSupport = function() {\n return window.console.firebug || window.console.exception;\n };\n\n if (isIE() || (isFF() && !ffSupport()) || (isOpera() && !operaSupport()) || (isSafari() && !safariSupport())) {\n exportedLog = _log;\n } else {\n exportedLog = log;\n }\n\n exportedLog.l = _log;\n\n if (typeof define === 'function' && define.amd) {\n define(exportedLog);\n } else if (typeof exports !== 'undefined') {\n module.exports = exportedLog;\n } else {\n window.log = exportedLog;\n }\n\n}).call(this);\n", - "RotatingFileStream = null; // see: https://github.com/trentm/node-bunyan/issues/223\nbunyan = require('bunyan');\nbunyanFormat = require('bunyan-format');\n\nvar WritableStream = require('stream').Writable;\nvar inherits = require('util').inherits;\nvar logStyle = require('log-with-style');\n\ninherits(BrowserStdout, WritableStream);\n\nfunction BrowserStdout() {\n if (!(this instanceof BrowserStdout)) {\n return new BrowserStdout();\n }\n WritableStream.call(this);\n}\n\nBrowserStdout.prototype._write = function(chunks, encoding, cb) {\n var output = JSON.parse(chunks.toString ? chunks.toString() : chunks);\n var color = '[c=\"color: green\"]';\n var level = 'INFO';\n if (output.level > 40) {\n color = '[c=\"color: red\"]';\n if (output.level === 60) {\n level = 'FATAL';\n } else {\n level = 'ERROR';\n }\n } else if (output.level === 40) {\n color = '[c=\"color: orange\"]';\n level = 'WARNING';\n } else if (output.level === 20) {\n level = 'DEBUG';\n } else if (output.level === 10) {\n level = 'TRACE';\n }\n logStyle(color + level + '[c] ' + '[c=\"color: blue\"]' + output.name + '[c] ' + output.msg);\n process.nextTick(cb);\n};\n\n// Import process.stdout and process.stderr\nprocess = require('process');\nprocess.stdout = BrowserStdout();\nprocess.stderr = BrowserStdout();\n\norion.logFormatter = BrowserStdout();\n" + "(function() {\n var exportedLog, ffSupport, formats, getOrderedMatches, hasMatches, isFF, isIE, isOpera, isSafari, log, makeArray, operaSupport, safariSupport, stringToArgs, _log;\n\n if (!(window.console && window.console.log)) {\n return;\n }\n\n log = function() {\n var args;\n args = [];\n makeArray(arguments).forEach(function(arg) {\n if (typeof arg === 'string') {\n return args = args.concat(stringToArgs(arg));\n } else {\n return args.push(arg);\n }\n });\n return _log.apply(window, args);\n };\n\n _log = function() {\n return console.log.apply(console, makeArray(arguments));\n };\n\n makeArray = function(arrayLikeThing) {\n return Array.prototype.slice.call(arrayLikeThing);\n };\n\n formats = [\n {\n regex: /\\*([^\\*]+)\\*/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['font-style: italic', ''];\n }\n }, {\n regex: /\\_([^\\_]+)\\_/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['font-weight: bold', ''];\n }\n }, {\n regex: /\\`([^\\`]+)\\`/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', ''];\n }\n }, {\n regex: /\\[c\\=(?:\\\"|\\')?((?:(?!(?:\\\"|\\')\\]).)*)(?:\\\"|\\')?\\]((?:(?!\\[c\\]).)*)\\[c\\]/,\n replacer: function(m, p1, p2) {\n return \"%c\" + p2 + \"%c\";\n },\n styles: function(match) {\n return [match[1], ''];\n }\n }\n ];\n\n hasMatches = function(str) {\n var _hasMatches;\n _hasMatches = false;\n formats.forEach(function(format) {\n if (format.regex.test(str)) {\n return _hasMatches = true;\n }\n });\n return _hasMatches;\n };\n\n getOrderedMatches = function(str) {\n var matches;\n matches = [];\n formats.forEach(function(format) {\n var match;\n match = str.match(format.regex);\n if (match) {\n return matches.push({\n format: format,\n match: match\n });\n }\n });\n return matches.sort(function(a, b) {\n return a.match.index - b.match.index;\n });\n };\n\n stringToArgs = function(str) {\n var firstMatch, matches, styles;\n styles = [];\n while (hasMatches(str)) {\n matches = getOrderedMatches(str);\n firstMatch = matches[0];\n str = str.replace(firstMatch.format.regex, firstMatch.format.replacer);\n styles = styles.concat(firstMatch.format.styles(firstMatch.match));\n }\n return [str].concat(styles);\n };\n\n isSafari = function() {\n return /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);\n };\n\n isOpera = function() {\n return /OPR/.test(navigator.userAgent) && /Opera/.test(navigator.vendor);\n };\n\n isFF = function() {\n return /Firefox/.test(navigator.userAgent);\n };\n\n isIE = function() {\n return /MSIE/.test(navigator.userAgent);\n };\n\n safariSupport = function() {\n var m;\n m = navigator.userAgent.match(/AppleWebKit\\/(\\d+)\\.(\\d+)(\\.|\\+|\\s)/);\n if (!m) {\n return false;\n }\n return 537.38 <= parseInt(m[1], 10) + (parseInt(m[2], 10) / 100);\n };\n\n operaSupport = function() {\n var m;\n m = navigator.userAgent.match(/OPR\\/(\\d+)\\./);\n if (!m) {\n return false;\n }\n return 15 <= parseInt(m[1], 10);\n };\n\n ffSupport = function() {\n return window.console.firebug || window.console.exception;\n };\n\n if (isIE() || (isFF() && !ffSupport()) || (isOpera() && !operaSupport()) || (isSafari() && !safariSupport())) {\n exportedLog = _log;\n } else {\n exportedLog = log;\n }\n\n exportedLog.l = _log;\n\n if (typeof define === 'function' && define.amd) {\n define(exportedLog);\n } else if (typeof exports !== 'undefined') {\n module.exports = exportedLog;\n } else {\n window.log = exportedLog;\n }\n\n}).call(this);\n" ] } \ No newline at end of file From 2fa33ab2795cb884a7549e7d027033523e5313e8 Mon Sep 17 00:00:00 2001 From: PEM-- Date: Mon, 17 Aug 2015 16:22:24 +0200 Subject: [PATCH 8/8] Better logging API for easing the creation of custom log formatter --- packages/logging/logging_client.browserify.js | 8 +- .../logging_client.browserify.js.cached | 2876 +---------------- .../logging/logging_client.browserify.js.map | 42 +- packages/logging/package.js | 6 +- 4 files changed, 91 insertions(+), 2841 deletions(-) diff --git a/packages/logging/logging_client.browserify.js b/packages/logging/logging_client.browserify.js index 1328277..fada6ac 100644 --- a/packages/logging/logging_client.browserify.js +++ b/packages/logging/logging_client.browserify.js @@ -1,10 +1,8 @@ RotatingFileStream = null; // see: https://github.com/trentm/node-bunyan/issues/223 bunyan = require('bunyan'); -bunyanFormat = require('bunyan-format'); - -var WritableStream = require('stream').Writable; -var inherits = require('util').inherits; -var logStyle = require('log-with-style'); +WritableStream = require('stream').Writable; +inherits = require('util').inherits; +logStyle = require('log-with-style'); inherits(BrowserStdout, WritableStream); diff --git a/packages/logging/logging_client.browserify.js.cached b/packages/logging/logging_client.browserify.js.cached index d46e195..308877a 100644 --- a/packages/logging/logging_client.browserify.js.cached +++ b/packages/logging/logging_client.browserify.js.cached @@ -361,7 +361,7 @@ var objectKeys = Object.keys || function (obj) { return keys; }; -},{"util/":36}],3:[function(require,module,exports){ +},{"util/":27}],3:[function(require,module,exports){ arguments[4][1][0].apply(exports,arguments) },{"dup":1}],4:[function(require,module,exports){ /*! @@ -2353,547 +2353,6 @@ function isUndefined(arg) { } },{}],9:[function(require,module,exports){ -var http = module.exports; -var EventEmitter = require('events').EventEmitter; -var Request = require('./lib/request'); -var url = require('url') - -http.request = function (params, cb) { - if (typeof params === 'string') { - params = url.parse(params) - } - if (!params) params = {}; - if (!params.host && !params.port) { - params.port = parseInt(window.location.port, 10); - } - if (!params.host && params.hostname) { - params.host = params.hostname; - } - - if (!params.protocol) { - if (params.scheme) { - params.protocol = params.scheme + ':'; - } else { - params.protocol = window.location.protocol; - } - } - - if (!params.host) { - params.host = window.location.hostname || window.location.host; - } - if (/:/.test(params.host)) { - if (!params.port) { - params.port = params.host.split(':')[1]; - } - params.host = params.host.split(':')[0]; - } - if (!params.port) params.port = params.protocol == 'https:' ? 443 : 80; - - var req = new Request(new xhrHttp, params); - if (cb) req.on('response', cb); - return req; -}; - -http.get = function (params, cb) { - params.method = 'GET'; - var req = http.request(params, cb); - req.end(); - return req; -}; - -http.Agent = function () {}; -http.Agent.defaultMaxSockets = 4; - -var xhrHttp = (function () { - if (typeof window === 'undefined') { - throw new Error('no window object present'); - } - else if (window.XMLHttpRequest) { - return window.XMLHttpRequest; - } - else if (window.ActiveXObject) { - var axs = [ - 'Msxml2.XMLHTTP.6.0', - 'Msxml2.XMLHTTP.3.0', - 'Microsoft.XMLHTTP' - ]; - for (var i = 0; i < axs.length; i++) { - try { - var ax = new(window.ActiveXObject)(axs[i]); - return function () { - if (ax) { - var ax_ = ax; - ax = null; - return ax_; - } - else { - return new(window.ActiveXObject)(axs[i]); - } - }; - } - catch (e) {} - } - throw new Error('ajax not supported in this browser') - } - else { - throw new Error('ajax not supported in this browser'); - } -})(); - -http.STATUS_CODES = { - 100 : 'Continue', - 101 : 'Switching Protocols', - 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918 - 200 : 'OK', - 201 : 'Created', - 202 : 'Accepted', - 203 : 'Non-Authoritative Information', - 204 : 'No Content', - 205 : 'Reset Content', - 206 : 'Partial Content', - 207 : 'Multi-Status', // RFC 4918 - 300 : 'Multiple Choices', - 301 : 'Moved Permanently', - 302 : 'Moved Temporarily', - 303 : 'See Other', - 304 : 'Not Modified', - 305 : 'Use Proxy', - 307 : 'Temporary Redirect', - 400 : 'Bad Request', - 401 : 'Unauthorized', - 402 : 'Payment Required', - 403 : 'Forbidden', - 404 : 'Not Found', - 405 : 'Method Not Allowed', - 406 : 'Not Acceptable', - 407 : 'Proxy Authentication Required', - 408 : 'Request Time-out', - 409 : 'Conflict', - 410 : 'Gone', - 411 : 'Length Required', - 412 : 'Precondition Failed', - 413 : 'Request Entity Too Large', - 414 : 'Request-URI Too Large', - 415 : 'Unsupported Media Type', - 416 : 'Requested Range Not Satisfiable', - 417 : 'Expectation Failed', - 418 : 'I\'m a teapot', // RFC 2324 - 422 : 'Unprocessable Entity', // RFC 4918 - 423 : 'Locked', // RFC 4918 - 424 : 'Failed Dependency', // RFC 4918 - 425 : 'Unordered Collection', // RFC 4918 - 426 : 'Upgrade Required', // RFC 2817 - 428 : 'Precondition Required', // RFC 6585 - 429 : 'Too Many Requests', // RFC 6585 - 431 : 'Request Header Fields Too Large',// RFC 6585 - 500 : 'Internal Server Error', - 501 : 'Not Implemented', - 502 : 'Bad Gateway', - 503 : 'Service Unavailable', - 504 : 'Gateway Time-out', - 505 : 'HTTP Version Not Supported', - 506 : 'Variant Also Negotiates', // RFC 2295 - 507 : 'Insufficient Storage', // RFC 4918 - 509 : 'Bandwidth Limit Exceeded', - 510 : 'Not Extended', // RFC 2774 - 511 : 'Network Authentication Required' // RFC 6585 -}; -},{"./lib/request":10,"events":8,"url":34}],10:[function(require,module,exports){ -var Stream = require('stream'); -var Response = require('./response'); -var Base64 = require('Base64'); -var inherits = require('inherits'); - -var Request = module.exports = function (xhr, params) { - var self = this; - self.writable = true; - self.xhr = xhr; - self.body = []; - - self.uri = (params.protocol || 'http:') + '//' - + params.host - + (params.port ? ':' + params.port : '') - + (params.path || '/') - ; - - if (typeof params.withCredentials === 'undefined') { - params.withCredentials = true; - } - - try { xhr.withCredentials = params.withCredentials } - catch (e) {} - - if (params.responseType) try { xhr.responseType = params.responseType } - catch (e) {} - - xhr.open( - params.method || 'GET', - self.uri, - true - ); - - xhr.onerror = function(event) { - self.emit('error', new Error('Network error')); - }; - - self._headers = {}; - - if (params.headers) { - var keys = objectKeys(params.headers); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - if (!self.isSafeRequestHeader(key)) continue; - var value = params.headers[key]; - self.setHeader(key, value); - } - } - - if (params.auth) { - //basic auth - this.setHeader('Authorization', 'Basic ' + Base64.btoa(params.auth)); - } - - var res = new Response; - res.on('close', function () { - self.emit('close'); - }); - - res.on('ready', function () { - self.emit('response', res); - }); - - res.on('error', function (err) { - self.emit('error', err); - }); - - xhr.onreadystatechange = function () { - // Fix for IE9 bug - // SCRIPT575: Could not complete the operation due to error c00c023f - // It happens when a request is aborted, calling the success callback anyway with readyState === 4 - if (xhr.__aborted) return; - res.handle(xhr); - }; -}; - -inherits(Request, Stream); - -Request.prototype.setHeader = function (key, value) { - this._headers[key.toLowerCase()] = value -}; - -Request.prototype.getHeader = function (key) { - return this._headers[key.toLowerCase()] -}; - -Request.prototype.removeHeader = function (key) { - delete this._headers[key.toLowerCase()] -}; - -Request.prototype.write = function (s) { - this.body.push(s); -}; - -Request.prototype.destroy = function (s) { - this.xhr.__aborted = true; - this.xhr.abort(); - this.emit('close'); -}; - -Request.prototype.end = function (s) { - if (s !== undefined) this.body.push(s); - - var keys = objectKeys(this._headers); - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = this._headers[key]; - if (isArray(value)) { - for (var j = 0; j < value.length; j++) { - this.xhr.setRequestHeader(key, value[j]); - } - } - else this.xhr.setRequestHeader(key, value) - } - - if (this.body.length === 0) { - this.xhr.send(''); - } - else if (typeof this.body[0] === 'string') { - this.xhr.send(this.body.join('')); - } - else if (isArray(this.body[0])) { - var body = []; - for (var i = 0; i < this.body.length; i++) { - body.push.apply(body, this.body[i]); - } - this.xhr.send(body); - } - else if (/Array/.test(Object.prototype.toString.call(this.body[0]))) { - var len = 0; - for (var i = 0; i < this.body.length; i++) { - len += this.body[i].length; - } - var body = new(this.body[0].constructor)(len); - var k = 0; - - for (var i = 0; i < this.body.length; i++) { - var b = this.body[i]; - for (var j = 0; j < b.length; j++) { - body[k++] = b[j]; - } - } - this.xhr.send(body); - } - else if (isXHR2Compatible(this.body[0])) { - this.xhr.send(this.body[0]); - } - else { - var body = ''; - for (var i = 0; i < this.body.length; i++) { - body += this.body[i].toString(); - } - this.xhr.send(body); - } -}; - -// Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html -Request.unsafeHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "cookie", - "cookie2", - "content-transfer-encoding", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "user-agent", - "via" -]; - -Request.prototype.isSafeRequestHeader = function (headerName) { - if (!headerName) return false; - return indexOf(Request.unsafeHeaders, headerName.toLowerCase()) === -1; -}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -var indexOf = function (xs, x) { - if (xs.indexOf) return xs.indexOf(x); - for (var i = 0; i < xs.length; i++) { - if (xs[i] === x) return i; - } - return -1; -}; - -var isXHR2Compatible = function (obj) { - if (typeof Blob !== 'undefined' && obj instanceof Blob) return true; - if (typeof ArrayBuffer !== 'undefined' && obj instanceof ArrayBuffer) return true; - if (typeof FormData !== 'undefined' && obj instanceof FormData) return true; -}; - -},{"./response":11,"Base64":12,"inherits":13,"stream":32}],11:[function(require,module,exports){ -var Stream = require('stream'); -var util = require('util'); - -var Response = module.exports = function (res) { - this.offset = 0; - this.readable = true; -}; - -util.inherits(Response, Stream); - -var capable = { - streaming : true, - status2 : true -}; - -function parseHeaders (res) { - var lines = res.getAllResponseHeaders().split(/\r?\n/); - var headers = {}; - for (var i = 0; i < lines.length; i++) { - var line = lines[i]; - if (line === '') continue; - - var m = line.match(/^([^:]+):\s*(.*)/); - if (m) { - var key = m[1].toLowerCase(), value = m[2]; - - if (headers[key] !== undefined) { - - if (isArray(headers[key])) { - headers[key].push(value); - } - else { - headers[key] = [ headers[key], value ]; - } - } - else { - headers[key] = value; - } - } - else { - headers[line] = true; - } - } - return headers; -} - -Response.prototype.getResponse = function (xhr) { - var respType = String(xhr.responseType).toLowerCase(); - if (respType === 'blob') return xhr.responseBlob || xhr.response; - if (respType === 'arraybuffer') return xhr.response; - return xhr.responseText; -} - -Response.prototype.getHeader = function (key) { - return this.headers[key.toLowerCase()]; -}; - -Response.prototype.handle = function (res) { - if (res.readyState === 2 && capable.status2) { - try { - this.statusCode = res.status; - this.headers = parseHeaders(res); - } - catch (err) { - capable.status2 = false; - } - - if (capable.status2) { - this.emit('ready'); - } - } - else if (capable.streaming && res.readyState === 3) { - try { - if (!this.statusCode) { - this.statusCode = res.status; - this.headers = parseHeaders(res); - this.emit('ready'); - } - } - catch (err) {} - - try { - this._emitData(res); - } - catch (err) { - capable.streaming = false; - } - } - else if (res.readyState === 4) { - if (!this.statusCode) { - this.statusCode = res.status; - this.emit('ready'); - } - this._emitData(res); - - if (res.error) { - this.emit('error', this.getResponse(res)); - } - else this.emit('end'); - - this.emit('close'); - } -}; - -Response.prototype._emitData = function (res) { - var respBody = this.getResponse(res); - if (respBody.toString().match(/ArrayBuffer/)) { - this.emit('data', new Uint8Array(respBody, this.offset)); - this.offset = respBody.byteLength; - return; - } - if (respBody.length > this.offset) { - this.emit('data', respBody.slice(this.offset)); - this.offset = respBody.length; - } -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -},{"stream":32,"util":36}],12:[function(require,module,exports){ -;(function () { - - var object = typeof exports != 'undefined' ? exports : this; // #8: web workers - var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - - function InvalidCharacterError(message) { - this.message = message; - } - InvalidCharacterError.prototype = new Error; - InvalidCharacterError.prototype.name = 'InvalidCharacterError'; - - // encoder - // [https://gist.github.com/999166] by [https://github.com/nignag] - object.btoa || ( - object.btoa = function (input) { - for ( - // initialize result and counter - var block, charCode, idx = 0, map = chars, output = ''; - // if the next input index does not exist: - // change the mapping table to "=" - // check if d has no fractional digits - input.charAt(idx | 0) || (map = '=', idx % 1); - // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 - output += map.charAt(63 & block >> 8 - idx % 1 * 8) - ) { - charCode = input.charCodeAt(idx += 3/4); - if (charCode > 0xFF) { - throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."); - } - block = block << 8 | charCode; - } - return output; - }); - - // decoder - // [https://gist.github.com/1020396] by [https://github.com/atk] - object.atob || ( - object.atob = function (input) { - input = input.replace(/=+$/, ''); - if (input.length % 4 == 1) { - throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded."); - } - for ( - // initialize result and counters - var bc = 0, bs, buffer, idx = 0, output = ''; - // get next character - buffer = input.charAt(idx++); - // character found in table? initialize bit storage and add its ascii value; - ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, - // and if not first of each 4 characters, - // convert the first 8 bits to one ascii character - bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 - ) { - // try to find character in table (0-63, not found => -1) - buffer = chars.indexOf(buffer); - } - return output; - }); - -}()); - -},{}],13:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -2918,12 +2377,12 @@ if (typeof Object.create === 'function') { } } -},{}],14:[function(require,module,exports){ +},{}],10:[function(require,module,exports){ module.exports = Array.isArray || function (arr) { return Object.prototype.toString.call(arr) == '[object Array]'; }; -},{}],15:[function(require,module,exports){ +},{}],11:[function(require,module,exports){ exports.endianness = function () { return 'LE' }; exports.hostname = function () { @@ -2970,7 +2429,7 @@ exports.tmpdir = exports.tmpDir = function () { exports.EOL = '\n'; -},{}],16:[function(require,module,exports){ +},{}],12:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -3062,724 +2521,10 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],17:[function(require,module,exports){ -(function (global){ -/*! https://mths.be/punycode v1.3.2 by @mathias */ -;(function(root) { - - /** Detect free variables */ - var freeExports = typeof exports == 'object' && exports && - !exports.nodeType && exports; - var freeModule = typeof module == 'object' && module && - !module.nodeType && module; - var freeGlobal = typeof global == 'object' && global; - if ( - freeGlobal.global === freeGlobal || - freeGlobal.window === freeGlobal || - freeGlobal.self === freeGlobal - ) { - root = freeGlobal; - } - - /** - * The `punycode` object. - * @name punycode - * @type Object - */ - var punycode, - - /** Highest positive signed 32-bit float value */ - maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 - - /** Bootstring parameters */ - base = 36, - tMin = 1, - tMax = 26, - skew = 38, - damp = 700, - initialBias = 72, - initialN = 128, // 0x80 - delimiter = '-', // '\x2D' - - /** Regular expressions */ - regexPunycode = /^xn--/, - regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars - regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators - - /** Error messages */ - errors = { - 'overflow': 'Overflow: input needs wider integers to process', - 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', - 'invalid-input': 'Invalid input' - }, - - /** Convenience shortcuts */ - baseMinusTMin = base - tMin, - floor = Math.floor, - stringFromCharCode = String.fromCharCode, - - /** Temporary variable */ - key; - - /*--------------------------------------------------------------------------*/ - - /** - * A generic error utility function. - * @private - * @param {String} type The error type. - * @returns {Error} Throws a `RangeError` with the applicable error message. - */ - function error(type) { - throw RangeError(errors[type]); - } - - /** - * A generic `Array#map` utility function. - * @private - * @param {Array} array The array to iterate over. - * @param {Function} callback The function that gets called for every array - * item. - * @returns {Array} A new array of values returned by the callback function. - */ - function map(array, fn) { - var length = array.length; - var result = []; - while (length--) { - result[length] = fn(array[length]); - } - return result; - } - - /** - * A simple `Array#map`-like wrapper to work with domain name strings or email - * addresses. - * @private - * @param {String} domain The domain name or email address. - * @param {Function} callback The function that gets called for every - * character. - * @returns {Array} A new string of characters returned by the callback - * function. - */ - function mapDomain(string, fn) { - var parts = string.split('@'); - var result = ''; - if (parts.length > 1) { - // In email addresses, only the domain name should be punycoded. Leave - // the local part (i.e. everything up to `@`) intact. - result = parts[0] + '@'; - string = parts[1]; - } - // Avoid `split(regex)` for IE8 compatibility. See #17. - string = string.replace(regexSeparators, '\x2E'); - var labels = string.split('.'); - var encoded = map(labels, fn).join('.'); - return result + encoded; - } - - /** - * Creates an array containing the numeric code points of each Unicode - * character in the string. While JavaScript uses UCS-2 internally, - * this function will convert a pair of surrogate halves (each of which - * UCS-2 exposes as separate characters) into a single code point, - * matching UTF-16. - * @see `punycode.ucs2.encode` - * @see - * @memberOf punycode.ucs2 - * @name decode - * @param {String} string The Unicode input string (UCS-2). - * @returns {Array} The new array of code points. - */ - function ucs2decode(string) { - var output = [], - counter = 0, - length = string.length, - value, - extra; - while (counter < length) { - value = string.charCodeAt(counter++); - if (value >= 0xD800 && value <= 0xDBFF && counter < length) { - // high surrogate, and there is a next character - extra = string.charCodeAt(counter++); - if ((extra & 0xFC00) == 0xDC00) { // low surrogate - output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); - } else { - // unmatched surrogate; only append this code unit, in case the next - // code unit is the high surrogate of a surrogate pair - output.push(value); - counter--; - } - } else { - output.push(value); - } - } - return output; - } - - /** - * Creates a string based on an array of numeric code points. - * @see `punycode.ucs2.decode` - * @memberOf punycode.ucs2 - * @name encode - * @param {Array} codePoints The array of numeric code points. - * @returns {String} The new Unicode string (UCS-2). - */ - function ucs2encode(array) { - return map(array, function(value) { - var output = ''; - if (value > 0xFFFF) { - value -= 0x10000; - output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); - value = 0xDC00 | value & 0x3FF; - } - output += stringFromCharCode(value); - return output; - }).join(''); - } - - /** - * Converts a basic code point into a digit/integer. - * @see `digitToBasic()` - * @private - * @param {Number} codePoint The basic numeric code point value. - * @returns {Number} The numeric value of a basic code point (for use in - * representing integers) in the range `0` to `base - 1`, or `base` if - * the code point does not represent a value. - */ - function basicToDigit(codePoint) { - if (codePoint - 48 < 10) { - return codePoint - 22; - } - if (codePoint - 65 < 26) { - return codePoint - 65; - } - if (codePoint - 97 < 26) { - return codePoint - 97; - } - return base; - } - - /** - * Converts a digit/integer into a basic code point. - * @see `basicToDigit()` - * @private - * @param {Number} digit The numeric value of a basic code point. - * @returns {Number} The basic code point whose value (when used for - * representing integers) is `digit`, which needs to be in the range - * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is - * used; else, the lowercase form is used. The behavior is undefined - * if `flag` is non-zero and `digit` has no uppercase form. - */ - function digitToBasic(digit, flag) { - // 0..25 map to ASCII a..z or A..Z - // 26..35 map to ASCII 0..9 - return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); - } - - /** - * Bias adaptation function as per section 3.4 of RFC 3492. - * http://tools.ietf.org/html/rfc3492#section-3.4 - * @private - */ - function adapt(delta, numPoints, firstTime) { - var k = 0; - delta = firstTime ? floor(delta / damp) : delta >> 1; - delta += floor(delta / numPoints); - for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { - delta = floor(delta / baseMinusTMin); - } - return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); - } - - /** - * Converts a Punycode string of ASCII-only symbols to a string of Unicode - * symbols. - * @memberOf punycode - * @param {String} input The Punycode string of ASCII-only symbols. - * @returns {String} The resulting string of Unicode symbols. - */ - function decode(input) { - // Don't use UCS-2 - var output = [], - inputLength = input.length, - out, - i = 0, - n = initialN, - bias = initialBias, - basic, - j, - index, - oldi, - w, - k, - digit, - t, - /** Cached calculation results */ - baseMinusT; - - // Handle the basic code points: let `basic` be the number of input code - // points before the last delimiter, or `0` if there is none, then copy - // the first basic code points to the output. - - basic = input.lastIndexOf(delimiter); - if (basic < 0) { - basic = 0; - } - - for (j = 0; j < basic; ++j) { - // if it's not a basic code point - if (input.charCodeAt(j) >= 0x80) { - error('not-basic'); - } - output.push(input.charCodeAt(j)); - } - - // Main decoding loop: start just after the last delimiter if any basic code - // points were copied; start at the beginning otherwise. - - for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { - - // `index` is the index of the next character to be consumed. - // Decode a generalized variable-length integer into `delta`, - // which gets added to `i`. The overflow checking is easier - // if we increase `i` as we go, then subtract off its starting - // value at the end to obtain `delta`. - for (oldi = i, w = 1, k = base; /* no condition */; k += base) { - - if (index >= inputLength) { - error('invalid-input'); - } - - digit = basicToDigit(input.charCodeAt(index++)); - - if (digit >= base || digit > floor((maxInt - i) / w)) { - error('overflow'); - } - - i += digit * w; - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - - if (digit < t) { - break; - } - - baseMinusT = base - t; - if (w > floor(maxInt / baseMinusT)) { - error('overflow'); - } - - w *= baseMinusT; - - } - - out = output.length + 1; - bias = adapt(i - oldi, out, oldi == 0); - - // `i` was supposed to wrap around from `out` to `0`, - // incrementing `n` each time, so we'll fix that now: - if (floor(i / out) > maxInt - n) { - error('overflow'); - } - - n += floor(i / out); - i %= out; - - // Insert `n` at position `i` of the output - output.splice(i++, 0, n); - - } - - return ucs2encode(output); - } - - /** - * Converts a string of Unicode symbols (e.g. a domain name label) to a - * Punycode string of ASCII-only symbols. - * @memberOf punycode - * @param {String} input The string of Unicode symbols. - * @returns {String} The resulting Punycode string of ASCII-only symbols. - */ - function encode(input) { - var n, - delta, - handledCPCount, - basicLength, - bias, - j, - m, - q, - k, - t, - currentValue, - output = [], - /** `inputLength` will hold the number of code points in `input`. */ - inputLength, - /** Cached calculation results */ - handledCPCountPlusOne, - baseMinusT, - qMinusT; - - // Convert the input in UCS-2 to Unicode - input = ucs2decode(input); - - // Cache the length - inputLength = input.length; - - // Initialize the state - n = initialN; - delta = 0; - bias = initialBias; - - // Handle the basic code points - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue < 0x80) { - output.push(stringFromCharCode(currentValue)); - } - } - - handledCPCount = basicLength = output.length; - - // `handledCPCount` is the number of code points that have been handled; - // `basicLength` is the number of basic code points. - - // Finish the basic string - if it is not empty - with a delimiter - if (basicLength) { - output.push(delimiter); - } - - // Main encoding loop: - while (handledCPCount < inputLength) { - - // All non-basic code points < n have been handled already. Find the next - // larger one: - for (m = maxInt, j = 0; j < inputLength; ++j) { - currentValue = input[j]; - if (currentValue >= n && currentValue < m) { - m = currentValue; - } - } - - // Increase `delta` enough to advance the decoder's state to , - // but guard against overflow - handledCPCountPlusOne = handledCPCount + 1; - if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { - error('overflow'); - } - - delta += (m - n) * handledCPCountPlusOne; - n = m; - - for (j = 0; j < inputLength; ++j) { - currentValue = input[j]; - - if (currentValue < n && ++delta > maxInt) { - error('overflow'); - } - - if (currentValue == n) { - // Represent delta as a generalized variable-length integer - for (q = delta, k = base; /* no condition */; k += base) { - t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); - if (q < t) { - break; - } - qMinusT = q - t; - baseMinusT = base - t; - output.push( - stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) - ); - q = floor(qMinusT / baseMinusT); - } - - output.push(stringFromCharCode(digitToBasic(q, 0))); - bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); - delta = 0; - ++handledCPCount; - } - } - - ++delta; - ++n; - - } - return output.join(''); - } - - /** - * Converts a Punycode string representing a domain name or an email address - * to Unicode. Only the Punycoded parts of the input will be converted, i.e. - * it doesn't matter if you call it on a string that has already been - * converted to Unicode. - * @memberOf punycode - * @param {String} input The Punycoded domain name or email address to - * convert to Unicode. - * @returns {String} The Unicode representation of the given Punycode - * string. - */ - function toUnicode(input) { - return mapDomain(input, function(string) { - return regexPunycode.test(string) - ? decode(string.slice(4).toLowerCase()) - : string; - }); - } - - /** - * Converts a Unicode string representing a domain name or an email address to - * Punycode. Only the non-ASCII parts of the domain name will be converted, - * i.e. it doesn't matter if you call it with a domain that's already in - * ASCII. - * @memberOf punycode - * @param {String} input The domain name or email address to convert, as a - * Unicode string. - * @returns {String} The Punycode representation of the given domain name or - * email address. - */ - function toASCII(input) { - return mapDomain(input, function(string) { - return regexNonASCII.test(string) - ? 'xn--' + encode(string) - : string; - }); - } - - /*--------------------------------------------------------------------------*/ - - /** Define the public API */ - punycode = { - /** - * A string representing the current Punycode.js version number. - * @memberOf punycode - * @type String - */ - 'version': '1.3.2', - /** - * An object of methods to convert from JavaScript's internal character - * representation (UCS-2) to Unicode code points, and back. - * @see - * @memberOf punycode - * @type Object - */ - 'ucs2': { - 'decode': ucs2decode, - 'encode': ucs2encode - }, - 'decode': decode, - 'encode': encode, - 'toASCII': toASCII, - 'toUnicode': toUnicode - }; - - /** Expose `punycode` */ - // Some AMD build optimizers, like r.js, check for specific condition patterns - // like the following: - if ( - typeof define == 'function' && - typeof define.amd == 'object' && - define.amd - ) { - define('punycode', function() { - return punycode; - }); - } else if (freeExports && freeModule) { - if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+ - freeModule.exports = punycode; - } else { // in Narwhal or RingoJS v0.7.0- - for (key in punycode) { - punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); - } - } - } else { // in Rhino or a web browser - root.punycode = punycode; - } - -}(this)); - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) - -},{}],18:[function(require,module,exports){ -// 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. - -'use strict'; - -// If obj.hasOwnProperty has been overridden, then calling -// obj.hasOwnProperty(prop) will break. -// See: https://github.com/joyent/node/issues/1707 -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -module.exports = function(qs, sep, eq, options) { - sep = sep || '&'; - eq = eq || '='; - var obj = {}; - - if (typeof qs !== 'string' || qs.length === 0) { - return obj; - } - - var regexp = /\+/g; - qs = qs.split(sep); - - var maxKeys = 1000; - if (options && typeof options.maxKeys === 'number') { - maxKeys = options.maxKeys; - } - - var len = qs.length; - // maxKeys <= 0 means that we should not limit keys count - if (maxKeys > 0 && len > maxKeys) { - len = maxKeys; - } - - for (var i = 0; i < len; ++i) { - var x = qs[i].replace(regexp, '%20'), - idx = x.indexOf(eq), - kstr, vstr, k, v; - - if (idx >= 0) { - kstr = x.substr(0, idx); - vstr = x.substr(idx + 1); - } else { - kstr = x; - vstr = ''; - } - - k = decodeURIComponent(kstr); - v = decodeURIComponent(vstr); - - if (!hasOwnProperty(obj, k)) { - obj[k] = v; - } else if (isArray(obj[k])) { - obj[k].push(v); - } else { - obj[k] = [obj[k], v]; - } - } - - return obj; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -},{}],19:[function(require,module,exports){ -// 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. - -'use strict'; - -var stringifyPrimitive = function(v) { - switch (typeof v) { - case 'string': - return v; - - case 'boolean': - return v ? 'true' : 'false'; - - case 'number': - return isFinite(v) ? v : ''; - - default: - return ''; - } -}; - -module.exports = function(obj, sep, eq, name) { - sep = sep || '&'; - eq = eq || '='; - if (obj === null) { - obj = undefined; - } - - if (typeof obj === 'object') { - return map(objectKeys(obj), function(k) { - var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; - if (isArray(obj[k])) { - return map(obj[k], function(v) { - return ks + encodeURIComponent(stringifyPrimitive(v)); - }).join(sep); - } else { - return ks + encodeURIComponent(stringifyPrimitive(obj[k])); - } - }).join(sep); - - } - - if (!name) return ''; - return encodeURIComponent(stringifyPrimitive(name)) + eq + - encodeURIComponent(stringifyPrimitive(obj)); -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; - -function map (xs, f) { - if (xs.map) return xs.map(f); - var res = []; - for (var i = 0; i < xs.length; i++) { - res.push(f(xs[i], i)); - } - return res; -} - -var objectKeys = Object.keys || function (obj) { - var res = []; - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); - } - return res; -}; - -},{}],20:[function(require,module,exports){ -'use strict'; - -exports.decode = exports.parse = require('./decode'); -exports.encode = exports.stringify = require('./encode'); - -},{"./decode":18,"./encode":19}],21:[function(require,module,exports){ +},{}],13:[function(require,module,exports){ module.exports = require("./lib/_stream_duplex.js") -},{"./lib/_stream_duplex.js":22}],22:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":14}],14:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -3873,7 +2618,7 @@ function forEach (xs, f) { }).call(this,require('_process')) -},{"./_stream_readable":24,"./_stream_writable":26,"_process":16,"core-util-is":27,"inherits":13}],23:[function(require,module,exports){ +},{"./_stream_readable":16,"./_stream_writable":18,"_process":12,"core-util-is":19,"inherits":9}],15:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -3921,7 +2666,7 @@ PassThrough.prototype._transform = function(chunk, encoding, cb) { cb(null, chunk); }; -},{"./_stream_transform":25,"core-util-is":27,"inherits":13}],24:[function(require,module,exports){ +},{"./_stream_transform":17,"core-util-is":19,"inherits":9}],16:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -4877,7 +3622,7 @@ function indexOf (xs, x) { }).call(this,require('_process')) -},{"./_stream_duplex":22,"_process":16,"buffer":4,"core-util-is":27,"events":8,"inherits":13,"isarray":14,"stream":32,"string_decoder/":33,"util":3}],25:[function(require,module,exports){ +},{"./_stream_duplex":14,"_process":12,"buffer":4,"core-util-is":19,"events":8,"inherits":9,"isarray":10,"stream":24,"string_decoder/":25,"util":3}],17:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -5088,7 +3833,7 @@ function done(stream, er) { return stream.push(null); } -},{"./_stream_duplex":22,"core-util-is":27,"inherits":13}],26:[function(require,module,exports){ +},{"./_stream_duplex":14,"core-util-is":19,"inherits":9}],18:[function(require,module,exports){ (function (process){ // Copyright Joyent, Inc. and other Node contributors. // @@ -5570,7 +4315,7 @@ function endWritable(stream, state, cb) { }).call(this,require('_process')) -},{"./_stream_duplex":22,"_process":16,"buffer":4,"core-util-is":27,"inherits":13,"stream":32}],27:[function(require,module,exports){ +},{"./_stream_duplex":14,"_process":12,"buffer":4,"core-util-is":19,"inherits":9,"stream":24}],19:[function(require,module,exports){ (function (Buffer){ // Copyright Joyent, Inc. and other Node contributors. // @@ -5681,10 +4426,10 @@ function objectToString(o) { } }).call(this,require("buffer").Buffer) -},{"buffer":4}],28:[function(require,module,exports){ +},{"buffer":4}],20:[function(require,module,exports){ module.exports = require("./lib/_stream_passthrough.js") -},{"./lib/_stream_passthrough.js":23}],29:[function(require,module,exports){ +},{"./lib/_stream_passthrough.js":15}],21:[function(require,module,exports){ exports = module.exports = require('./lib/_stream_readable.js'); exports.Stream = require('stream'); exports.Readable = exports; @@ -5693,13 +4438,13 @@ exports.Duplex = require('./lib/_stream_duplex.js'); exports.Transform = require('./lib/_stream_transform.js'); exports.PassThrough = require('./lib/_stream_passthrough.js'); -},{"./lib/_stream_duplex.js":22,"./lib/_stream_passthrough.js":23,"./lib/_stream_readable.js":24,"./lib/_stream_transform.js":25,"./lib/_stream_writable.js":26,"stream":32}],30:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":14,"./lib/_stream_passthrough.js":15,"./lib/_stream_readable.js":16,"./lib/_stream_transform.js":17,"./lib/_stream_writable.js":18,"stream":24}],22:[function(require,module,exports){ module.exports = require("./lib/_stream_transform.js") -},{"./lib/_stream_transform.js":25}],31:[function(require,module,exports){ +},{"./lib/_stream_transform.js":17}],23:[function(require,module,exports){ module.exports = require("./lib/_stream_writable.js") -},{"./lib/_stream_writable.js":26}],32:[function(require,module,exports){ +},{"./lib/_stream_writable.js":18}],24:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -5828,7 +4573,7 @@ Stream.prototype.pipe = function(dest, options) { return dest; }; -},{"events":8,"inherits":13,"readable-stream/duplex.js":21,"readable-stream/passthrough.js":28,"readable-stream/readable.js":29,"readable-stream/transform.js":30,"readable-stream/writable.js":31}],33:[function(require,module,exports){ +},{"events":8,"inherits":9,"readable-stream/duplex.js":13,"readable-stream/passthrough.js":20,"readable-stream/readable.js":21,"readable-stream/transform.js":22,"readable-stream/writable.js":23}],25:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -6017,757 +4762,48 @@ StringDecoder.prototype.detectIncompleteChar = function(buffer) { if (i <= 3 && c >> 3 == 0x1E) { this.charLength = 4; break; - } - } - this.charReceived = i; -}; - -StringDecoder.prototype.end = function(buffer) { - var res = ''; - if (buffer && buffer.length) - res = this.write(buffer); - - if (this.charReceived) { - var cr = this.charReceived; - var buf = this.charBuffer; - var enc = this.encoding; - res += buf.slice(0, cr).toString(enc); - } - - return res; -}; - -function passThroughWrite(buffer) { - return buffer.toString(this.encoding); -} - -function utf16DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 2; - this.charLength = this.charReceived ? 2 : 0; -} - -function base64DetectIncompleteChar(buffer) { - this.charReceived = buffer.length % 3; - this.charLength = this.charReceived ? 3 : 0; -} - -},{"buffer":4}],34:[function(require,module,exports){ -// 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. - -var punycode = require('punycode'); - -exports.parse = urlParse; -exports.resolve = urlResolve; -exports.resolveObject = urlResolveObject; -exports.format = urlFormat; - -exports.Url = Url; - -function Url() { - this.protocol = null; - this.slashes = null; - this.auth = null; - this.host = null; - this.port = null; - this.hostname = null; - this.hash = null; - this.search = null; - this.query = null; - this.pathname = null; - this.path = null; - this.href = null; -} - -// Reference: RFC 3986, RFC 1808, RFC 2396 - -// define these here so at least they only have to be -// compiled once on the first module load. -var protocolPattern = /^([a-z0-9.+-]+:)/i, - portPattern = /:[0-9]*$/, - - // RFC 2396: characters reserved for delimiting URLs. - // We actually just auto-escape these. - delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], - - // RFC 2396: characters not allowed for various reasons. - unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), - - // Allowed by RFCs, but cause of XSS attacks. Always escape these. - autoEscape = ['\''].concat(unwise), - // Characters that are never ever allowed in a hostname. - // Note that any invalid chars are also handled, but these - // are the ones that are *expected* to be seen, so we fast-path - // them. - nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), - hostEndingChars = ['/', '?', '#'], - hostnameMaxLen = 255, - hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/, - hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/, - // protocols that can allow "unsafe" and "unwise" chars. - unsafeProtocol = { - 'javascript': true, - 'javascript:': true - }, - // protocols that never have a hostname. - hostlessProtocol = { - 'javascript': true, - 'javascript:': true - }, - // protocols that always contain a // bit. - slashedProtocol = { - 'http': true, - 'https': true, - 'ftp': true, - 'gopher': true, - 'file': true, - 'http:': true, - 'https:': true, - 'ftp:': true, - 'gopher:': true, - 'file:': true - }, - querystring = require('querystring'); - -function urlParse(url, parseQueryString, slashesDenoteHost) { - if (url && isObject(url) && url instanceof Url) return url; - - var u = new Url; - u.parse(url, parseQueryString, slashesDenoteHost); - return u; -} - -Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { - if (!isString(url)) { - throw new TypeError("Parameter 'url' must be a string, not " + typeof url); - } - - var rest = url; - - // trim before proceeding. - // This is to support parse stuff like " http://foo.com \n" - rest = rest.trim(); - - var proto = protocolPattern.exec(rest); - if (proto) { - proto = proto[0]; - var lowerProto = proto.toLowerCase(); - this.protocol = lowerProto; - rest = rest.substr(proto.length); - } - - // figure out if it's got a host - // user@server is *always* interpreted as a hostname, and url - // resolution will treat //foo/bar as host=foo,path=bar because that's - // how the browser resolves relative URLs. - if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { - var slashes = rest.substr(0, 2) === '//'; - if (slashes && !(proto && hostlessProtocol[proto])) { - rest = rest.substr(2); - this.slashes = true; - } - } - - if (!hostlessProtocol[proto] && - (slashes || (proto && !slashedProtocol[proto]))) { - - // there's a hostname. - // the first instance of /, ?, ;, or # ends the host. - // - // If there is an @ in the hostname, then non-host chars *are* allowed - // to the left of the last @ sign, unless some host-ending character - // comes *before* the @-sign. - // URLs are obnoxious. - // - // ex: - // http://a@b@c/ => user:a@b host:c - // http://a@b?@c => user:a host:c path:/?@c - - // v0.12 TODO(isaacs): This is not quite how Chrome does things. - // Review our test case against browsers more comprehensively. - - // find the first instance of any hostEndingChars - var hostEnd = -1; - for (var i = 0; i < hostEndingChars.length; i++) { - var hec = rest.indexOf(hostEndingChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - - // at this point, either we have an explicit point where the - // auth portion cannot go past, or the last @ char is the decider. - var auth, atSign; - if (hostEnd === -1) { - // atSign can be anywhere. - atSign = rest.lastIndexOf('@'); - } else { - // atSign must be in auth portion. - // http://a@b/c@d => host:b auth:a path:/c@d - atSign = rest.lastIndexOf('@', hostEnd); - } - - // Now we have a portion which is definitely the auth. - // Pull that off. - if (atSign !== -1) { - auth = rest.slice(0, atSign); - rest = rest.slice(atSign + 1); - this.auth = decodeURIComponent(auth); - } - - // the host is the remaining to the left of the first non-host char - hostEnd = -1; - for (var i = 0; i < nonHostChars.length; i++) { - var hec = rest.indexOf(nonHostChars[i]); - if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) - hostEnd = hec; - } - // if we still have not hit it, then the entire thing is a host. - if (hostEnd === -1) - hostEnd = rest.length; - - this.host = rest.slice(0, hostEnd); - rest = rest.slice(hostEnd); - - // pull out port. - this.parseHost(); - - // we've indicated that there is a hostname, - // so even if it's empty, it has to be present. - this.hostname = this.hostname || ''; - - // if hostname begins with [ and ends with ] - // assume that it's an IPv6 address. - var ipv6Hostname = this.hostname[0] === '[' && - this.hostname[this.hostname.length - 1] === ']'; - - // validate a little. - if (!ipv6Hostname) { - var hostparts = this.hostname.split(/\./); - for (var i = 0, l = hostparts.length; i < l; i++) { - var part = hostparts[i]; - if (!part) continue; - if (!part.match(hostnamePartPattern)) { - var newpart = ''; - for (var j = 0, k = part.length; j < k; j++) { - if (part.charCodeAt(j) > 127) { - // we replace non-ASCII char with a temporary placeholder - // we need this to make sure size of hostname is not - // broken by replacing non-ASCII by nothing - newpart += 'x'; - } else { - newpart += part[j]; - } - } - // we test again with ASCII char only - if (!newpart.match(hostnamePartPattern)) { - var validParts = hostparts.slice(0, i); - var notHost = hostparts.slice(i + 1); - var bit = part.match(hostnamePartStart); - if (bit) { - validParts.push(bit[1]); - notHost.unshift(bit[2]); - } - if (notHost.length) { - rest = '/' + notHost.join('.') + rest; - } - this.hostname = validParts.join('.'); - break; - } - } - } - } - - if (this.hostname.length > hostnameMaxLen) { - this.hostname = ''; - } else { - // hostnames are always lower case. - this.hostname = this.hostname.toLowerCase(); - } - - if (!ipv6Hostname) { - // IDNA Support: Returns a puny coded representation of "domain". - // It only converts the part of the domain name that - // has non ASCII characters. I.e. it dosent matter if - // you call it with a domain that already is in ASCII. - var domainArray = this.hostname.split('.'); - var newOut = []; - for (var i = 0; i < domainArray.length; ++i) { - var s = domainArray[i]; - newOut.push(s.match(/[^A-Za-z0-9_-]/) ? - 'xn--' + punycode.encode(s) : s); - } - this.hostname = newOut.join('.'); - } - - var p = this.port ? ':' + this.port : ''; - var h = this.hostname || ''; - this.host = h + p; - this.href += this.host; - - // strip [ and ] from the hostname - // the host field still retains them, though - if (ipv6Hostname) { - this.hostname = this.hostname.substr(1, this.hostname.length - 2); - if (rest[0] !== '/') { - rest = '/' + rest; - } - } - } - - // now rest is set to the post-host stuff. - // chop off any delim chars. - if (!unsafeProtocol[lowerProto]) { - - // First, make 100% sure that any "autoEscape" chars get - // escaped, even if encodeURIComponent doesn't think they - // need to be. - for (var i = 0, l = autoEscape.length; i < l; i++) { - var ae = autoEscape[i]; - var esc = encodeURIComponent(ae); - if (esc === ae) { - esc = escape(ae); - } - rest = rest.split(ae).join(esc); - } - } - - - // chop off from the tail first. - var hash = rest.indexOf('#'); - if (hash !== -1) { - // got a fragment string. - this.hash = rest.substr(hash); - rest = rest.slice(0, hash); - } - var qm = rest.indexOf('?'); - if (qm !== -1) { - this.search = rest.substr(qm); - this.query = rest.substr(qm + 1); - if (parseQueryString) { - this.query = querystring.parse(this.query); - } - rest = rest.slice(0, qm); - } else if (parseQueryString) { - // no query string, but parseQueryString still requested - this.search = ''; - this.query = {}; - } - if (rest) this.pathname = rest; - if (slashedProtocol[lowerProto] && - this.hostname && !this.pathname) { - this.pathname = '/'; - } - - //to support http.request - if (this.pathname || this.search) { - var p = this.pathname || ''; - var s = this.search || ''; - this.path = p + s; - } - - // finally, reconstruct the href based on what has been validated. - this.href = this.format(); - return this; -}; - -// format a parsed object into a url string -function urlFormat(obj) { - // ensure it's an object, and not a string url. - // If it's an obj, this is a no-op. - // this way, you can call url_format() on strings - // to clean up potentially wonky urls. - if (isString(obj)) obj = urlParse(obj); - if (!(obj instanceof Url)) return Url.prototype.format.call(obj); - return obj.format(); -} - -Url.prototype.format = function() { - var auth = this.auth || ''; - if (auth) { - auth = encodeURIComponent(auth); - auth = auth.replace(/%3A/i, ':'); - auth += '@'; - } - - var protocol = this.protocol || '', - pathname = this.pathname || '', - hash = this.hash || '', - host = false, - query = ''; - - if (this.host) { - host = auth + this.host; - } else if (this.hostname) { - host = auth + (this.hostname.indexOf(':') === -1 ? - this.hostname : - '[' + this.hostname + ']'); - if (this.port) { - host += ':' + this.port; - } - } - - if (this.query && - isObject(this.query) && - Object.keys(this.query).length) { - query = querystring.stringify(this.query); - } - - var search = this.search || (query && ('?' + query)) || ''; - - if (protocol && protocol.substr(-1) !== ':') protocol += ':'; - - // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. - // unless they had them to begin with. - if (this.slashes || - (!protocol || slashedProtocol[protocol]) && host !== false) { - host = '//' + (host || ''); - if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; - } else if (!host) { - host = ''; - } - - if (hash && hash.charAt(0) !== '#') hash = '#' + hash; - if (search && search.charAt(0) !== '?') search = '?' + search; - - pathname = pathname.replace(/[?#]/g, function(match) { - return encodeURIComponent(match); - }); - search = search.replace('#', '%23'); - - return protocol + host + pathname + search + hash; -}; - -function urlResolve(source, relative) { - return urlParse(source, false, true).resolve(relative); -} - -Url.prototype.resolve = function(relative) { - return this.resolveObject(urlParse(relative, false, true)).format(); -}; - -function urlResolveObject(source, relative) { - if (!source) return relative; - return urlParse(source, false, true).resolveObject(relative); -} - -Url.prototype.resolveObject = function(relative) { - if (isString(relative)) { - var rel = new Url(); - rel.parse(relative, false, true); - relative = rel; - } - - var result = new Url(); - Object.keys(this).forEach(function(k) { - result[k] = this[k]; - }, this); - - // hash is always overridden, no matter what. - // even href="" will remove it. - result.hash = relative.hash; - - // if the relative url is empty, then there's nothing left to do here. - if (relative.href === '') { - result.href = result.format(); - return result; - } - - // hrefs like //foo/bar always cut to the protocol. - if (relative.slashes && !relative.protocol) { - // take everything except the protocol from relative - Object.keys(relative).forEach(function(k) { - if (k !== 'protocol') - result[k] = relative[k]; - }); - - //urlParse appends trailing / to urls like http://www.example.com - if (slashedProtocol[result.protocol] && - result.hostname && !result.pathname) { - result.path = result.pathname = '/'; - } - - result.href = result.format(); - return result; - } - - if (relative.protocol && relative.protocol !== result.protocol) { - // if it's a known url protocol, then changing - // the protocol does weird things - // first, if it's not file:, then we MUST have a host, - // and if there was a path - // to begin with, then we MUST have a path. - // if it is file:, then the host is dropped, - // because that's known to be hostless. - // anything else is assumed to be absolute. - if (!slashedProtocol[relative.protocol]) { - Object.keys(relative).forEach(function(k) { - result[k] = relative[k]; - }); - result.href = result.format(); - return result; - } - - result.protocol = relative.protocol; - if (!relative.host && !hostlessProtocol[relative.protocol]) { - var relPath = (relative.pathname || '').split('/'); - while (relPath.length && !(relative.host = relPath.shift())); - if (!relative.host) relative.host = ''; - if (!relative.hostname) relative.hostname = ''; - if (relPath[0] !== '') relPath.unshift(''); - if (relPath.length < 2) relPath.unshift(''); - result.pathname = relPath.join('/'); - } else { - result.pathname = relative.pathname; - } - result.search = relative.search; - result.query = relative.query; - result.host = relative.host || ''; - result.auth = relative.auth; - result.hostname = relative.hostname || relative.host; - result.port = relative.port; - // to support http.request - if (result.pathname || result.search) { - var p = result.pathname || ''; - var s = result.search || ''; - result.path = p + s; - } - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; - } - - var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), - isRelAbs = ( - relative.host || - relative.pathname && relative.pathname.charAt(0) === '/' - ), - mustEndAbs = (isRelAbs || isSourceAbs || - (result.host && relative.pathname)), - removeAllDots = mustEndAbs, - srcPath = result.pathname && result.pathname.split('/') || [], - relPath = relative.pathname && relative.pathname.split('/') || [], - psychotic = result.protocol && !slashedProtocol[result.protocol]; - - // if the url is a non-slashed url, then relative - // links like ../.. should be able - // to crawl up to the hostname, as well. This is strange. - // result.protocol has already been set by now. - // Later on, put the first path part into the host field. - if (psychotic) { - result.hostname = ''; - result.port = null; - if (result.host) { - if (srcPath[0] === '') srcPath[0] = result.host; - else srcPath.unshift(result.host); - } - result.host = ''; - if (relative.protocol) { - relative.hostname = null; - relative.port = null; - if (relative.host) { - if (relPath[0] === '') relPath[0] = relative.host; - else relPath.unshift(relative.host); - } - relative.host = null; - } - mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); - } - - if (isRelAbs) { - // it's absolute. - result.host = (relative.host || relative.host === '') ? - relative.host : result.host; - result.hostname = (relative.hostname || relative.hostname === '') ? - relative.hostname : result.hostname; - result.search = relative.search; - result.query = relative.query; - srcPath = relPath; - // fall through to the dot-handling below. - } else if (relPath.length) { - // it's relative - // throw away the existing file, and take the new path instead. - if (!srcPath) srcPath = []; - srcPath.pop(); - srcPath = srcPath.concat(relPath); - result.search = relative.search; - result.query = relative.query; - } else if (!isNullOrUndefined(relative.search)) { - // just pull out the search. - // like href='?foo'. - // Put this after the other two cases because it simplifies the booleans - if (psychotic) { - result.hostname = result.host = srcPath.shift(); - //occationaly the auth can get stuck only in host - //this especialy happens in cases like - //url.resolveObject('mailto:local1@domain1', 'local2@domain2') - var authInHost = result.host && result.host.indexOf('@') > 0 ? - result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - result.search = relative.search; - result.query = relative.query; - //to support http.request - if (!isNull(result.pathname) || !isNull(result.search)) { - result.path = (result.pathname ? result.pathname : '') + - (result.search ? result.search : ''); - } - result.href = result.format(); - return result; - } - - if (!srcPath.length) { - // no path at all. easy. - // we've already handled the other stuff above. - result.pathname = null; - //to support http.request - if (result.search) { - result.path = '/' + result.search; - } else { - result.path = null; - } - result.href = result.format(); - return result; - } - - // if a url ENDs in . or .., then it must get a trailing slash. - // however, if it ends in anything else non-slashy, - // then it must NOT get a trailing slash. - var last = srcPath.slice(-1)[0]; - var hasTrailingSlash = ( - (result.host || relative.host) && (last === '.' || last === '..') || - last === ''); - - // strip single dots, resolve double dots to parent dir - // if the path tries to go above the root, `up` ends up > 0 - var up = 0; - for (var i = srcPath.length; i >= 0; i--) { - last = srcPath[i]; - if (last == '.') { - srcPath.splice(i, 1); - } else if (last === '..') { - srcPath.splice(i, 1); - up++; - } else if (up) { - srcPath.splice(i, 1); - up--; - } - } - - // if the path is allowed to go above the root, restore leading ..s - if (!mustEndAbs && !removeAllDots) { - for (; up--; up) { - srcPath.unshift('..'); - } - } - - if (mustEndAbs && srcPath[0] !== '' && - (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { - srcPath.unshift(''); - } - - if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { - srcPath.push(''); - } - - var isAbsolute = srcPath[0] === '' || - (srcPath[0] && srcPath[0].charAt(0) === '/'); - - // put the host back - if (psychotic) { - result.hostname = result.host = isAbsolute ? '' : - srcPath.length ? srcPath.shift() : ''; - //occationaly the auth can get stuck only in host - //this especialy happens in cases like - //url.resolveObject('mailto:local1@domain1', 'local2@domain2') - var authInHost = result.host && result.host.indexOf('@') > 0 ? - result.host.split('@') : false; - if (authInHost) { - result.auth = authInHost.shift(); - result.host = result.hostname = authInHost.shift(); - } - } - - mustEndAbs = mustEndAbs || (result.host && srcPath.length); - - if (mustEndAbs && !isAbsolute) { - srcPath.unshift(''); - } - - if (!srcPath.length) { - result.pathname = null; - result.path = null; - } else { - result.pathname = srcPath.join('/'); - } - - //to support request.http - if (!isNull(result.pathname) || !isNull(result.search)) { - result.path = (result.pathname ? result.pathname : '') + - (result.search ? result.search : ''); + } } - result.auth = relative.auth || result.auth; - result.slashes = result.slashes || relative.slashes; - result.href = result.format(); - return result; + this.charReceived = i; }; -Url.prototype.parseHost = function() { - var host = this.host; - var port = portPattern.exec(host); - if (port) { - port = port[0]; - if (port !== ':') { - this.port = port.substr(1); - } - host = host.substr(0, host.length - port.length); +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); } - if (host) this.hostname = host; + + return res; }; -function isString(arg) { - return typeof arg === "string"; +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); } -function isObject(arg) { - return typeof arg === 'object' && arg !== null; +function utf16DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; } -function isNull(arg) { - return arg === null; -} -function isNullOrUndefined(arg) { - return arg == null; +function base64DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; } -},{"punycode":17,"querystring":20}],35:[function(require,module,exports){ +},{"buffer":4}],26:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],36:[function(require,module,exports){ +},{}],27:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -7358,751 +5394,56 @@ function hasOwnProperty(obj, prop) { }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":35,"_process":16,"inherits":13}],37:[function(require,module,exports){ +},{"./support/isBuffer":26,"_process":12,"inherits":9}],28:[function(require,module,exports){ (function (process){ -'use strict'; - -var stream = require('stream'); -var util = require('util'); -var formatRecord = require('./lib/format-record'); -var xtend = require('xtend'); - - -var Writable = stream.Writable; - -module.exports = BunyanFormatWritable; - -util.inherits(BunyanFormatWritable, Writable); - -/** - * Creates a writable stream that formats bunyan records written to it. - * - * @name BunyanFormatWritable - * @function - * @param opts {Options} passed to bunyan format function - * - outputMode: short|long|simple|json|bunyan - * - color (true): toggles colors in output - * - colorFromLevel: allows overriding log level colors - * @param out {Stream} (process.stdout) writable stream to write - * @return {WritableStream} that you can pipe bunyan output into - */ -function BunyanFormatWritable (opts, out) { - if (!(this instanceof BunyanFormatWritable)) return new BunyanFormatWritable(opts, out); - - opts = opts || {}; - opts.objectMode = true; - Writable.call(this, opts); - - this.opts = xtend({ - outputMode: 'short', - color: true, - colorFromLevel: { - 10: 'brightBlack', // TRACE - 20: 'brightBlack', // DEBUG - 30: 'green', // INFO - 40: 'magenta', // WARN - 50: 'red', // ERROR - 60: 'brightRed', // FATAL - } - }, opts); - this.out = out || process.stdout; -} - -BunyanFormatWritable.prototype._write = function (chunk, encoding, cb) { - var rec; - try { - rec = JSON.parse(chunk); - this.out.write(formatRecord(rec, this.opts)); - } catch (e) { - this.out.write(chunk); - } - cb(); -}; - -}).call(this,require('_process')) - -},{"./lib/format-record":38,"_process":16,"stream":32,"util":36,"xtend":42}],38:[function(require,module,exports){ -'use strict'; - -var util = require('util'); -var format = util.format; -var http = require('http'); -var xtend = require('xtend'); -var ansicolors = require('ansicolors'); -var ansistyles = require('ansistyles'); - -var styles = xtend(ansistyles, ansicolors); - -// Most of this code is lifted directly from the bunyan ./bin file and should be cleaned up once there is more time -var OM_LONG = 1; -var OM_JSON = 2; -var OM_INSPECT = 3; -var OM_SIMPLE = 4; -var OM_SHORT = 5; -var OM_BUNYAN = 6; -var OM_FROM_NAME = { - 'long': OM_LONG, - 'json': OM_JSON, - 'inspect': OM_INSPECT, - 'simple': OM_SIMPLE, - 'short': OM_SHORT, - 'bunyan': OM_BUNYAN -}; - -// Levels -var TRACE = 10; -var DEBUG = 20; -var INFO = 30; -var WARN = 40; -var ERROR = 50; -var FATAL = 60; - -var levelFromName = { - 'trace': TRACE, - 'debug': DEBUG, - 'info': INFO, - 'warn': WARN, - 'error': ERROR, - 'fatal': FATAL -}; -var nameFromLevel = {}; -var upperNameFromLevel = {}; -var upperPaddedNameFromLevel = {}; -Object.keys(levelFromName).forEach(function (name) { - var lvl = levelFromName[name]; - nameFromLevel[lvl] = name; - upperNameFromLevel[lvl] = name.toUpperCase(); - upperPaddedNameFromLevel[lvl] = ( - name.length === 4 ? ' ' : '') + name.toUpperCase(); -}); - - -/** - * Is this a valid Bunyan log record. - */ -function isValidRecord(rec) { - if (rec.v === null || - rec.level === null || - rec.name === null || - rec.hostname === null || - rec.pid === null || - rec.time === null || - rec.msg === null) { - // Not valid Bunyan log. - return false; - } else { - return true; - } -} - -function indent(s) { - return ' ' + s.split(/\r?\n/).join('\n '); -} - -function stylizeWithColor(s, color) { - if (!s) return ''; - var fn = styles[color]; - return fn ? fn(s) : s; -} +RotatingFileStream = null; // see: https://github.com/trentm/node-bunyan/issues/223 +bunyan = require('bunyan'); +WritableStream = require('stream').Writable; +inherits = require('util').inherits; +logStyle = require('log-with-style'); -function stylizeWithoutColor(str, color) { - return str; -} +inherits(BrowserStdout, WritableStream); -/** - * @param {int} level is the level of the record. - * @return The level value to its String representation. - * This is only used on json-related formats output and first suggested at - * https://github.com/trentm/node-bunyan/issues/194#issuecomment-64858117 - */ -function mapLevelToName(level) { - switch (level) { - case TRACE: - return 'TRACE'; - case DEBUG: - return 'DEBUG'; - case INFO: - return 'INFO'; - case WARN: - return 'WARN'; - case ERROR: - return 'ERROR'; - case FATAL: - return 'FATAL'; +function BrowserStdout() { + if (!(this instanceof BrowserStdout)) { + return new BrowserStdout(); } + WritableStream.call(this); } -/** - * Print out a single result, considering input options. - */ -module.exports = function formatRecord(rec, opts) { - - function _res(res) { - var s = ''; - if (res.header) { - s += res.header.trimRight(); - } else if (res.headers) { - if (res.statusCode) { - s += format('HTTP/1.1 %s %s\n', res.statusCode, - http.STATUS_CODES[res.statusCode]); - } - var headers = res.headers; - s += Object.keys(headers).map( - function (h) { return h + ': ' + headers[h]; }).join('\n'); - } - delete res.header; - delete res.headers; - delete res.statusCode; - if (res.body) { - s += '\n\n' + (typeof (res.body) === 'object' - ? JSON.stringify(res.body, null, 2) : res.body); - delete res.body; - } - if (res.trailer) { - s += '\n' + res.trailer; - } - delete res.trailer; - if (s) { - details.push(indent(s)); - } - // E.g. for extra 'foo' field on 'res', add 'res.foo' at - // top-level. This *does* have the potential to stomp on a - // literal 'res.foo' key. - Object.keys(res).forEach(function (k) { - rec['res.' + k] = res[k]; - }); - } - - var short = false; - var time; - var line = rec.line; - var stylize = opts.color ? stylizeWithColor : stylizeWithoutColor; - var outputMode = isNaN(opts.outputMode) ? OM_FROM_NAME[opts.outputMode] : opts.outputMode; - - switch (outputMode) { - case OM_SHORT: - short = true; - /* falls through */ - case OM_LONG: - // [time] LEVEL: name[/comp]/pid on hostname (src): msg* (extras...) - // msg* - // -- - // long and multi-line extras - // ... - // If 'msg' is single-line, then it goes in the top line. - // If 'req', show the request. - // If 'res', show the response. - // If 'err' and 'err.stack' then show that. - if (!isValidRecord(rec)) { - return line + '\n'; - } - - delete rec.v; - - /* - * We assume the Date is formatted according to ISO8601, in which - * case we can safely chop off the date information. - */ - if (short && rec.time[10] == 'T') { - time = rec.time.substr(11); - time = stylize(time, 'brightBlack'); - } else { - time = stylize('[' + rec.time + ']', 'brightBlack'); - } - - delete rec.time; - - var nameStr = rec.name; - delete rec.name; - - if (rec.component) { - nameStr += '/' + rec.component; - } - delete rec.component; - - if (!short) - nameStr += '/' + rec.pid; - delete rec.pid; - - var level = (upperPaddedNameFromLevel[rec.level] || 'LVL' + rec.level); - if (opts.color) { - var colorFromLevel = opts.colorFromLevel || { - 10: 'brightBlack', // TRACE - 20: 'brightBlack', // DEBUG - 30: 'cyan', // INFO - 40: 'magenta', // WARN - 50: 'red', // ERROR - 60: 'inverse', // FATAL - }; - level = stylize(level, colorFromLevel[rec.level]); - } - delete rec.level; - - var src = ''; - var s; - var headers; - var hostHeaderLine = ''; - if (rec.src && rec.src.file) { - s = rec.src; - if (s.func) { - src = format(' (%s:%d in %s)', s.file, s.line, s.func); - } else { - src = format(' (%s:%d)', s.file, s.line); - } - src = stylize(src, 'green'); - } - delete rec.src; - - var hostname = rec.hostname; - delete rec.hostname; - - var extras = []; - var details = []; - - if (rec.req_id) { - extras.push('req_id=' + rec.req_id); - } - delete rec.req_id; - - var onelineMsg; - if (rec.msg.indexOf('\n') !== -1) { - onelineMsg = ''; - details.push(indent(stylize(rec.msg, 'cyan'))); +BrowserStdout.prototype._write = function(chunks, encoding, cb) { + var output = JSON.parse(chunks.toString ? chunks.toString() : chunks); + var color = '[c="color: green"]'; + var level = 'INFO'; + if (output.level > 40) { + color = '[c="color: red"]'; + if (output.level === 60) { + level = 'FATAL'; } else { - onelineMsg = ' ' + stylize(rec.msg, 'cyan'); - } - delete rec.msg; - - if (rec.req && typeof (rec.req) === 'object') { - var req = rec.req; - delete rec.req; - headers = req.headers; - s = format('%s %s HTTP/%s%s', req.method, - req.url, - req.httpVersion || '1.1', - (headers ? - '\n' + Object.keys(headers).map(function (h) { - return h + ': ' + headers[h]; - }).join('\n') : - '') - ); - delete req.url; - delete req.method; - delete req.httpVersion; - delete req.headers; - if (req.body) { - s += '\n\n' + (typeof (req.body) === 'object' - ? JSON.stringify(req.body, null, 2) : req.body); - delete req.body; - } - if (req.trailers && Object.keys(req.trailers) > 0) { - s += '\n' + Object.keys(req.trailers).map(function (t) { - return t + ': ' + req.trailers[t]; - }).join('\n'); - } - delete req.trailers; - details.push(indent(s)); - // E.g. for extra 'foo' field on 'req', add 'req.foo' at - // top-level. This *does* have the potential to stomp on a - // literal 'req.foo' key. - Object.keys(req).forEach(function (k) { - rec['req.' + k] = req[k]; - }) - } - - if (rec.client_req && typeof (rec.client_req) === 'object') { - var client_req = rec.client_req; - delete rec.client_req; - headers = client_req.headers; - s = ''; - if (client_req.address) { - hostHeaderLine = 'Host: ' + client_req.address; - if (client_req.port) - hostHeaderLine += ':' + client_req.port; - hostHeaderLine += '\n'; - } - delete client_req.headers; - delete client_req.address; - delete client_req.port; - s += format('%s %s HTTP/%s\n%s%s', client_req.method, - client_req.url, - client_req.httpVersion || '1.1', - hostHeaderLine, - (headers ? - Object.keys(headers).map( - function (h) { - return h + ': ' + headers[h]; - }).join('\n') : - '')); - delete client_req.method; - delete client_req.url; - delete client_req.httpVersion; - if (client_req.body) { - s += '\n\n' + (typeof (client_req.body) === 'object' ? - JSON.stringify(client_req.body, null, 2) : - client_req.body); - delete client_req.body; - } - // E.g. for extra 'foo' field on 'client_req', add - // 'client_req.foo' at top-level. This *does* have the potential - // to stomp on a literal 'client_req.foo' key. - Object.keys(client_req).forEach(function (k) { - rec['client_req.' + k] = client_req[k]; - }) - details.push(indent(s)); - } - - - if (rec.res && typeof (rec.res) === 'object') { - _res(rec.res); - delete rec.res; - } - if (rec.client_res && typeof (rec.client_res) === 'object') { - _res(rec.client_res); - delete rec.res; - } - - if (rec.err && rec.err.stack) { - details.push(indent(rec.err.stack)); - delete rec.err; - } - - var leftover = Object.keys(rec); - for (var i = 0; i < leftover.length; i++) { - var key = leftover[i]; - var value = rec[key]; - var stringified = false; - if (typeof (value) !== 'string') { - value = JSON.stringify(value, null, 2); - stringified = true; - } - if (value.indexOf('\n') !== -1 || value.length > 50) { - details.push(indent(key + ': ' + value)); - } else if (!stringified && (value.indexOf(' ') != -1 || - value.length === 0)) - { - extras.push(key + '=' + JSON.stringify(value)); - } else { - extras.push(key + '=' + value); - } - } - - extras = stylize( - (extras.length ? ' (' + extras.join(', ') + ')' : ''), 'brightBlack'); - details = stylize( - (details.length ? details.join('\n --\n') + '\n' : ''), 'brightBlack'); - if (!short) - return format('%s %s: %s on %s%s:%s%s\n%s', - time, - level, - nameStr, - hostname || '', - src, - onelineMsg, - extras, - details); - else - return format('%s %s %s:%s%s\n%s', - time, - level, - nameStr, - onelineMsg, - extras, - details); - break; - - case OM_INSPECT: - return util.inspect(rec, false, Infinity, true) + '\n'; - - case OM_BUNYAN: - if (opts.levelInString) { - rec.level = mapLevelToName(rec.level); - } - return JSON.stringify(rec, null, 0) + '\n'; - - case OM_JSON: - if (opts.levelInString) { - rec.level = mapLevelToName(rec.level); - } - return JSON.stringify(rec, null, opts.jsonIndent) + '\n'; - - case OM_SIMPLE: - /* JSSTYLED */ - // - if (!isValidRecord(rec)) { - return line + '\n'; - } - return format('%s - %s\n', - upperNameFromLevel[rec.level] || 'LVL' + rec.level, - rec.msg); - default: - throw new Error('unknown output mode: '+opts.outputMode); - } -} - - -},{"ansicolors":39,"ansistyles":40,"http":9,"util":36,"xtend":42}],39:[function(require,module,exports){ -// ColorCodes explained: http://www.termsys.demon.co.uk/vtansi.htm -'use strict'; - -var colorNums = { - white : 37 - , black : 30 - , blue : 34 - , cyan : 36 - , green : 32 - , magenta : 35 - , red : 31 - , yellow : 33 - , brightBlack : 90 - , brightRed : 91 - , brightGreen : 92 - , brightYellow : 93 - , brightBlue : 94 - , brightMagenta : 95 - , brightCyan : 96 - , brightWhite : 97 - } - , backgroundColorNums = { - bgBlack : 40 - , bgRed : 41 - , bgGreen : 42 - , bgYellow : 43 - , bgBlue : 44 - , bgMagenta : 45 - , bgCyan : 46 - , bgWhite : 47 - , bgBrightBlack : 100 - , bgBrightRed : 101 - , bgBrightGreen : 102 - , bgBrightYellow : 103 - , bgBrightBlue : 104 - , bgBrightMagenta : 105 - , bgBrightCyan : 106 - , bgBrightWhite : 107 - } - , colors = {}; - - -Object.keys(colorNums).forEach(function (k) { - colors[k] = function (s) { - return '\u001b[' + colorNums[k] + 'm' + s + '\u001b[39m'; - }; -}); - -Object.keys(backgroundColorNums).forEach(function (k) { - colors[k] = function (s) { - return '\u001b[' + backgroundColorNums[k] + 'm' + s + '\u001b[49m'; - }; -}); - -module.exports = colors; - -},{}],40:[function(require,module,exports){ -'use strict'; - -/* - * Info: http://www.termsys.demon.co.uk/vtansi.htm#colors - * Following caveats - * bright - brightens the color (bold-blue is same as brigthtBlue) - * dim - nothing on Mac or Linux - * italic - nothing on Mac or Linux - * underline - underlines string - * blink - nothing on Mac or linux - * inverse - background becomes foreground and vice versa - * - * In summary, the only styles that work are: - * - bright, underline and inverse - * - the others are only included for completeness - */ - -var styleNums = { - reset : [0, 22] - , bright : [1, 22] - , dim : [2, 22] - , italic : [3, 23] - , underline : [4, 24] - , blink : [5, 25] - , inverse : [7, 27] - } - , styles = {} - ; - -Object.keys(styleNums).forEach(function (k) { - styles[k] = function (s) { - var open = styleNums[k][0] - , close = styleNums[k][1]; - return '\u001b[' + open + 'm' + s + '\u001b[' + close + 'm'; - }; -}); - -module.exports = styles; - -},{}],41:[function(require,module,exports){ -module.exports = hasKeys - -function hasKeys(source) { - return source !== null && - (typeof source === "object" || - typeof source === "function") -} - -},{}],42:[function(require,module,exports){ -var Keys = require("object-keys") -var hasKeys = require("./has-keys") - -module.exports = extend - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - if (!hasKeys(source)) { - continue - } - - var keys = Keys(source) - - for (var j = 0; j < keys.length; j++) { - var name = keys[j] - target[name] = source[name] - } + level = 'ERROR'; } - - return target -} - -},{"./has-keys":41,"object-keys":44}],43:[function(require,module,exports){ -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -var isFunction = function (fn) { - var isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]'; - if (!isFunc && typeof window !== 'undefined') { - isFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt; - } - return isFunc; -}; - -module.exports = function forEach(obj, fn) { - if (!isFunction(fn)) { - throw new TypeError('iterator must be a function'); - } - var i, k, - isString = typeof obj === 'string', - l = obj.length, - context = arguments.length > 2 ? arguments[2] : null; - if (l === +l) { - for (i = 0; i < l; i++) { - if (context === null) { - fn(isString ? obj.charAt(i) : obj[i], i, obj); - } else { - fn.call(context, isString ? obj.charAt(i) : obj[i], i, obj); - } - } - } else { - for (k in obj) { - if (hasOwn.call(obj, k)) { - if (context === null) { - fn(obj[k], k, obj); - } else { - fn.call(context, obj[k], k, obj); - } - } - } - } -}; - - -},{}],44:[function(require,module,exports){ -module.exports = Object.keys || require('./shim'); - - -},{"./shim":46}],45:[function(require,module,exports){ -var toString = Object.prototype.toString; - -module.exports = function isArguments(value) { - var str = toString.call(value); - var isArguments = str === '[object Arguments]'; - if (!isArguments) { - isArguments = str !== '[object Array]' - && value !== null - && typeof value === 'object' - && typeof value.length === 'number' - && value.length >= 0 - && toString.call(value.callee) === '[object Function]'; - } - return isArguments; + } else if (output.level === 40) { + color = '[c="color: orange"]'; + level = 'WARNING'; + } else if (output.level === 20) { + level = 'DEBUG'; + } else if (output.level === 10) { + level = 'TRACE'; + } + logStyle(color + level + '[c] ' + '[c="color: blue"]' + output.name + '[c] ' + output.msg); + process.nextTick(cb); }; +// Import process.stdout and process.stderr +process = require('process'); +process.stdout = BrowserStdout(); +process.stderr = BrowserStdout(); -},{}],46:[function(require,module,exports){ -(function () { - "use strict"; - - // modified from https://github.com/kriskowal/es5-shim - var has = Object.prototype.hasOwnProperty, - toString = Object.prototype.toString, - forEach = require('./foreach'), - isArgs = require('./isArguments'), - hasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'), - hasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'), - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - keysShim; - - keysShim = function keys(object) { - var isObject = object !== null && typeof object === 'object', - isFunction = toString.call(object) === '[object Function]', - isArguments = isArgs(object), - theKeys = []; - - if (!isObject && !isFunction && !isArguments) { - throw new TypeError("Object.keys called on a non-object"); - } - - if (isArguments) { - forEach(object, function (value) { - theKeys.push(value); - }); - } else { - var name, - skipProto = hasProtoEnumBug && isFunction; - - for (name in object) { - if (!(skipProto && name === 'prototype') && has.call(object, name)) { - theKeys.push(name); - } - } - } - - if (hasDontEnumBug) { - var ctor = object.constructor, - skipConstructor = ctor && ctor.prototype === object; - - forEach(dontEnums, function (dontEnum) { - if (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) { - theKeys.push(dontEnum); - } - }); - } - return theKeys; - }; - - module.exports = keysShim; -}()); +orion.logFormatter = BrowserStdout(); +}).call(this,require('_process')) -},{"./foreach":43,"./isArguments":45}],47:[function(require,module,exports){ +},{"_process":12,"bunyan":29,"log-with-style":31,"process":32,"stream":24,"util":27}],29:[function(require,module,exports){ (function (process,Buffer){ /** * Copyright (c) 2014 Trent Mick. All rights reserved. @@ -9541,7 +6882,7 @@ module.exports.safeCycles = safeCycles; }).call(this,require('_process'),require("buffer").Buffer) -},{"_process":16,"assert":2,"buffer":4,"events":8,"fs":1,"os":15,"safe-json-stringify":48,"util":36}],48:[function(require,module,exports){ +},{"_process":12,"assert":2,"buffer":4,"events":8,"fs":1,"os":11,"safe-json-stringify":30,"util":27}],30:[function(require,module,exports){ var hasProp = Object.prototype.hasOwnProperty; function throwsMessage(err) { @@ -9602,7 +6943,7 @@ module.exports = function(data) { module.exports.ensureProperties = ensureProperties; -},{}],49:[function(require,module,exports){ +},{}],31:[function(require,module,exports){ (function() { var exportedLog, ffSupport, formats, getOrderedMatches, hasMatches, isFF, isIE, isOpera, isSafari, log, makeArray, operaSupport, safariSupport, stringToArgs, _log; @@ -9764,58 +7105,7 @@ module.exports.ensureProperties = ensureProperties; }).call(this); -},{}],50:[function(require,module,exports){ -arguments[4][16][0].apply(exports,arguments) -},{"dup":16}],51:[function(require,module,exports){ -(function (process){ -RotatingFileStream = null; // see: https://github.com/trentm/node-bunyan/issues/223 -bunyan = require('bunyan'); -bunyanFormat = require('bunyan-format'); - -var WritableStream = require('stream').Writable; -var inherits = require('util').inherits; -var logStyle = require('log-with-style'); - -inherits(BrowserStdout, WritableStream); - -function BrowserStdout() { - if (!(this instanceof BrowserStdout)) { - return new BrowserStdout(); - } - WritableStream.call(this); -} - -BrowserStdout.prototype._write = function(chunks, encoding, cb) { - var output = JSON.parse(chunks.toString ? chunks.toString() : chunks); - var color = '[c="color: green"]'; - var level = 'INFO'; - if (output.level > 40) { - color = '[c="color: red"]'; - if (output.level === 60) { - level = 'FATAL'; - } else { - level = 'ERROR'; - } - } else if (output.level === 40) { - color = '[c="color: orange"]'; - level = 'WARNING'; - } else if (output.level === 20) { - level = 'DEBUG'; - } else if (output.level === 10) { - level = 'TRACE'; - } - logStyle(color + level + '[c] ' + '[c="color: blue"]' + output.name + '[c] ' + output.msg); - process.nextTick(cb); -}; - -// Import process.stdout and process.stderr -process = require('process'); -process.stdout = BrowserStdout(); -process.stderr = BrowserStdout(); - -orion.logFormatter = BrowserStdout(); - -}).call(this,require('_process')) - -},{"_process":16,"bunyan":47,"bunyan-format":37,"log-with-style":49,"process":50,"stream":32,"util":36}]},{},[51]) +},{}],32:[function(require,module,exports){ +arguments[4][12][0].apply(exports,arguments) +},{"dup":12}]},{},[28]) //# sourceMappingURL=orionjs:logging/logging_client.browserify.js diff --git a/packages/logging/logging_client.browserify.js.map b/packages/logging/logging_client.browserify.js.map index fb2d4b7..8b74442 100644 --- a/packages/logging/logging_client.browserify.js.map +++ b/packages/logging/logging_client.browserify.js.map @@ -9,18 +9,10 @@ "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/ieee754/index.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/buffer/node_modules/is-array/index.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/events/events.js", - "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/index.js", - "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/lib/request.js", - "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/lib/response.js", - "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/http-browserify/node_modules/Base64/base64.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/inherits/inherits_browser.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/isarray/index.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/os-browserify/browser.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/process/browser.js", - "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/punycode/punycode.js", - "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/decode.js", - "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/encode.js", - "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/querystring-es3/index.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/duplex.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_duplex.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/lib/_stream_passthrough.js", @@ -34,26 +26,15 @@ "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/readable-stream/writable.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/stream-browserify/index.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/string_decoder/index.js", - "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/url/url.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/util/support/isBufferBrowser.js", "../../../../../../../.meteor/packages/cosmos_browserify/.0.5.0.1alc3uk++os+web.browser+web.cordova/plugin.CosmosBrowserify.os/npm/CosmosBrowserify/node_modules/browserify/node_modules/util/util.js", "_stream_0.js", - "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/index.js", - "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/lib/format-record.js", - "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansicolors/ansicolors.js", - "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/ansistyles/ansistyles.js", - "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/has-keys.js", - "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/index.js", - "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/foreach.js", - "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/index.js", - "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/isArguments.js", - "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan-format/node_modules/xtend/node_modules/object-keys/shim.js", "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan/lib/bunyan.js", "../../../../../../orion/packages/logging/.npm/package/node_modules/bunyan/node_modules/safe-json-stringify/index.js", "../../../../../../orion/packages/logging/.npm/package/node_modules/log-with-style/log.js" ], "names": [], - "mappings": "AAAA;ACAA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC75CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AClhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;;ACJA;AACA;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACv7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC7dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1GA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;;ACDA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnsBA;AACA;AACA;AACA;AACA;AACA;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC1kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC15CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", + "mappings": "AAAA;ACAA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC75CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7SA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1FA;AACA;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACv7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC7dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC1GA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;;ACDA;AACA;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7NA;AACA;AACA;AACA;AACA;AACA;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC1kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AC15CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", "file": "generated.js", "sourceRoot": "", "sourcesContent": [ @@ -65,18 +46,10 @@ "exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = nBytes * 8 - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n", "\n/**\n * isArray\n */\n\nvar isArray = Array.isArray;\n\n/**\n * toString\n */\n\nvar str = Object.prototype.toString;\n\n/**\n * Whether or not the given `val`\n * is an array.\n *\n * example:\n *\n * isArray([]);\n * // > true\n * isArray(arguments);\n * // > false\n * isArray('');\n * // > false\n *\n * @param {mixed} val\n * @return {bool}\n */\n\nmodule.exports = isArray || function (val) {\n return !! val && '[object Array]' == str.call(val);\n};\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nEventEmitter.defaultMaxListeners = 10;\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function(n) {\n if (!isNumber(n) || n < 0 || isNaN(n))\n throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function(type) {\n var er, handler, len, args, i, listeners;\n\n if (!this._events)\n this._events = {};\n\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events.error ||\n (isObject(this._events.error) && !this._events.error.length)) {\n er = arguments[1];\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n }\n throw TypeError('Uncaught, unspecified \"error\" event.');\n }\n }\n\n handler = this._events[type];\n\n if (isUndefined(handler))\n return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n len = arguments.length;\n args = new Array(len - 1);\n for (i = 1; i < len; i++)\n args[i - 1] = arguments[i];\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n len = arguments.length;\n args = new Array(len - 1);\n for (i = 1; i < len; i++)\n args[i - 1] = arguments[i];\n\n listeners = handler.slice();\n len = listeners.length;\n for (i = 0; i < len; i++)\n listeners[i].apply(this, args);\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function(type, listener) {\n var m;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events)\n this._events = {};\n\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (this._events.newListener)\n this.emit('newListener', type,\n isFunction(listener.listener) ?\n listener.listener : listener);\n\n if (!this._events[type])\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n else if (isObject(this._events[type]))\n // If we've already got an array, just append.\n this._events[type].push(listener);\n else\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n\n // Check for listener leak\n if (isObject(this._events[type]) && !this._events[type].warned) {\n var m;\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' +\n 'leak detected. %d listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit.',\n this._events[type].length);\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n\n return this;\n};\n\n// emits a 'removeListener' event iff the listener was removed\nEventEmitter.prototype.removeListener = function(type, listener) {\n var list, position, length, i;\n\n if (!isFunction(listener))\n throw TypeError('listener must be a function');\n\n if (!this._events || !this._events[type])\n return this;\n\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener ||\n (isFunction(list.listener) && list.listener === listener)) {\n delete this._events[type];\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener)\n this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n var key, listeners;\n\n if (!this._events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!this._events.removeListener) {\n if (arguments.length === 0)\n this._events = {};\n else if (this._events[type])\n delete this._events[type];\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else {\n // LIFO order\n while (listeners.length)\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n delete this._events[type];\n\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n var ret;\n if (!this._events || !this._events[type])\n ret = [];\n else if (isFunction(this._events[type]))\n ret = [this._events[type]];\n else\n ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n var ret;\n if (!emitter._events || !emitter._events[type])\n ret = 0;\n else if (isFunction(emitter._events[type]))\n ret = 1;\n else\n ret = emitter._events[type].length;\n return ret;\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n", - "var http = module.exports;\nvar EventEmitter = require('events').EventEmitter;\nvar Request = require('./lib/request');\nvar url = require('url')\n\nhttp.request = function (params, cb) {\n if (typeof params === 'string') {\n params = url.parse(params)\n }\n if (!params) params = {};\n if (!params.host && !params.port) {\n params.port = parseInt(window.location.port, 10);\n }\n if (!params.host && params.hostname) {\n params.host = params.hostname;\n }\n\n if (!params.protocol) {\n if (params.scheme) {\n params.protocol = params.scheme + ':';\n } else {\n params.protocol = window.location.protocol;\n }\n }\n\n if (!params.host) {\n params.host = window.location.hostname || window.location.host;\n }\n if (/:/.test(params.host)) {\n if (!params.port) {\n params.port = params.host.split(':')[1];\n }\n params.host = params.host.split(':')[0];\n }\n if (!params.port) params.port = params.protocol == 'https:' ? 443 : 80;\n \n var req = new Request(new xhrHttp, params);\n if (cb) req.on('response', cb);\n return req;\n};\n\nhttp.get = function (params, cb) {\n params.method = 'GET';\n var req = http.request(params, cb);\n req.end();\n return req;\n};\n\nhttp.Agent = function () {};\nhttp.Agent.defaultMaxSockets = 4;\n\nvar xhrHttp = (function () {\n if (typeof window === 'undefined') {\n throw new Error('no window object present');\n }\n else if (window.XMLHttpRequest) {\n return window.XMLHttpRequest;\n }\n else if (window.ActiveXObject) {\n var axs = [\n 'Msxml2.XMLHTTP.6.0',\n 'Msxml2.XMLHTTP.3.0',\n 'Microsoft.XMLHTTP'\n ];\n for (var i = 0; i < axs.length; i++) {\n try {\n var ax = new(window.ActiveXObject)(axs[i]);\n return function () {\n if (ax) {\n var ax_ = ax;\n ax = null;\n return ax_;\n }\n else {\n return new(window.ActiveXObject)(axs[i]);\n }\n };\n }\n catch (e) {}\n }\n throw new Error('ajax not supported in this browser')\n }\n else {\n throw new Error('ajax not supported in this browser');\n }\n})();\n\nhttp.STATUS_CODES = {\n 100 : 'Continue',\n 101 : 'Switching Protocols',\n 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918\n 200 : 'OK',\n 201 : 'Created',\n 202 : 'Accepted',\n 203 : 'Non-Authoritative Information',\n 204 : 'No Content',\n 205 : 'Reset Content',\n 206 : 'Partial Content',\n 207 : 'Multi-Status', // RFC 4918\n 300 : 'Multiple Choices',\n 301 : 'Moved Permanently',\n 302 : 'Moved Temporarily',\n 303 : 'See Other',\n 304 : 'Not Modified',\n 305 : 'Use Proxy',\n 307 : 'Temporary Redirect',\n 400 : 'Bad Request',\n 401 : 'Unauthorized',\n 402 : 'Payment Required',\n 403 : 'Forbidden',\n 404 : 'Not Found',\n 405 : 'Method Not Allowed',\n 406 : 'Not Acceptable',\n 407 : 'Proxy Authentication Required',\n 408 : 'Request Time-out',\n 409 : 'Conflict',\n 410 : 'Gone',\n 411 : 'Length Required',\n 412 : 'Precondition Failed',\n 413 : 'Request Entity Too Large',\n 414 : 'Request-URI Too Large',\n 415 : 'Unsupported Media Type',\n 416 : 'Requested Range Not Satisfiable',\n 417 : 'Expectation Failed',\n 418 : 'I\\'m a teapot', // RFC 2324\n 422 : 'Unprocessable Entity', // RFC 4918\n 423 : 'Locked', // RFC 4918\n 424 : 'Failed Dependency', // RFC 4918\n 425 : 'Unordered Collection', // RFC 4918\n 426 : 'Upgrade Required', // RFC 2817\n 428 : 'Precondition Required', // RFC 6585\n 429 : 'Too Many Requests', // RFC 6585\n 431 : 'Request Header Fields Too Large',// RFC 6585\n 500 : 'Internal Server Error',\n 501 : 'Not Implemented',\n 502 : 'Bad Gateway',\n 503 : 'Service Unavailable',\n 504 : 'Gateway Time-out',\n 505 : 'HTTP Version Not Supported',\n 506 : 'Variant Also Negotiates', // RFC 2295\n 507 : 'Insufficient Storage', // RFC 4918\n 509 : 'Bandwidth Limit Exceeded',\n 510 : 'Not Extended', // RFC 2774\n 511 : 'Network Authentication Required' // RFC 6585\n};", - "var Stream = require('stream');\nvar Response = require('./response');\nvar Base64 = require('Base64');\nvar inherits = require('inherits');\n\nvar Request = module.exports = function (xhr, params) {\n var self = this;\n self.writable = true;\n self.xhr = xhr;\n self.body = [];\n \n self.uri = (params.protocol || 'http:') + '//'\n + params.host\n + (params.port ? ':' + params.port : '')\n + (params.path || '/')\n ;\n \n if (typeof params.withCredentials === 'undefined') {\n params.withCredentials = true;\n }\n\n try { xhr.withCredentials = params.withCredentials }\n catch (e) {}\n \n if (params.responseType) try { xhr.responseType = params.responseType }\n catch (e) {}\n \n xhr.open(\n params.method || 'GET',\n self.uri,\n true\n );\n\n xhr.onerror = function(event) {\n self.emit('error', new Error('Network error'));\n };\n\n self._headers = {};\n \n if (params.headers) {\n var keys = objectKeys(params.headers);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!self.isSafeRequestHeader(key)) continue;\n var value = params.headers[key];\n self.setHeader(key, value);\n }\n }\n \n if (params.auth) {\n //basic auth\n this.setHeader('Authorization', 'Basic ' + Base64.btoa(params.auth));\n }\n\n var res = new Response;\n res.on('close', function () {\n self.emit('close');\n });\n \n res.on('ready', function () {\n self.emit('response', res);\n });\n\n res.on('error', function (err) {\n self.emit('error', err);\n });\n \n xhr.onreadystatechange = function () {\n // Fix for IE9 bug\n // SCRIPT575: Could not complete the operation due to error c00c023f\n // It happens when a request is aborted, calling the success callback anyway with readyState === 4\n if (xhr.__aborted) return;\n res.handle(xhr);\n };\n};\n\ninherits(Request, Stream);\n\nRequest.prototype.setHeader = function (key, value) {\n this._headers[key.toLowerCase()] = value\n};\n\nRequest.prototype.getHeader = function (key) {\n return this._headers[key.toLowerCase()]\n};\n\nRequest.prototype.removeHeader = function (key) {\n delete this._headers[key.toLowerCase()]\n};\n\nRequest.prototype.write = function (s) {\n this.body.push(s);\n};\n\nRequest.prototype.destroy = function (s) {\n this.xhr.__aborted = true;\n this.xhr.abort();\n this.emit('close');\n};\n\nRequest.prototype.end = function (s) {\n if (s !== undefined) this.body.push(s);\n\n var keys = objectKeys(this._headers);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = this._headers[key];\n if (isArray(value)) {\n for (var j = 0; j < value.length; j++) {\n this.xhr.setRequestHeader(key, value[j]);\n }\n }\n else this.xhr.setRequestHeader(key, value)\n }\n\n if (this.body.length === 0) {\n this.xhr.send('');\n }\n else if (typeof this.body[0] === 'string') {\n this.xhr.send(this.body.join(''));\n }\n else if (isArray(this.body[0])) {\n var body = [];\n for (var i = 0; i < this.body.length; i++) {\n body.push.apply(body, this.body[i]);\n }\n this.xhr.send(body);\n }\n else if (/Array/.test(Object.prototype.toString.call(this.body[0]))) {\n var len = 0;\n for (var i = 0; i < this.body.length; i++) {\n len += this.body[i].length;\n }\n var body = new(this.body[0].constructor)(len);\n var k = 0;\n \n for (var i = 0; i < this.body.length; i++) {\n var b = this.body[i];\n for (var j = 0; j < b.length; j++) {\n body[k++] = b[j];\n }\n }\n this.xhr.send(body);\n }\n else if (isXHR2Compatible(this.body[0])) {\n this.xhr.send(this.body[0]);\n }\n else {\n var body = '';\n for (var i = 0; i < this.body.length; i++) {\n body += this.body[i].toString();\n }\n this.xhr.send(body);\n }\n};\n\n// Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html\nRequest.unsafeHeaders = [\n \"accept-charset\",\n \"accept-encoding\",\n \"access-control-request-headers\",\n \"access-control-request-method\",\n \"connection\",\n \"content-length\",\n \"cookie\",\n \"cookie2\",\n \"content-transfer-encoding\",\n \"date\",\n \"expect\",\n \"host\",\n \"keep-alive\",\n \"origin\",\n \"referer\",\n \"te\",\n \"trailer\",\n \"transfer-encoding\",\n \"upgrade\",\n \"user-agent\",\n \"via\"\n];\n\nRequest.prototype.isSafeRequestHeader = function (headerName) {\n if (!headerName) return false;\n return indexOf(Request.unsafeHeaders, headerName.toLowerCase()) === -1;\n};\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nvar indexOf = function (xs, x) {\n if (xs.indexOf) return xs.indexOf(x);\n for (var i = 0; i < xs.length; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n};\n\nvar isXHR2Compatible = function (obj) {\n if (typeof Blob !== 'undefined' && obj instanceof Blob) return true;\n if (typeof ArrayBuffer !== 'undefined' && obj instanceof ArrayBuffer) return true;\n if (typeof FormData !== 'undefined' && obj instanceof FormData) return true;\n};\n", - "var Stream = require('stream');\nvar util = require('util');\n\nvar Response = module.exports = function (res) {\n this.offset = 0;\n this.readable = true;\n};\n\nutil.inherits(Response, Stream);\n\nvar capable = {\n streaming : true,\n status2 : true\n};\n\nfunction parseHeaders (res) {\n var lines = res.getAllResponseHeaders().split(/\\r?\\n/);\n var headers = {};\n for (var i = 0; i < lines.length; i++) {\n var line = lines[i];\n if (line === '') continue;\n \n var m = line.match(/^([^:]+):\\s*(.*)/);\n if (m) {\n var key = m[1].toLowerCase(), value = m[2];\n \n if (headers[key] !== undefined) {\n \n if (isArray(headers[key])) {\n headers[key].push(value);\n }\n else {\n headers[key] = [ headers[key], value ];\n }\n }\n else {\n headers[key] = value;\n }\n }\n else {\n headers[line] = true;\n }\n }\n return headers;\n}\n\nResponse.prototype.getResponse = function (xhr) {\n var respType = String(xhr.responseType).toLowerCase();\n if (respType === 'blob') return xhr.responseBlob || xhr.response;\n if (respType === 'arraybuffer') return xhr.response;\n return xhr.responseText;\n}\n\nResponse.prototype.getHeader = function (key) {\n return this.headers[key.toLowerCase()];\n};\n\nResponse.prototype.handle = function (res) {\n if (res.readyState === 2 && capable.status2) {\n try {\n this.statusCode = res.status;\n this.headers = parseHeaders(res);\n }\n catch (err) {\n capable.status2 = false;\n }\n \n if (capable.status2) {\n this.emit('ready');\n }\n }\n else if (capable.streaming && res.readyState === 3) {\n try {\n if (!this.statusCode) {\n this.statusCode = res.status;\n this.headers = parseHeaders(res);\n this.emit('ready');\n }\n }\n catch (err) {}\n \n try {\n this._emitData(res);\n }\n catch (err) {\n capable.streaming = false;\n }\n }\n else if (res.readyState === 4) {\n if (!this.statusCode) {\n this.statusCode = res.status;\n this.emit('ready');\n }\n this._emitData(res);\n \n if (res.error) {\n this.emit('error', this.getResponse(res));\n }\n else this.emit('end');\n \n this.emit('close');\n }\n};\n\nResponse.prototype._emitData = function (res) {\n var respBody = this.getResponse(res);\n if (respBody.toString().match(/ArrayBuffer/)) {\n this.emit('data', new Uint8Array(respBody, this.offset));\n this.offset = respBody.byteLength;\n return;\n }\n if (respBody.length > this.offset) {\n this.emit('data', respBody.slice(this.offset));\n this.offset = respBody.length;\n }\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n", - ";(function () {\n\n var object = typeof exports != 'undefined' ? exports : this; // #8: web workers\n var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n function InvalidCharacterError(message) {\n this.message = message;\n }\n InvalidCharacterError.prototype = new Error;\n InvalidCharacterError.prototype.name = 'InvalidCharacterError';\n\n // encoder\n // [https://gist.github.com/999166] by [https://github.com/nignag]\n object.btoa || (\n object.btoa = function (input) {\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars, output = '';\n // if the next input index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n input.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)\n ) {\n charCode = input.charCodeAt(idx += 3/4);\n if (charCode > 0xFF) {\n throw new InvalidCharacterError(\"'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.\");\n }\n block = block << 8 | charCode;\n }\n return output;\n });\n\n // decoder\n // [https://gist.github.com/1020396] by [https://github.com/atk]\n object.atob || (\n object.atob = function (input) {\n input = input.replace(/=+$/, '');\n if (input.length % 4 == 1) {\n throw new InvalidCharacterError(\"'atob' failed: The string to be decoded is not correctly encoded.\");\n }\n for (\n // initialize result and counters\n var bc = 0, bs, buffer, idx = 0, output = '';\n // get next character\n buffer = input.charAt(idx++);\n // character found in table? initialize bit storage and add its ascii value;\n ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,\n // and if not first of each 4 characters,\n // convert the first 8 bits to one ascii character\n bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0\n ) {\n // try to find character in table (0-63, not found => -1)\n buffer = chars.indexOf(buffer);\n }\n return output;\n });\n\n}());\n", "if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n", "module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n", "exports.endianness = function () { return 'LE' };\n\nexports.hostname = function () {\n if (typeof location !== 'undefined') {\n return location.hostname\n }\n else return '';\n};\n\nexports.loadavg = function () { return [] };\n\nexports.uptime = function () { return 0 };\n\nexports.freemem = function () {\n return Number.MAX_VALUE;\n};\n\nexports.totalmem = function () {\n return Number.MAX_VALUE;\n};\n\nexports.cpus = function () { return [] };\n\nexports.type = function () { return 'Browser' };\n\nexports.release = function () {\n if (typeof navigator !== 'undefined') {\n return navigator.appVersion;\n }\n return '';\n};\n\nexports.networkInterfaces\n= exports.getNetworkInterfaces\n= function () { return {} };\n\nexports.arch = function () { return 'javascript' };\n\nexports.platform = function () { return 'browser' };\n\nexports.tmpdir = exports.tmpDir = function () {\n return '/tmp';\n};\n\nexports.EOL = '\\n';\n", "// shim for using process in browser\n\nvar process = module.exports = {};\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = setTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n currentQueue[queueIndex].run();\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n clearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n setTimeout(drainQueue, 0);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n", - "/*! https://mths.be/punycode v1.3.2 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see \n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * http://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's state to ,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.3.2',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see \n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else { // in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else { // in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n", - "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n", - "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n", - "'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n", "module.exports = require(\"./lib/_stream_duplex.js\")\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n\nmodule.exports = Duplex;\n\n/**/\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n for (var key in obj) keys.push(key);\n return keys;\n}\n/**/\n\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nvar Readable = require('./_stream_readable');\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n\nforEach(objectKeys(Writable.prototype), function(method) {\n if (!Duplex.prototype[method])\n Duplex.prototype[method] = Writable.prototype[method];\n});\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex))\n return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false)\n this.readable = false;\n\n if (options && options.writable === false)\n this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false)\n this.allowHalfOpen = false;\n\n this.once('end', onend);\n}\n\n// the no-half-open enforcer\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended)\n return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n process.nextTick(this.end.bind(this));\n}\n\nfunction forEach (xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n}\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n\n/**/\nvar util = require('core-util-is');\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough))\n return new PassThrough(options);\n\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function(chunk, encoding, cb) {\n cb(null, chunk);\n};\n", @@ -90,20 +63,9 @@ "module.exports = require(\"./lib/_stream_writable.js\")\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar Buffer = require('buffer').Buffer;\n\nvar isBufferEncoding = Buffer.isEncoding\n || function(encoding) {\n switch (encoding && encoding.toLowerCase()) {\n case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;\n default: return false;\n }\n }\n\n\nfunction assertEncoding(encoding) {\n if (encoding && !isBufferEncoding(encoding)) {\n throw new Error('Unknown encoding: ' + encoding);\n }\n}\n\n// StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters. CESU-8 is handled as part of the UTF-8 encoding.\n//\n// @TODO Handling all encodings inside a single object makes it very difficult\n// to reason about this code, so it should be split up in the future.\n// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code\n// points as used by CESU-8.\nvar StringDecoder = exports.StringDecoder = function(encoding) {\n this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');\n assertEncoding(encoding);\n switch (this.encoding) {\n case 'utf8':\n // CESU-8 represents each of Surrogate Pair by 3-bytes\n this.surrogateSize = 3;\n break;\n case 'ucs2':\n case 'utf16le':\n // UTF-16 represents each of Surrogate Pair by 2-bytes\n this.surrogateSize = 2;\n this.detectIncompleteChar = utf16DetectIncompleteChar;\n break;\n case 'base64':\n // Base-64 stores 3 bytes in 4 chars, and pads the remainder.\n this.surrogateSize = 3;\n this.detectIncompleteChar = base64DetectIncompleteChar;\n break;\n default:\n this.write = passThroughWrite;\n return;\n }\n\n // Enough space to store all bytes of a single character. UTF-8 needs 4\n // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\n this.charBuffer = new Buffer(6);\n // Number of bytes received for the current incomplete multi-byte character.\n this.charReceived = 0;\n // Number of bytes expected for the current incomplete multi-byte character.\n this.charLength = 0;\n};\n\n\n// write decodes the given buffer and returns it as JS string that is\n// guaranteed to not contain any partial multi-byte characters. Any partial\n// character found at the end of the buffer is buffered up, and will be\n// returned when calling write again with the remaining bytes.\n//\n// Note: Converting a Buffer containing an orphan surrogate to a String\n// currently works, but converting a String to a Buffer (via `new Buffer`, or\n// Buffer#write) will replace incomplete surrogates with the unicode\n// replacement character. See https://codereview.chromium.org/121173009/ .\nStringDecoder.prototype.write = function(buffer) {\n var charStr = '';\n // if our last write ended with an incomplete multibyte character\n while (this.charLength) {\n // determine how many remaining bytes this buffer has to offer for this char\n var available = (buffer.length >= this.charLength - this.charReceived) ?\n this.charLength - this.charReceived :\n buffer.length;\n\n // add the new bytes to the char buffer\n buffer.copy(this.charBuffer, this.charReceived, 0, available);\n this.charReceived += available;\n\n if (this.charReceived < this.charLength) {\n // still not enough chars in this buffer? wait for more ...\n return '';\n }\n\n // remove bytes belonging to the current character from the buffer\n buffer = buffer.slice(available, buffer.length);\n\n // get the character that was split\n charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);\n\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n var charCode = charStr.charCodeAt(charStr.length - 1);\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n this.charLength += this.surrogateSize;\n charStr = '';\n continue;\n }\n this.charReceived = this.charLength = 0;\n\n // if there are no more bytes in this buffer, just emit our char\n if (buffer.length === 0) {\n return charStr;\n }\n break;\n }\n\n // determine and set charLength / charReceived\n this.detectIncompleteChar(buffer);\n\n var end = buffer.length;\n if (this.charLength) {\n // buffer the incomplete character bytes we got\n buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);\n end -= this.charReceived;\n }\n\n charStr += buffer.toString(this.encoding, 0, end);\n\n var end = charStr.length - 1;\n var charCode = charStr.charCodeAt(end);\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n var size = this.surrogateSize;\n this.charLength += size;\n this.charReceived += size;\n this.charBuffer.copy(this.charBuffer, size, 0, size);\n buffer.copy(this.charBuffer, 0, 0, size);\n return charStr.substring(0, end);\n }\n\n // or just emit the charStr\n return charStr;\n};\n\n// detectIncompleteChar determines if there is an incomplete UTF-8 character at\n// the end of the given buffer. If so, it sets this.charLength to the byte\n// length that character, and sets this.charReceived to the number of bytes\n// that are available for this character.\nStringDecoder.prototype.detectIncompleteChar = function(buffer) {\n // determine how many bytes we have to check at the end of this buffer\n var i = (buffer.length >= 3) ? 3 : buffer.length;\n\n // Figure out if one of the last i bytes of our buffer announces an\n // incomplete char.\n for (; i > 0; i--) {\n var c = buffer[buffer.length - i];\n\n // See http://en.wikipedia.org/wiki/UTF-8#Description\n\n // 110XXXXX\n if (i == 1 && c >> 5 == 0x06) {\n this.charLength = 2;\n break;\n }\n\n // 1110XXXX\n if (i <= 2 && c >> 4 == 0x0E) {\n this.charLength = 3;\n break;\n }\n\n // 11110XXX\n if (i <= 3 && c >> 3 == 0x1E) {\n this.charLength = 4;\n break;\n }\n }\n this.charReceived = i;\n};\n\nStringDecoder.prototype.end = function(buffer) {\n var res = '';\n if (buffer && buffer.length)\n res = this.write(buffer);\n\n if (this.charReceived) {\n var cr = this.charReceived;\n var buf = this.charBuffer;\n var enc = this.encoding;\n res += buf.slice(0, cr).toString(enc);\n }\n\n return res;\n};\n\nfunction passThroughWrite(buffer) {\n return buffer.toString(this.encoding);\n}\n\nfunction utf16DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 2;\n this.charLength = this.charReceived ? 2 : 0;\n}\n\nfunction base64DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 3;\n this.charLength = this.charReceived ? 3 : 0;\n}\n", - "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar punycode = require('punycode');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a puny coded representation of \"domain\".\n // It only converts the part of the domain name that\n // has non ASCII characters. I.e. it dosent matter if\n // you call it with a domain that already is in ASCII.\n var domainArray = this.hostname.split('.');\n var newOut = [];\n for (var i = 0; i < domainArray.length; ++i) {\n var s = domainArray[i];\n newOut.push(s.match(/[^A-Za-z0-9_-]/) ?\n 'xn--' + punycode.encode(s) : s);\n }\n this.hostname = newOut.join('.');\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n Object.keys(this).forEach(function(k) {\n result[k] = this[k];\n }, this);\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n Object.keys(relative).forEach(function(k) {\n if (k !== 'protocol')\n result[k] = relative[k];\n });\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n Object.keys(relative).forEach(function(k) {\n result[k] = relative[k];\n });\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especialy happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!isNull(result.pathname) || !isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host) && (last === '.' || last === '..') ||\n last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last == '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especialy happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!isNull(result.pathname) || !isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n\nfunction isString(arg) {\n return typeof arg === \"string\";\n}\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\n\nfunction isNull(arg) {\n return arg === null;\n}\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\n", "module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}", "// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n", - "RotatingFileStream = null; // see: https://github.com/trentm/node-bunyan/issues/223\nbunyan = require('bunyan');\nbunyanFormat = require('bunyan-format');\n\nvar WritableStream = require('stream').Writable;\nvar inherits = require('util').inherits;\nvar logStyle = require('log-with-style');\n\ninherits(BrowserStdout, WritableStream);\n\nfunction BrowserStdout() {\n if (!(this instanceof BrowserStdout)) {\n return new BrowserStdout();\n }\n WritableStream.call(this);\n}\n\nBrowserStdout.prototype._write = function(chunks, encoding, cb) {\n var output = JSON.parse(chunks.toString ? chunks.toString() : chunks);\n var color = '[c=\"color: green\"]';\n var level = 'INFO';\n if (output.level > 40) {\n color = '[c=\"color: red\"]';\n if (output.level === 60) {\n level = 'FATAL';\n } else {\n level = 'ERROR';\n }\n } else if (output.level === 40) {\n color = '[c=\"color: orange\"]';\n level = 'WARNING';\n } else if (output.level === 20) {\n level = 'DEBUG';\n } else if (output.level === 10) {\n level = 'TRACE';\n }\n logStyle(color + level + '[c] ' + '[c=\"color: blue\"]' + output.name + '[c] ' + output.msg);\n process.nextTick(cb);\n};\n\n// Import process.stdout and process.stderr\nprocess = require('process');\nprocess.stdout = BrowserStdout();\nprocess.stderr = BrowserStdout();\n\norion.logFormatter = BrowserStdout();\n", - "'use strict';\n\nvar stream = require('stream');\nvar util = require('util');\nvar formatRecord = require('./lib/format-record');\nvar xtend = require('xtend');\n\n\nvar Writable = stream.Writable;\n\nmodule.exports = BunyanFormatWritable;\n\nutil.inherits(BunyanFormatWritable, Writable);\n\n/**\n * Creates a writable stream that formats bunyan records written to it.\n * \n * @name BunyanFormatWritable\n * @function\n * @param opts {Options} passed to bunyan format function\n * - outputMode: short|long|simple|json|bunyan\n * - color (true): toggles colors in output\n * - colorFromLevel: allows overriding log level colors\n * @param out {Stream} (process.stdout) writable stream to write \n * @return {WritableStream} that you can pipe bunyan output into\n */\nfunction BunyanFormatWritable (opts, out) {\n if (!(this instanceof BunyanFormatWritable)) return new BunyanFormatWritable(opts, out);\n\n opts = opts || {};\n opts.objectMode = true;\n Writable.call(this, opts);\n\n this.opts = xtend({ \n outputMode: 'short', \n color: true,\n colorFromLevel: {\n 10: 'brightBlack', // TRACE\n 20: 'brightBlack', // DEBUG\n 30: 'green', // INFO\n 40: 'magenta', // WARN\n 50: 'red', // ERROR\n 60: 'brightRed', // FATAL\n }\n }, opts);\n this.out = out || process.stdout;\n}\n\nBunyanFormatWritable.prototype._write = function (chunk, encoding, cb) {\n var rec;\n try { \n rec = JSON.parse(chunk);\n this.out.write(formatRecord(rec, this.opts));\n } catch (e) {\n this.out.write(chunk);\n }\n cb();\n};\n", - "'use strict';\n\nvar util = require('util');\nvar format = util.format;\nvar http = require('http');\nvar xtend = require('xtend');\nvar ansicolors = require('ansicolors');\nvar ansistyles = require('ansistyles');\n\nvar styles = xtend(ansistyles, ansicolors);\n\n// Most of this code is lifted directly from the bunyan ./bin file and should be cleaned up once there is more time\nvar OM_LONG = 1;\nvar OM_JSON = 2;\nvar OM_INSPECT = 3;\nvar OM_SIMPLE = 4;\nvar OM_SHORT = 5;\nvar OM_BUNYAN = 6;\nvar OM_FROM_NAME = {\n 'long': OM_LONG,\n 'json': OM_JSON,\n 'inspect': OM_INSPECT,\n 'simple': OM_SIMPLE,\n 'short': OM_SHORT,\n 'bunyan': OM_BUNYAN\n};\n\n// Levels\nvar TRACE = 10;\nvar DEBUG = 20;\nvar INFO = 30;\nvar WARN = 40;\nvar ERROR = 50;\nvar FATAL = 60;\n\nvar levelFromName = {\n 'trace': TRACE,\n 'debug': DEBUG,\n 'info': INFO,\n 'warn': WARN,\n 'error': ERROR,\n 'fatal': FATAL\n};\nvar nameFromLevel = {};\nvar upperNameFromLevel = {};\nvar upperPaddedNameFromLevel = {};\nObject.keys(levelFromName).forEach(function (name) {\n var lvl = levelFromName[name];\n nameFromLevel[lvl] = name;\n upperNameFromLevel[lvl] = name.toUpperCase();\n upperPaddedNameFromLevel[lvl] = (\n name.length === 4 ? ' ' : '') + name.toUpperCase();\n});\n\n\n/**\n * Is this a valid Bunyan log record.\n */\nfunction isValidRecord(rec) {\n if (rec.v === null ||\n rec.level === null ||\n rec.name === null ||\n rec.hostname === null ||\n rec.pid === null ||\n rec.time === null ||\n rec.msg === null) {\n // Not valid Bunyan log.\n return false;\n } else {\n return true;\n }\n}\n\nfunction indent(s) {\n return ' ' + s.split(/\\r?\\n/).join('\\n ');\n}\n\nfunction stylizeWithColor(s, color) {\n if (!s) return '';\n var fn = styles[color];\n return fn ? fn(s) : s;\n}\n\nfunction stylizeWithoutColor(str, color) {\n return str;\n}\n\n/**\n * @param {int} level is the level of the record.\n * @return The level value to its String representation.\n * This is only used on json-related formats output and first suggested at \n * https://github.com/trentm/node-bunyan/issues/194#issuecomment-64858117\n */\nfunction mapLevelToName(level) {\n switch (level) {\n case TRACE:\n return 'TRACE';\n case DEBUG:\n return 'DEBUG';\n case INFO:\n return 'INFO';\n case WARN:\n return 'WARN';\n case ERROR:\n return 'ERROR';\n case FATAL:\n return 'FATAL';\n }\n}\n\n/**\n * Print out a single result, considering input options.\n */\nmodule.exports = function formatRecord(rec, opts) {\n\n function _res(res) {\n var s = '';\n if (res.header) {\n s += res.header.trimRight();\n } else if (res.headers) {\n if (res.statusCode) {\n s += format('HTTP/1.1 %s %s\\n', res.statusCode,\n http.STATUS_CODES[res.statusCode]);\n }\n var headers = res.headers;\n s += Object.keys(headers).map(\n function (h) { return h + ': ' + headers[h]; }).join('\\n');\n }\n delete res.header;\n delete res.headers;\n delete res.statusCode;\n if (res.body) {\n s += '\\n\\n' + (typeof (res.body) === 'object'\n ? JSON.stringify(res.body, null, 2) : res.body);\n delete res.body;\n }\n if (res.trailer) {\n s += '\\n' + res.trailer;\n }\n delete res.trailer;\n if (s) {\n details.push(indent(s));\n }\n // E.g. for extra 'foo' field on 'res', add 'res.foo' at\n // top-level. This *does* have the potential to stomp on a\n // literal 'res.foo' key.\n Object.keys(res).forEach(function (k) {\n rec['res.' + k] = res[k];\n });\n }\n\n var short = false;\n var time;\n var line = rec.line;\n var stylize = opts.color ? stylizeWithColor : stylizeWithoutColor;\n var outputMode = isNaN(opts.outputMode) ? OM_FROM_NAME[opts.outputMode] : opts.outputMode; \n\n switch (outputMode) {\n case OM_SHORT:\n short = true;\n /* falls through */\n case OM_LONG:\n // [time] LEVEL: name[/comp]/pid on hostname (src): msg* (extras...)\n // msg*\n // --\n // long and multi-line extras\n // ...\n // If 'msg' is single-line, then it goes in the top line.\n // If 'req', show the request.\n // If 'res', show the response.\n // If 'err' and 'err.stack' then show that.\n if (!isValidRecord(rec)) {\n return line + '\\n';\n }\n\n delete rec.v;\n\n /*\n * We assume the Date is formatted according to ISO8601, in which\n * case we can safely chop off the date information.\n */\n if (short && rec.time[10] == 'T') {\n time = rec.time.substr(11);\n time = stylize(time, 'brightBlack');\n } else {\n time = stylize('[' + rec.time + ']', 'brightBlack');\n }\n\n delete rec.time;\n\n var nameStr = rec.name;\n delete rec.name;\n\n if (rec.component) {\n nameStr += '/' + rec.component;\n }\n delete rec.component;\n\n if (!short)\n nameStr += '/' + rec.pid;\n delete rec.pid;\n\n var level = (upperPaddedNameFromLevel[rec.level] || 'LVL' + rec.level);\n if (opts.color) {\n var colorFromLevel = opts.colorFromLevel || {\n 10: 'brightBlack', // TRACE\n 20: 'brightBlack', // DEBUG\n 30: 'cyan', // INFO\n 40: 'magenta', // WARN\n 50: 'red', // ERROR\n 60: 'inverse', // FATAL\n };\n level = stylize(level, colorFromLevel[rec.level]);\n }\n delete rec.level;\n\n var src = '';\n var s;\n var headers;\n var hostHeaderLine = '';\n if (rec.src && rec.src.file) {\n s = rec.src;\n if (s.func) {\n src = format(' (%s:%d in %s)', s.file, s.line, s.func);\n } else {\n src = format(' (%s:%d)', s.file, s.line);\n }\n src = stylize(src, 'green');\n }\n delete rec.src;\n\n var hostname = rec.hostname;\n delete rec.hostname;\n\n var extras = [];\n var details = [];\n\n if (rec.req_id) {\n extras.push('req_id=' + rec.req_id);\n }\n delete rec.req_id;\n\n var onelineMsg;\n if (rec.msg.indexOf('\\n') !== -1) {\n onelineMsg = '';\n details.push(indent(stylize(rec.msg, 'cyan')));\n } else {\n onelineMsg = ' ' + stylize(rec.msg, 'cyan');\n }\n delete rec.msg;\n\n if (rec.req && typeof (rec.req) === 'object') {\n var req = rec.req;\n delete rec.req;\n headers = req.headers;\n s = format('%s %s HTTP/%s%s', req.method,\n req.url,\n req.httpVersion || '1.1',\n (headers ?\n '\\n' + Object.keys(headers).map(function (h) {\n return h + ': ' + headers[h];\n }).join('\\n') :\n '')\n );\n delete req.url;\n delete req.method;\n delete req.httpVersion;\n delete req.headers;\n if (req.body) {\n s += '\\n\\n' + (typeof (req.body) === 'object'\n ? JSON.stringify(req.body, null, 2) : req.body);\n delete req.body;\n }\n if (req.trailers && Object.keys(req.trailers) > 0) {\n s += '\\n' + Object.keys(req.trailers).map(function (t) {\n return t + ': ' + req.trailers[t];\n }).join('\\n');\n }\n delete req.trailers;\n details.push(indent(s));\n // E.g. for extra 'foo' field on 'req', add 'req.foo' at\n // top-level. This *does* have the potential to stomp on a\n // literal 'req.foo' key.\n Object.keys(req).forEach(function (k) {\n rec['req.' + k] = req[k];\n })\n }\n\n if (rec.client_req && typeof (rec.client_req) === 'object') {\n var client_req = rec.client_req;\n delete rec.client_req;\n headers = client_req.headers;\n s = '';\n if (client_req.address) {\n hostHeaderLine = 'Host: ' + client_req.address;\n if (client_req.port)\n hostHeaderLine += ':' + client_req.port;\n hostHeaderLine += '\\n';\n }\n delete client_req.headers;\n delete client_req.address;\n delete client_req.port;\n s += format('%s %s HTTP/%s\\n%s%s', client_req.method,\n client_req.url,\n client_req.httpVersion || '1.1',\n hostHeaderLine,\n (headers ?\n Object.keys(headers).map(\n function (h) {\n return h + ': ' + headers[h];\n }).join('\\n') :\n ''));\n delete client_req.method;\n delete client_req.url;\n delete client_req.httpVersion;\n if (client_req.body) {\n s += '\\n\\n' + (typeof (client_req.body) === 'object' ?\n JSON.stringify(client_req.body, null, 2) :\n client_req.body);\n delete client_req.body;\n }\n // E.g. for extra 'foo' field on 'client_req', add\n // 'client_req.foo' at top-level. This *does* have the potential\n // to stomp on a literal 'client_req.foo' key.\n Object.keys(client_req).forEach(function (k) {\n rec['client_req.' + k] = client_req[k];\n })\n details.push(indent(s));\n }\n\n\n if (rec.res && typeof (rec.res) === 'object') {\n _res(rec.res);\n delete rec.res;\n }\n if (rec.client_res && typeof (rec.client_res) === 'object') {\n _res(rec.client_res);\n delete rec.res;\n }\n\n if (rec.err && rec.err.stack) {\n details.push(indent(rec.err.stack));\n delete rec.err;\n }\n\n var leftover = Object.keys(rec);\n for (var i = 0; i < leftover.length; i++) {\n var key = leftover[i];\n var value = rec[key];\n var stringified = false;\n if (typeof (value) !== 'string') {\n value = JSON.stringify(value, null, 2);\n stringified = true;\n }\n if (value.indexOf('\\n') !== -1 || value.length > 50) {\n details.push(indent(key + ': ' + value));\n } else if (!stringified && (value.indexOf(' ') != -1 ||\n value.length === 0))\n {\n extras.push(key + '=' + JSON.stringify(value));\n } else {\n extras.push(key + '=' + value);\n }\n }\n\n extras = stylize(\n (extras.length ? ' (' + extras.join(', ') + ')' : ''), 'brightBlack');\n details = stylize(\n (details.length ? details.join('\\n --\\n') + '\\n' : ''), 'brightBlack');\n if (!short)\n return format('%s %s: %s on %s%s:%s%s\\n%s',\n time,\n level,\n nameStr,\n hostname || '',\n src,\n onelineMsg,\n extras,\n details);\n else\n return format('%s %s %s:%s%s\\n%s',\n time,\n level,\n nameStr,\n onelineMsg,\n extras,\n details);\n break;\n\n case OM_INSPECT:\n return util.inspect(rec, false, Infinity, true) + '\\n';\n\n case OM_BUNYAN:\n if (opts.levelInString) {\n rec.level = mapLevelToName(rec.level);\n }\n return JSON.stringify(rec, null, 0) + '\\n';\n\n case OM_JSON:\n if (opts.levelInString) {\n rec.level = mapLevelToName(rec.level);\n }\n return JSON.stringify(rec, null, opts.jsonIndent) + '\\n';\n\n case OM_SIMPLE:\n /* JSSTYLED */\n // \n if (!isValidRecord(rec)) {\n return line + '\\n';\n }\n return format('%s - %s\\n',\n upperNameFromLevel[rec.level] || 'LVL' + rec.level,\n rec.msg);\n default:\n throw new Error('unknown output mode: '+opts.outputMode);\n }\n}\n\n", - "// ColorCodes explained: http://www.termsys.demon.co.uk/vtansi.htm\n'use strict';\n\nvar colorNums = {\n white : 37\n , black : 30\n , blue : 34\n , cyan : 36\n , green : 32\n , magenta : 35\n , red : 31\n , yellow : 33\n , brightBlack : 90\n , brightRed : 91\n , brightGreen : 92\n , brightYellow : 93\n , brightBlue : 94\n , brightMagenta : 95\n , brightCyan : 96\n , brightWhite : 97\n }\n , backgroundColorNums = {\n bgBlack : 40\n , bgRed : 41\n , bgGreen : 42\n , bgYellow : 43\n , bgBlue : 44\n , bgMagenta : 45\n , bgCyan : 46\n , bgWhite : 47\n , bgBrightBlack : 100\n , bgBrightRed : 101\n , bgBrightGreen : 102\n , bgBrightYellow : 103\n , bgBrightBlue : 104\n , bgBrightMagenta : 105\n , bgBrightCyan : 106\n , bgBrightWhite : 107\n } \n , colors = {};\n\n\nObject.keys(colorNums).forEach(function (k) {\n colors[k] = function (s) { \n return '\\u001b[' + colorNums[k] + 'm' + s + '\\u001b[39m';\n };\n});\n\nObject.keys(backgroundColorNums).forEach(function (k) {\n colors[k] = function (s) { \n return '\\u001b[' + backgroundColorNums[k] + 'm' + s + '\\u001b[49m';\n };\n});\n\nmodule.exports = colors;\n", - "'use strict';\n\n/*\n * Info: http://www.termsys.demon.co.uk/vtansi.htm#colors \n * Following caveats\n * bright - brightens the color (bold-blue is same as brigthtBlue)\n * dim - nothing on Mac or Linux\n * italic - nothing on Mac or Linux\n * underline - underlines string\n * blink - nothing on Mac or linux\n * inverse - background becomes foreground and vice versa\n *\n * In summary, the only styles that work are:\n * - bright, underline and inverse\n * - the others are only included for completeness\n */\n\nvar styleNums = {\n reset : [0, 22]\n , bright : [1, 22]\n , dim : [2, 22]\n , italic : [3, 23]\n , underline : [4, 24]\n , blink : [5, 25]\n , inverse : [7, 27]\n }\n , styles = {}\n ;\n\nObject.keys(styleNums).forEach(function (k) {\n styles[k] = function (s) { \n var open = styleNums[k][0]\n , close = styleNums[k][1];\n return '\\u001b[' + open + 'm' + s + '\\u001b[' + close + 'm';\n };\n});\n\nmodule.exports = styles;\n", - "module.exports = hasKeys\n\nfunction hasKeys(source) {\n return source !== null &&\n (typeof source === \"object\" ||\n typeof source === \"function\")\n}\n", - "var Keys = require(\"object-keys\")\nvar hasKeys = require(\"./has-keys\")\n\nmodule.exports = extend\n\nfunction extend() {\n var target = {}\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i]\n\n if (!hasKeys(source)) {\n continue\n }\n\n var keys = Keys(source)\n\n for (var j = 0; j < keys.length; j++) {\n var name = keys[j]\n target[name] = source[name]\n }\n }\n\n return target\n}\n", - "var hasOwn = Object.prototype.hasOwnProperty;\nvar toString = Object.prototype.toString;\n\nvar isFunction = function (fn) {\n\tvar isFunc = (typeof fn === 'function' && !(fn instanceof RegExp)) || toString.call(fn) === '[object Function]';\n\tif (!isFunc && typeof window !== 'undefined') {\n\t\tisFunc = fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt;\n\t}\n\treturn isFunc;\n};\n\nmodule.exports = function forEach(obj, fn) {\n\tif (!isFunction(fn)) {\n\t\tthrow new TypeError('iterator must be a function');\n\t}\n\tvar i, k,\n\t\tisString = typeof obj === 'string',\n\t\tl = obj.length,\n\t\tcontext = arguments.length > 2 ? arguments[2] : null;\n\tif (l === +l) {\n\t\tfor (i = 0; i < l; i++) {\n\t\t\tif (context === null) {\n\t\t\t\tfn(isString ? obj.charAt(i) : obj[i], i, obj);\n\t\t\t} else {\n\t\t\t\tfn.call(context, isString ? obj.charAt(i) : obj[i], i, obj);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (k in obj) {\n\t\t\tif (hasOwn.call(obj, k)) {\n\t\t\t\tif (context === null) {\n\t\t\t\t\tfn(obj[k], k, obj);\n\t\t\t\t} else {\n\t\t\t\t\tfn.call(context, obj[k], k, obj);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n", - "module.exports = Object.keys || require('./shim');\n\n", - "var toString = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toString.call(value);\n\tvar isArguments = str === '[object Arguments]';\n\tif (!isArguments) {\n\t\tisArguments = str !== '[object Array]'\n\t\t\t&& value !== null\n\t\t\t&& typeof value === 'object'\n\t\t\t&& typeof value.length === 'number'\n\t\t\t&& value.length >= 0\n\t\t\t&& toString.call(value.callee) === '[object Function]';\n\t}\n\treturn isArguments;\n};\n\n", - "(function () {\n\t\"use strict\";\n\n\t// modified from https://github.com/kriskowal/es5-shim\n\tvar has = Object.prototype.hasOwnProperty,\n\t\ttoString = Object.prototype.toString,\n\t\tforEach = require('./foreach'),\n\t\tisArgs = require('./isArguments'),\n\t\thasDontEnumBug = !({'toString': null}).propertyIsEnumerable('toString'),\n\t\thasProtoEnumBug = (function () {}).propertyIsEnumerable('prototype'),\n\t\tdontEnums = [\n\t\t\t\"toString\",\n\t\t\t\"toLocaleString\",\n\t\t\t\"valueOf\",\n\t\t\t\"hasOwnProperty\",\n\t\t\t\"isPrototypeOf\",\n\t\t\t\"propertyIsEnumerable\",\n\t\t\t\"constructor\"\n\t\t],\n\t\tkeysShim;\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object',\n\t\t\tisFunction = toString.call(object) === '[object Function]',\n\t\t\tisArguments = isArgs(object),\n\t\t\ttheKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError(\"Object.keys called on a non-object\");\n\t\t}\n\n\t\tif (isArguments) {\n\t\t\tforEach(object, function (value) {\n\t\t\t\ttheKeys.push(value);\n\t\t\t});\n\t\t} else {\n\t\t\tvar name,\n\t\t\t\tskipProto = hasProtoEnumBug && isFunction;\n\n\t\t\tfor (name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar ctor = object.constructor,\n\t\t\t\tskipConstructor = ctor && ctor.prototype === object;\n\n\t\t\tforEach(dontEnums, function (dontEnum) {\n\t\t\t\tif (!(skipConstructor && dontEnum === 'constructor') && has.call(object, dontEnum)) {\n\t\t\t\t\ttheKeys.push(dontEnum);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn theKeys;\n\t};\n\n\tmodule.exports = keysShim;\n}());\n\n", + "RotatingFileStream = null; // see: https://github.com/trentm/node-bunyan/issues/223\nbunyan = require('bunyan');\nWritableStream = require('stream').Writable;\ninherits = require('util').inherits;\nlogStyle = require('log-with-style');\n\ninherits(BrowserStdout, WritableStream);\n\nfunction BrowserStdout() {\n if (!(this instanceof BrowserStdout)) {\n return new BrowserStdout();\n }\n WritableStream.call(this);\n}\n\nBrowserStdout.prototype._write = function(chunks, encoding, cb) {\n var output = JSON.parse(chunks.toString ? chunks.toString() : chunks);\n var color = '[c=\"color: green\"]';\n var level = 'INFO';\n if (output.level > 40) {\n color = '[c=\"color: red\"]';\n if (output.level === 60) {\n level = 'FATAL';\n } else {\n level = 'ERROR';\n }\n } else if (output.level === 40) {\n color = '[c=\"color: orange\"]';\n level = 'WARNING';\n } else if (output.level === 20) {\n level = 'DEBUG';\n } else if (output.level === 10) {\n level = 'TRACE';\n }\n logStyle(color + level + '[c] ' + '[c=\"color: blue\"]' + output.name + '[c] ' + output.msg);\n process.nextTick(cb);\n};\n\n// Import process.stdout and process.stderr\nprocess = require('process');\nprocess.stdout = BrowserStdout();\nprocess.stderr = BrowserStdout();\n\norion.logFormatter = BrowserStdout();\n", "/**\n * Copyright (c) 2014 Trent Mick. All rights reserved.\n * Copyright (c) 2014 Joyent Inc. All rights reserved.\n *\n * The bunyan logging library for node.js.\n *\n * -*- mode: js -*-\n * vim: expandtab:ts=4:sw=4\n */\n\nvar VERSION = '1.4.0';\n\n// Bunyan log format version. This becomes the 'v' field on all log records.\n// `0` is until I release a version '1.0.0' of node-bunyan. Thereafter,\n// starting with `1`, this will be incremented if there is any backward\n// incompatible change to the log record format. Details will be in\n// 'CHANGES.md' (the change log).\nvar LOG_VERSION = 0;\n\n\nvar xxx = function xxx(s) { // internal dev/debug logging\n var args = ['XX' + 'X: '+s].concat(\n Array.prototype.slice.call(arguments, 1));\n console.error.apply(this, args);\n};\nvar xxx = function xxx() {}; // comment out to turn on debug logging\n\n\nvar os = require('os');\nvar fs = require('fs');\nvar util = require('util');\nvar assert = require('assert');\ntry {\n /* Use `+ ''` to hide this import from browserify. */\n var dtrace = require('dtrace-provider' + '');\n} catch (e) {\n dtrace = null;\n}\nvar EventEmitter = require('events').EventEmitter;\n\ntry {\n var safeJsonStringify = require('safe-json-stringify');\n} catch (e) {\n safeJsonStringify = null;\n}\nif (process.env.BUNYAN_TEST_NO_SAFE_JSON_STRINGIFY) {\n safeJsonStringify = null;\n}\n\n// The 'mv' module is required for rotating-file stream support.\ntry {\n /* Use `+ ''` to hide this import from browserify. */\n var mv = require('mv' + '');\n} catch (e) {\n mv = null;\n}\n\n// Are we in the browser (e.g. running via browserify)?\nvar isBrowser = function () {\n return typeof (window) !== 'undefined' && this === window; }();\n\ntry {\n /* Use `+ ''` to hide this import from browserify. */\n var sourceMapSupport = require('source-map-support' + '');\n} catch (_) {\n sourceMapSupport = null;\n}\n\n\n\n//---- Internal support stuff\n\n/**\n * A shallow copy of an object. Bunyan logging attempts to never cause\n * exceptions, so this function attempts to handle non-objects gracefully.\n */\nfunction objCopy(obj) {\n if (obj == null) { // null or undefined\n return obj;\n } else if (Array.isArray(obj)) {\n return obj.slice();\n } else if (typeof (obj) === 'object') {\n var copy = {};\n Object.keys(obj).forEach(function (k) {\n copy[k] = obj[k];\n });\n return copy;\n } else {\n return obj;\n }\n}\n\nvar format = util.format;\nif (!format) {\n // If node < 0.6, then use its `util.format`:\n // :\n var inspect = util.inspect;\n var formatRegExp = /%[sdj%]/g;\n format = function format(f) {\n if (typeof (f) !== 'string') {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function (x) {\n if (i >= len)\n return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j': return JSON.stringify(args[i++], safeCycles());\n case '%%': return '%';\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (x === null || typeof (x) !== 'object') {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n };\n}\n\n\n/**\n * Gather some caller info 3 stack levels up.\n * See .\n */\nfunction getCaller3Info() {\n var obj = {};\n var saveLimit = Error.stackTraceLimit;\n var savePrepare = Error.prepareStackTrace;\n Error.stackTraceLimit = 3;\n Error.captureStackTrace(this, getCaller3Info);\n\n Error.prepareStackTrace = function (_, stack) {\n var caller = stack[2];\n if (sourceMapSupport) {\n caller = sourceMapSupport.wrapCallSite(caller);\n }\n obj.file = caller.getFileName();\n obj.line = caller.getLineNumber();\n var func = caller.getFunctionName();\n if (func)\n obj.func = func;\n };\n this.stack;\n Error.stackTraceLimit = saveLimit;\n Error.prepareStackTrace = savePrepare;\n return obj;\n}\n\n\nfunction _indent(s, indent) {\n if (!indent) indent = ' ';\n var lines = s.split(/\\r?\\n/g);\n return indent + lines.join('\\n' + indent);\n}\n\n\n/**\n * Warn about an bunyan processing error.\n *\n * @param msg {String} Message with which to warn.\n * @param dedupKey {String} Optional. A short string key for this warning to\n * have its warning only printed once.\n */\nfunction _warn(msg, dedupKey) {\n assert.ok(msg);\n if (dedupKey) {\n if (_warned[dedupKey]) {\n return;\n }\n _warned[dedupKey] = true;\n }\n process.stderr.write(msg + '\\n');\n}\nfunction _haveWarned(dedupKey) {\n return _warned[dedupKey];\n}\nvar _warned = {};\n\n\nfunction ConsoleRawStream() {}\nConsoleRawStream.prototype.write = function (rec) {\n if (rec.level < INFO) {\n console.log(rec);\n } else if (rec.level < WARN) {\n console.info(rec);\n } else if (rec.level < ERROR) {\n console.warn(rec);\n } else {\n console.error(rec);\n }\n};\n\n\n//---- Levels\n\nvar TRACE = 10;\nvar DEBUG = 20;\nvar INFO = 30;\nvar WARN = 40;\nvar ERROR = 50;\nvar FATAL = 60;\n\nvar levelFromName = {\n 'trace': TRACE,\n 'debug': DEBUG,\n 'info': INFO,\n 'warn': WARN,\n 'error': ERROR,\n 'fatal': FATAL\n};\nvar nameFromLevel = {};\nObject.keys(levelFromName).forEach(function (name) {\n nameFromLevel[levelFromName[name]] = name;\n});\n\n// Dtrace probes.\nvar dtp = undefined;\nvar probes = dtrace && {};\n\n/**\n * Resolve a level number, name (upper or lowercase) to a level number value.\n *\n * @api public\n */\nfunction resolveLevel(nameOrNum) {\n var level = (typeof (nameOrNum) === 'string'\n ? levelFromName[nameOrNum.toLowerCase()]\n : nameOrNum);\n return level;\n}\n\n\n\n//---- Logger class\n\n/**\n * Create a Logger instance.\n *\n * @param options {Object} See documentation for full details. At minimum\n * this must include a 'name' string key. Configuration keys:\n * - `streams`: specify the logger output streams. This is an array of\n * objects with these fields:\n * - `type`: The stream type. See README.md for full details.\n * Often this is implied by the other fields. Examples are\n * 'file', 'stream' and \"raw\".\n * - `level`: Defaults to 'info'.\n * - `path` or `stream`: The specify the file path or writeable\n * stream to which log records are written. E.g.\n * `stream: process.stdout`.\n * - `closeOnExit` (boolean): Optional. Default is true for a\n * 'file' stream when `path` is given, false otherwise.\n * See README.md for full details.\n * - `level`: set the level for a single output stream (cannot be used\n * with `streams`)\n * - `stream`: the output stream for a logger with just one, e.g.\n * `process.stdout` (cannot be used with `streams`)\n * - `serializers`: object mapping log record field names to\n * serializing functions. See README.md for details.\n * - `src`: Boolean (default false). Set true to enable 'src' automatic\n * field with log call source info.\n * All other keys are log record fields.\n *\n * An alternative *internal* call signature is used for creating a child:\n * new Logger(, [, ]);\n *\n * @param _childSimple (Boolean) An assertion that the given `_childOptions`\n * (a) only add fields (no config) and (b) no serialization handling is\n * required for them. IOW, this is a fast path for frequent child\n * creation.\n */\nfunction Logger(options, _childOptions, _childSimple) {\n xxx('Logger start:', options)\n if (!(this instanceof Logger)) {\n return new Logger(options, _childOptions);\n }\n\n // Input arg validation.\n var parent;\n if (_childOptions !== undefined) {\n parent = options;\n options = _childOptions;\n if (!(parent instanceof Logger)) {\n throw new TypeError(\n 'invalid Logger creation: do not pass a second arg');\n }\n }\n if (!options) {\n throw new TypeError('options (object) is required');\n }\n if (!parent) {\n if (!options.name) {\n throw new TypeError('options.name (string) is required');\n }\n } else {\n if (options.name) {\n throw new TypeError(\n 'invalid options.name: child cannot set logger name');\n }\n }\n if (options.stream && options.streams) {\n throw new TypeError('cannot mix \"streams\" and \"stream\" options');\n }\n if (options.streams && !Array.isArray(options.streams)) {\n throw new TypeError('invalid options.streams: must be an array')\n }\n if (options.serializers && (typeof (options.serializers) !== 'object' ||\n Array.isArray(options.serializers))) {\n throw new TypeError('invalid options.serializers: must be an object')\n }\n\n EventEmitter.call(this);\n\n // Fast path for simple child creation.\n if (parent && _childSimple) {\n // `_isSimpleChild` is a signal to stream close handling that this child\n // owns none of its streams.\n this._isSimpleChild = true;\n\n this._level = parent._level;\n this.streams = parent.streams;\n this.serializers = parent.serializers;\n this.src = parent.src;\n var fields = this.fields = {};\n var parentFieldNames = Object.keys(parent.fields);\n for (var i = 0; i < parentFieldNames.length; i++) {\n var name = parentFieldNames[i];\n fields[name] = parent.fields[name];\n }\n var names = Object.keys(options);\n for (var i = 0; i < names.length; i++) {\n var name = names[i];\n fields[name] = options[name];\n }\n return;\n }\n\n // Null values.\n var self = this;\n if (parent) {\n this._level = parent._level;\n this.streams = [];\n for (var i = 0; i < parent.streams.length; i++) {\n var s = objCopy(parent.streams[i]);\n s.closeOnExit = false; // Don't own parent stream.\n this.streams.push(s);\n }\n this.serializers = objCopy(parent.serializers);\n this.src = parent.src;\n this.fields = objCopy(parent.fields);\n if (options.level) {\n this.level(options.level);\n }\n } else {\n this._level = Number.POSITIVE_INFINITY;\n this.streams = [];\n this.serializers = null;\n this.src = false;\n this.fields = {};\n }\n\n if (!dtp && dtrace) {\n dtp = dtrace.createDTraceProvider('bunyan');\n\n for (var level in levelFromName) {\n var probe;\n\n probes[levelFromName[level]] = probe =\n dtp.addProbe('log-' + level, 'char *');\n\n // Explicitly add a reference to dtp to prevent it from being GC'd\n probe.dtp = dtp;\n }\n\n dtp.enable();\n }\n\n // Handle *config* options (i.e. options that are not just plain data\n // for log records).\n if (options.stream) {\n self.addStream({\n type: 'stream',\n stream: options.stream,\n closeOnExit: false,\n level: options.level\n });\n } else if (options.streams) {\n options.streams.forEach(function (s) {\n self.addStream(s, options.level);\n });\n } else if (parent && options.level) {\n this.level(options.level);\n } else if (!parent) {\n if (isBrowser) {\n /*\n * In the browser we'll be emitting to console.log by default.\n * Any console.log worth its salt these days can nicely render\n * and introspect objects (e.g. the Firefox and Chrome console)\n * so let's emit the raw log record. Are there browsers for which\n * that breaks things?\n */\n self.addStream({\n type: 'raw',\n stream: new ConsoleRawStream(),\n closeOnExit: false,\n level: options.level\n });\n } else {\n self.addStream({\n type: 'stream',\n stream: process.stdout,\n closeOnExit: false,\n level: options.level\n });\n }\n }\n if (options.serializers) {\n self.addSerializers(options.serializers);\n }\n if (options.src) {\n this.src = true;\n }\n xxx('Logger: ', self)\n\n // Fields.\n // These are the default fields for log records (minus the attributes\n // removed in this constructor). To allow storing raw log records\n // (unrendered), `this.fields` must never be mutated. Create a copy for\n // any changes.\n var fields = objCopy(options);\n delete fields.stream;\n delete fields.level;\n delete fields.streams;\n delete fields.serializers;\n delete fields.src;\n if (this.serializers) {\n this._applySerializers(fields);\n }\n if (!fields.hostname) {\n fields.hostname = os.hostname();\n }\n if (!fields.pid) {\n fields.pid = process.pid;\n }\n Object.keys(fields).forEach(function (k) {\n self.fields[k] = fields[k];\n });\n}\n\nutil.inherits(Logger, EventEmitter);\n\n\n/**\n * Add a stream\n *\n * @param stream {Object}. Object with these fields:\n * - `type`: The stream type. See README.md for full details.\n * Often this is implied by the other fields. Examples are\n * 'file', 'stream' and \"raw\".\n * - `path` or `stream`: The specify the file path or writeable\n * stream to which log records are written. E.g.\n * `stream: process.stdout`.\n * - `level`: Optional. Falls back to `defaultLevel`.\n * - `closeOnExit` (boolean): Optional. Default is true for a\n * 'file' stream when `path` is given, false otherwise.\n * See README.md for full details.\n * @param defaultLevel {Number|String} Optional. A level to use if\n * `stream.level` is not set. If neither is given, this defaults to INFO.\n */\nLogger.prototype.addStream = function addStream(s, defaultLevel) {\n var self = this;\n if (defaultLevel === null || defaultLevel === undefined) {\n defaultLevel = INFO;\n }\n\n s = objCopy(s);\n\n // Implicit 'type' from other args.\n var type = s.type;\n if (!s.type) {\n if (s.stream) {\n s.type = 'stream';\n } else if (s.path) {\n s.type = 'file'\n }\n }\n s.raw = (s.type === 'raw'); // PERF: Allow for faster check in `_emit`.\n\n if (s.level) {\n s.level = resolveLevel(s.level);\n } else {\n s.level = resolveLevel(defaultLevel);\n }\n if (s.level < self._level) {\n self._level = s.level;\n }\n\n switch (s.type) {\n case 'stream':\n if (!s.closeOnExit) {\n s.closeOnExit = false;\n }\n break;\n case 'file':\n if (!s.stream) {\n s.stream = fs.createWriteStream(s.path,\n {flags: 'a', encoding: 'utf8'});\n s.stream.on('error', function (err) {\n self.emit('error', err, s);\n });\n if (!s.closeOnExit) {\n s.closeOnExit = true;\n }\n } else {\n if (!s.closeOnExit) {\n s.closeOnExit = false;\n }\n }\n break;\n case 'rotating-file':\n assert.ok(!s.stream,\n '\"rotating-file\" stream should not give a \"stream\"');\n assert.ok(s.path);\n assert.ok(mv, '\"rotating-file\" stream type is not supported: '\n + 'missing \"mv\" module');\n s.stream = new RotatingFileStream(s);\n if (!s.closeOnExit) {\n s.closeOnExit = true;\n }\n break;\n case 'raw':\n if (!s.closeOnExit) {\n s.closeOnExit = false;\n }\n break;\n default:\n throw new TypeError('unknown stream type \"' + s.type + '\"');\n }\n\n self.streams.push(s);\n delete self.haveNonRawStreams; // reset\n}\n\n\n/**\n * Add serializers\n *\n * @param serializers {Object} Optional. Object mapping log record field names\n * to serializing functions. See README.md for details.\n */\nLogger.prototype.addSerializers = function addSerializers(serializers) {\n var self = this;\n\n if (!self.serializers) {\n self.serializers = {};\n }\n Object.keys(serializers).forEach(function (field) {\n var serializer = serializers[field];\n if (typeof (serializer) !== 'function') {\n throw new TypeError(format(\n 'invalid serializer for \"%s\" field: must be a function',\n field));\n } else {\n self.serializers[field] = serializer;\n }\n });\n}\n\n\n\n/**\n * Create a child logger, typically to add a few log record fields.\n *\n * This can be useful when passing a logger to a sub-component, e.g. a\n * 'wuzzle' component of your service:\n *\n * var wuzzleLog = log.child({component: 'wuzzle'})\n * var wuzzle = new Wuzzle({..., log: wuzzleLog})\n *\n * Then log records from the wuzzle code will have the same structure as\n * the app log, *plus the component='wuzzle' field*.\n *\n * @param options {Object} Optional. Set of options to apply to the child.\n * All of the same options for a new Logger apply here. Notes:\n * - The parent's streams are inherited and cannot be removed in this\n * call. Any given `streams` are *added* to the set inherited from\n * the parent.\n * - The parent's serializers are inherited, though can effectively be\n * overwritten by using duplicate keys.\n * - Can use `level` to set the level of the streams inherited from\n * the parent. The level for the parent is NOT affected.\n * @param simple {Boolean} Optional. Set to true to assert that `options`\n * (a) only add fields (no config) and (b) no serialization handling is\n * required for them. IOW, this is a fast path for frequent child\n * creation. See 'tools/timechild.js' for numbers.\n */\nLogger.prototype.child = function (options, simple) {\n return new (this.constructor)(this, options || {}, simple);\n}\n\n\n/**\n * A convenience method to reopen 'file' streams on a logger. This can be\n * useful with external log rotation utilities that move and re-open log files\n * (e.g. logrotate on Linux, logadm on SmartOS/Illumos). Those utilities\n * typically have rotation options to copy-and-truncate the log file, but\n * you may not want to use that. An alternative is to do this in your\n * application:\n *\n * var log = bunyan.createLogger(...);\n * ...\n * process.on('SIGUSR2', function () {\n * log.reopenFileStreams();\n * });\n * ...\n *\n * See .\n */\nLogger.prototype.reopenFileStreams = function () {\n var self = this;\n self.streams.forEach(function (s) {\n if (s.type === 'file') {\n if (s.stream) {\n // Not sure if typically would want this, or more immediate\n // `s.stream.destroy()`.\n s.stream.end();\n s.stream.destroySoon();\n delete s.stream;\n }\n s.stream = fs.createWriteStream(s.path,\n {flags: 'a', encoding: 'utf8'});\n s.stream.on('error', function (err) {\n self.emit('error', err, s);\n });\n }\n });\n};\n\n\n/* BEGIN JSSTYLED */\n/**\n * Close this logger.\n *\n * This closes streams (that it owns, as per 'endOnClose' attributes on\n * streams), etc. Typically you **don't** need to bother calling this.\nLogger.prototype.close = function () {\n if (this._closed) {\n return;\n }\n if (!this._isSimpleChild) {\n self.streams.forEach(function (s) {\n if (s.endOnClose) {\n xxx('closing stream s:', s);\n s.stream.end();\n s.endOnClose = false;\n }\n });\n }\n this._closed = true;\n}\n */\n/* END JSSTYLED */\n\n\n/**\n * Get/set the level of all streams on this logger.\n *\n * Get Usage:\n * // Returns the current log level (lowest level of all its streams).\n * log.level() -> INFO\n *\n * Set Usage:\n * log.level(INFO) // set all streams to level INFO\n * log.level('info') // can use 'info' et al aliases\n */\nLogger.prototype.level = function level(value) {\n if (value === undefined) {\n return this._level;\n }\n var newLevel = resolveLevel(value);\n var len = this.streams.length;\n for (var i = 0; i < len; i++) {\n this.streams[i].level = newLevel;\n }\n this._level = newLevel;\n}\n\n\n/**\n * Get/set the level of a particular stream on this logger.\n *\n * Get Usage:\n * // Returns an array of the levels of each stream.\n * log.levels() -> [TRACE, INFO]\n *\n * // Returns a level of the identified stream.\n * log.levels(0) -> TRACE // level of stream at index 0\n * log.levels('foo') // level of stream with name 'foo'\n *\n * Set Usage:\n * log.levels(0, INFO) // set level of stream 0 to INFO\n * log.levels(0, 'info') // can use 'info' et al aliases\n * log.levels('foo', WARN) // set stream named 'foo' to WARN\n *\n * Stream names: When streams are defined, they can optionally be given\n * a name. For example,\n * log = new Logger({\n * streams: [\n * {\n * name: 'foo',\n * path: '/var/log/my-service/foo.log'\n * level: 'trace'\n * },\n * ...\n *\n * @param name {String|Number} The stream index or name.\n * @param value {Number|String} The level value (INFO) or alias ('info').\n * If not given, this is a 'get' operation.\n * @throws {Error} If there is no stream with the given name.\n */\nLogger.prototype.levels = function levels(name, value) {\n if (name === undefined) {\n assert.equal(value, undefined);\n return this.streams.map(\n function (s) { return s.level });\n }\n var stream;\n if (typeof (name) === 'number') {\n stream = this.streams[name];\n if (stream === undefined) {\n throw new Error('invalid stream index: ' + name);\n }\n } else {\n var len = this.streams.length;\n for (var i = 0; i < len; i++) {\n var s = this.streams[i];\n if (s.name === name) {\n stream = s;\n break;\n }\n }\n if (!stream) {\n throw new Error(format('no stream with name \"%s\"', name));\n }\n }\n if (value === undefined) {\n return stream.level;\n } else {\n var newLevel = resolveLevel(value);\n stream.level = newLevel;\n if (newLevel < this._level) {\n this._level = newLevel;\n }\n }\n}\n\n\n/**\n * Apply registered serializers to the appropriate keys in the given fields.\n *\n * Pre-condition: This is only called if there is at least one serializer.\n *\n * @param fields (Object) The log record fields.\n * @param excludeFields (Object) Optional mapping of keys to `true` for\n * keys to NOT apply a serializer.\n */\nLogger.prototype._applySerializers = function (fields, excludeFields) {\n var self = this;\n\n xxx('_applySerializers: excludeFields', excludeFields);\n\n // Check each serializer against these (presuming number of serializers\n // is typically less than number of fields).\n Object.keys(this.serializers).forEach(function (name) {\n if (fields[name] === undefined ||\n (excludeFields && excludeFields[name]))\n {\n return;\n }\n xxx('_applySerializers; apply to \"%s\" key', name)\n try {\n fields[name] = self.serializers[name](fields[name]);\n } catch (err) {\n _warn(format('bunyan: ERROR: Exception thrown from the \"%s\" '\n + 'Bunyan serializer. This should never happen. This is a bug'\n + 'in that serializer function.\\n%s',\n name, err.stack || err));\n fields[name] = format('(Error in Bunyan log \"%s\" serializer '\n + 'broke field. See stderr for details.)', name);\n }\n });\n}\n\n\n/**\n * Emit a log record.\n *\n * @param rec {log record}\n * @param noemit {Boolean} Optional. Set to true to skip emission\n * and just return the JSON string.\n */\nLogger.prototype._emit = function (rec, noemit) {\n var i;\n\n // Lazily determine if this Logger has non-'raw' streams. If there are\n // any, then we need to stringify the log record.\n if (this.haveNonRawStreams === undefined) {\n this.haveNonRawStreams = false;\n for (i = 0; i < this.streams.length; i++) {\n if (!this.streams[i].raw) {\n this.haveNonRawStreams = true;\n break;\n }\n }\n }\n\n // Stringify the object. Attempt to warn/recover on error.\n var str;\n if (noemit || this.haveNonRawStreams) {\n try {\n str = JSON.stringify(rec, safeCycles()) + '\\n';\n } catch (e) {\n if (safeJsonStringify) {\n str = safeJsonStringify(rec) + '\\n';\n } else {\n var dedupKey = e.stack.split(/\\n/g, 2).join('\\n');\n _warn('bunyan: ERROR: Exception in '\n + '`JSON.stringify(rec)`. You can install the '\n + '\"safe-json-stringify\" module to have Bunyan fallback '\n + 'to safer stringification. Record:\\n'\n + _indent(format('%s\\n%s', util.inspect(rec), e.stack)),\n dedupKey);\n str = format('(Exception in JSON.stringify(rec): %j. '\n + 'See stderr for details.)\\n', e.message);\n }\n }\n }\n\n if (noemit)\n return str;\n\n var level = rec.level;\n for (i = 0; i < this.streams.length; i++) {\n var s = this.streams[i];\n if (s.level <= level) {\n xxx('writing log rec \"%s\" to \"%s\" stream (%d <= %d): %j',\n rec.msg, s.type, s.level, level, rec);\n s.stream.write(s.raw ? rec : str);\n }\n };\n\n return str;\n}\n\n\n/**\n * Build a log emitter function for level minLevel. I.e. this is the\n * creator of `log.info`, `log.error`, etc.\n */\nfunction mkLogEmitter(minLevel) {\n return function () {\n var log = this;\n\n function mkRecord(args) {\n var excludeFields;\n if (args[0] instanceof Error) {\n // `log.(err, ...)`\n fields = {\n // Use this Logger's err serializer, if defined.\n err: (log.serializers && log.serializers.err\n ? log.serializers.err(args[0])\n : Logger.stdSerializers.err(args[0]))\n };\n excludeFields = {err: true};\n if (args.length === 1) {\n msgArgs = [fields.err.message];\n } else {\n msgArgs = Array.prototype.slice.call(args, 1);\n }\n } else if (typeof (args[0]) !== 'object' && args[0] !== null ||\n Array.isArray(args[0])) {\n // `log.(msg, ...)`\n fields = null;\n msgArgs = Array.prototype.slice.call(args);\n } else if (Buffer.isBuffer(args[0])) { // `log.(buf, ...)`\n // Almost certainly an error, show `inspect(buf)`. See bunyan\n // issue #35.\n fields = null;\n msgArgs = Array.prototype.slice.call(args);\n msgArgs[0] = util.inspect(msgArgs[0]);\n } else { // `log.(fields, msg, ...)`\n fields = args[0];\n msgArgs = Array.prototype.slice.call(args, 1);\n }\n\n // Build up the record object.\n var rec = objCopy(log.fields);\n var level = rec.level = minLevel;\n var recFields = (fields ? objCopy(fields) : null);\n if (recFields) {\n if (log.serializers) {\n log._applySerializers(recFields, excludeFields);\n }\n Object.keys(recFields).forEach(function (k) {\n rec[k] = recFields[k];\n });\n }\n rec.msg = format.apply(log, msgArgs);\n if (!rec.time) {\n rec.time = (new Date());\n }\n // Get call source info\n if (log.src && !rec.src) {\n rec.src = getCaller3Info()\n }\n rec.v = LOG_VERSION;\n\n return rec;\n };\n\n var fields = null;\n var msgArgs = arguments;\n var str = null;\n var rec = null;\n if (! this._emit) {\n /*\n * Show this invalid Bunyan usage warning *once*.\n *\n * See for\n * an example of how this can happen.\n */\n var dedupKey = 'unbound';\n if (!_haveWarned[dedupKey]) {\n var caller = getCaller3Info();\n _warn(format('bunyan usage error: %s:%s: attempt to log '\n + 'with an unbound log method: `this` is: %s',\n caller.file, caller.line, util.inspect(this)),\n dedupKey);\n }\n return;\n } else if (arguments.length === 0) { // `log.()`\n return (this._level <= minLevel);\n } else if (this._level > minLevel) {\n /* pass through */\n } else {\n rec = mkRecord(msgArgs);\n str = this._emit(rec);\n }\n probes && probes[minLevel].fire(function () {\n return [ str ||\n (rec && log._emit(rec, true)) ||\n log._emit(mkRecord(msgArgs), true) ];\n });\n }\n}\n\n\n/**\n * The functions below log a record at a specific level.\n *\n * Usages:\n * log.() -> boolean is-trace-enabled\n * log.( err, [ msg, ...])\n * log.( msg, ...)\n * log.( fields, msg, ...)\n *\n * where is the lowercase version of the log level. E.g.:\n *\n * log.info()\n *\n * @params fields {Object} Optional set of additional fields to log.\n * @params msg {String} Log message. This can be followed by additional\n * arguments that are handled like\n * [util.format](http://nodejs.org/docs/latest/api/all.html#util.format).\n */\nLogger.prototype.trace = mkLogEmitter(TRACE);\nLogger.prototype.debug = mkLogEmitter(DEBUG);\nLogger.prototype.info = mkLogEmitter(INFO);\nLogger.prototype.warn = mkLogEmitter(WARN);\nLogger.prototype.error = mkLogEmitter(ERROR);\nLogger.prototype.fatal = mkLogEmitter(FATAL);\n\n\n\n//---- Standard serializers\n// A serializer is a function that serializes a JavaScript object to a\n// JSON representation for logging. There is a standard set of presumed\n// interesting objects in node.js-land.\n\nLogger.stdSerializers = {};\n\n// Serialize an HTTP request.\nLogger.stdSerializers.req = function req(req) {\n if (!req || !req.connection)\n return req;\n return {\n method: req.method,\n url: req.url,\n headers: req.headers,\n remoteAddress: req.connection.remoteAddress,\n remotePort: req.connection.remotePort\n };\n // Trailers: Skipping for speed. If you need trailers in your app, then\n // make a custom serializer.\n //if (Object.keys(trailers).length > 0) {\n // obj.trailers = req.trailers;\n //}\n};\n\n// Serialize an HTTP response.\nLogger.stdSerializers.res = function res(res) {\n if (!res || !res.statusCode)\n return res;\n return {\n statusCode: res.statusCode,\n header: res._header\n }\n};\n\n\n/*\n * This function dumps long stack traces for exceptions having a cause()\n * method. The error classes from\n * [verror](https://github.com/davepacheco/node-verror) and\n * [restify v2.0](https://github.com/mcavage/node-restify) are examples.\n *\n * Based on `dumpException` in\n * https://github.com/davepacheco/node-extsprintf/blob/master/lib/extsprintf.js\n */\nfunction getFullErrorStack(ex)\n{\n var ret = ex.stack || ex.toString();\n if (ex.cause && typeof (ex.cause) === 'function') {\n var cex = ex.cause();\n if (cex) {\n ret += '\\nCaused by: ' + getFullErrorStack(cex);\n }\n }\n return (ret);\n}\n\n// Serialize an Error object\n// (Core error properties are enumerable in node 0.4, not in 0.6).\nvar errSerializer = Logger.stdSerializers.err = function err(err) {\n if (!err || !err.stack)\n return err;\n var obj = {\n message: err.message,\n name: err.name,\n stack: getFullErrorStack(err),\n code: err.code,\n signal: err.signal\n }\n return obj;\n};\n\n\n// A JSON stringifier that handles cycles safely.\n// Usage: JSON.stringify(obj, safeCycles())\nfunction safeCycles() {\n var seen = [];\n return function (key, val) {\n if (!val || typeof (val) !== 'object') {\n return val;\n }\n if (seen.indexOf(val) !== -1) {\n return '[Circular]';\n }\n seen.push(val);\n return val;\n };\n}\n\n\n/**\n * XXX\n */\nif (mv) {\n\nfunction RotatingFileStream(options) {\n this.path = options.path;\n this.stream = fs.createWriteStream(this.path,\n {flags: 'a', encoding: 'utf8'});\n this.count = (options.count == null ? 10 : options.count);\n assert.equal(typeof (this.count), 'number',\n format('rotating-file stream \"count\" is not a number: %j (%s) in %j',\n this.count, typeof (this.count), this));\n assert.ok(this.count >= 0,\n format('rotating-file stream \"count\" is not >= 0: %j in %j',\n this.count, this));\n\n // Parse `options.period`.\n if (options.period) {\n // where scope is:\n // h hours (at the start of the hour)\n // d days (at the start of the day, i.e. just after midnight)\n // w weeks (at the start of Sunday)\n // m months (on the first of the month)\n // y years (at the start of Jan 1st)\n // with special values 'hourly' (1h), 'daily' (1d), \"weekly\" (1w),\n // 'monthly' (1m) and 'yearly' (1y)\n var period = {\n 'hourly': '1h',\n 'daily': '1d',\n 'weekly': '1w',\n 'monthly': '1m',\n 'yearly': '1y'\n }[options.period] || options.period;\n var m = /^([1-9][0-9]*)([hdwmy]|ms)$/.exec(period);\n if (!m) {\n throw new Error(format('invalid period: \"%s\"', options.period));\n }\n this.periodNum = Number(m[1]);\n this.periodScope = m[2];\n } else {\n this.periodNum = 1;\n this.periodScope = 'd';\n }\n\n // TODO: template support for backup files\n // template: \n // default is %P.%n\n // '/var/log/archive/foo.log' -> foo.log.%n\n // '/var/log/archive/foo.log.%n'\n // codes:\n // XXX support strftime codes (per node version of those)\n // or whatever module. Pick non-colliding for extra\n // codes\n // %P `path` base value\n // %n integer number of rotated log (1,2,3,...)\n // %d datetime in YYYY-MM-DD_HH-MM-SS\n // XXX what should default date format be?\n // prior art? Want to avoid ':' in\n // filenames (illegal on Windows for one).\n\n this.rotQueue = [];\n this.rotating = false;\n this._setupNextRot();\n}\n\nutil.inherits(RotatingFileStream, EventEmitter);\n\nRotatingFileStream.prototype._setupNextRot = function () {\n var self = this;\n this.rotAt = this._nextRotTime();\n var delay = this.rotAt - Date.now();\n // Cap timeout to Node's max setTimeout, see\n // .\n var TIMEOUT_MAX = 2147483647; // 2^31-1\n if (delay > TIMEOUT_MAX) {\n delay = TIMEOUT_MAX;\n }\n this.timeout = setTimeout(\n function () { self.rotate(); },\n delay);\n if (typeof (this.timeout.unref) === 'function') {\n this.timeout.unref();\n }\n}\n\nRotatingFileStream.prototype._nextRotTime = function _nextRotTime(first) {\n var _DEBUG = false;\n if (_DEBUG)\n console.log('-- _nextRotTime: %s%s', this.periodNum, this.periodScope);\n var d = new Date();\n\n if (_DEBUG) console.log(' now local: %s', d);\n if (_DEBUG) console.log(' now utc: %s', d.toISOString());\n var rotAt;\n switch (this.periodScope) {\n case 'ms':\n // Hidden millisecond period for debugging.\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum;\n } else {\n rotAt = Date.now() + this.periodNum;\n }\n break;\n case 'h':\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum * 60 * 60 * 1000;\n } else {\n // First time: top of the next hour.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(),\n d.getUTCDate(), d.getUTCHours() + 1);\n }\n break;\n case 'd':\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum * 24 * 60 * 60 * 1000;\n } else {\n // First time: start of tomorrow (i.e. at the coming midnight) UTC.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(),\n d.getUTCDate() + 1);\n }\n break;\n case 'w':\n // Currently, always on Sunday morning at 00:00:00 (UTC).\n if (this.rotAt) {\n rotAt = this.rotAt + this.periodNum * 7 * 24 * 60 * 60 * 1000;\n } else {\n // First time: this coming Sunday.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth(),\n d.getUTCDate() + (7 - d.getUTCDay()));\n }\n break;\n case 'm':\n if (this.rotAt) {\n rotAt = Date.UTC(d.getUTCFullYear(),\n d.getUTCMonth() + this.periodNum, 1);\n } else {\n // First time: the start of the next month.\n rotAt = Date.UTC(d.getUTCFullYear(), d.getUTCMonth() + 1, 1);\n }\n break;\n case 'y':\n if (this.rotAt) {\n rotAt = Date.UTC(d.getUTCFullYear() + this.periodNum, 0, 1);\n } else {\n // First time: the start of the next year.\n rotAt = Date.UTC(d.getUTCFullYear() + 1, 0, 1);\n }\n break;\n default:\n assert.fail(format('invalid period scope: \"%s\"', this.periodScope));\n }\n\n if (_DEBUG) {\n console.log(' **rotAt**: %s (utc: %s)', rotAt,\n new Date(rotAt).toUTCString());\n var now = Date.now();\n console.log(' now: %s (%sms == %smin == %sh to go)',\n now,\n rotAt - now,\n (rotAt-now)/1000/60,\n (rotAt-now)/1000/60/60);\n }\n return rotAt;\n};\n\nRotatingFileStream.prototype.rotate = function rotate() {\n // XXX What about shutdown?\n var self = this;\n var _DEBUG = false;\n\n // If rotation period is > ~25 days, we have to break into multiple\n // setTimeout's. See .\n if (self.rotAt && self.rotAt > Date.now()) {\n return self._setupNextRot();\n }\n\n if (_DEBUG) {\n console.log('-- [%s, pid=%s] rotating %s',\n new Date(), process.pid, self.path);\n }\n if (self.rotating) {\n throw new TypeError('cannot start a rotation when already rotating');\n }\n self.rotating = true;\n\n self.stream.end(); // XXX can do moves sync after this? test at high rate\n\n function del() {\n var toDel = self.path + '.' + String(n - 1);\n if (n === 0) {\n toDel = self.path;\n }\n n -= 1;\n if (_DEBUG) console.log('rm %s', toDel);\n fs.unlink(toDel, function (delErr) {\n //XXX handle err other than not exists\n moves();\n });\n }\n\n function moves() {\n if (self.count === 0 || n < 0) {\n return finish();\n }\n var before = self.path;\n var after = self.path + '.' + String(n);\n if (n > 0) {\n before += '.' + String(n - 1);\n }\n n -= 1;\n fs.exists(before, function (exists) {\n if (!exists) {\n moves();\n } else {\n if (_DEBUG) {\n console.log('[pid %s] mv %s %s',\n process.pid, before, after);\n }\n mv(before, after, function (mvErr) {\n if (mvErr) {\n self.emit('error', mvErr);\n finish(); // XXX finish here?\n } else {\n moves();\n }\n });\n }\n })\n }\n\n function finish() {\n if (_DEBUG) console.log('[pid %s] open %s', process.pid, self.path);\n self.stream = fs.createWriteStream(self.path,\n {flags: 'a', encoding: 'utf8'});\n var q = self.rotQueue, len = q.length;\n for (var i = 0; i < len; i++) {\n self.stream.write(q[i]);\n }\n self.rotQueue = [];\n self.rotating = false;\n self.emit('drain');\n self._setupNextRot();\n }\n\n var n = this.count;\n del();\n};\n\nRotatingFileStream.prototype.write = function write(s) {\n if (this.rotating) {\n this.rotQueue.push(s);\n return false;\n } else {\n return this.stream.write(s);\n }\n};\n\nRotatingFileStream.prototype.end = function end(s) {\n this.stream.end();\n};\n\nRotatingFileStream.prototype.destroy = function destroy(s) {\n this.stream.destroy();\n};\n\nRotatingFileStream.prototype.destroySoon = function destroySoon(s) {\n this.stream.destroySoon();\n};\n\n} /* if (mv) */\n\n\n\n/**\n * RingBuffer is a Writable Stream that just stores the last N records in\n * memory.\n *\n * @param options {Object}, with the following fields:\n *\n * - limit: number of records to keep in memory\n */\nfunction RingBuffer(options) {\n this.limit = options && options.limit ? options.limit : 100;\n this.writable = true;\n this.records = [];\n EventEmitter.call(this);\n}\n\nutil.inherits(RingBuffer, EventEmitter);\n\nRingBuffer.prototype.write = function (record) {\n if (!this.writable)\n throw (new Error('RingBuffer has been ended already'));\n\n this.records.push(record);\n\n if (this.records.length > this.limit)\n this.records.shift();\n\n return (true);\n};\n\nRingBuffer.prototype.end = function () {\n if (arguments.length > 0)\n this.write.apply(this, Array.prototype.slice.call(arguments));\n this.writable = false;\n};\n\nRingBuffer.prototype.destroy = function () {\n this.writable = false;\n this.emit('close');\n};\n\nRingBuffer.prototype.destroySoon = function () {\n this.destroy();\n};\n\n\n//---- Exports\n\nmodule.exports = Logger;\n\nmodule.exports.TRACE = TRACE;\nmodule.exports.DEBUG = DEBUG;\nmodule.exports.INFO = INFO;\nmodule.exports.WARN = WARN;\nmodule.exports.ERROR = ERROR;\nmodule.exports.FATAL = FATAL;\nmodule.exports.resolveLevel = resolveLevel;\nmodule.exports.levelFromName = levelFromName;\nmodule.exports.nameFromLevel = nameFromLevel;\n\nmodule.exports.VERSION = VERSION;\nmodule.exports.LOG_VERSION = LOG_VERSION;\n\nmodule.exports.createLogger = function createLogger(options) {\n return new Logger(options);\n};\n\nmodule.exports.RingBuffer = RingBuffer;\nmodule.exports.RotatingFileStream = RotatingFileStream;\n\n// Useful for custom `type == 'raw'` streams that may do JSON stringification\n// of log records themselves. Usage:\n// var str = JSON.stringify(rec, bunyan.safeCycles());\nmodule.exports.safeCycles = safeCycles;\n", "var hasProp = Object.prototype.hasOwnProperty;\n\nfunction throwsMessage(err) {\n\treturn '[Throws: ' + (err ? err.message : '?') + ']';\n}\n\nfunction safeGetValueFromPropertyOnObject(obj, property) {\n\tif (hasProp.call(obj, property)) {\n\t\ttry {\n\t\t\treturn obj[property];\n\t\t}\n\t\tcatch (err) {\n\t\t\treturn throwsMessage(err);\n\t\t}\n\t}\n\n\treturn obj[property];\n}\n\nfunction ensureProperties(obj) {\n\tvar seen = [ ]; // store references to objects we have seen before\n\n\tfunction visit(obj) {\n\t\tif (obj === null || typeof obj !== 'object') {\n\t\t\treturn obj;\n\t\t}\n\n\t\tif (seen.indexOf(obj) !== -1) {\n\t\t\treturn '[Circular]';\n\t\t}\n\t\tseen.push(obj);\n\n\t\tif (typeof obj.toJSON === 'function') {\n\t\t\ttry {\n\t\t\t\treturn visit(obj.toJSON());\n\t\t\t} catch(err) {\n\t\t\t\treturn throwsMessage(err);\n\t\t\t}\n\t\t}\n\n\t\tif (Array.isArray(obj)) {\n\t\t\treturn obj.map(visit);\n\t\t}\n\n\t\treturn Object.keys(obj).reduce(function(result, prop) {\n\t\t\t// prevent faulty defined getter properties\n\t\t\tresult[prop] = visit(safeGetValueFromPropertyOnObject(obj, prop));\n\t\t\treturn result;\n\t\t}, {});\n\t};\n\n\treturn visit(obj);\n}\n\nmodule.exports = function(data) {\n\treturn JSON.stringify(ensureProperties(data));\n}\n\nmodule.exports.ensureProperties = ensureProperties;\n", "(function() {\n var exportedLog, ffSupport, formats, getOrderedMatches, hasMatches, isFF, isIE, isOpera, isSafari, log, makeArray, operaSupport, safariSupport, stringToArgs, _log;\n\n if (!(window.console && window.console.log)) {\n return;\n }\n\n log = function() {\n var args;\n args = [];\n makeArray(arguments).forEach(function(arg) {\n if (typeof arg === 'string') {\n return args = args.concat(stringToArgs(arg));\n } else {\n return args.push(arg);\n }\n });\n return _log.apply(window, args);\n };\n\n _log = function() {\n return console.log.apply(console, makeArray(arguments));\n };\n\n makeArray = function(arrayLikeThing) {\n return Array.prototype.slice.call(arrayLikeThing);\n };\n\n formats = [\n {\n regex: /\\*([^\\*]+)\\*/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['font-style: italic', ''];\n }\n }, {\n regex: /\\_([^\\_]+)\\_/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['font-weight: bold', ''];\n }\n }, {\n regex: /\\`([^\\`]+)\\`/,\n replacer: function(m, p1) {\n return \"%c\" + p1 + \"%c\";\n },\n styles: function() {\n return ['background: rgb(255, 255, 219); padding: 1px 5px; border: 1px solid rgba(0, 0, 0, 0.1)', ''];\n }\n }, {\n regex: /\\[c\\=(?:\\\"|\\')?((?:(?!(?:\\\"|\\')\\]).)*)(?:\\\"|\\')?\\]((?:(?!\\[c\\]).)*)\\[c\\]/,\n replacer: function(m, p1, p2) {\n return \"%c\" + p2 + \"%c\";\n },\n styles: function(match) {\n return [match[1], ''];\n }\n }\n ];\n\n hasMatches = function(str) {\n var _hasMatches;\n _hasMatches = false;\n formats.forEach(function(format) {\n if (format.regex.test(str)) {\n return _hasMatches = true;\n }\n });\n return _hasMatches;\n };\n\n getOrderedMatches = function(str) {\n var matches;\n matches = [];\n formats.forEach(function(format) {\n var match;\n match = str.match(format.regex);\n if (match) {\n return matches.push({\n format: format,\n match: match\n });\n }\n });\n return matches.sort(function(a, b) {\n return a.match.index - b.match.index;\n });\n };\n\n stringToArgs = function(str) {\n var firstMatch, matches, styles;\n styles = [];\n while (hasMatches(str)) {\n matches = getOrderedMatches(str);\n firstMatch = matches[0];\n str = str.replace(firstMatch.format.regex, firstMatch.format.replacer);\n styles = styles.concat(firstMatch.format.styles(firstMatch.match));\n }\n return [str].concat(styles);\n };\n\n isSafari = function() {\n return /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);\n };\n\n isOpera = function() {\n return /OPR/.test(navigator.userAgent) && /Opera/.test(navigator.vendor);\n };\n\n isFF = function() {\n return /Firefox/.test(navigator.userAgent);\n };\n\n isIE = function() {\n return /MSIE/.test(navigator.userAgent);\n };\n\n safariSupport = function() {\n var m;\n m = navigator.userAgent.match(/AppleWebKit\\/(\\d+)\\.(\\d+)(\\.|\\+|\\s)/);\n if (!m) {\n return false;\n }\n return 537.38 <= parseInt(m[1], 10) + (parseInt(m[2], 10) / 100);\n };\n\n operaSupport = function() {\n var m;\n m = navigator.userAgent.match(/OPR\\/(\\d+)\\./);\n if (!m) {\n return false;\n }\n return 15 <= parseInt(m[1], 10);\n };\n\n ffSupport = function() {\n return window.console.firebug || window.console.exception;\n };\n\n if (isIE() || (isFF() && !ffSupport()) || (isOpera() && !operaSupport()) || (isSafari() && !safariSupport())) {\n exportedLog = _log;\n } else {\n exportedLog = log;\n }\n\n exportedLog.l = _log;\n\n if (typeof define === 'function' && define.amd) {\n define(exportedLog);\n } else if (typeof exports !== 'undefined') {\n module.exports = exportedLog;\n } else {\n window.log = exportedLog;\n }\n\n}).call(this);\n" diff --git a/packages/logging/package.js b/packages/logging/package.js index 9393362..51a40db 100644 --- a/packages/logging/package.js +++ b/packages/logging/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'orionjs:logging', - version: '1.4.0', + version: '1.4.1', summary: 'Orion - Logger', git: 'https://github.com/orionjs/orion', documentation: 'README.md' @@ -28,7 +28,7 @@ Package.onUse(function(api) { api.addFiles('logging_both.js'); // Exported variables - api.export(['orion', 'bunyan', 'formatter']); - api.export('process', 'client'); + api.export(['orion', 'bunyan']); + api.export(['process', 'WritableStream', 'inherits', 'logStyle'], 'client'); api.export('bunyanFormat', 'server'); });