Browse Source

jsl 模块维护

dzr 6 months ago
parent
commit
0d6aaa6e77
100 changed files with 226 additions and 17949 deletions
  1. 6 4
      zbytb/crawler/defaults.py
  2. 16 7
      zbytb/crawler/sessions_521.py
  3. 66 53
      zbytb/crawler/spiders/ListPageSpider.py
  4. 70 0
      zbytb/jsl/jsl.js
  5. 67 0
      zbytb/jsl/jsl.py
  6. 1 1
      zbytb/main.py
  7. 0 12
      zbytb/node_modules/.bin/acorn
  8. 0 17
      zbytb/node_modules/.bin/acorn.cmd
  9. 0 28
      zbytb/node_modules/.bin/acorn.ps1
  10. 0 12
      zbytb/node_modules/.bin/escodegen
  11. 0 17
      zbytb/node_modules/.bin/escodegen.cmd
  12. 0 28
      zbytb/node_modules/.bin/escodegen.ps1
  13. 0 12
      zbytb/node_modules/.bin/esgenerate
  14. 0 17
      zbytb/node_modules/.bin/esgenerate.cmd
  15. 0 28
      zbytb/node_modules/.bin/esgenerate.ps1
  16. 0 12
      zbytb/node_modules/.bin/esparse
  17. 0 17
      zbytb/node_modules/.bin/esparse.cmd
  18. 0 28
      zbytb/node_modules/.bin/esparse.ps1
  19. 0 12
      zbytb/node_modules/.bin/esvalidate
  20. 0 17
      zbytb/node_modules/.bin/esvalidate.cmd
  21. 0 28
      zbytb/node_modules/.bin/esvalidate.ps1
  22. 0 593
      zbytb/node_modules/.package-lock.json
  23. 0 21
      zbytb/node_modules/@tootallnate/once/LICENSE
  24. 0 93
      zbytb/node_modules/@tootallnate/once/README.md
  25. 0 52
      zbytb/node_modules/@tootallnate/once/package.json
  26. 0 45
      zbytb/node_modules/abab/CHANGELOG.md
  27. 0 13
      zbytb/node_modules/abab/LICENSE.md
  28. 0 51
      zbytb/node_modules/abab/README.md
  29. 0 2
      zbytb/node_modules/abab/index.d.ts
  30. 0 9
      zbytb/node_modules/abab/index.js
  31. 0 42
      zbytb/node_modules/abab/package.json
  32. 0 19
      zbytb/node_modules/acorn-globals/LICENSE
  33. 0 81
      zbytb/node_modules/acorn-globals/README.md
  34. 0 179
      zbytb/node_modules/acorn-globals/index.js
  35. 0 12
      zbytb/node_modules/acorn-globals/node_modules/.bin/acorn
  36. 0 17
      zbytb/node_modules/acorn-globals/node_modules/.bin/acorn.cmd
  37. 0 28
      zbytb/node_modules/acorn-globals/node_modules/.bin/acorn.ps1
  38. 0 620
      zbytb/node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md
  39. 0 21
      zbytb/node_modules/acorn-globals/node_modules/acorn/LICENSE
  40. 0 269
      zbytb/node_modules/acorn-globals/node_modules/acorn/README.md
  41. 0 4
      zbytb/node_modules/acorn-globals/node_modules/acorn/bin/acorn
  42. 0 35
      zbytb/node_modules/acorn-globals/node_modules/acorn/package.json
  43. 0 35
      zbytb/node_modules/acorn-globals/package.json
  44. 0 131
      zbytb/node_modules/acorn-walk/CHANGELOG.md
  45. 0 19
      zbytb/node_modules/acorn-walk/LICENSE
  46. 0 126
      zbytb/node_modules/acorn-walk/README.md
  47. 0 34
      zbytb/node_modules/acorn-walk/package.json
  48. 0 788
      zbytb/node_modules/acorn/CHANGELOG.md
  49. 0 21
      zbytb/node_modules/acorn/LICENSE
  50. 0 280
      zbytb/node_modules/acorn/README.md
  51. 0 4
      zbytb/node_modules/acorn/bin/acorn
  52. 0 46
      zbytb/node_modules/acorn/package.json
  53. 0 145
      zbytb/node_modules/agent-base/README.md
  54. 0 64
      zbytb/node_modules/agent-base/package.json
  55. 0 345
      zbytb/node_modules/agent-base/src/index.ts
  56. 0 33
      zbytb/node_modules/agent-base/src/promisify.ts
  57. 0 21
      zbytb/node_modules/asynckit/LICENSE
  58. 0 233
      zbytb/node_modules/asynckit/README.md
  59. 0 76
      zbytb/node_modules/asynckit/bench.js
  60. 0 6
      zbytb/node_modules/asynckit/index.js
  61. 0 63
      zbytb/node_modules/asynckit/package.json
  62. 0 43
      zbytb/node_modules/asynckit/parallel.js
  63. 0 17
      zbytb/node_modules/asynckit/serial.js
  64. 0 75
      zbytb/node_modules/asynckit/serialOrdered.js
  65. 0 21
      zbytb/node_modules/asynckit/stream.js
  66. 0 9
      zbytb/node_modules/browser-process-hrtime/LICENSE
  67. 0 27
      zbytb/node_modules/browser-process-hrtime/README.md
  68. 0 4
      zbytb/node_modules/browser-process-hrtime/index.d.ts
  69. 0 28
      zbytb/node_modules/browser-process-hrtime/index.js
  70. 0 15
      zbytb/node_modules/browser-process-hrtime/package.json
  71. 0 19
      zbytb/node_modules/combined-stream/License
  72. 0 138
      zbytb/node_modules/combined-stream/Readme.md
  73. 0 25
      zbytb/node_modules/combined-stream/package.json
  74. 0 17
      zbytb/node_modules/combined-stream/yarn.lock
  75. 0 20
      zbytb/node_modules/cssom/LICENSE.txt
  76. 0 67
      zbytb/node_modules/cssom/README.mdown
  77. 0 18
      zbytb/node_modules/cssom/package.json
  78. 0 20
      zbytb/node_modules/cssstyle/LICENSE
  79. 0 15
      zbytb/node_modules/cssstyle/README.md
  80. 0 20
      zbytb/node_modules/cssstyle/node_modules/cssom/LICENSE.txt
  81. 0 67
      zbytb/node_modules/cssstyle/node_modules/cssom/README.mdown
  82. 0 18
      zbytb/node_modules/cssstyle/node_modules/cssom/package.json
  83. 0 72
      zbytb/node_modules/cssstyle/package.json
  84. 0 7
      zbytb/node_modules/data-urls/LICENSE.txt
  85. 0 62
      zbytb/node_modules/data-urls/README.md
  86. 0 54
      zbytb/node_modules/data-urls/package.json
  87. 0 20
      zbytb/node_modules/debug/LICENSE
  88. 0 478
      zbytb/node_modules/debug/README.md
  89. 0 59
      zbytb/node_modules/debug/package.json
  90. 0 269
      zbytb/node_modules/debug/src/browser.js
  91. 0 274
      zbytb/node_modules/debug/src/common.js
  92. 0 10
      zbytb/node_modules/debug/src/index.js
  93. 0 263
      zbytb/node_modules/debug/src/node.js
  94. 0 231
      zbytb/node_modules/decimal.js/CHANGELOG.md
  95. 0 23
      zbytb/node_modules/decimal.js/LICENCE.md
  96. 0 246
      zbytb/node_modules/decimal.js/README.md
  97. 0 300
      zbytb/node_modules/decimal.js/decimal.d.ts
  98. 0 4934
      zbytb/node_modules/decimal.js/decimal.js
  99. 0 4898
      zbytb/node_modules/decimal.js/decimal.mjs
  100. 0 40
      zbytb/node_modules/decimal.js/package.json

+ 6 - 4
zbytb/crawler/defaults.py

@@ -1,7 +1,8 @@
+import json
+import os
+
 import requests
 import urllib3
-import os
-import json
 from requests.models import Response, Request
 
 from crawler.sessions_521 import http_session_521
@@ -45,8 +46,9 @@ def http_request_get(url, **kwargs):
     response = Response()
     while retries < 3:
         try:
-            cks = get_cookies(url,headers, proxies)
-            response = requests.get(url, cookies=cks, **request_params)
+            cks = get_cookies(url, headers, proxies)
+            request_params['cookies'] = cks
+            response = requests.get(url, **request_params)
             if response.status_code == 200:
                 response.encoding = response.apparent_encoding
                 return True, response

+ 16 - 7
zbytb/crawler/sessions_521.py

@@ -1,14 +1,15 @@
 import copy
-import re
 import json
+import re
 import time
+
 import execjs
 import jsbeautifier
 import requests
 from requests.utils import dict_from_cookiejar
 
 from config.load import node_module_path
-
+from jsl import jsl
 
 
 def save_js_script(js_code: str, allow_beautify_code=False):
@@ -155,7 +156,7 @@ def http_session_521_old(url: str, headers: dict, **kwargs):
     return True, http_session, resp2_cookies
 
 
-def create_cookie(page_url, headers, proxies=None, is_save_js=False):
+def create_cookie_old(page_url, headers, proxies=None, is_save_js=False):
     retry = 0
     while (retry := retry + 1) < 10:
         try:
@@ -228,8 +229,16 @@ def create_cookie(page_url, headers, proxies=None, is_save_js=False):
             time.sleep(3)
 
 
-def http_session_521(url: str, headers: dict, proxies=None):
-    resp2_cookies = create_cookie(page_url=url, headers=headers, proxies=proxies)
+def create_cookie(page_url, headers, **kwargs):
+    try:
+        return jsl.get_jsl_cookies(page_url, headers, **kwargs)
+    except IndexError:
+        raise requests.exceptions.ContentDecodingError('fetch jsl cookies failed')
+
+
+def http_session_521(url, headers, proxies=None):
+    jsl_cookies = create_cookie(page_url=url, headers=headers, proxies=proxies)
     with open(f'./zbytb_ck.json', 'w', encoding='utf-8') as fw:
-        fw.write(json.dumps(resp2_cookies))
-    return resp2_cookies
+        fw.write(json.dumps(jsl_cookies))
+    return jsl_cookies
+

+ 66 - 53
zbytb/crawler/spiders/ListPageSpider.py

@@ -1,6 +1,7 @@
 import re
 import time
 from concurrent.futures import ThreadPoolExecutor, wait
+from datetime import datetime
 from urllib.parse import urlencode
 
 from lxml.html import fromstring
@@ -13,15 +14,25 @@ from utils.socks5 import Proxy
 from utils.tools import sha1, area_dict
 
 
+def format_date(date_str, fmt='%Y-%m-%d'):
+    # 将给定的日期字符串与当前年份结合,并解析成日期对象
+    full_date = datetime.strptime(f'{datetime.now().year}-{date_str}', fmt)
+    return full_date.strftime(fmt)
+
+
+def date2timestamp(date_str, fmt='%Y-%m-%d'):
+    return datetime.strptime(date_str, fmt).timestamp()
+
+
 class CrawlListPageSpider:
 
     def __init__(
-            self,
-            db: str,
-            crawl_tab: str,
-            error_tab: str,
-            enable_proxy=False,
-            **kwargs
+        self,
+        db: str,
+        crawl_tab: str,
+        error_tab: str,
+        enable_proxy=False,
+        **kwargs
     ):
         self.crawl_tab = mongo_table(db, crawl_tab)
         self.crawl_error_tab = mongo_table(db, error_tab)
@@ -33,6 +44,28 @@ class CrawlListPageSpider:
         self.proxy = Proxy(enable_proxy)
         self.max_page = kwargs.get('max_page', 10)
         self.allow_show_exception = kwargs.get('allow_show_exception', False)
+        self._label_items = {
+            24: {
+                'type_code': 24,
+                'channel': '中标',
+                'spidercode': 'a_zgzbycgw_zbxx_zb',
+            },
+            25: {
+                'type_code': 25,
+                'channel': '招标信息',
+                'spidercode': 'a_zgzbycgw_zbxx_zbxx',
+            },
+            26: {
+                'type_code': 26,
+                'channel': '拟在建',
+                'spidercode': 'a_zgzbycgw_zbxx_nzj',
+            },
+            27: {
+                'type_code': 27,  # 详情api中使用参数
+                'channel': '询价',
+                'spidercode': 'a_zgzbycgw_zbxx_xj',
+            }
+        }
 
     def crawl_request(self, url, **kwargs):
         retries = 0
@@ -50,29 +83,32 @@ class CrawlListPageSpider:
                 break
         return success, response
 
-    def crawl_success(self, response, **kwargs):
-        label_info: dict = kwargs.get('label_info')
+    def crawl_success(self, response, module_id, **kwargs):
         area_id = kwargs.get('area_id')
-        element = fromstring(response.text)
-        nodes = element.xpath('//div[contains(@class,"list-box")]/ul/li')
+        area = area_dict.get(f"{area_id}")
+        label_item = self._label_items[module_id]
+
         results = []
+        document = fromstring(response.text)
+        nodes = document.xpath('//div[contains(@class,"list-box")]/ul/li')
         for node in nodes:
             title = node.xpath('./div[@class="title"]/a/text()')
             if title:
                 title = title[0]
                 competehref = node.xpath('./div[@class="title"]/a/@href')[0]
-                publish_time = "2024-" + str(node.xpath('./div[@class="title"]/span[1]/text()')[0])
+                publish_time = str(node.xpath('./div[@class="title"]/span[1]/text()')[0])
+                publish_time = format_date(publish_time)
             else:
                 title = node.xpath('./div[@class="xiangmu"]/a/text()')[0]
                 competehref = node.xpath('./div[@class="xiangmu"]/a/@href')[0]
-                publish_time = node.xpath('./div[@class="agnmid gzsj"]/text()')[0].replace('/','-')
+                publish_time = node.xpath('./div[@class="agnmid gzsj"]/text()')[0].replace('/', '-')
 
             title = re.sub(r'([,|.|。|,|;|;|?|&|$|#|@|!|!|%|*|\'|"|‘|’|“|¥|?| ]*?)$', "", title.strip())
-            l_np_publishtime = int(time.mktime(time.strptime(publish_time, "%Y-%m-%d")))
+            l_np_publishtime = int(date2timestamp(publish_time))
             info = {
                 "title": title,
                 "competehref": competehref,
-                "area": area_dict.get(f"{area_id}"),
+                "area": area,
                 "publishtime": publish_time,
                 "l_np_publishtime": int2long(l_np_publishtime),
                 "site": "中国招标与采购网",
@@ -82,25 +118,27 @@ class CrawlListPageSpider:
                 "sendflag": "false",
                 "_d": "comeintime",
                 "infoformat": 1,
-                **label_info,
                 "crawl": False,
+                **label_item,
             }
             sign = sha1(info['competehref'])
             if not self.r.hexists(self.redis_key, sign):
                 info["count"] = es_query(info["title"], info["l_np_publishtime"])
                 results.append(info)
                 self.r.hset(self.redis_key, sign, '')
+
         if len(results) > 0:
-            self.crawl_tab.insert_many(results)
-        logger.info(f'[采集成功]{label_info["channel"]}-第{kwargs.get("page")}页-{len(results)}条')
+            self.crawl_tab.insert_many(results, ordered=False)
+        logger.info(f'[采集成功]{label_item["channel"]}|{area}|第{kwargs.get("page")}页|{len(results)}条')
 
-    def crawl_error(self, response, **kwargs):
+    def crawl_error(self, response, module_id):
+        label_item = self._label_items[module_id]
         items = {
             'url': response.request.url,
             'status_code': response.status_code,
             'reason': response.reason,
             'params': response.request.params,
-            'spidercode': kwargs.get('label_info').get('spidercode'),
+            'spidercode': label_item['spidercode'],
             'crawl_time': int2long(int(time.time())),
             'crawl_type': 'list'
         }
@@ -109,32 +147,6 @@ class CrawlListPageSpider:
 
     def crawl_spider(self, task: tuple):
         module_id, area_id, page = task
-        label_info = {}
-        if module_id == 27:
-            label_info = {
-                'type_code': 27,  # 详情api中使用参数
-                'channel': '询价',
-                'spidercode': 'a_zgzbycgw_zbxx_xj',
-            }
-        elif module_id == 24:
-            label_info = {
-                'type_code': 24,
-                'channel': '中标',
-                'spidercode': 'a_zgzbycgw_zbxx_zb',
-            }
-        elif module_id == 25:
-            label_info = {
-                'type_code': 25,
-                'channel': '招标信息',
-                'spidercode': 'a_zgzbycgw_zbxx_zbxx',
-            }
-        elif module_id == 26:
-            label_info = {
-                'type_code': 26,
-                'channel': '拟在建',
-                'spidercode': 'a_zgzbycgw_zbxx_nzj',
-            }
-
         params = {
             "kw": "",
             "okw": "",
@@ -142,7 +154,7 @@ class CrawlListPageSpider:
             "zizhi": "",
             "zdxm": "",
             "zdyear": "",
-            "field": "",
+            "field": "0",
             "moduleid": module_id,
             "areaids": area_id,
             "page": page
@@ -152,14 +164,14 @@ class CrawlListPageSpider:
         logger.info(f"开始请求: {url}")
         success, response = self.crawl_request(url, headers=self.headers)
         if not success:
-            self.crawl_error(response, label_info=label_info)
+            self.crawl_error(response, module_id)
         else:
-            self.crawl_success(response, area_id=area_id,label_info=label_info, page=page)
+            self.crawl_success(response, module_id, area_id=area_id, page=page)
 
-    @property
-    def crawl_tasks(self):
+    def create_crawl_tasks(self):
         tasks = []
-        for module_id in [24, 25, 26, 27]:
+        # 搜索范围
+        for module_id in [24, 25, 26]:
             # 遍历省份
             for area_id in range(1, 32):
                 # 遍历页码
@@ -175,10 +187,11 @@ class CrawlListPageSpider:
 
         with ThreadPoolExecutor(max_workers=workers) as Executor:
             futures = []
-            for task in self.crawl_tasks:
+            for task in self.create_crawl_tasks():
                 future = Executor.submit(self.crawl_spider, task)
                 if self.allow_show_exception:
                     future.add_done_callback(_callback_err)
                 futures.append(future)
             wait(futures)
-            logger.info("任务结束")
+
+        logger.info("任务结束")

+ 70 - 0
zbytb/jsl/jsl.js

@@ -0,0 +1,70 @@
+var CryptoJS = require('crypto-js');
+
+
+function hash(type, value){
+    if(type == 'md5'){
+        return CryptoJS.MD5(value).toString();
+    }
+    if(type == 'sha1'){
+        return CryptoJS.SHA1(value).toString();
+    }
+    if(type == 'sha256'){
+        return CryptoJS.SHA256(value).toString();
+    }
+}
+
+
+var _0x2228a0 = {
+    "mLZyz" : function(_0x435347, _0x8098d) {
+        return _0x435347 < _0x8098d;
+    },
+    "SsARo" : function(_0x286fd4, _0x10b2a6) {
+        return _0x286fd4 + _0x10b2a6;
+    },
+    "jfMAx" : function(_0x6b4da, _0x19c099) {
+        return _0x6b4da + _0x19c099;
+    },
+    "HWzBW" : function(_0x3b9d7f, _0x232017) {
+        return _0x3b9d7f + _0x232017;
+    },
+    "DRnYs" : function(_0x4573a2, _0x3855be) {
+        return _0x4573a2 == _0x3855be;
+    },
+    "ZJMqu" : function(_0x3af043, _0x1dbbb7) {
+        return _0x3af043 - _0x1dbbb7;
+    },
+};
+
+
+function cookies(_0x60274b){
+    var _0x34d7a8 = new Date();
+    function _0x14e035(_0x56cbce, _0x5e5712) {
+    var _0x2d0a43 = _0x60274b['chars']['length'];
+    for (var _0x212ce4 = 0x0; _0x212ce4 < _0x2d0a43; _0x212ce4++) {
+        for (var _0x8164 = 0x0; _0x2228a0["mLZyz"](_0x8164, _0x2d0a43); _0x8164++) {
+            var _0x2a7ea9 = _0x5e5712[0] + _0x60274b["chars"]["substr"](_0x212ce4, 1) + _0x60274b["chars"]["substr"](_0x8164, 1) + _0x5e5712[1];
+            if (_0x2228a0["DRnYs"](hash(_0x60274b['ha'], _0x2a7ea9), _0x56cbce)) {
+                return [_0x2a7ea9, _0x2228a0["ZJMqu"](new Date(), _0x34d7a8)];
+            }
+        }
+    }
+    }
+    var _0x732635 = _0x14e035(_0x60274b['ct'], _0x60274b['bts']);
+    return {'__jsl_clearance_s' : _0x732635[0]};
+}
+
+// console.log(cookies({
+//     "bts": ["1658906704.293|0|YYj", "Jm5cKs%2B1v1GqTYAtpQjthM%3D"],
+//     "chars": "vUzQIgamgWnnFOJyKwXiGK",
+//     "ct": "690f55a681f304c95b35941b20538480",
+//     "ha": "md5",
+//     "tn": "__jsl_clearance_s",
+//     "vt": "3600",
+//     "wt": "1500"
+// }))
+
+// __jsl_clearance_s: '1658906704.293|0|YYjzaJm5cKs%2B1v1GqTYAtpQjthM%3D'
+
+// console.log(
+//     cookies({"bts":["1727600204.91|0|4AJ2","wPg8kk5tO0xhJP0aeRdrE%3D"],"chars":"rrVrICHmZsauh3asSMeXUR","ct":"c43510308c1640973bba76148db942230095f83f","ha":"sha1","is":true,"tn":"__jsl_clearance_s","vt":"3600","wt":"1500"})
+// )

+ 67 - 0
zbytb/jsl/jsl.py

@@ -0,0 +1,67 @@
+# -*- coding: utf-8 -*-
+"""
+Created on 2024-09-29 
+---------
+@summary:  加速乐
+---------
+@author: Dzr
+"""
+import json
+import pathlib
+import re
+
+import execjs
+import requests
+
+_cookies = {}
+
+
+def ck1(url, headers, timeout=10, proxies=None):
+    global _cookies
+    response = requests.get(url, headers=headers, timeout=timeout, proxies=proxies)
+    _cookies.update(response.cookies)
+    script = re.findall('cookie=(.*?);location', response.content.decode())[0]
+    _, val = next(iter(execjs.eval(script).split(';')), '').split('=')
+    # print(val)  # jsl_clearance_s
+    _cookies['__jsl_clearance_s'] = val
+    # _cookies[_] = val
+
+
+def get_params(url, headers, timeout, proxies=None):
+    global _cookies
+    # 通过携带 jsluid_s 和 jsl_clearance_s 值的 cookie 获取第二层响应内容
+    request_params = dict(cookies=_cookies, timeout=timeout, proxies=proxies)
+    response = requests.get(url=url, headers=headers, **request_params)
+    # 获取 go 字典参数
+    go_params = re.findall(';go\((.*?)\)</script>', response.content.decode())[0]
+    params = json.loads(go_params)
+    return params
+
+
+def ck2(url, headers, timeout=10, proxies=None):
+    filelib = (pathlib.Path(__file__).parent.absolute() / 'jsl.js').absolute()
+    script = filelib.open('r', encoding='utf-8').read()
+    params = get_params(url, headers, timeout, proxies)
+    # 传入字典
+    third_cookie = execjs.compile(script).call('cookies', params)
+    _cookies.update(third_cookie)
+
+
+def get_jsl_cookies(url, headers, **kwargs):
+    global _cookies
+    ck1(url, headers, **kwargs)
+    ck2(url, headers, **kwargs)
+    return _cookies
+
+
+get_cookies = get_jsl_cookies
+
+
+if __name__ == '__main__':
+    jsl_headers = {
+        'Referer': 'https://zjcs.cqggzy.com/cq-zjcs-pub/invalidProject/view/500103MB0T460482408210380',
+        'Upgrade-Insecure-Requests': '1',
+        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36',
+    }
+    jsl_url = 'https://zjcs.cqggzy.com/cq-zjcs-pub/invalidProject/view/500103MB0T460482408210380'
+    print(get_cookies(jsl_url, jsl_headers))

+ 1 - 1
zbytb/main.py

@@ -22,7 +22,7 @@ def list_page_spider():
         max_page=20,
         headers=headers,
         allow_show_exception=False
-    ).start(workers=4)
+    ).start(workers=1)
 
 
 def detail_page_spider():

+ 0 - 12
zbytb/node_modules/.bin/acorn

@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../acorn/bin/acorn" "$@"
-else 
-  exec node  "$basedir/../acorn/bin/acorn" "$@"
-fi

+ 0 - 17
zbytb/node_modules/.bin/acorn.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\acorn\bin\acorn" %*

+ 0 - 28
zbytb/node_modules/.bin/acorn.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../acorn/bin/acorn" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../acorn/bin/acorn" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../acorn/bin/acorn" $args
-  } else {
-    & "node$exe"  "$basedir/../acorn/bin/acorn" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 12
zbytb/node_modules/.bin/escodegen

@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../escodegen/bin/escodegen.js" "$@"
-else 
-  exec node  "$basedir/../escodegen/bin/escodegen.js" "$@"
-fi

+ 0 - 17
zbytb/node_modules/.bin/escodegen.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\escodegen\bin\escodegen.js" %*

+ 0 - 28
zbytb/node_modules/.bin/escodegen.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../escodegen/bin/escodegen.js" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../escodegen/bin/escodegen.js" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../escodegen/bin/escodegen.js" $args
-  } else {
-    & "node$exe"  "$basedir/../escodegen/bin/escodegen.js" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 12
zbytb/node_modules/.bin/esgenerate

@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../escodegen/bin/esgenerate.js" "$@"
-else 
-  exec node  "$basedir/../escodegen/bin/esgenerate.js" "$@"
-fi

+ 0 - 17
zbytb/node_modules/.bin/esgenerate.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\escodegen\bin\esgenerate.js" %*

+ 0 - 28
zbytb/node_modules/.bin/esgenerate.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../escodegen/bin/esgenerate.js" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../escodegen/bin/esgenerate.js" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../escodegen/bin/esgenerate.js" $args
-  } else {
-    & "node$exe"  "$basedir/../escodegen/bin/esgenerate.js" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 12
zbytb/node_modules/.bin/esparse

@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../esprima/bin/esparse.js" "$@"
-else 
-  exec node  "$basedir/../esprima/bin/esparse.js" "$@"
-fi

+ 0 - 17
zbytb/node_modules/.bin/esparse.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\esprima\bin\esparse.js" %*

+ 0 - 28
zbytb/node_modules/.bin/esparse.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../esprima/bin/esparse.js" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../esprima/bin/esparse.js" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../esprima/bin/esparse.js" $args
-  } else {
-    & "node$exe"  "$basedir/../esprima/bin/esparse.js" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 12
zbytb/node_modules/.bin/esvalidate

@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../esprima/bin/esvalidate.js" "$@"
-else 
-  exec node  "$basedir/../esprima/bin/esvalidate.js" "$@"
-fi

+ 0 - 17
zbytb/node_modules/.bin/esvalidate.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\esprima\bin\esvalidate.js" %*

+ 0 - 28
zbytb/node_modules/.bin/esvalidate.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../esprima/bin/esvalidate.js" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../esprima/bin/esvalidate.js" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../esprima/bin/esvalidate.js" $args
-  } else {
-    & "node$exe"  "$basedir/../esprima/bin/esvalidate.js" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 593
zbytb/node_modules/.package-lock.json

@@ -1,593 +0,0 @@
-{
-  "name": "zbytb",
-  "version": "1.0.0",
-  "lockfileVersion": 3,
-  "requires": true,
-  "packages": {
-    "node_modules/@tootallnate/once": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmmirror.com/@tootallnate/once/-/once-2.0.0.tgz",
-      "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
-      "engines": {
-        "node": ">= 10"
-      }
-    },
-    "node_modules/abab": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmmirror.com/abab/-/abab-2.0.5.tgz",
-      "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==",
-      "deprecated": "Use your platform's native atob() and btoa() methods instead"
-    },
-    "node_modules/acorn": {
-      "version": "8.7.0",
-      "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.7.0.tgz",
-      "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==",
-      "bin": {
-        "acorn": "bin/acorn"
-      },
-      "engines": {
-        "node": ">=0.4.0"
-      }
-    },
-    "node_modules/acorn-globals": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmmirror.com/acorn-globals/-/acorn-globals-6.0.0.tgz",
-      "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==",
-      "dependencies": {
-        "acorn": "^7.1.1",
-        "acorn-walk": "^7.1.1"
-      }
-    },
-    "node_modules/acorn-globals/node_modules/acorn": {
-      "version": "7.4.1",
-      "resolved": "https://registry.npmmirror.com/acorn/-/acorn-7.4.1.tgz",
-      "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
-      "bin": {
-        "acorn": "bin/acorn"
-      },
-      "engines": {
-        "node": ">=0.4.0"
-      }
-    },
-    "node_modules/acorn-walk": {
-      "version": "7.2.0",
-      "resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-7.2.0.tgz",
-      "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==",
-      "engines": {
-        "node": ">=0.4.0"
-      }
-    },
-    "node_modules/agent-base": {
-      "version": "6.0.2",
-      "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz",
-      "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
-      "dependencies": {
-        "debug": "4"
-      },
-      "engines": {
-        "node": ">= 6.0.0"
-      }
-    },
-    "node_modules/asynckit": {
-      "version": "0.4.0",
-      "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
-      "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
-    },
-    "node_modules/browser-process-hrtime": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmmirror.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
-      "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
-    },
-    "node_modules/combined-stream": {
-      "version": "1.0.8",
-      "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
-      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
-      "dependencies": {
-        "delayed-stream": "~1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/cssom": {
-      "version": "0.5.0",
-      "resolved": "https://registry.npmmirror.com/cssom/-/cssom-0.5.0.tgz",
-      "integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw=="
-    },
-    "node_modules/cssstyle": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmmirror.com/cssstyle/-/cssstyle-2.3.0.tgz",
-      "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==",
-      "dependencies": {
-        "cssom": "~0.3.6"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/cssstyle/node_modules/cssom": {
-      "version": "0.3.8",
-      "resolved": "https://registry.npmmirror.com/cssom/-/cssom-0.3.8.tgz",
-      "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
-    },
-    "node_modules/data-urls": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmmirror.com/data-urls/-/data-urls-3.0.1.tgz",
-      "integrity": "sha512-Ds554NeT5Gennfoo9KN50Vh6tpgtvYEwraYjejXnyTpu1C7oXKxdFk75REooENHE8ndTVOJuv+BEs4/J/xcozw==",
-      "dependencies": {
-        "abab": "^2.0.3",
-        "whatwg-mimetype": "^3.0.0",
-        "whatwg-url": "^10.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/debug": {
-      "version": "4.3.3",
-      "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.3.tgz",
-      "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
-      "dependencies": {
-        "ms": "2.1.2"
-      },
-      "engines": {
-        "node": ">=6.0"
-      },
-      "peerDependenciesMeta": {
-        "supports-color": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/decimal.js": {
-      "version": "10.3.1",
-      "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.3.1.tgz",
-      "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ=="
-    },
-    "node_modules/deep-is": {
-      "version": "0.1.4",
-      "resolved": "https://registry.npmmirror.com/deep-is/-/deep-is-0.1.4.tgz",
-      "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
-    },
-    "node_modules/delayed-stream": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
-      "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
-      "engines": {
-        "node": ">=0.4.0"
-      }
-    },
-    "node_modules/domexception": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmmirror.com/domexception/-/domexception-4.0.0.tgz",
-      "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==",
-      "deprecated": "Use your platform's native DOMException instead",
-      "dependencies": {
-        "webidl-conversions": "^7.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/escodegen": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmmirror.com/escodegen/-/escodegen-2.0.0.tgz",
-      "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==",
-      "dependencies": {
-        "esprima": "^4.0.1",
-        "estraverse": "^5.2.0",
-        "esutils": "^2.0.2",
-        "optionator": "^0.8.1"
-      },
-      "bin": {
-        "escodegen": "bin/escodegen.js",
-        "esgenerate": "bin/esgenerate.js"
-      },
-      "engines": {
-        "node": ">=6.0"
-      },
-      "optionalDependencies": {
-        "source-map": "~0.6.1"
-      }
-    },
-    "node_modules/esprima": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmmirror.com/esprima/-/esprima-4.0.1.tgz",
-      "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
-      "bin": {
-        "esparse": "bin/esparse.js",
-        "esvalidate": "bin/esvalidate.js"
-      },
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/estraverse": {
-      "version": "5.3.0",
-      "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz",
-      "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
-      "engines": {
-        "node": ">=4.0"
-      }
-    },
-    "node_modules/esutils": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmmirror.com/esutils/-/esutils-2.0.3.tgz",
-      "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/fast-levenshtein": {
-      "version": "2.0.6",
-      "resolved": "https://registry.npmmirror.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
-      "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="
-    },
-    "node_modules/form-data": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.0.tgz",
-      "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
-      "dependencies": {
-        "asynckit": "^0.4.0",
-        "combined-stream": "^1.0.8",
-        "mime-types": "^2.1.12"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/html-encoding-sniffer": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmmirror.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
-      "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==",
-      "dependencies": {
-        "whatwg-encoding": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/http-proxy-agent": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmmirror.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
-      "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
-      "dependencies": {
-        "@tootallnate/once": "2",
-        "agent-base": "6",
-        "debug": "4"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/https-proxy-agent": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
-      "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
-      "dependencies": {
-        "agent-base": "6",
-        "debug": "4"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/iconv-lite": {
-      "version": "0.6.3",
-      "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
-      "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
-      "dependencies": {
-        "safer-buffer": ">= 2.1.2 < 3.0.0"
-      },
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/is-potential-custom-element-name": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmmirror.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
-      "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
-    },
-    "node_modules/jsdom": {
-      "version": "19.0.0",
-      "resolved": "https://registry.npmmirror.com/jsdom/-/jsdom-19.0.0.tgz",
-      "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==",
-      "dependencies": {
-        "abab": "^2.0.5",
-        "acorn": "^8.5.0",
-        "acorn-globals": "^6.0.0",
-        "cssom": "^0.5.0",
-        "cssstyle": "^2.3.0",
-        "data-urls": "^3.0.1",
-        "decimal.js": "^10.3.1",
-        "domexception": "^4.0.0",
-        "escodegen": "^2.0.0",
-        "form-data": "^4.0.0",
-        "html-encoding-sniffer": "^3.0.0",
-        "http-proxy-agent": "^5.0.0",
-        "https-proxy-agent": "^5.0.0",
-        "is-potential-custom-element-name": "^1.0.1",
-        "nwsapi": "^2.2.0",
-        "parse5": "6.0.1",
-        "saxes": "^5.0.1",
-        "symbol-tree": "^3.2.4",
-        "tough-cookie": "^4.0.0",
-        "w3c-hr-time": "^1.0.2",
-        "w3c-xmlserializer": "^3.0.0",
-        "webidl-conversions": "^7.0.0",
-        "whatwg-encoding": "^2.0.0",
-        "whatwg-mimetype": "^3.0.0",
-        "whatwg-url": "^10.0.0",
-        "ws": "^8.2.3",
-        "xml-name-validator": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "peerDependencies": {
-        "canvas": "^2.5.0"
-      },
-      "peerDependenciesMeta": {
-        "canvas": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/levn": {
-      "version": "0.3.0",
-      "resolved": "https://registry.npmmirror.com/levn/-/levn-0.3.0.tgz",
-      "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
-      "dependencies": {
-        "prelude-ls": "~1.1.2",
-        "type-check": "~0.3.2"
-      },
-      "engines": {
-        "node": ">= 0.8.0"
-      }
-    },
-    "node_modules/mime-db": {
-      "version": "1.52.0",
-      "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
-      "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
-    "node_modules/mime-types": {
-      "version": "2.1.35",
-      "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
-      "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
-      "dependencies": {
-        "mime-db": "1.52.0"
-      },
-      "engines": {
-        "node": ">= 0.6"
-      }
-    },
-    "node_modules/ms": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
-      "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
-    },
-    "node_modules/nwsapi": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmmirror.com/nwsapi/-/nwsapi-2.2.0.tgz",
-      "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ=="
-    },
-    "node_modules/optionator": {
-      "version": "0.8.3",
-      "resolved": "https://registry.npmmirror.com/optionator/-/optionator-0.8.3.tgz",
-      "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
-      "dependencies": {
-        "deep-is": "~0.1.3",
-        "fast-levenshtein": "~2.0.6",
-        "levn": "~0.3.0",
-        "prelude-ls": "~1.1.2",
-        "type-check": "~0.3.2",
-        "word-wrap": "~1.2.3"
-      },
-      "engines": {
-        "node": ">= 0.8.0"
-      }
-    },
-    "node_modules/parse5": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmmirror.com/parse5/-/parse5-6.0.1.tgz",
-      "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
-    },
-    "node_modules/prelude-ls": {
-      "version": "1.1.2",
-      "resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.1.2.tgz",
-      "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==",
-      "engines": {
-        "node": ">= 0.8.0"
-      }
-    },
-    "node_modules/psl": {
-      "version": "1.8.0",
-      "resolved": "https://registry.npmmirror.com/psl/-/psl-1.8.0.tgz",
-      "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
-    },
-    "node_modules/punycode": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.1.1.tgz",
-      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/safer-buffer": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
-      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
-    },
-    "node_modules/saxes": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmmirror.com/saxes/-/saxes-5.0.1.tgz",
-      "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==",
-      "dependencies": {
-        "xmlchars": "^2.2.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/source-map": {
-      "version": "0.6.1",
-      "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
-      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-      "optional": true,
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/symbol-tree": {
-      "version": "3.2.4",
-      "resolved": "https://registry.npmmirror.com/symbol-tree/-/symbol-tree-3.2.4.tgz",
-      "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
-    },
-    "node_modules/tough-cookie": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-4.0.0.tgz",
-      "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==",
-      "dependencies": {
-        "psl": "^1.1.33",
-        "punycode": "^2.1.1",
-        "universalify": "^0.1.2"
-      },
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/tr46": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmmirror.com/tr46/-/tr46-3.0.0.tgz",
-      "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
-      "dependencies": {
-        "punycode": "^2.1.1"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/type-check": {
-      "version": "0.3.2",
-      "resolved": "https://registry.npmmirror.com/type-check/-/type-check-0.3.2.tgz",
-      "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
-      "dependencies": {
-        "prelude-ls": "~1.1.2"
-      },
-      "engines": {
-        "node": ">= 0.8.0"
-      }
-    },
-    "node_modules/universalify": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz",
-      "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
-      "engines": {
-        "node": ">= 4.0.0"
-      }
-    },
-    "node_modules/w3c-hr-time": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmmirror.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
-      "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==",
-      "deprecated": "Use your platform's native performance.now() and performance.timeOrigin.",
-      "dependencies": {
-        "browser-process-hrtime": "^1.0.0"
-      }
-    },
-    "node_modules/w3c-xmlserializer": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmmirror.com/w3c-xmlserializer/-/w3c-xmlserializer-3.0.0.tgz",
-      "integrity": "sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==",
-      "dependencies": {
-        "xml-name-validator": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/webidl-conversions": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
-      "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/whatwg-encoding": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmmirror.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
-      "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
-      "dependencies": {
-        "iconv-lite": "0.6.3"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/whatwg-mimetype": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmmirror.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz",
-      "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==",
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/whatwg-url": {
-      "version": "10.0.0",
-      "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-10.0.0.tgz",
-      "integrity": "sha512-CLxxCmdUby142H5FZzn4D8ikO1cmypvXVQktsgosNy4a4BHrDHeciBBGZhb0bNoR5/MltoCatso+vFjjGx8t0w==",
-      "dependencies": {
-        "tr46": "^3.0.0",
-        "webidl-conversions": "^7.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/word-wrap": {
-      "version": "1.2.3",
-      "resolved": "https://registry.npmmirror.com/word-wrap/-/word-wrap-1.2.3.tgz",
-      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/ws": {
-      "version": "8.5.0",
-      "resolved": "https://registry.npmmirror.com/ws/-/ws-8.5.0.tgz",
-      "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
-      "engines": {
-        "node": ">=10.0.0"
-      },
-      "peerDependencies": {
-        "bufferutil": "^4.0.1",
-        "utf-8-validate": "^5.0.2"
-      },
-      "peerDependenciesMeta": {
-        "bufferutil": {
-          "optional": true
-        },
-        "utf-8-validate": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/xml-name-validator": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmmirror.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz",
-      "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==",
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/xmlchars": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmmirror.com/xmlchars/-/xmlchars-2.2.0.tgz",
-      "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
-    }
-  }
-}

+ 0 - 21
zbytb/node_modules/@tootallnate/once/LICENSE

@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2020 Nathan Rajlich
-
-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.

+ 0 - 93
zbytb/node_modules/@tootallnate/once/README.md

@@ -1,93 +0,0 @@
-# @tootallnate/once
-
-### Creates a Promise that waits for a single event
-
-## Installation
-
-Install with `npm`:
-
-```bash
-$ npm install @tootallnate/once
-```
-
-## API
-
-### once(emitter: EventEmitter, name: string, opts?: OnceOptions): Promise&lt;[...Args]&gt;
-
-Creates a Promise that waits for event `name` to occur on `emitter`, and resolves
-the promise with an array of the values provided to the event handler. If an
-`error` event occurs before the event specified by `name`, then the Promise is
-rejected with the error argument.
-
-```typescript
-import once from '@tootallnate/once';
-import { EventEmitter } from 'events';
-
-const emitter = new EventEmitter();
-
-setTimeout(() => {
-    emitter.emit('foo', 'bar');
-}, 100);
-
-const [result] = await once(emitter, 'foo');
-console.log({ result });
-// { result: 'bar' }
-```
-
-#### Promise Strong Typing
-
-The main feature that this module provides over other "once" implementations is that
-the Promise that is returned is _**strongly typed**_ based on the type of `emitter`
-and the `name` of the event. Some examples are shown below.
-
-_The process "exit" event contains a single number for exit code:_
-
-```typescript
-const [code] = await once(process, 'exit');
-//     ^ number
-```
-_A child process "exit" event contains either an exit code or a signal:_
-
-```typescript
-const child = spawn('echo', []);
-const [code, signal] = await once(child, 'exit');
-//     ^ number | null
-//           ^ string | null
-```
-
-_A forked child process "message" event is type `any`, so you can cast the Promise directly:_
-
-```typescript
-const child = fork('file.js');
-
-// With `await`
-const [message, _]: [WorkerPayload, unknown] = await once(child, 'message');
-
-// With Promise
-const messagePromise: Promise<[WorkerPayload, unknown]> = once(child, 'message');
-
-// Better yet would be to leave it as `any`, and validate the payload
-// at runtime with i.e. `ajv` + `json-schema-to-typescript`
-```
-
-_If the TypeScript definition does not contain an overload for the specified event name, then the Promise will have type `unknown[]` and your code will need to narrow the result manually:_
-
-```typescript
-interface CustomEmitter extends EventEmitter {
-    on(name: 'foo', listener: (a: string, b: number) => void): this;
-}
-
-const emitter: CustomEmitter = new EventEmitter();
-
-// "foo" event is a defined overload, so it's properly typed
-const fooPromise = once(emitter, 'foo');
-//    ^ Promise<[a: string, b: number]>
-
-// "bar" event in not a defined overload, so it gets `unknown[]`
-const barPromise = once(emitter, 'bar');
-//    ^ Promise<unknown[]>
-```
-
-### OnceOptions
-
--   `signal` - `AbortSignal` instance to unbind event handlers before the Promise has been fulfilled.

+ 0 - 52
zbytb/node_modules/@tootallnate/once/package.json

@@ -1,52 +0,0 @@
-{
-  "name": "@tootallnate/once",
-  "version": "2.0.0",
-  "description": "Creates a Promise that waits for a single event",
-  "main": "./dist/index.js",
-  "types": "./dist/index.d.ts",
-  "files": [
-    "dist"
-  ],
-  "scripts": {
-    "prebuild": "rimraf dist",
-    "build": "tsc",
-    "test": "jest",
-    "prepublishOnly": "npm run build"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/TooTallNate/once.git"
-  },
-  "keywords": [],
-  "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
-  "license": "MIT",
-  "bugs": {
-    "url": "https://github.com/TooTallNate/once/issues"
-  },
-  "devDependencies": {
-    "@types/jest": "^27.0.2",
-    "@types/node": "^12.12.11",
-    "abort-controller": "^3.0.0",
-    "jest": "^27.2.1",
-    "rimraf": "^3.0.0",
-    "ts-jest": "^27.0.5",
-    "typescript": "^4.4.3"
-  },
-  "engines": {
-    "node": ">= 10"
-  },
-  "jest": {
-    "preset": "ts-jest",
-    "globals": {
-      "ts-jest": {
-        "diagnostics": false,
-        "isolatedModules": true
-      }
-    },
-    "verbose": false,
-    "testEnvironment": "node",
-    "testMatch": [
-      "<rootDir>/test/**/*.test.ts"
-    ]
-  }
-}

+ 0 - 45
zbytb/node_modules/abab/CHANGELOG.md

@@ -1,45 +0,0 @@
-## 2.0.5
-
--   Use a lookup string in atobLookup and btoaLookup (@GiovanniFrigo in #38)
--   Dependency updates
-
-## 2.0.4
-
--   Dependency updates
-
-## 2.0.3
-
--   Use standard wording for BSD-3-Clause license (@PhilippWendler)
-
-## 2.0.2
-
--   Correct license in `package.json` (@Haegin)
-
-## 2.0.1
-
--   Add TypeScript type definitions, thanks to @LinusU
-
-## 2.0.0
-
-Modernization updates thanks to @TimothyGu:
-
--   Use jsdom's eslint config, remove jscs
--   Move syntax to ES6
--   Remove Babel
--   Via: https://github.com/jsdom/abab/pull/26
-
-## 1.0.4
-
--   Added license file
-
-## 1.0.3
-
--   Replaced `let` with `var` in `lib/btoa.js`
-    -   Follow up from `1.0.2`
-    -   Resolves https://github.com/jsdom/abab/issues/18
-
-## 1.0.2
-
--   Replaced `const` with `var` in `index.js`
-    -   Allows use of `abab` in the browser without a transpilation step
-    -   Resolves https://github.com/jsdom/abab/issues/15

+ 0 - 13
zbytb/node_modules/abab/LICENSE.md

@@ -1,13 +0,0 @@
-Copyright © 2019 W3C and Jeff Carpenter \<jeffcarp@chromium.org\>
-
-Both the original source code and new contributions in this repository are released under the [3-Clause BSD license](https://opensource.org/licenses/BSD-3-Clause).
-
-# The 3-Clause BSD License
-
-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.
-3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT HOLDER 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.

+ 0 - 51
zbytb/node_modules/abab/README.md

@@ -1,51 +0,0 @@
-# abab [![npm version](https://badge.fury.io/js/abab.svg)](https://www.npmjs.com/package/abab) [![Build Status](https://travis-ci.org/jsdom/abab.svg?branch=master)](https://travis-ci.org/jsdom/abab)
-
-A JavaScript module that implements `window.atob` and `window.btoa` according the forgiving-base64 algorithm in the [Infra Standard](https://infra.spec.whatwg.org/#forgiving-base64). The original code was forked from [w3c/web-platform-tests](https://github.com/w3c/web-platform-tests/blob/master/html/webappapis/atob/base64.html).
-
-Compatibility: Node.js version 3+ and all major browsers.
-
-Install with `npm`:
-
-```sh
-npm install abab
-```
-
-## API
-
-### `btoa` (base64 encode)
-
-```js
-const { btoa } = require('abab');
-btoa('Hello, world!'); // 'SGVsbG8sIHdvcmxkIQ=='
-```
-
-### `atob` (base64 decode)
-
-```js 
-const { atob } = require('abab');
-atob('SGVsbG8sIHdvcmxkIQ=='); // 'Hello, world!'
-```
-
-#### Valid characters
-
-[Per the spec](https://html.spec.whatwg.org/multipage/webappapis.html#atob:dom-windowbase64-btoa-3), `btoa` will accept strings "containing only characters in the range `U+0000` to `U+00FF`." If passed a string with characters above `U+00FF`, `btoa` will return `null`. If `atob` is passed a string that is not base64-valid, it will also return `null`. In both cases when `null` is returned, the spec calls for throwing a `DOMException` of type `InvalidCharacterError`.
-
-## Browsers
-
-If you want to include just one of the methods to save bytes in your client-side code, you can `require` the desired module directly.
-
-```js
-const atob = require('abab/lib/atob');
-const btoa = require('abab/lib/btoa');
-```
-
-## Development
-
-If you're **submitting a PR** or **deploying to npm**, please use the [checklists in CONTRIBUTING.md](CONTRIBUTING.md#checklists).
-
-## Remembering what `atob` and `btoa` stand for
-
-Base64 comes from IETF [RFC 4648](https://tools.ietf.org/html/rfc4648#section-4) (2006). 
-
-- **`btoa`**, the encoder function, stands for **binary** to **ASCII**, meaning it converts any binary input into a subset of **ASCII** (Base64).
-- **`atob`**, the decoder function, converts **ASCII** (or Base64) to its original **binary** format. 

+ 0 - 2
zbytb/node_modules/abab/index.d.ts

@@ -1,2 +0,0 @@
-export function atob(encodedData: string): string | null
-export function btoa(stringToEncode: string): string | null

+ 0 - 9
zbytb/node_modules/abab/index.js

@@ -1,9 +0,0 @@
-"use strict";
-
-const atob = require("./lib/atob");
-const btoa = require("./lib/btoa");
-
-module.exports = {
-  atob,
-  btoa
-};

+ 0 - 42
zbytb/node_modules/abab/package.json

@@ -1,42 +0,0 @@
-{
-  "name": "abab",
-  "version": "2.0.5",
-  "description": "WHATWG spec-compliant implementations of window.atob and window.btoa.",
-  "main": "index.js",
-  "files": [
-    "index.d.ts",
-    "index.js",
-    "lib/"
-  ],
-  "scripts": {
-    "mocha": "mocha test/node",
-    "karma": "karma start",
-    "test": "npm run lint && npm run mocha && npm run karma",
-    "lint": "eslint ."
-  },
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/jsdom/abab.git"
-  },
-  "keywords": [
-    "atob",
-    "btoa",
-    "browser"
-  ],
-  "author": "Jeff Carpenter <gcarpenterv@gmail.com>",
-  "license": "BSD-3-Clause",
-  "bugs": {
-    "url": "https://github.com/jsdom/abab/issues"
-  },
-  "homepage": "https://github.com/jsdom/abab#readme",
-  "devDependencies": {
-    "eslint": "^4.19.1",
-    "karma": "^2.0.0",
-    "karma-cli": "^1.0.1",
-    "karma-firefox-launcher": "^1.1.0",
-    "karma-mocha": "^1.3.0",
-    "karma-webpack": "^3.0.0",
-    "mocha": "^5.1.0",
-    "webpack": "^4.5.0"
-  }
-}

+ 0 - 19
zbytb/node_modules/acorn-globals/LICENSE

@@ -1,19 +0,0 @@
-Copyright (c) 2014 Forbes Lindesay
-
-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.

+ 0 - 81
zbytb/node_modules/acorn-globals/README.md

@@ -1,81 +0,0 @@
-# acorn-globals
-
-Detect global variables in JavaScript using acorn
-
-[Get supported acorn-globals with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-acorn_globals?utm_source=npm-acorn-globals&utm_medium=referral&utm_campaign=readme)
-
-[![Build Status](https://img.shields.io/travis/ForbesLindesay/acorn-globals/master.svg)](https://travis-ci.org/ForbesLindesay/acorn-globals)
-[![Dependency Status](https://img.shields.io/david/ForbesLindesay/acorn-globals.svg)](https://david-dm.org/ForbesLindesay/acorn-globals)
-[![NPM version](https://img.shields.io/npm/v/acorn-globals.svg)](https://www.npmjs.org/package/acorn-globals)
-
-## Installation
-
-    npm install acorn-globals
-
-## Usage
-
-detect.js
-
-```js
-var fs = require('fs');
-var detect = require('acorn-globals');
-
-var src = fs.readFileSync(__dirname + '/input.js', 'utf8');
-
-var scope = detect(src);
-console.dir(scope);
-```
-
-input.js
-
-```js
-var x = 5;
-var y = 3, z = 2;
-
-w.foo();
-w = 2;
-
-RAWR=444;
-RAWR.foo();
-
-BLARG=3;
-
-foo(function () {
-    var BAR = 3;
-    process.nextTick(function (ZZZZZZZZZZZZ) {
-        console.log('beep boop');
-        var xyz = 4;
-        x += 10;
-        x.zzzzzz;
-        ZZZ=6;
-    });
-    function doom () {
-    }
-    ZZZ.foo();
-
-});
-
-console.log(xyz);
-```
-
-output:
-
-```
-$ node example/detect.js
-[ { name: 'BLARG', nodes: [ [Object] ] },
-  { name: 'RAWR', nodes: [ [Object], [Object] ] },
-  { name: 'ZZZ', nodes: [ [Object], [Object] ] },
-  { name: 'console', nodes: [ [Object], [Object] ] },
-  { name: 'foo', nodes: [ [Object] ] },
-  { name: 'process', nodes: [ [Object] ] },
-  { name: 'w', nodes: [ [Object], [Object] ] },
-  { name: 'xyz', nodes: [ [Object] ] } ]
-```
-
-## Security contact information
-
-To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
-
-## License
-
-  MIT

+ 0 - 179
zbytb/node_modules/acorn-globals/index.js

@@ -1,179 +0,0 @@
-'use strict';
-
-var acorn = require('acorn');
-var walk = require('acorn-walk');
-
-function isScope(node) {
-  return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration' || node.type === 'ArrowFunctionExpression' || node.type === 'Program';
-}
-function isBlockScope(node) {
-  return node.type === 'BlockStatement' || isScope(node);
-}
-
-function declaresArguments(node) {
-  return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration';
-}
-
-function declaresThis(node) {
-  return node.type === 'FunctionExpression' || node.type === 'FunctionDeclaration';
-}
-
-function reallyParse(source, options) {
-  var parseOptions = Object.assign({}, options,
-    {
-      allowReturnOutsideFunction: true,
-      allowImportExportEverywhere: true,
-      allowHashBang: true
-    }
-  );
-  return acorn.parse(source, parseOptions);
-}
-module.exports = findGlobals;
-module.exports.parse = reallyParse;
-function findGlobals(source, options) {
-  options = options || {};
-  var globals = [];
-  var ast;
-  // istanbul ignore else
-  if (typeof source === 'string') {
-    ast = reallyParse(source, options);
-  } else {
-    ast = source;
-  }
-  // istanbul ignore if
-  if (!(ast && typeof ast === 'object' && ast.type === 'Program')) {
-    throw new TypeError('Source must be either a string of JavaScript or an acorn AST');
-  }
-  var declareFunction = function (node) {
-    var fn = node;
-    fn.locals = fn.locals || Object.create(null);
-    node.params.forEach(function (node) {
-      declarePattern(node, fn);
-    });
-    if (node.id) {
-      fn.locals[node.id.name] = true;
-    }
-  };
-  var declareClass = function (node) {
-    node.locals = node.locals || Object.create(null);
-    if (node.id) {
-      node.locals[node.id.name] = true;
-    }
-  };
-  var declarePattern = function (node, parent) {
-    switch (node.type) {
-      case 'Identifier':
-        parent.locals[node.name] = true;
-        break;
-      case 'ObjectPattern':
-        node.properties.forEach(function (node) {
-          declarePattern(node.value || node.argument, parent);
-        });
-        break;
-      case 'ArrayPattern':
-        node.elements.forEach(function (node) {
-          if (node) declarePattern(node, parent);
-        });
-        break;
-      case 'RestElement':
-        declarePattern(node.argument, parent);
-        break;
-      case 'AssignmentPattern':
-        declarePattern(node.left, parent);
-        break;
-      // istanbul ignore next
-      default:
-        throw new Error('Unrecognized pattern type: ' + node.type);
-    }
-  };
-  var declareModuleSpecifier = function (node, parents) {
-    ast.locals = ast.locals || Object.create(null);
-    ast.locals[node.local.name] = true;
-  };
-  walk.ancestor(ast, {
-    'VariableDeclaration': function (node, parents) {
-      var parent = null;
-      for (var i = parents.length - 1; i >= 0 && parent === null; i--) {
-        if (node.kind === 'var' ? isScope(parents[i]) : isBlockScope(parents[i])) {
-          parent = parents[i];
-        }
-      }
-      parent.locals = parent.locals || Object.create(null);
-      node.declarations.forEach(function (declaration) {
-        declarePattern(declaration.id, parent);
-      });
-    },
-    'FunctionDeclaration': function (node, parents) {
-      var parent = null;
-      for (var i = parents.length - 2; i >= 0 && parent === null; i--) {
-        if (isScope(parents[i])) {
-          parent = parents[i];
-        }
-      }
-      parent.locals = parent.locals || Object.create(null);
-      if (node.id) {
-        parent.locals[node.id.name] = true;
-      }
-      declareFunction(node);
-    },
-    'Function': declareFunction,
-    'ClassDeclaration': function (node, parents) {
-      var parent = null;
-      for (var i = parents.length - 2; i >= 0 && parent === null; i--) {
-        if (isBlockScope(parents[i])) {
-          parent = parents[i];
-        }
-      }
-      parent.locals = parent.locals || Object.create(null);
-      if (node.id) {
-        parent.locals[node.id.name] = true;
-      }
-      declareClass(node);
-    },
-    'Class': declareClass,
-    'TryStatement': function (node) {
-      if (node.handler === null) return;
-      node.handler.locals = node.handler.locals || Object.create(null);
-      declarePattern(node.handler.param, node.handler);
-    },
-    'ImportDefaultSpecifier': declareModuleSpecifier,
-    'ImportSpecifier': declareModuleSpecifier,
-    'ImportNamespaceSpecifier': declareModuleSpecifier
-  });
-  function identifier(node, parents) {
-    var name = node.name;
-    if (name === 'undefined') return;
-    for (var i = 0; i < parents.length; i++) {
-      if (name === 'arguments' && declaresArguments(parents[i])) {
-        return;
-      }
-      if (parents[i].locals && name in parents[i].locals) {
-        return;
-      }
-    }
-    node.parents = parents.slice();
-    globals.push(node);
-  }
-  walk.ancestor(ast, {
-    'VariablePattern': identifier,
-    'Identifier': identifier,
-    'ThisExpression': function (node, parents) {
-      for (var i = 0; i < parents.length; i++) {
-        if (declaresThis(parents[i])) {
-          return;
-        }
-      }
-      node.parents = parents.slice();
-      globals.push(node);
-    }
-  });
-  var groupedGlobals = Object.create(null);
-  globals.forEach(function (node) {
-    var name = node.type === 'ThisExpression' ? 'this' : node.name;
-    groupedGlobals[name] = (groupedGlobals[name] || []);
-    groupedGlobals[name].push(node);
-  });
-  return Object.keys(groupedGlobals).sort().map(function (name) {
-    return {name: name, nodes: groupedGlobals[name]};
-  });
-}

+ 0 - 12
zbytb/node_modules/acorn-globals/node_modules/.bin/acorn

@@ -1,12 +0,0 @@
-#!/bin/sh
-basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
-
-case `uname` in
-    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
-esac
-
-if [ -x "$basedir/node" ]; then
-  exec "$basedir/node"  "$basedir/../acorn/bin/acorn" "$@"
-else 
-  exec node  "$basedir/../acorn/bin/acorn" "$@"
-fi

+ 0 - 17
zbytb/node_modules/acorn-globals/node_modules/.bin/acorn.cmd

@@ -1,17 +0,0 @@
-@ECHO off
-GOTO start
-:find_dp0
-SET dp0=%~dp0
-EXIT /b
-:start
-SETLOCAL
-CALL :find_dp0
-
-IF EXIST "%dp0%\node.exe" (
-  SET "_prog=%dp0%\node.exe"
-) ELSE (
-  SET "_prog=node"
-  SET PATHEXT=%PATHEXT:;.JS;=;%
-)
-
-endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\acorn\bin\acorn" %*

+ 0 - 28
zbytb/node_modules/acorn-globals/node_modules/.bin/acorn.ps1

@@ -1,28 +0,0 @@
-#!/usr/bin/env pwsh
-$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
-
-$exe=""
-if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
-  # Fix case when both the Windows and Linux builds of Node
-  # are installed in the same directory
-  $exe=".exe"
-}
-$ret=0
-if (Test-Path "$basedir/node$exe") {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "$basedir/node$exe"  "$basedir/../acorn/bin/acorn" $args
-  } else {
-    & "$basedir/node$exe"  "$basedir/../acorn/bin/acorn" $args
-  }
-  $ret=$LASTEXITCODE
-} else {
-  # Support pipeline input
-  if ($MyInvocation.ExpectingInput) {
-    $input | & "node$exe"  "$basedir/../acorn/bin/acorn" $args
-  } else {
-    & "node$exe"  "$basedir/../acorn/bin/acorn" $args
-  }
-  $ret=$LASTEXITCODE
-}
-exit $ret

+ 0 - 620
zbytb/node_modules/acorn-globals/node_modules/acorn/CHANGELOG.md

@@ -1,620 +0,0 @@
-## 7.4.0 (2020-08-03)
-
-### New features
-
-Add support for logical assignment operators.
-
-Add support for numeric separators.
-
-## 7.3.1 (2020-06-11)
-
-### Bug fixes
-
-Make the string in the `version` export match the actual library version.
-
-## 7.3.0 (2020-06-11)
-
-### Bug fixes
-
-Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail.
-
-### New features
-
-Add support for optional chaining (`?.`).
-
-## 7.2.0 (2020-05-09)
-
-### Bug fixes
-
-Fix precedence issue in parsing of async arrow functions.
-
-### New features
-
-Add support for nullish coalescing.
-
-Add support for `import.meta`.
-
-Support `export * as ...` syntax.
-
-Upgrade to Unicode 13.
-
-## 6.4.1 (2020-03-09)
-
-### Bug fixes
-
-More carefully check for valid UTF16 surrogate pairs in regexp validator.
-
-## 7.1.1 (2020-03-01)
-
-### Bug fixes
-
-Treat `\8` and `\9` as invalid escapes in template strings.
-
-Allow unicode escapes in property names that are keywords.
-
-Don't error on an exponential operator expression as argument to `await`.
-
-More carefully check for valid UTF16 surrogate pairs in regexp validator.
-
-## 7.1.0 (2019-09-24)
-
-### Bug fixes
-
-Disallow trailing object literal commas when ecmaVersion is less than 5.
-
-### New features
-
-Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on.
-
-## 7.0.0 (2019-08-13)
-
-### Breaking changes
-
-Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression).
-
-Makes 10 (ES2019) the default value for the `ecmaVersion` option.
-
-## 6.3.0 (2019-08-12)
-
-### New features
-
-`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard.
-
-## 6.2.1 (2019-07-21)
-
-### Bug fixes
-
-Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such.
-
-Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances.
-
-## 6.2.0 (2019-07-04)
-
-### Bug fixes
-
-Improve valid assignment checking in `for`/`in` and `for`/`of` loops.
-
-Disallow binding `let` in patterns.
-
-### New features
-
-Support bigint syntax with `ecmaVersion` >= 11.
-
-Support dynamic `import` syntax with `ecmaVersion` >= 11.
-
-Upgrade to Unicode version 12.
-
-## 6.1.1 (2019-02-27)
-
-### Bug fixes
-
-Fix bug that caused parsing default exports of with names to fail.
-
-## 6.1.0 (2019-02-08)
-
-### Bug fixes
-
-Fix scope checking when redefining a `var` as a lexical binding.
-
-### New features
-
-Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins.
-
-## 6.0.7 (2019-02-04)
-
-### Bug fixes
-
-Check that exported bindings are defined.
-
-Don't treat `\u180e` as a whitespace character.
-
-Check for duplicate parameter names in methods.
-
-Don't allow shorthand properties when they are generators or async methods.
-
-Forbid binding `await` in async arrow function's parameter list.
-
-## 6.0.6 (2019-01-30)
-
-### Bug fixes
-
-The content of class declarations and expressions is now always parsed in strict mode.
-
-Don't allow `let` or `const` to bind the variable name `let`.
-
-Treat class declarations as lexical.
-
-Don't allow a generator function declaration as the sole body of an `if` or `else`.
-
-Ignore `"use strict"` when after an empty statement.
-
-Allow string line continuations with special line terminator characters.
-
-Treat `for` bodies as part of the `for` scope when checking for conflicting bindings.
-
-Fix bug with parsing `yield` in a `for` loop initializer.
-
-Implement special cases around scope checking for functions.
-
-## 6.0.5 (2019-01-02)
-
-### Bug fixes
-
-Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type.
-
-Don't treat `let` as a keyword when the next token is `{` on the next line.
-
-Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on.
-
-## 6.0.4 (2018-11-05)
-
-### Bug fixes
-
-Further improvements to tokenizing regular expressions in corner cases.
-
-## 6.0.3 (2018-11-04)
-
-### Bug fixes
-
-Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression.
-
-Remove stray symlink in the package tarball.
-
-## 6.0.2 (2018-09-26)
-
-### Bug fixes
-
-Fix bug where default expressions could fail to parse inside an object destructuring assignment expression.
-
-## 6.0.1 (2018-09-14)
-
-### Bug fixes
-
-Fix wrong value in `version` export.
-
-## 6.0.0 (2018-09-14)
-
-### Bug fixes
-
-Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
-
-Forbid `new.target` in top-level arrow functions.
-
-Fix issue with parsing a regexp after `yield` in some contexts.
-
-### New features
-
-The package now comes with TypeScript definitions.
-
-### Breaking changes
-
-The default value of the `ecmaVersion` option is now 9 (2018).
-
-Plugins work differently, and will have to be rewritten to work with this version.
-
-The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`).
-
-## 5.7.3 (2018-09-10)
-
-### Bug fixes
-
-Fix failure to tokenize regexps after expressions like `x.of`.
-
-Better error message for unterminated template literals.
-
-## 5.7.2 (2018-08-24)
-
-### Bug fixes
-
-Properly handle `allowAwaitOutsideFunction` in for statements.
-
-Treat function declarations at the top level of modules like let bindings.
-
-Don't allow async function declarations as the only statement under a label.
-
-## 5.7.0 (2018-06-15)
-
-### New features
-
-Upgraded to Unicode 11.
-
-## 5.6.0 (2018-05-31)
-
-### New features
-
-Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
-
-Allow binding-less catch statements when ECMAVersion >= 10.
-
-Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
-
-## 5.5.3 (2018-03-08)
-
-### Bug fixes
-
-A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
-
-## 5.5.2 (2018-03-08)
-
-### Bug fixes
-
-A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0.
-
-## 5.5.1 (2018-03-06)
-
-### Bug fixes
-
-Fix misleading error message for octal escapes in template strings.
-
-## 5.5.0 (2018-02-27)
-
-### New features
-
-The identifier character categorization is now based on Unicode version 10.
-
-Acorn will now validate the content of regular expressions, including new ES9 features.
-
-## 5.4.0 (2018-02-01)
-
-### Bug fixes
-
-Disallow duplicate or escaped flags on regular expressions.
-
-Disallow octal escapes in strings in strict mode.
-
-### New features
-
-Add support for async iteration.
-
-Add support for object spread and rest.
-
-## 5.3.0 (2017-12-28)
-
-### Bug fixes
-
-Fix parsing of floating point literals with leading zeroes in loose mode.
-
-Allow duplicate property names in object patterns.
-
-Don't allow static class methods named `prototype`.
-
-Disallow async functions directly under `if` or `else`.
-
-Parse right-hand-side of `for`/`of` as an assignment expression.
-
-Stricter parsing of `for`/`in`.
-
-Don't allow unicode escapes in contextual keywords.
-
-### New features
-
-Parsing class members was factored into smaller methods to allow plugins to hook into it.
-
-## 5.2.1 (2017-10-30)
-
-### Bug fixes
-
-Fix a token context corruption bug.
-
-## 5.2.0 (2017-10-30)
-
-### Bug fixes
-
-Fix token context tracking for `class` and `function` in property-name position.
-
-Make sure `%*` isn't parsed as a valid operator.
-
-Allow shorthand properties `get` and `set` to be followed by default values.
-
-Disallow `super` when not in callee or object position.
-
-### New features
-
-Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements.
-
-## 5.1.2 (2017-09-04)
-
-### Bug fixes
-
-Disable parsing of legacy HTML-style comments in modules.
-
-Fix parsing of async methods whose names are keywords.
-
-## 5.1.1 (2017-07-06)
-
-### Bug fixes
-
-Fix problem with disambiguating regexp and division after a class.
-
-## 5.1.0 (2017-07-05)
-
-### Bug fixes
-
-Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
-
-Parse zero-prefixed numbers with non-octal digits as decimal.
-
-Allow object/array patterns in rest parameters.
-
-Don't error when `yield` is used as a property name.
-
-Allow `async` as a shorthand object property.
-
-### New features
-
-Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9.
-
-## 5.0.3 (2017-04-01)
-
-### Bug fixes
-
-Fix spurious duplicate variable definition errors for named functions.
-
-## 5.0.2 (2017-03-30)
-
-### Bug fixes
-
-A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
-
-## 5.0.0 (2017-03-28)
-
-### Bug fixes
-
-Raise an error for duplicated lexical bindings.
-
-Fix spurious error when an assignement expression occurred after a spread expression.
-
-Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
-
-Allow labels in front or `var` declarations, even in strict mode.
-
-### Breaking changes
-
-Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`.
-
-## 4.0.11 (2017-02-07)
-
-### Bug fixes
-
-Allow all forms of member expressions to be parenthesized as lvalue.
-
-## 4.0.10 (2017-02-07)
-
-### Bug fixes
-
-Don't expect semicolons after default-exported functions or classes, even when they are expressions.
-
-Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode.
-
-## 4.0.9 (2017-02-06)
-
-### Bug fixes
-
-Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again.
-
-## 4.0.8 (2017-02-03)
-
-### Bug fixes
-
-Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
-
-## 4.0.7 (2017-02-02)
-
-### Bug fixes
-
-Accept invalidly rejected code like `(x).y = 2` again.
-
-Don't raise an error when a function _inside_ strict code has a non-simple parameter list.
-
-## 4.0.6 (2017-02-02)
-
-### Bug fixes
-
-Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
-
-## 4.0.5 (2017-02-02)
-
-### Bug fixes
-
-Disallow parenthesized pattern expressions.
-
-Allow keywords as export names.
-
-Don't allow the `async` keyword to be parenthesized.
-
-Properly raise an error when a keyword contains a character escape.
-
-Allow `"use strict"` to appear after other string literal expressions.
-
-Disallow labeled declarations.
-
-## 4.0.4 (2016-12-19)
-
-### Bug fixes
-
-Fix crash when `export` was followed by a keyword that can't be
-exported.
-
-## 4.0.3 (2016-08-16)
-
-### Bug fixes
-
-Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
-
-Properly parse properties named `async` in ES2017 mode.
-
-Fix bug where reserved words were broken in ES2017 mode.
-
-## 4.0.2 (2016-08-11)
-
-### Bug fixes
-
-Don't ignore period or 'e' characters after octal numbers.
-
-Fix broken parsing for call expressions in default parameter values of arrow functions.
-
-## 4.0.1 (2016-08-08)
-
-### Bug fixes
-
-Fix false positives in duplicated export name errors.
-
-## 4.0.0 (2016-08-07)
-
-### Breaking changes
-
-The default `ecmaVersion` option value is now 7.
-
-A number of internal method signatures changed, so plugins might need to be updated.
-
-### Bug fixes
-
-The parser now raises errors on duplicated export names.
-
-`arguments` and `eval` can now be used in shorthand properties.
-
-Duplicate parameter names in non-simple argument lists now always produce an error.
-
-### New features
-
-The `ecmaVersion` option now also accepts year-style version numbers
-(2015, etc).
-
-Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
-
-Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
-
-## 3.3.0 (2016-07-25)
-
-### Bug fixes
-
-Fix bug in tokenizing of regexp operator after a function declaration.
-
-Fix parser crash when parsing an array pattern with a hole.
-
-### New features
-
-Implement check against complex argument lists in functions that enable strict mode in ES7.
-
-## 3.2.0 (2016-06-07)
-
-### Bug fixes
-
-Improve handling of lack of unicode regexp support in host
-environment.
-
-Properly reject shorthand properties whose name is a keyword.
-
-### New features
-
-Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object.
-
-## 3.1.0 (2016-04-18)
-
-### Bug fixes
-
-Properly tokenize the division operator directly after a function expression.
-
-Allow trailing comma in destructuring arrays.
-
-## 3.0.4 (2016-02-25)
-
-### Fixes
-
-Allow update expressions as left-hand-side of the ES7 exponential operator.
-
-## 3.0.2 (2016-02-10)
-
-### Fixes
-
-Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
-
-## 3.0.0 (2016-02-10)
-
-### Breaking changes
-
-The default value of the `ecmaVersion` option is now 6 (used to be 5).
-
-Support for comprehension syntax (which was dropped from the draft spec) has been removed.
-
-### Fixes
-
-`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
-
-A parenthesized class or function expression after `export default` is now parsed correctly.
-
-### New features
-
-When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
-
-The identifier character ranges are now based on Unicode 8.0.0.
-
-Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled.
-
-## 2.7.0 (2016-01-04)
-
-### Fixes
-
-Stop allowing rest parameters in setters.
-
-Disallow `y` rexexp flag in ES5.
-
-Disallow `\00` and `\000` escapes in strict mode.
-
-Raise an error when an import name is a reserved word.
-
-## 2.6.2 (2015-11-10)
-
-### Fixes
-
-Don't crash when no options object is passed.
-
-## 2.6.0 (2015-11-09)
-
-### Fixes
-
-Add `await` as a reserved word in module sources.
-
-Disallow `yield` in a parameter default value for a generator.
-
-Forbid using a comma after a rest pattern in an array destructuring.
-
-### New features
-
-Support parsing stdin in command-line tool.
-
-## 2.5.0 (2015-10-27)
-
-### Fixes
-
-Fix tokenizer support in the command-line tool.
-
-Stop allowing `new.target` outside of functions.
-
-Remove legacy `guard` and `guardedHandler` properties from try nodes.
-
-Stop allowing multiple `__proto__` properties on an object literal in strict mode.
-
-Don't allow rest parameters to be non-identifier patterns.
-
-Check for duplicate paramter names in arrow functions.

+ 0 - 21
zbytb/node_modules/acorn-globals/node_modules/acorn/LICENSE

@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (C) 2012-2018 by various contributors (see AUTHORS)
-
-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.

+ 0 - 269
zbytb/node_modules/acorn-globals/node_modules/acorn/README.md

@@ -1,269 +0,0 @@
-# Acorn
-
-A tiny, fast JavaScript parser written in JavaScript.
-
-## Community
-
-Acorn is open source software released under an
-[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
-
-You are welcome to
-[report bugs](https://github.com/acornjs/acorn/issues) or create pull
-requests on [github](https://github.com/acornjs/acorn). For questions
-and discussion, please use the
-[Tern discussion forum](https://discuss.ternjs.net).
-
-## Installation
-
-The easiest way to install acorn is from [`npm`](https://www.npmjs.com/):
-
-```sh
-npm install acorn
-```
-
-Alternately, you can download the source and build acorn yourself:
-
-```sh
-git clone https://github.com/acornjs/acorn.git
-cd acorn
-npm install
-```
-
-## Interface
-
-**parse**`(input, options)` is the main interface to the library. The
-`input` parameter is a string, `options` can be undefined or an object
-setting some of the options listed below. The return value will be an
-abstract syntax tree object as specified by the [ESTree
-spec](https://github.com/estree/estree).
-
-```javascript
-let acorn = require("acorn");
-console.log(acorn.parse("1 + 1"));
-```
-
-When encountering a syntax error, the parser will raise a
-`SyntaxError` object with a meaningful message. The error object will
-have a `pos` property that indicates the string offset at which the
-error occurred, and a `loc` object that contains a `{line, column}`
-object referring to that same position.
-
-Options can be provided by passing a second argument, which should be
-an object containing any of these fields:
-
-- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
-  either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019) or 11
-  (2020, partial support). This influences support for strict mode,
-  the set of reserved words, and support for new syntax features.
-  Default is 10.
-
-  **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
-  implemented by Acorn. Other proposed new features can be implemented
-  through plugins.
-
-- **sourceType**: Indicate the mode the code should be parsed in. Can be
-  either `"script"` or `"module"`. This influences global strict mode
-  and parsing of `import` and `export` declarations.
-
-  **NOTE**: If set to `"module"`, then static `import` / `export` syntax
-  will be valid, even if `ecmaVersion` is less than 6.
-
-- **onInsertedSemicolon**: If given a callback, that callback will be
-  called whenever a missing semicolon is inserted by the parser. The
-  callback will be given the character offset of the point where the
-  semicolon is inserted as argument, and if `locations` is on, also a
-  `{line, column}` object representing this position.
-
-- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
-  commas.
-
-- **allowReserved**: If `false`, using a reserved word will generate
-  an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher
-  versions. When given the value `"never"`, reserved words and
-  keywords can also not be used as property names (as in Internet
-  Explorer's old parser).
-
-- **allowReturnOutsideFunction**: By default, a return statement at
-  the top level raises an error. Set this to `true` to accept such
-  code.
-
-- **allowImportExportEverywhere**: By default, `import` and `export`
-  declarations can only appear at a program's top level. Setting this
-  option to `true` allows them anywhere where a statement is allowed.
-  
-- **allowAwaitOutsideFunction**: By default, `await` expressions can
-  only appear inside `async` functions. Setting this option to
-  `true` allows to have top-level `await` expressions. They are
-  still not allowed in non-`async` functions, though.
-
-- **allowHashBang**: When this is enabled (off by default), if the
-  code starts with the characters `#!` (as in a shellscript), the
-  first line will be treated as a comment.
-
-- **locations**: When `true`, each node has a `loc` object attached
-  with `start` and `end` subobjects, each of which contains the
-  one-based line and zero-based column numbers in `{line, column}`
-  form. Default is `false`.
-
-- **onToken**: If a function is passed for this option, each found
-  token will be passed in same format as tokens returned from
-  `tokenizer().getToken()`.
-
-  If array is passed, each found token is pushed to it.
-
-  Note that you are not allowed to call the parser from the
-  callback—that will corrupt its internal state.
-
-- **onComment**: If a function is passed for this option, whenever a
-  comment is encountered the function will be called with the
-  following parameters:
-
-  - `block`: `true` if the comment is a block comment, false if it
-    is a line comment.
-  - `text`: The content of the comment.
-  - `start`: Character offset of the start of the comment.
-  - `end`: Character offset of the end of the comment.
-
-  When the `locations` options is on, the `{line, column}` locations
-  of the comment’s start and end are passed as two additional
-  parameters.
-
-  If array is passed for this option, each found comment is pushed
-  to it as object in Esprima format:
-
-  ```javascript
-  {
-    "type": "Line" | "Block",
-    "value": "comment text",
-    "start": Number,
-    "end": Number,
-    // If `locations` option is on:
-    "loc": {
-      "start": {line: Number, column: Number}
-      "end": {line: Number, column: Number}
-    },
-    // If `ranges` option is on:
-    "range": [Number, Number]
-  }
-  ```
-
-  Note that you are not allowed to call the parser from the
-  callback—that will corrupt its internal state.
-
-- **ranges**: Nodes have their start and end characters offsets
-  recorded in `start` and `end` properties (directly on the node,
-  rather than the `loc` object, which holds line/column data. To also
-  add a
-  [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678)
-  `range` property holding a `[start, end]` array with the same
-  numbers, set the `ranges` option to `true`.
-
-- **program**: It is possible to parse multiple files into a single
-  AST by passing the tree produced by parsing the first file as the
-  `program` option in subsequent parses. This will add the toplevel
-  forms of the parsed file to the "Program" (top) node of an existing
-  parse tree.
-
-- **sourceFile**: When the `locations` option is `true`, you can pass
-  this option to add a `source` attribute in every node’s `loc`
-  object. Note that the contents of this option are not examined or
-  processed in any way; you are free to use whatever format you
-  choose.
-
-- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
-  will be added (regardless of the `location` option) directly to the
-  nodes, rather than the `loc` object.
-
-- **preserveParens**: If this option is `true`, parenthesized expressions
-  are represented by (non-standard) `ParenthesizedExpression` nodes
-  that have a single `expression` property containing the expression
-  inside parentheses.
-
-**parseExpressionAt**`(input, offset, options)` will parse a single
-expression in a string, and return its AST. It will not complain if
-there is more of the string left after the expression.
-
-**tokenizer**`(input, options)` returns an object with a `getToken`
-method that can be called repeatedly to get the next token, a `{start,
-end, type, value}` object (with added `loc` property when the
-`locations` option is enabled and `range` property when the `ranges`
-option is enabled). When the token's type is `tokTypes.eof`, you
-should stop calling the method, since it will keep returning that same
-token forever.
-
-In ES6 environment, returned result can be used as any other
-protocol-compliant iterable:
-
-```javascript
-for (let token of acorn.tokenizer(str)) {
-  // iterate over the tokens
-}
-
-// transform code to array of tokens:
-var tokens = [...acorn.tokenizer(str)];
-```
-
-**tokTypes** holds an object mapping names to the token type objects
-that end up in the `type` properties of tokens.
-
-**getLineInfo**`(input, offset)` can be used to get a `{line,
-column}` object for a given program string and offset.
-
-### The `Parser` class
-
-Instances of the **`Parser`** class contain all the state and logic
-that drives a parse. It has static methods `parse`,
-`parseExpressionAt`, and `tokenizer` that match the top-level
-functions by the same name.
-
-When extending the parser with plugins, you need to call these methods
-on the extended version of the class. To extend a parser with plugins,
-you can use its static `extend` method.
-
-```javascript
-var acorn = require("acorn");
-var jsx = require("acorn-jsx");
-var JSXParser = acorn.Parser.extend(jsx());
-JSXParser.parse("foo(<bar/>)");
-```
-
-The `extend` method takes any number of plugin values, and returns a
-new `Parser` class that includes the extra parser logic provided by
-the plugins.
-
-## Command line interface
-
-The `bin/acorn` utility can be used to parse a file from the command
-line. It accepts as arguments its input file and the following
-options:
-
-- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version
-  to parse. Default is version 9.
-
-- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise.
-
-- `--locations`: Attaches a "loc" object to each node with "start" and
-  "end" subobjects, each of which contains the one-based line and
-  zero-based column numbers in `{line, column}` form.
-
-- `--allow-hash-bang`: If the code starts with the characters #! (as
-  in a shellscript), the first line will be treated as a comment.
-
-- `--compact`: No whitespace is used in the AST output.
-
-- `--silent`: Do not output the AST, just return the exit status.
-
-- `--help`: Print the usage information and quit.
-
-The utility spits out the syntax tree as JSON data.
-
-## Existing plugins
-
- - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
- 
-Plugins for ECMAScript proposals:
- 
- - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling:
-   - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields)
-   - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta)
-   - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n

+ 0 - 4
zbytb/node_modules/acorn-globals/node_modules/acorn/bin/acorn

@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-
-require('../dist/bin.js');

+ 0 - 35
zbytb/node_modules/acorn-globals/node_modules/acorn/package.json

@@ -1,35 +0,0 @@
-{
-  "name": "acorn",
-  "description": "ECMAScript parser",
-  "homepage": "https://github.com/acornjs/acorn",
-  "main": "dist/acorn.js",
-  "types": "dist/acorn.d.ts",
-  "module": "dist/acorn.mjs",
-  "version": "7.4.1",
-  "engines": {"node": ">=0.4.0"},
-  "maintainers": [
-    {
-      "name": "Marijn Haverbeke",
-      "email": "marijnh@gmail.com",
-      "web": "https://marijnhaverbeke.nl"
-    },
-    {
-      "name": "Ingvar Stepanyan",
-      "email": "me@rreverser.com",
-      "web": "https://rreverser.com/"
-    },
-    {
-      "name": "Adrian Heine",
-      "web": "http://adrianheine.de"
-    }
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/acornjs/acorn.git"
-  },
-  "license": "MIT",
-  "scripts": {
-    "prepare": "cd ..; npm run build:main && npm run build:bin"
-  },
-  "bin": {"acorn": "./bin/acorn"}
-}

+ 0 - 35
zbytb/node_modules/acorn-globals/package.json

@@ -1,35 +0,0 @@
-{
-  "name": "acorn-globals",
-  "version": "6.0.0",
-  "description": "Detect global variables in JavaScript using acorn",
-  "keywords": [
-    "ast",
-    "variable",
-    "name",
-    "lexical",
-    "scope",
-    "local",
-    "global",
-    "implicit"
-  ],
-  "files": [
-    "index.js",
-    "LICENSE"
-  ],
-  "dependencies": {
-    "acorn": "^7.1.1",
-    "acorn-walk": "^7.1.1"
-  },
-  "devDependencies": {
-    "testit": "^3.1.0"
-  },
-  "scripts": {
-    "test": "node test"
-  },
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/ForbesLindesay/acorn-globals.git"
-  },
-  "author": "ForbesLindesay",
-  "license": "MIT"
-}

+ 0 - 131
zbytb/node_modules/acorn-walk/CHANGELOG.md

@@ -1,131 +0,0 @@
-## 7.2.0 (2020-06-17)
-
-### New features
-
-Support optional chaining and nullish coalescing.
-
-Support `import.meta`.
-
-Add support for `export * as ns from "source"`.
-
-## 7.1.1 (2020-02-13)
-
-### Bug fixes
-
-Clean up the type definitions to actually work well with the main parser.
-
-## 7.1.0 (2020-02-11)
-
-### New features
-
-Add a TypeScript definition file for the library.
-
-## 7.0.0 (2017-08-12)
-
-### New features
-
-Support walking `ImportExpression` nodes.
-
-## 6.2.0 (2017-07-04)
-
-### New features
-
-Add support for `Import` nodes.
-
-## 6.1.0 (2018-09-28)
-
-### New features
-
-The walker now walks `TemplateElement` nodes.
-
-## 6.0.1 (2018-09-14)
-
-### Bug fixes
-
-Fix bad "main" field in package.json.
-
-## 6.0.0 (2018-09-14)
-
-### Breaking changes
-
-This is now a separate package, `acorn-walk`, rather than part of the main `acorn` package.
-
-The `ScopeBody` and `ScopeExpression` meta-node-types are no longer supported.
-
-## 5.7.1 (2018-06-15)
-
-### Bug fixes
-
-Make sure the walker and bin files are rebuilt on release (the previous release didn't get the up-to-date versions).
-
-## 5.7.0 (2018-06-15)
-
-### Bug fixes
-
-Fix crash in walker when walking a binding-less catch node.
-
-## 5.6.2 (2018-06-05)
-
-### Bug fixes
-
-In the walker, go back to allowing the `baseVisitor` argument to be null to default to the default base everywhere.
-
-## 5.6.1 (2018-06-01)
-
-### Bug fixes
-
-Fix regression when passing `null` as fourth argument to `walk.recursive`.
-
-## 5.6.0 (2018-05-31)
-
-### Bug fixes
-
-Fix a bug in the walker that caused a crash when walking an object pattern spread.
-
-## 5.5.1 (2018-03-06)
-
-### Bug fixes
-
-Fix regression in walker causing property values in object patterns to be walked as expressions.
-
-## 5.5.0 (2018-02-27)
-
-### Bug fixes
-
-Support object spread in the AST walker.
-
-## 5.4.1 (2018-02-02)
-
-### Bug fixes
-
-5.4.0 somehow accidentally included an old version of walk.js.
-
-## 5.2.0 (2017-10-30)
-
-### Bug fixes
-
-The `full` and `fullAncestor` walkers no longer visit nodes multiple times.
-
-## 5.1.0 (2017-07-05)
-
-### New features
-
-New walker functions `full` and `fullAncestor`.
-
-## 3.2.0 (2016-06-07)
-
-### New features
-
-Make it possible to use `visit.ancestor` with a walk state.
-
-## 3.1.0 (2016-04-18)
-
-### New features
-
-The walker now allows defining handlers for `CatchClause` nodes.
-
-## 2.5.2 (2015-10-27)
-
-### Fixes
-
-Fix bug where the walker walked an exported `let` statement as an expression.

+ 0 - 19
zbytb/node_modules/acorn-walk/LICENSE

@@ -1,19 +0,0 @@
-Copyright (C) 2012-2018 by various contributors (see AUTHORS)
-
-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.

+ 0 - 126
zbytb/node_modules/acorn-walk/README.md

@@ -1,126 +0,0 @@
-# Acorn AST walker
-
-An abstract syntax tree walker for the
-[ESTree](https://github.com/estree/estree) format.
-
-## Community
-
-Acorn is open source software released under an
-[MIT license](https://github.com/acornjs/acorn/blob/master/acorn-walk/LICENSE).
-
-You are welcome to
-[report bugs](https://github.com/acornjs/acorn/issues) or create pull
-requests on [github](https://github.com/acornjs/acorn). For questions
-and discussion, please use the
-[Tern discussion forum](https://discuss.ternjs.net).
-
-## Installation
-
-The easiest way to install acorn is from [`npm`](https://www.npmjs.com/):
-
-```sh
-npm install acorn-walk
-```
-
-Alternately, you can download the source and build acorn yourself:
-
-```sh
-git clone https://github.com/acornjs/acorn.git
-cd acorn
-npm install
-```
-
-## Interface
-
-An algorithm for recursing through a syntax tree is stored as an
-object, with a property for each tree node type holding a function
-that will recurse through such a node. There are several ways to run
-such a walker.
-
-**simple**`(node, visitors, base, state)` does a 'simple' walk over a
-tree. `node` should be the AST node to walk, and `visitors` an object
-with properties whose names correspond to node types in the [ESTree
-spec](https://github.com/estree/estree). The properties should contain
-functions that will be called with the node object and, if applicable
-the state at that point. The last two arguments are optional. `base`
-is a walker algorithm, and `state` is a start state. The default
-walker will simply visit all statements and expressions and not
-produce a meaningful state. (An example of a use of state is to track
-scope at each point in the tree.)
-
-```js
-const acorn = require("acorn")
-const walk = require("acorn-walk")
-
-walk.simple(acorn.parse("let x = 10"), {
-  Literal(node) {
-    console.log(`Found a literal: ${node.value}`)
-  }
-})
-```
-
-**ancestor**`(node, visitors, base, state)` does a 'simple' walk over
-a tree, building up an array of ancestor nodes (including the current node)
-and passing the array to the callbacks as a third parameter.
-
-```js
-const acorn = require("acorn")
-const walk = require("acorn-walk")
-
-walk.ancestor(acorn.parse("foo('hi')"), {
-  Literal(_, ancestors) {
-    console.log("This literal's ancestors are:", ancestors.map(n => n.type))
-  }
-})
-```
-
-**recursive**`(node, state, functions, base)` does a 'recursive'
-walk, where the walker functions are responsible for continuing the
-walk on the child nodes of their target node. `state` is the start
-state, and `functions` should contain an object that maps node types
-to walker functions. Such functions are called with `(node, state, c)`
-arguments, and can cause the walk to continue on a sub-node by calling
-the `c` argument on it with `(node, state)` arguments. The optional
-`base` argument provides the fallback walker functions for node types
-that aren't handled in the `functions` object. If not given, the
-default walkers will be used.
-
-**make**`(functions, base)` builds a new walker object by using the
-walker functions in `functions` and filling in the missing ones by
-taking defaults from `base`.
-
-**full**`(node, callback, base, state)` does a 'full' walk over a
-tree, calling the callback with the arguments (node, state, type) for
-each node
-
-**fullAncestor**`(node, callback, base, state)` does a 'full' walk
-over a tree, building up an array of ancestor nodes (including the
-current node) and passing the array to the callbacks as a third
-parameter.
-
-```js
-const acorn = require("acorn")
-const walk = require("acorn-walk")
-
-walk.full(acorn.parse("1 + 1"), node => {
-  console.log(`There's a ${node.type} node at ${node.ch}`)
-})
-```
-
-**findNodeAt**`(node, start, end, test, base, state)` tries to locate
-a node in a tree at the given start and/or end offsets, which
-satisfies the predicate `test`. `start` and `end` can be either `null`
-(as wildcard) or a number. `test` may be a string (indicating a node
-type) or a function that takes `(nodeType, node)` arguments and
-returns a boolean indicating whether this node is interesting. `base`
-and `state` are optional, and can be used to specify a custom walker.
-Nodes are tested from inner to outer, so if two nodes match the
-boundaries, the inner one will be preferred.
-
-**findNodeAround**`(node, pos, test, base, state)` is a lot like
-`findNodeAt`, but will match any node that exists 'around' (spanning)
-the given position.
-
-**findNodeAfter**`(node, pos, test, base, state)` is similar to
-`findNodeAround`, but will match all nodes *after* the given position
-(testing outer nodes before inner nodes).

+ 0 - 34
zbytb/node_modules/acorn-walk/package.json

@@ -1,34 +0,0 @@
-{
-  "name": "acorn-walk",
-  "description": "ECMAScript (ESTree) AST walker",
-  "homepage": "https://github.com/acornjs/acorn",
-  "main": "dist/walk.js",
-  "types": "dist/walk.d.ts",
-  "module": "dist/walk.mjs",
-  "version": "7.2.0",
-  "engines": {"node": ">=0.4.0"},
-  "maintainers": [
-    {
-      "name": "Marijn Haverbeke",
-      "email": "marijnh@gmail.com",
-      "web": "https://marijnhaverbeke.nl"
-    },
-    {
-      "name": "Ingvar Stepanyan",
-      "email": "me@rreverser.com",
-      "web": "https://rreverser.com/"
-    },
-    {
-      "name": "Adrian Heine",
-      "web": "http://adrianheine.de"
-    }
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/acornjs/acorn.git"
-  },
-  "scripts": {
-    "prepare": "cd ..; npm run build:walk"
-  },
-  "license": "MIT"
-}

+ 0 - 788
zbytb/node_modules/acorn/CHANGELOG.md

@@ -1,788 +0,0 @@
-## 8.7.0 (2021-12-27)
-
-### New features
-
-Support quoted export names.
-
-Upgrade to Unicode 14.
-
-Add support for Unicode 13 properties in regular expressions.
-
-### Bug fixes
-
-Use a loop to find line breaks, because the existing regexp search would overrun the end of the searched range and waste a lot of time in minified code.
-
-## 8.6.0 (2021-11-18)
-
-### Bug fixes
-
-Fix a bug where an object literal with multiple `__proto__` properties would incorrectly be accepted if a later property value held an assigment.
-
-### New features
-
-Support class private fields with the `in` operator.
-
-## 8.5.0 (2021-09-06)
-
-### Bug fixes
-
-Improve context-dependent tokenization in a number of corner cases.
-
-Fix location tracking after a 0x2028 or 0x2029 character in a string literal (which before did not increase the line number).
-
-Fix an issue where arrow function bodies in for loop context would inappropriately consume `in` operators.
-
-Fix wrong end locations stored on SequenceExpression nodes.
-
-Implement restriction that `for`/`of` loop LHS can't start with `let`.
-
-### New features
-
-Add support for ES2022 class static blocks.
-
-Allow multiple input files to be passed to the CLI tool.
-
-## 8.4.1 (2021-06-24)
-
-### Bug fixes
-
-Fix a bug where `allowAwaitOutsideFunction` would allow `await` in class field initializers, and setting `ecmaVersion` to 13 or higher would allow top-level await in non-module sources.
-
-## 8.4.0 (2021-06-11)
-
-### New features
-
-A new option, `allowSuperOutsideMethod`, can be used to suppress the error when `super` is used in the wrong context.
-
-## 8.3.0 (2021-05-31)
-
-### New features
-
-Default `allowAwaitOutsideFunction` to true for ECMAScript 2022 an higher.
-
-Add support for the `d` ([indices](https://github.com/tc39/proposal-regexp-match-indices)) regexp flag.
-
-## 8.2.4 (2021-05-04)
-
-### Bug fixes
-
-Fix spec conformity in corner case 'for await (async of ...)'.
-
-## 8.2.3 (2021-05-04)
-
-### Bug fixes
-
-Fix an issue where the library couldn't parse 'for (async of ...)'.
-
-Fix a bug in UTF-16 decoding that would read characters incorrectly in some circumstances.
-
-## 8.2.2 (2021-04-29)
-
-### Bug fixes
-
-Fix a bug where a class field initialized to an async arrow function wouldn't allow await inside it. Same issue existed for generator arrow functions with yield.
-
-## 8.2.1 (2021-04-24)
-
-### Bug fixes
-
-Fix a regression introduced in 8.2.0 where static or async class methods with keyword names fail to parse.
-
-## 8.2.0 (2021-04-24)
-
-### New features
-
-Add support for ES2022 class fields and private methods.
-
-## 8.1.1 (2021-04-12)
-
-### Various
-
-Stop shipping source maps in the NPM package.
-
-## 8.1.0 (2021-03-09)
-
-### Bug fixes
-
-Fix a spurious error in nested destructuring arrays.
-
-### New features
-
-Expose `allowAwaitOutsideFunction` in CLI interface.
-
-Make `allowImportExportAnywhere` also apply to `import.meta`.
-
-## 8.0.5 (2021-01-25)
-
-### Bug fixes
-
-Adjust package.json to work with Node 12.16.0 and 13.0-13.6.
-
-## 8.0.4 (2020-10-05)
-
-### Bug fixes
-
-Make `await x ** y` an error, following the spec.
-
-Fix potentially exponential regular expression.
-
-## 8.0.3 (2020-10-02)
-
-### Bug fixes
-
-Fix a wasteful loop during `Parser` creation when setting `ecmaVersion` to `"latest"`.
-
-## 8.0.2 (2020-09-30)
-
-### Bug fixes
-
-Make the TypeScript types reflect the current allowed values for `ecmaVersion`.
-
-Fix another regexp/division tokenizer issue.
-
-## 8.0.1 (2020-08-12)
-
-### Bug fixes
-
-Provide the correct value in the `version` export.
-
-## 8.0.0 (2020-08-12)
-
-### Bug fixes
-
-Disallow expressions like `(a = b) = c`.
-
-Make non-octal escape sequences a syntax error in strict mode.
-
-### New features
-
-The package can now be loaded directly as an ECMAScript module in node 13+.
-
-Update to the set of Unicode properties from ES2021.
-
-### Breaking changes
-
-The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release.
-
-Some changes to method signatures that may be used by plugins.
-
-## 7.4.0 (2020-08-03)
-
-### New features
-
-Add support for logical assignment operators.
-
-Add support for numeric separators.
-
-## 7.3.1 (2020-06-11)
-
-### Bug fixes
-
-Make the string in the `version` export match the actual library version.
-
-## 7.3.0 (2020-06-11)
-
-### Bug fixes
-
-Fix a bug that caused parsing of object patterns with a property named `set` that had a default value to fail.
-
-### New features
-
-Add support for optional chaining (`?.`).
-
-## 7.2.0 (2020-05-09)
-
-### Bug fixes
-
-Fix precedence issue in parsing of async arrow functions.
-
-### New features
-
-Add support for nullish coalescing.
-
-Add support for `import.meta`.
-
-Support `export * as ...` syntax.
-
-Upgrade to Unicode 13.
-
-## 6.4.1 (2020-03-09)
-
-### Bug fixes
-
-More carefully check for valid UTF16 surrogate pairs in regexp validator.
-
-## 7.1.1 (2020-03-01)
-
-### Bug fixes
-
-Treat `\8` and `\9` as invalid escapes in template strings.
-
-Allow unicode escapes in property names that are keywords.
-
-Don't error on an exponential operator expression as argument to `await`.
-
-More carefully check for valid UTF16 surrogate pairs in regexp validator.
-
-## 7.1.0 (2019-09-24)
-
-### Bug fixes
-
-Disallow trailing object literal commas when ecmaVersion is less than 5.
-
-### New features
-
-Add a static `acorn` property to the `Parser` class that contains the entire module interface, to allow plugins to access the instance of the library that they are acting on.
-
-## 7.0.0 (2019-08-13)
-
-### Breaking changes
-
-Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression).
-
-Makes 10 (ES2019) the default value for the `ecmaVersion` option.
-
-## 6.3.0 (2019-08-12)
-
-### New features
-
-`sourceType: "module"` can now be used even when `ecmaVersion` is less than 6, to parse module-style code that otherwise conforms to an older standard.
-
-## 6.2.1 (2019-07-21)
-
-### Bug fixes
-
-Fix bug causing Acorn to treat some characters as identifier characters that shouldn't be treated as such.
-
-Fix issue where setting the `allowReserved` option to `"never"` allowed reserved words in some circumstances.
-
-## 6.2.0 (2019-07-04)
-
-### Bug fixes
-
-Improve valid assignment checking in `for`/`in` and `for`/`of` loops.
-
-Disallow binding `let` in patterns.
-
-### New features
-
-Support bigint syntax with `ecmaVersion` >= 11.
-
-Support dynamic `import` syntax with `ecmaVersion` >= 11.
-
-Upgrade to Unicode version 12.
-
-## 6.1.1 (2019-02-27)
-
-### Bug fixes
-
-Fix bug that caused parsing default exports of with names to fail.
-
-## 6.1.0 (2019-02-08)
-
-### Bug fixes
-
-Fix scope checking when redefining a `var` as a lexical binding.
-
-### New features
-
-Split up `parseSubscripts` to use an internal `parseSubscript` method to make it easier to extend with plugins.
-
-## 6.0.7 (2019-02-04)
-
-### Bug fixes
-
-Check that exported bindings are defined.
-
-Don't treat `\u180e` as a whitespace character.
-
-Check for duplicate parameter names in methods.
-
-Don't allow shorthand properties when they are generators or async methods.
-
-Forbid binding `await` in async arrow function's parameter list.
-
-## 6.0.6 (2019-01-30)
-
-### Bug fixes
-
-The content of class declarations and expressions is now always parsed in strict mode.
-
-Don't allow `let` or `const` to bind the variable name `let`.
-
-Treat class declarations as lexical.
-
-Don't allow a generator function declaration as the sole body of an `if` or `else`.
-
-Ignore `"use strict"` when after an empty statement.
-
-Allow string line continuations with special line terminator characters.
-
-Treat `for` bodies as part of the `for` scope when checking for conflicting bindings.
-
-Fix bug with parsing `yield` in a `for` loop initializer.
-
-Implement special cases around scope checking for functions.
-
-## 6.0.5 (2019-01-02)
-
-### Bug fixes
-
-Fix TypeScript type for `Parser.extend` and add `allowAwaitOutsideFunction` to options type.
-
-Don't treat `let` as a keyword when the next token is `{` on the next line.
-
-Fix bug that broke checking for parentheses around an object pattern in a destructuring assignment when `preserveParens` was on.
-
-## 6.0.4 (2018-11-05)
-
-### Bug fixes
-
-Further improvements to tokenizing regular expressions in corner cases.
-
-## 6.0.3 (2018-11-04)
-
-### Bug fixes
-
-Fix bug in tokenizing an expression-less return followed by a function followed by a regular expression.
-
-Remove stray symlink in the package tarball.
-
-## 6.0.2 (2018-09-26)
-
-### Bug fixes
-
-Fix bug where default expressions could fail to parse inside an object destructuring assignment expression.
-
-## 6.0.1 (2018-09-14)
-
-### Bug fixes
-
-Fix wrong value in `version` export.
-
-## 6.0.0 (2018-09-14)
-
-### Bug fixes
-
-Better handle variable-redefinition checks for catch bindings and functions directly under if statements.
-
-Forbid `new.target` in top-level arrow functions.
-
-Fix issue with parsing a regexp after `yield` in some contexts.
-
-### New features
-
-The package now comes with TypeScript definitions.
-
-### Breaking changes
-
-The default value of the `ecmaVersion` option is now 9 (2018).
-
-Plugins work differently, and will have to be rewritten to work with this version.
-
-The loose parser and walker have been moved into separate packages (`acorn-loose` and `acorn-walk`).
-
-## 5.7.3 (2018-09-10)
-
-### Bug fixes
-
-Fix failure to tokenize regexps after expressions like `x.of`.
-
-Better error message for unterminated template literals.
-
-## 5.7.2 (2018-08-24)
-
-### Bug fixes
-
-Properly handle `allowAwaitOutsideFunction` in for statements.
-
-Treat function declarations at the top level of modules like let bindings.
-
-Don't allow async function declarations as the only statement under a label.
-
-## 5.7.0 (2018-06-15)
-
-### New features
-
-Upgraded to Unicode 11.
-
-## 5.6.0 (2018-05-31)
-
-### New features
-
-Allow U+2028 and U+2029 in string when ECMAVersion >= 10.
-
-Allow binding-less catch statements when ECMAVersion >= 10.
-
-Add `allowAwaitOutsideFunction` option for parsing top-level `await`.
-
-## 5.5.3 (2018-03-08)
-
-### Bug fixes
-
-A _second_ republish of the code in 5.5.1, this time with yarn, to hopefully get valid timestamps.
-
-## 5.5.2 (2018-03-08)
-
-### Bug fixes
-
-A republish of the code in 5.5.1 in an attempt to solve an issue with the file timestamps in the npm package being 0.
-
-## 5.5.1 (2018-03-06)
-
-### Bug fixes
-
-Fix misleading error message for octal escapes in template strings.
-
-## 5.5.0 (2018-02-27)
-
-### New features
-
-The identifier character categorization is now based on Unicode version 10.
-
-Acorn will now validate the content of regular expressions, including new ES9 features.
-
-## 5.4.0 (2018-02-01)
-
-### Bug fixes
-
-Disallow duplicate or escaped flags on regular expressions.
-
-Disallow octal escapes in strings in strict mode.
-
-### New features
-
-Add support for async iteration.
-
-Add support for object spread and rest.
-
-## 5.3.0 (2017-12-28)
-
-### Bug fixes
-
-Fix parsing of floating point literals with leading zeroes in loose mode.
-
-Allow duplicate property names in object patterns.
-
-Don't allow static class methods named `prototype`.
-
-Disallow async functions directly under `if` or `else`.
-
-Parse right-hand-side of `for`/`of` as an assignment expression.
-
-Stricter parsing of `for`/`in`.
-
-Don't allow unicode escapes in contextual keywords.
-
-### New features
-
-Parsing class members was factored into smaller methods to allow plugins to hook into it.
-
-## 5.2.1 (2017-10-30)
-
-### Bug fixes
-
-Fix a token context corruption bug.
-
-## 5.2.0 (2017-10-30)
-
-### Bug fixes
-
-Fix token context tracking for `class` and `function` in property-name position.
-
-Make sure `%*` isn't parsed as a valid operator.
-
-Allow shorthand properties `get` and `set` to be followed by default values.
-
-Disallow `super` when not in callee or object position.
-
-### New features
-
-Support [`directive` property](https://github.com/estree/estree/compare/b3de58c9997504d6fba04b72f76e6dd1619ee4eb...1da8e603237144f44710360f8feb7a9977e905e0) on directive expression statements.
-
-## 5.1.2 (2017-09-04)
-
-### Bug fixes
-
-Disable parsing of legacy HTML-style comments in modules.
-
-Fix parsing of async methods whose names are keywords.
-
-## 5.1.1 (2017-07-06)
-
-### Bug fixes
-
-Fix problem with disambiguating regexp and division after a class.
-
-## 5.1.0 (2017-07-05)
-
-### Bug fixes
-
-Fix tokenizing of regexps in an object-desctructuring `for`/`of` loop and after `yield`.
-
-Parse zero-prefixed numbers with non-octal digits as decimal.
-
-Allow object/array patterns in rest parameters.
-
-Don't error when `yield` is used as a property name.
-
-Allow `async` as a shorthand object property.
-
-### New features
-
-Implement the [template literal revision proposal](https://github.com/tc39/proposal-template-literal-revision) for ES9.
-
-## 5.0.3 (2017-04-01)
-
-### Bug fixes
-
-Fix spurious duplicate variable definition errors for named functions.
-
-## 5.0.2 (2017-03-30)
-
-### Bug fixes
-
-A binary operator after a parenthesized arrow expression is no longer incorrectly treated as an error.
-
-## 5.0.0 (2017-03-28)
-
-### Bug fixes
-
-Raise an error for duplicated lexical bindings.
-
-Fix spurious error when an assignement expression occurred after a spread expression.
-
-Accept regular expressions after `of` (in `for`/`of`), `yield` (in a generator), and braced arrow functions.
-
-Allow labels in front or `var` declarations, even in strict mode.
-
-### Breaking changes
-
-Parse declarations following `export default` as declaration nodes, not expressions. This means that class and function declarations nodes can now have `null` as their `id`.
-
-## 4.0.11 (2017-02-07)
-
-### Bug fixes
-
-Allow all forms of member expressions to be parenthesized as lvalue.
-
-## 4.0.10 (2017-02-07)
-
-### Bug fixes
-
-Don't expect semicolons after default-exported functions or classes, even when they are expressions.
-
-Check for use of `'use strict'` directives in non-simple parameter functions, even when already in strict mode.
-
-## 4.0.9 (2017-02-06)
-
-### Bug fixes
-
-Fix incorrect error raised for parenthesized simple assignment targets, so that `(x) = 1` parses again.
-
-## 4.0.8 (2017-02-03)
-
-### Bug fixes
-
-Solve spurious parenthesized pattern errors by temporarily erring on the side of accepting programs that our delayed errors don't handle correctly yet.
-
-## 4.0.7 (2017-02-02)
-
-### Bug fixes
-
-Accept invalidly rejected code like `(x).y = 2` again.
-
-Don't raise an error when a function _inside_ strict code has a non-simple parameter list.
-
-## 4.0.6 (2017-02-02)
-
-### Bug fixes
-
-Fix exponential behavior (manifesting itself as a complete hang for even relatively small source files) introduced by the new 'use strict' check.
-
-## 4.0.5 (2017-02-02)
-
-### Bug fixes
-
-Disallow parenthesized pattern expressions.
-
-Allow keywords as export names.
-
-Don't allow the `async` keyword to be parenthesized.
-
-Properly raise an error when a keyword contains a character escape.
-
-Allow `"use strict"` to appear after other string literal expressions.
-
-Disallow labeled declarations.
-
-## 4.0.4 (2016-12-19)
-
-### Bug fixes
-
-Fix crash when `export` was followed by a keyword that can't be
-exported.
-
-## 4.0.3 (2016-08-16)
-
-### Bug fixes
-
-Allow regular function declarations inside single-statement `if` branches in loose mode. Forbid them entirely in strict mode.
-
-Properly parse properties named `async` in ES2017 mode.
-
-Fix bug where reserved words were broken in ES2017 mode.
-
-## 4.0.2 (2016-08-11)
-
-### Bug fixes
-
-Don't ignore period or 'e' characters after octal numbers.
-
-Fix broken parsing for call expressions in default parameter values of arrow functions.
-
-## 4.0.1 (2016-08-08)
-
-### Bug fixes
-
-Fix false positives in duplicated export name errors.
-
-## 4.0.0 (2016-08-07)
-
-### Breaking changes
-
-The default `ecmaVersion` option value is now 7.
-
-A number of internal method signatures changed, so plugins might need to be updated.
-
-### Bug fixes
-
-The parser now raises errors on duplicated export names.
-
-`arguments` and `eval` can now be used in shorthand properties.
-
-Duplicate parameter names in non-simple argument lists now always produce an error.
-
-### New features
-
-The `ecmaVersion` option now also accepts year-style version numbers
-(2015, etc).
-
-Support for `async`/`await` syntax when `ecmaVersion` is >= 8.
-
-Support for trailing commas in call expressions when `ecmaVersion` is >= 8.
-
-## 3.3.0 (2016-07-25)
-
-### Bug fixes
-
-Fix bug in tokenizing of regexp operator after a function declaration.
-
-Fix parser crash when parsing an array pattern with a hole.
-
-### New features
-
-Implement check against complex argument lists in functions that enable strict mode in ES7.
-
-## 3.2.0 (2016-06-07)
-
-### Bug fixes
-
-Improve handling of lack of unicode regexp support in host
-environment.
-
-Properly reject shorthand properties whose name is a keyword.
-
-### New features
-
-Visitors created with `visit.make` now have their base as _prototype_, rather than copying properties into a fresh object.
-
-## 3.1.0 (2016-04-18)
-
-### Bug fixes
-
-Properly tokenize the division operator directly after a function expression.
-
-Allow trailing comma in destructuring arrays.
-
-## 3.0.4 (2016-02-25)
-
-### Fixes
-
-Allow update expressions as left-hand-side of the ES7 exponential operator.
-
-## 3.0.2 (2016-02-10)
-
-### Fixes
-
-Fix bug that accidentally made `undefined` a reserved word when parsing ES7.
-
-## 3.0.0 (2016-02-10)
-
-### Breaking changes
-
-The default value of the `ecmaVersion` option is now 6 (used to be 5).
-
-Support for comprehension syntax (which was dropped from the draft spec) has been removed.
-
-### Fixes
-
-`let` and `yield` are now “contextual keywords”, meaning you can mostly use them as identifiers in ES5 non-strict code.
-
-A parenthesized class or function expression after `export default` is now parsed correctly.
-
-### New features
-
-When `ecmaVersion` is set to 7, Acorn will parse the exponentiation operator (`**`).
-
-The identifier character ranges are now based on Unicode 8.0.0.
-
-Plugins can now override the `raiseRecoverable` method to override the way non-critical errors are handled.
-
-## 2.7.0 (2016-01-04)
-
-### Fixes
-
-Stop allowing rest parameters in setters.
-
-Disallow `y` rexexp flag in ES5.
-
-Disallow `\00` and `\000` escapes in strict mode.
-
-Raise an error when an import name is a reserved word.
-
-## 2.6.2 (2015-11-10)
-
-### Fixes
-
-Don't crash when no options object is passed.
-
-## 2.6.0 (2015-11-09)
-
-### Fixes
-
-Add `await` as a reserved word in module sources.
-
-Disallow `yield` in a parameter default value for a generator.
-
-Forbid using a comma after a rest pattern in an array destructuring.
-
-### New features
-
-Support parsing stdin in command-line tool.
-
-## 2.5.0 (2015-10-27)
-
-### Fixes
-
-Fix tokenizer support in the command-line tool.
-
-Stop allowing `new.target` outside of functions.
-
-Remove legacy `guard` and `guardedHandler` properties from try nodes.
-
-Stop allowing multiple `__proto__` properties on an object literal in strict mode.
-
-Don't allow rest parameters to be non-identifier patterns.
-
-Check for duplicate paramter names in arrow functions.

+ 0 - 21
zbytb/node_modules/acorn/LICENSE

@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (C) 2012-2020 by various contributors (see AUTHORS)
-
-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.

+ 0 - 280
zbytb/node_modules/acorn/README.md

@@ -1,280 +0,0 @@
-# Acorn
-
-A tiny, fast JavaScript parser written in JavaScript.
-
-## Community
-
-Acorn is open source software released under an
-[MIT license](https://github.com/acornjs/acorn/blob/master/acorn/LICENSE).
-
-You are welcome to
-[report bugs](https://github.com/acornjs/acorn/issues) or create pull
-requests on [github](https://github.com/acornjs/acorn). For questions
-and discussion, please use the
-[Tern discussion forum](https://discuss.ternjs.net).
-
-## Installation
-
-The easiest way to install acorn is from [`npm`](https://www.npmjs.com/):
-
-```sh
-npm install acorn
-```
-
-Alternately, you can download the source and build acorn yourself:
-
-```sh
-git clone https://github.com/acornjs/acorn.git
-cd acorn
-npm install
-```
-
-## Interface
-
-**parse**`(input, options)` is the main interface to the library. The
-`input` parameter is a string, `options` must be an object setting
-some of the options listed below. The return value will be an abstract
-syntax tree object as specified by the [ESTree
-spec](https://github.com/estree/estree).
-
-```javascript
-let acorn = require("acorn");
-console.log(acorn.parse("1 + 1", {ecmaVersion: 2020}));
-```
-
-When encountering a syntax error, the parser will raise a
-`SyntaxError` object with a meaningful message. The error object will
-have a `pos` property that indicates the string offset at which the
-error occurred, and a `loc` object that contains a `{line, column}`
-object referring to that same position.
-
-Options are provided by in a second argument, which should be an
-object containing any of these fields (only `ecmaVersion` is
-required):
-
-- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
-  either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
-  11 (2020), 12 (2021), 13 (2022, partial support)
-  or `"latest"` (the latest the library supports). This influences
-  support for strict mode, the set of reserved words, and support
-  for new syntax features.
-
-  **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
-  implemented by Acorn. Other proposed new features must be
-  implemented through plugins.
-
-- **sourceType**: Indicate the mode the code should be parsed in. Can be
-  either `"script"` or `"module"`. This influences global strict mode
-  and parsing of `import` and `export` declarations.
-
-  **NOTE**: If set to `"module"`, then static `import` / `export` syntax
-  will be valid, even if `ecmaVersion` is less than 6.
-
-- **onInsertedSemicolon**: If given a callback, that callback will be
-  called whenever a missing semicolon is inserted by the parser. The
-  callback will be given the character offset of the point where the
-  semicolon is inserted as argument, and if `locations` is on, also a
-  `{line, column}` object representing this position.
-
-- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
-  commas.
-
-- **allowReserved**: If `false`, using a reserved word will generate
-  an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher
-  versions. When given the value `"never"`, reserved words and
-  keywords can also not be used as property names (as in Internet
-  Explorer's old parser).
-
-- **allowReturnOutsideFunction**: By default, a return statement at
-  the top level raises an error. Set this to `true` to accept such
-  code.
-
-- **allowImportExportEverywhere**: By default, `import` and `export`
-  declarations can only appear at a program's top level. Setting this
-  option to `true` allows them anywhere where a statement is allowed,
-  and also allows `import.meta` expressions to appear in scripts
-  (when `sourceType` is not `"module"`).
-
-- **allowAwaitOutsideFunction**: If `false`, `await` expressions can
-  only appear inside `async` functions. Defaults to `true` for
-  `ecmaVersion` 2022 and later, `false` for lower versions. Setting this option to
-  `true` allows to have top-level `await` expressions. They are
-  still not allowed in non-`async` functions, though.
-
-- **allowSuperOutsideMethod**: By default, `super` outside a method
-  raises an error. Set this to `true` to accept such code.
-
-- **allowHashBang**: When this is enabled (off by default), if the
-  code starts with the characters `#!` (as in a shellscript), the
-  first line will be treated as a comment.
-
-- **locations**: When `true`, each node has a `loc` object attached
-  with `start` and `end` subobjects, each of which contains the
-  one-based line and zero-based column numbers in `{line, column}`
-  form. Default is `false`.
-
-- **onToken**: If a function is passed for this option, each found
-  token will be passed in same format as tokens returned from
-  `tokenizer().getToken()`.
-
-  If array is passed, each found token is pushed to it.
-
-  Note that you are not allowed to call the parser from the
-  callback—that will corrupt its internal state.
-
-- **onComment**: If a function is passed for this option, whenever a
-  comment is encountered the function will be called with the
-  following parameters:
-
-  - `block`: `true` if the comment is a block comment, false if it
-    is a line comment.
-  - `text`: The content of the comment.
-  - `start`: Character offset of the start of the comment.
-  - `end`: Character offset of the end of the comment.
-
-  When the `locations` options is on, the `{line, column}` locations
-  of the comment’s start and end are passed as two additional
-  parameters.
-
-  If array is passed for this option, each found comment is pushed
-  to it as object in Esprima format:
-
-  ```javascript
-  {
-    "type": "Line" | "Block",
-    "value": "comment text",
-    "start": Number,
-    "end": Number,
-    // If `locations` option is on:
-    "loc": {
-      "start": {line: Number, column: Number}
-      "end": {line: Number, column: Number}
-    },
-    // If `ranges` option is on:
-    "range": [Number, Number]
-  }
-  ```
-
-  Note that you are not allowed to call the parser from the
-  callback—that will corrupt its internal state.
-
-- **ranges**: Nodes have their start and end characters offsets
-  recorded in `start` and `end` properties (directly on the node,
-  rather than the `loc` object, which holds line/column data. To also
-  add a
-  [semi-standardized](https://bugzilla.mozilla.org/show_bug.cgi?id=745678)
-  `range` property holding a `[start, end]` array with the same
-  numbers, set the `ranges` option to `true`.
-
-- **program**: It is possible to parse multiple files into a single
-  AST by passing the tree produced by parsing the first file as the
-  `program` option in subsequent parses. This will add the toplevel
-  forms of the parsed file to the "Program" (top) node of an existing
-  parse tree.
-
-- **sourceFile**: When the `locations` option is `true`, you can pass
-  this option to add a `source` attribute in every node’s `loc`
-  object. Note that the contents of this option are not examined or
-  processed in any way; you are free to use whatever format you
-  choose.
-
-- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
-  will be added (regardless of the `location` option) directly to the
-  nodes, rather than the `loc` object.
-
-- **preserveParens**: If this option is `true`, parenthesized expressions
-  are represented by (non-standard) `ParenthesizedExpression` nodes
-  that have a single `expression` property containing the expression
-  inside parentheses.
-
-**parseExpressionAt**`(input, offset, options)` will parse a single
-expression in a string, and return its AST. It will not complain if
-there is more of the string left after the expression.
-
-**tokenizer**`(input, options)` returns an object with a `getToken`
-method that can be called repeatedly to get the next token, a `{start,
-end, type, value}` object (with added `loc` property when the
-`locations` option is enabled and `range` property when the `ranges`
-option is enabled). When the token's type is `tokTypes.eof`, you
-should stop calling the method, since it will keep returning that same
-token forever.
-
-In ES6 environment, returned result can be used as any other
-protocol-compliant iterable:
-
-```javascript
-for (let token of acorn.tokenizer(str)) {
-  // iterate over the tokens
-}
-
-// transform code to array of tokens:
-var tokens = [...acorn.tokenizer(str)];
-```
-
-**tokTypes** holds an object mapping names to the token type objects
-that end up in the `type` properties of tokens.
-
-**getLineInfo**`(input, offset)` can be used to get a `{line,
-column}` object for a given program string and offset.
-
-### The `Parser` class
-
-Instances of the **`Parser`** class contain all the state and logic
-that drives a parse. It has static methods `parse`,
-`parseExpressionAt`, and `tokenizer` that match the top-level
-functions by the same name.
-
-When extending the parser with plugins, you need to call these methods
-on the extended version of the class. To extend a parser with plugins,
-you can use its static `extend` method.
-
-```javascript
-var acorn = require("acorn");
-var jsx = require("acorn-jsx");
-var JSXParser = acorn.Parser.extend(jsx());
-JSXParser.parse("foo(<bar/>)", {ecmaVersion: 2020});
-```
-
-The `extend` method takes any number of plugin values, and returns a
-new `Parser` class that includes the extra parser logic provided by
-the plugins.
-
-## Command line interface
-
-The `bin/acorn` utility can be used to parse a file from the command
-line. It accepts as arguments its input file and the following
-options:
-
-- `--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|--ecma10`: Sets the ECMAScript version
-  to parse. Default is version 9.
-
-- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise.
-
-- `--locations`: Attaches a "loc" object to each node with "start" and
-  "end" subobjects, each of which contains the one-based line and
-  zero-based column numbers in `{line, column}` form.
-
-- `--allow-hash-bang`: If the code starts with the characters #! (as
-  in a shellscript), the first line will be treated as a comment.
-
-- `--allow-await-outside-function`: Allows top-level `await` expressions.
-  See the `allowAwaitOutsideFunction` option for more information.
-
-- `--compact`: No whitespace is used in the AST output.
-
-- `--silent`: Do not output the AST, just return the exit status.
-
-- `--help`: Print the usage information and quit.
-
-The utility spits out the syntax tree as JSON data.
-
-## Existing plugins
-
- - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
- 
-Plugins for ECMAScript proposals:
- 
- - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling:
-   - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields)
-   - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta)
-   - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n

+ 0 - 4
zbytb/node_modules/acorn/bin/acorn

@@ -1,4 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-
-require('../dist/bin.js');

+ 0 - 46
zbytb/node_modules/acorn/package.json

@@ -1,46 +0,0 @@
-{
-  "name": "acorn",
-  "description": "ECMAScript parser",
-  "homepage": "https://github.com/acornjs/acorn",
-  "main": "dist/acorn.js",
-  "types": "dist/acorn.d.ts",
-  "module": "dist/acorn.mjs",
-  "exports": {
-    ".": [
-      {
-        "import": "./dist/acorn.mjs",
-        "require": "./dist/acorn.js",
-        "default": "./dist/acorn.js"
-      },
-      "./dist/acorn.js"
-    ],
-    "./package.json": "./package.json"
-  },
-  "version": "8.7.0",
-  "engines": {"node": ">=0.4.0"},
-  "maintainers": [
-    {
-      "name": "Marijn Haverbeke",
-      "email": "marijnh@gmail.com",
-      "web": "https://marijnhaverbeke.nl"
-    },
-    {
-      "name": "Ingvar Stepanyan",
-      "email": "me@rreverser.com",
-      "web": "https://rreverser.com/"
-    },
-    {
-      "name": "Adrian Heine",
-      "web": "http://adrianheine.de"
-    }
-  ],
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/acornjs/acorn.git"
-  },
-  "license": "MIT",
-  "scripts": {
-    "prepare": "cd ..; npm run build:main"
-  },
-  "bin": {"acorn": "./bin/acorn"}
-}

+ 0 - 145
zbytb/node_modules/agent-base/README.md

@@ -1,145 +0,0 @@
-agent-base
-==========
-### Turn a function into an [`http.Agent`][http.Agent] instance
-[![Build Status](https://github.com/TooTallNate/node-agent-base/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-agent-base/actions?workflow=Node+CI)
-
-This module provides an `http.Agent` generator. That is, you pass it an async
-callback function, and it returns a new `http.Agent` instance that will invoke the
-given callback function when sending outbound HTTP requests.
-
-#### Some subclasses:
-
-Here's some more interesting uses of `agent-base`.
-Send a pull request to list yours!
-
- * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
- * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints
- * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS
- * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
-
-
-Installation
-------------
-
-Install with `npm`:
-
-``` bash
-$ npm install agent-base
-```
-
-
-Example
--------
-
-Here's a minimal example that creates a new `net.Socket` connection to the server
-for every HTTP request (i.e. the equivalent of `agent: false` option):
-
-```js
-var net = require('net');
-var tls = require('tls');
-var url = require('url');
-var http = require('http');
-var agent = require('agent-base');
-
-var endpoint = 'http://nodejs.org/api/';
-var parsed = url.parse(endpoint);
-
-// This is the important part!
-parsed.agent = agent(function (req, opts) {
-  var socket;
-  // `secureEndpoint` is true when using the https module
-  if (opts.secureEndpoint) {
-    socket = tls.connect(opts);
-  } else {
-    socket = net.connect(opts);
-  }
-  return socket;
-});
-
-// Everything else works just like normal...
-http.get(parsed, function (res) {
-  console.log('"response" event!', res.headers);
-  res.pipe(process.stdout);
-});
-```
-
-Returning a Promise or using an `async` function is also supported:
-
-```js
-agent(async function (req, opts) {
-  await sleep(1000);
-  // etc…
-});
-```
-
-Return another `http.Agent` instance to "pass through" the responsibility
-for that HTTP request to that agent:
-
-```js
-agent(function (req, opts) {
-  return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
-});
-```
-
-
-API
----
-
-## Agent(Function callback[, Object options]) → [http.Agent][]
-
-Creates a base `http.Agent` that will execute the callback function `callback`
-for every HTTP request that it is used as the `agent` for. The callback function
-is responsible for creating a `stream.Duplex` instance of some kind that will be
-used as the underlying socket in the HTTP request.
-
-The `options` object accepts the following properties:
-
-  * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional).
-
-The callback function should have the following signature:
-
-### callback(http.ClientRequest req, Object options, Function cb) → undefined
-
-The ClientRequest `req` can be accessed to read request headers and
-and the path, etc. The `options` object contains the options passed
-to the `http.request()`/`https.request()` function call, and is formatted
-to be directly passed to `net.connect()`/`tls.connect()`, or however
-else you want a Socket to be created. Pass the created socket to
-the callback function `cb` once created, and the HTTP request will
-continue to proceed.
-
-If the `https` module is used to invoke the HTTP request, then the
-`secureEndpoint` property on `options` _will be set to `true`_.
-
-
-License
--------
-
-(The MIT License)
-
-Copyright (c) 2013 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent
-[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
-[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
-[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
-[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent

+ 0 - 64
zbytb/node_modules/agent-base/package.json

@@ -1,64 +0,0 @@
-{
-  "name": "agent-base",
-  "version": "6.0.2",
-  "description": "Turn a function into an `http.Agent` instance",
-  "main": "dist/src/index",
-  "typings": "dist/src/index",
-  "files": [
-    "dist/src",
-    "src"
-  ],
-  "scripts": {
-    "prebuild": "rimraf dist",
-    "build": "tsc",
-    "postbuild": "cpy --parents src test '!**/*.ts' dist",
-    "test": "mocha --reporter spec dist/test/*.js",
-    "test-lint": "eslint src --ext .js,.ts",
-    "prepublishOnly": "npm run build"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/TooTallNate/node-agent-base.git"
-  },
-  "keywords": [
-    "http",
-    "agent",
-    "base",
-    "barebones",
-    "https"
-  ],
-  "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
-  "license": "MIT",
-  "bugs": {
-    "url": "https://github.com/TooTallNate/node-agent-base/issues"
-  },
-  "dependencies": {
-    "debug": "4"
-  },
-  "devDependencies": {
-    "@types/debug": "4",
-    "@types/mocha": "^5.2.7",
-    "@types/node": "^14.0.20",
-    "@types/semver": "^7.1.0",
-    "@types/ws": "^6.0.3",
-    "@typescript-eslint/eslint-plugin": "1.6.0",
-    "@typescript-eslint/parser": "1.1.0",
-    "async-listen": "^1.2.0",
-    "cpy-cli": "^2.0.0",
-    "eslint": "5.16.0",
-    "eslint-config-airbnb": "17.1.0",
-    "eslint-config-prettier": "4.1.0",
-    "eslint-import-resolver-typescript": "1.1.1",
-    "eslint-plugin-import": "2.16.0",
-    "eslint-plugin-jsx-a11y": "6.2.1",
-    "eslint-plugin-react": "7.12.4",
-    "mocha": "^6.2.0",
-    "rimraf": "^3.0.0",
-    "semver": "^7.1.2",
-    "typescript": "^3.5.3",
-    "ws": "^3.0.0"
-  },
-  "engines": {
-    "node": ">= 6.0.0"
-  }
-}

+ 0 - 345
zbytb/node_modules/agent-base/src/index.ts

@@ -1,345 +0,0 @@
-import net from 'net';
-import http from 'http';
-import https from 'https';
-import { Duplex } from 'stream';
-import { EventEmitter } from 'events';
-import createDebug from 'debug';
-import promisify from './promisify';
-
-const debug = createDebug('agent-base');
-
-function isAgent(v: any): v is createAgent.AgentLike {
-	return Boolean(v) && typeof v.addRequest === 'function';
-}
-
-function isSecureEndpoint(): boolean {
-	const { stack } = new Error();
-	if (typeof stack !== 'string') return false;
-	return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1  || l.indexOf('node:https:') !== -1);
-}
-
-function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent;
-function createAgent(
-	callback: createAgent.AgentCallback,
-	opts?: createAgent.AgentOptions
-): createAgent.Agent;
-function createAgent(
-	callback?: createAgent.AgentCallback | createAgent.AgentOptions,
-	opts?: createAgent.AgentOptions
-) {
-	return new createAgent.Agent(callback, opts);
-}
-
-namespace createAgent {
-	export interface ClientRequest extends http.ClientRequest {
-		_last?: boolean;
-		_hadError?: boolean;
-		method: string;
-	}
-
-	export interface AgentRequestOptions {
-		host?: string;
-		path?: string;
-		// `port` on `http.RequestOptions` can be a string or undefined,
-		// but `net.TcpNetConnectOpts` expects only a number
-		port: number;
-	}
-
-	export interface HttpRequestOptions
-		extends AgentRequestOptions,
-			Omit<http.RequestOptions, keyof AgentRequestOptions> {
-		secureEndpoint: false;
-	}
-
-	export interface HttpsRequestOptions
-		extends AgentRequestOptions,
-			Omit<https.RequestOptions, keyof AgentRequestOptions> {
-		secureEndpoint: true;
-	}
-
-	export type RequestOptions = HttpRequestOptions | HttpsRequestOptions;
-
-	export type AgentLike = Pick<createAgent.Agent, 'addRequest'> | http.Agent;
-
-	export type AgentCallbackReturn = Duplex | AgentLike;
-
-	export type AgentCallbackCallback = (
-		err?: Error | null,
-		socket?: createAgent.AgentCallbackReturn
-	) => void;
-
-	export type AgentCallbackPromise = (
-		req: createAgent.ClientRequest,
-		opts: createAgent.RequestOptions
-	) =>
-		| createAgent.AgentCallbackReturn
-		| Promise<createAgent.AgentCallbackReturn>;
-
-	export type AgentCallback = typeof Agent.prototype.callback;
-
-	export type AgentOptions = {
-		timeout?: number;
-	};
-
-	/**
-	 * Base `http.Agent` implementation.
-	 * No pooling/keep-alive is implemented by default.
-	 *
-	 * @param {Function} callback
-	 * @api public
-	 */
-	export class Agent extends EventEmitter {
-		public timeout: number | null;
-		public maxFreeSockets: number;
-		public maxTotalSockets: number;
-		public maxSockets: number;
-		public sockets: {
-			[key: string]: net.Socket[];
-		};
-		public freeSockets: {
-			[key: string]: net.Socket[];
-		};
-		public requests: {
-			[key: string]: http.IncomingMessage[];
-		};
-		public options: https.AgentOptions;
-		private promisifiedCallback?: createAgent.AgentCallbackPromise;
-		private explicitDefaultPort?: number;
-		private explicitProtocol?: string;
-
-		constructor(
-			callback?: createAgent.AgentCallback | createAgent.AgentOptions,
-			_opts?: createAgent.AgentOptions
-		) {
-			super();
-
-			let opts = _opts;
-			if (typeof callback === 'function') {
-				this.callback = callback;
-			} else if (callback) {
-				opts = callback;
-			}
-
-			// Timeout for the socket to be returned from the callback
-			this.timeout = null;
-			if (opts && typeof opts.timeout === 'number') {
-				this.timeout = opts.timeout;
-			}
-
-			// These aren't actually used by `agent-base`, but are required
-			// for the TypeScript definition files in `@types/node` :/
-			this.maxFreeSockets = 1;
-			this.maxSockets = 1;
-			this.maxTotalSockets = Infinity;
-			this.sockets = {};
-			this.freeSockets = {};
-			this.requests = {};
-			this.options = {};
-		}
-
-		get defaultPort(): number {
-			if (typeof this.explicitDefaultPort === 'number') {
-				return this.explicitDefaultPort;
-			}
-			return isSecureEndpoint() ? 443 : 80;
-		}
-
-		set defaultPort(v: number) {
-			this.explicitDefaultPort = v;
-		}
-
-		get protocol(): string {
-			if (typeof this.explicitProtocol === 'string') {
-				return this.explicitProtocol;
-			}
-			return isSecureEndpoint() ? 'https:' : 'http:';
-		}
-
-		set protocol(v: string) {
-			this.explicitProtocol = v;
-		}
-
-		callback(
-			req: createAgent.ClientRequest,
-			opts: createAgent.RequestOptions,
-			fn: createAgent.AgentCallbackCallback
-		): void;
-		callback(
-			req: createAgent.ClientRequest,
-			opts: createAgent.RequestOptions
-		):
-			| createAgent.AgentCallbackReturn
-			| Promise<createAgent.AgentCallbackReturn>;
-		callback(
-			req: createAgent.ClientRequest,
-			opts: createAgent.AgentOptions,
-			fn?: createAgent.AgentCallbackCallback
-		):
-			| createAgent.AgentCallbackReturn
-			| Promise<createAgent.AgentCallbackReturn>
-			| void {
-			throw new Error(
-				'"agent-base" has no default implementation, you must subclass and override `callback()`'
-			);
-		}
-
-		/**
-		 * Called by node-core's "_http_client.js" module when creating
-		 * a new HTTP request with this Agent instance.
-		 *
-		 * @api public
-		 */
-		addRequest(req: ClientRequest, _opts: RequestOptions): void {
-			const opts: RequestOptions = { ..._opts };
-
-			if (typeof opts.secureEndpoint !== 'boolean') {
-				opts.secureEndpoint = isSecureEndpoint();
-			}
-
-			if (opts.host == null) {
-				opts.host = 'localhost';
-			}
-
-			if (opts.port == null) {
-				opts.port = opts.secureEndpoint ? 443 : 80;
-			}
-
-			if (opts.protocol == null) {
-				opts.protocol = opts.secureEndpoint ? 'https:' : 'http:';
-			}
-
-			if (opts.host && opts.path) {
-				// If both a `host` and `path` are specified then it's most
-				// likely the result of a `url.parse()` call... we need to
-				// remove the `path` portion so that `net.connect()` doesn't
-				// attempt to open that as a unix socket file.
-				delete opts.path;
-			}
-
-			delete opts.agent;
-			delete opts.hostname;
-			delete opts._defaultAgent;
-			delete opts.defaultPort;
-			delete opts.createConnection;
-
-			// Hint to use "Connection: close"
-			// XXX: non-documented `http` module API :(
-			req._last = true;
-			req.shouldKeepAlive = false;
-
-			let timedOut = false;
-			let timeoutId: ReturnType<typeof setTimeout> | null = null;
-			const timeoutMs = opts.timeout || this.timeout;
-
-			const onerror = (err: NodeJS.ErrnoException) => {
-				if (req._hadError) return;
-				req.emit('error', err);
-				// For Safety. Some additional errors might fire later on
-				// and we need to make sure we don't double-fire the error event.
-				req._hadError = true;
-			};
-
-			const ontimeout = () => {
-				timeoutId = null;
-				timedOut = true;
-				const err: NodeJS.ErrnoException = new Error(
-					`A "socket" was not created for HTTP request before ${timeoutMs}ms`
-				);
-				err.code = 'ETIMEOUT';
-				onerror(err);
-			};
-
-			const callbackError = (err: NodeJS.ErrnoException) => {
-				if (timedOut) return;
-				if (timeoutId !== null) {
-					clearTimeout(timeoutId);
-					timeoutId = null;
-				}
-				onerror(err);
-			};
-
-			const onsocket = (socket: AgentCallbackReturn) => {
-				if (timedOut) return;
-				if (timeoutId != null) {
-					clearTimeout(timeoutId);
-					timeoutId = null;
-				}
-
-				if (isAgent(socket)) {
-					// `socket` is actually an `http.Agent` instance, so
-					// relinquish responsibility for this `req` to the Agent
-					// from here on
-					debug(
-						'Callback returned another Agent instance %o',
-						socket.constructor.name
-					);
-					(socket as createAgent.Agent).addRequest(req, opts);
-					return;
-				}
-
-				if (socket) {
-					socket.once('free', () => {
-						this.freeSocket(socket as net.Socket, opts);
-					});
-					req.onSocket(socket as net.Socket);
-					return;
-				}
-
-				const err = new Error(
-					`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
-				);
-				onerror(err);
-			};
-
-			if (typeof this.callback !== 'function') {
-				onerror(new Error('`callback` is not defined'));
-				return;
-			}
-
-			if (!this.promisifiedCallback) {
-				if (this.callback.length >= 3) {
-					debug('Converting legacy callback function to promise');
-					this.promisifiedCallback = promisify(this.callback);
-				} else {
-					this.promisifiedCallback = this.callback;
-				}
-			}
-
-			if (typeof timeoutMs === 'number' && timeoutMs > 0) {
-				timeoutId = setTimeout(ontimeout, timeoutMs);
-			}
-
-			if ('port' in opts && typeof opts.port !== 'number') {
-				opts.port = Number(opts.port);
-			}
-
-			try {
-				debug(
-					'Resolving socket for %o request: %o',
-					opts.protocol,
-					`${req.method} ${req.path}`
-				);
-				Promise.resolve(this.promisifiedCallback(req, opts)).then(
-					onsocket,
-					callbackError
-				);
-			} catch (err) {
-				Promise.reject(err).catch(callbackError);
-			}
-		}
-
-		freeSocket(socket: net.Socket, opts: AgentOptions) {
-			debug('Freeing socket %o %o', socket.constructor.name, opts);
-			socket.destroy();
-		}
-
-		destroy() {
-			debug('Destroying agent %o', this.constructor.name);
-		}
-	}
-
-	// So that `instanceof` works correctly
-	createAgent.prototype = createAgent.Agent.prototype;
-}
-
-export = createAgent;

+ 0 - 33
zbytb/node_modules/agent-base/src/promisify.ts

@@ -1,33 +0,0 @@
-import {
-	Agent,
-	ClientRequest,
-	RequestOptions,
-	AgentCallbackCallback,
-	AgentCallbackPromise,
-	AgentCallbackReturn
-} from './index';
-
-type LegacyCallback = (
-	req: ClientRequest,
-	opts: RequestOptions,
-	fn: AgentCallbackCallback
-) => void;
-
-export default function promisify(fn: LegacyCallback): AgentCallbackPromise {
-	return function(this: Agent, req: ClientRequest, opts: RequestOptions) {
-		return new Promise((resolve, reject) => {
-			fn.call(
-				this,
-				req,
-				opts,
-				(err: Error | null | undefined, rtn?: AgentCallbackReturn) => {
-					if (err) {
-						reject(err);
-					} else {
-						resolve(rtn);
-					}
-				}
-			);
-		});
-	};
-}

+ 0 - 21
zbytb/node_modules/asynckit/LICENSE

@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Alex Indigo
-
-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.

+ 0 - 233
zbytb/node_modules/asynckit/README.md

@@ -1,233 +0,0 @@
-# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit)
-
-Minimal async jobs utility library, with streams support.
-
-[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit)
-[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit)
-[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit)
-
-[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master)
-[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit)
-[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit)
-
-<!-- [![Readme](https://img.shields.io/badge/readme-tested-brightgreen.svg?style=flat)](https://www.npmjs.com/package/reamde) -->
-
-AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects.
-Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method.
-
-It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators.
-
-| compression        |     size |
-| :----------------- | -------: |
-| asynckit.js        | 12.34 kB |
-| asynckit.min.js    |  4.11 kB |
-| asynckit.min.js.gz |  1.47 kB |
-
-
-## Install
-
-```sh
-$ npm install --save asynckit
-```
-
-## Examples
-
-### Parallel Jobs
-
-Runs iterator over provided array in parallel. Stores output in the `result` array,
-on the matching positions. In unlikely event of an error from one of the jobs,
-will terminate rest of the active jobs (if abort function is provided)
-and return error along with salvaged data to the main callback function.
-
-#### Input Array
-
-```javascript
-var parallel = require('asynckit').parallel
-  , assert   = require('assert')
-  ;
-
-var source         = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
-  , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
-  , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
-  , target         = []
-  ;
-
-parallel(source, asyncJob, function(err, result)
-{
-  assert.deepEqual(result, expectedResult);
-  assert.deepEqual(target, expectedTarget);
-});
-
-// async job accepts one element from the array
-// and a callback function
-function asyncJob(item, cb)
-{
-  // different delays (in ms) per item
-  var delay = item * 25;
-
-  // pretend different jobs take different time to finish
-  // and not in consequential order
-  var timeoutId = setTimeout(function() {
-    target.push(item);
-    cb(null, item * 2);
-  }, delay);
-
-  // allow to cancel "leftover" jobs upon error
-  // return function, invoking of which will abort this job
-  return clearTimeout.bind(null, timeoutId);
-}
-```
-
-More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js).
-
-#### Input Object
-
-Also it supports named jobs, listed via object.
-
-```javascript
-var parallel = require('asynckit/parallel')
-  , assert   = require('assert')
-  ;
-
-var source         = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
-  , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
-  , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ]
-  , expectedKeys   = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ]
-  , target         = []
-  , keys           = []
-  ;
-
-parallel(source, asyncJob, function(err, result)
-{
-  assert.deepEqual(result, expectedResult);
-  assert.deepEqual(target, expectedTarget);
-  assert.deepEqual(keys, expectedKeys);
-});
-
-// supports full value, key, callback (shortcut) interface
-function asyncJob(item, key, cb)
-{
-  // different delays (in ms) per item
-  var delay = item * 25;
-
-  // pretend different jobs take different time to finish
-  // and not in consequential order
-  var timeoutId = setTimeout(function() {
-    keys.push(key);
-    target.push(item);
-    cb(null, item * 2);
-  }, delay);
-
-  // allow to cancel "leftover" jobs upon error
-  // return function, invoking of which will abort this job
-  return clearTimeout.bind(null, timeoutId);
-}
-```
-
-More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js).
-
-### Serial Jobs
-
-Runs iterator over provided array sequentially. Stores output in the `result` array,
-on the matching positions. In unlikely event of an error from one of the jobs,
-will not proceed to the rest of the items in the list
-and return error along with salvaged data to the main callback function.
-
-#### Input Array
-
-```javascript
-var serial = require('asynckit/serial')
-  , assert = require('assert')
-  ;
-
-var source         = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
-  , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
-  , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
-  , target         = []
-  ;
-
-serial(source, asyncJob, function(err, result)
-{
-  assert.deepEqual(result, expectedResult);
-  assert.deepEqual(target, expectedTarget);
-});
-
-// extended interface (item, key, callback)
-// also supported for arrays
-function asyncJob(item, key, cb)
-{
-  target.push(key);
-
-  // it will be automatically made async
-  // even it iterator "returns" in the same event loop
-  cb(null, item * 2);
-}
-```
-
-More examples could be found in [test/test-serial-array.js](test/test-serial-array.js).
-
-#### Input Object
-
-Also it supports named jobs, listed via object.
-
-```javascript
-var serial = require('asynckit').serial
-  , assert = require('assert')
-  ;
-
-var source         = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
-  , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ]
-  , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ]
-  , target         = []
-  ;
-
-var source         = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 }
-  , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 }
-  , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ]
-  , target         = []
-  ;
-
-
-serial(source, asyncJob, function(err, result)
-{
-  assert.deepEqual(result, expectedResult);
-  assert.deepEqual(target, expectedTarget);
-});
-
-// shortcut interface (item, callback)
-// works for object as well as for the arrays
-function asyncJob(item, cb)
-{
-  target.push(item);
-
-  // it will be automatically made async
-  // even it iterator "returns" in the same event loop
-  cb(null, item * 2);
-}
-```
-
-More examples could be found in [test/test-serial-object.js](test/test-serial-object.js).
-
-_Note: Since _object_ is an _unordered_ collection of properties,
-it may produce unexpected results with sequential iterations.
-Whenever order of the jobs' execution is important please use `serialOrdered` method._
-
-### Ordered Serial Iterations
-
-TBD
-
-For example [compare-property](compare-property) package.
-
-### Streaming interface
-
-TBD
-
-## Want to Know More?
-
-More examples can be found in [test folder](test/).
-
-Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions.
-
-## License
-
-AsyncKit is licensed under the MIT license.

+ 0 - 76
zbytb/node_modules/asynckit/bench.js

@@ -1,76 +0,0 @@
-/* eslint no-console: "off" */
-
-var asynckit = require('./')
-  , async    = require('async')
-  , assert   = require('assert')
-  , expected = 0
-  ;
-
-var Benchmark = require('benchmark');
-var suite = new Benchmark.Suite;
-
-var source = [];
-for (var z = 1; z < 100; z++)
-{
-  source.push(z);
-  expected += z;
-}
-
-suite
-// add tests
-
-.add('async.map', function(deferred)
-{
-  var total = 0;
-
-  async.map(source,
-  function(i, cb)
-  {
-    setImmediate(function()
-    {
-      total += i;
-      cb(null, total);
-    });
-  },
-  function(err, result)
-  {
-    assert.ifError(err);
-    assert.equal(result[result.length - 1], expected);
-    deferred.resolve();
-  });
-}, {'defer': true})
-
-
-.add('asynckit.parallel', function(deferred)
-{
-  var total = 0;
-
-  asynckit.parallel(source,
-  function(i, cb)
-  {
-    setImmediate(function()
-    {
-      total += i;
-      cb(null, total);
-    });
-  },
-  function(err, result)
-  {
-    assert.ifError(err);
-    assert.equal(result[result.length - 1], expected);
-    deferred.resolve();
-  });
-}, {'defer': true})
-
-
-// add listeners
-.on('cycle', function(ev)
-{
-  console.log(String(ev.target));
-})
-.on('complete', function()
-{
-  console.log('Fastest is ' + this.filter('fastest').map('name'));
-})
-// run async
-.run({ 'async': true });

+ 0 - 6
zbytb/node_modules/asynckit/index.js

@@ -1,6 +0,0 @@
-module.exports =
-{
-  parallel      : require('./parallel.js'),
-  serial        : require('./serial.js'),
-  serialOrdered : require('./serialOrdered.js')
-};

+ 0 - 63
zbytb/node_modules/asynckit/package.json

@@ -1,63 +0,0 @@
-{
-  "name": "asynckit",
-  "version": "0.4.0",
-  "description": "Minimal async jobs utility library, with streams support",
-  "main": "index.js",
-  "scripts": {
-    "clean": "rimraf coverage",
-    "lint": "eslint *.js lib/*.js test/*.js",
-    "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec",
-    "win-test": "tape test/test-*.js",
-    "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec",
-    "report": "istanbul report",
-    "size": "browserify index.js | size-table asynckit",
-    "debug": "tape test/test-*.js"
-  },
-  "pre-commit": [
-    "clean",
-    "lint",
-    "test",
-    "browser",
-    "report",
-    "size"
-  ],
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/alexindigo/asynckit.git"
-  },
-  "keywords": [
-    "async",
-    "jobs",
-    "parallel",
-    "serial",
-    "iterator",
-    "array",
-    "object",
-    "stream",
-    "destroy",
-    "terminate",
-    "abort"
-  ],
-  "author": "Alex Indigo <iam@alexindigo.com>",
-  "license": "MIT",
-  "bugs": {
-    "url": "https://github.com/alexindigo/asynckit/issues"
-  },
-  "homepage": "https://github.com/alexindigo/asynckit#readme",
-  "devDependencies": {
-    "browserify": "^13.0.0",
-    "browserify-istanbul": "^2.0.0",
-    "coveralls": "^2.11.9",
-    "eslint": "^2.9.0",
-    "istanbul": "^0.4.3",
-    "obake": "^0.1.2",
-    "phantomjs-prebuilt": "^2.1.7",
-    "pre-commit": "^1.1.3",
-    "reamde": "^1.1.0",
-    "rimraf": "^2.5.2",
-    "size-table": "^0.2.0",
-    "tap-spec": "^4.1.1",
-    "tape": "^4.5.1"
-  },
-  "dependencies": {}
-}

+ 0 - 43
zbytb/node_modules/asynckit/parallel.js

@@ -1,43 +0,0 @@
-var iterate    = require('./lib/iterate.js')
-  , initState  = require('./lib/state.js')
-  , terminator = require('./lib/terminator.js')
-  ;
-
-// Public API
-module.exports = parallel;
-
-/**
- * Runs iterator over provided array elements in parallel
- *
- * @param   {array|object} list - array or object (named list) to iterate over
- * @param   {function} iterator - iterator to run
- * @param   {function} callback - invoked when all elements processed
- * @returns {function} - jobs terminator
- */
-function parallel(list, iterator, callback)
-{
-  var state = initState(list);
-
-  while (state.index < (state['keyedList'] || list).length)
-  {
-    iterate(list, iterator, state, function(error, result)
-    {
-      if (error)
-      {
-        callback(error, result);
-        return;
-      }
-
-      // looks like it's the last one
-      if (Object.keys(state.jobs).length === 0)
-      {
-        callback(null, state.results);
-        return;
-      }
-    });
-
-    state.index++;
-  }
-
-  return terminator.bind(state, callback);
-}

+ 0 - 17
zbytb/node_modules/asynckit/serial.js

@@ -1,17 +0,0 @@
-var serialOrdered = require('./serialOrdered.js');
-
-// Public API
-module.exports = serial;
-
-/**
- * Runs iterator over provided array elements in series
- *
- * @param   {array|object} list - array or object (named list) to iterate over
- * @param   {function} iterator - iterator to run
- * @param   {function} callback - invoked when all elements processed
- * @returns {function} - jobs terminator
- */
-function serial(list, iterator, callback)
-{
-  return serialOrdered(list, iterator, null, callback);
-}

+ 0 - 75
zbytb/node_modules/asynckit/serialOrdered.js

@@ -1,75 +0,0 @@
-var iterate    = require('./lib/iterate.js')
-  , initState  = require('./lib/state.js')
-  , terminator = require('./lib/terminator.js')
-  ;
-
-// Public API
-module.exports = serialOrdered;
-// sorting helpers
-module.exports.ascending  = ascending;
-module.exports.descending = descending;
-
-/**
- * Runs iterator over provided sorted array elements in series
- *
- * @param   {array|object} list - array or object (named list) to iterate over
- * @param   {function} iterator - iterator to run
- * @param   {function} sortMethod - custom sort function
- * @param   {function} callback - invoked when all elements processed
- * @returns {function} - jobs terminator
- */
-function serialOrdered(list, iterator, sortMethod, callback)
-{
-  var state = initState(list, sortMethod);
-
-  iterate(list, iterator, state, function iteratorHandler(error, result)
-  {
-    if (error)
-    {
-      callback(error, result);
-      return;
-    }
-
-    state.index++;
-
-    // are we there yet?
-    if (state.index < (state['keyedList'] || list).length)
-    {
-      iterate(list, iterator, state, iteratorHandler);
-      return;
-    }
-
-    // done here
-    callback(null, state.results);
-  });
-
-  return terminator.bind(state, callback);
-}
-
-/*
- * -- Sort methods
- */
-
-/**
- * sort helper to sort array elements in ascending order
- *
- * @param   {mixed} a - an item to compare
- * @param   {mixed} b - an item to compare
- * @returns {number} - comparison result
- */
-function ascending(a, b)
-{
-  return a < b ? -1 : a > b ? 1 : 0;
-}
-
-/**
- * sort helper to sort array elements in descending order
- *
- * @param   {mixed} a - an item to compare
- * @param   {mixed} b - an item to compare
- * @returns {number} - comparison result
- */
-function descending(a, b)
-{
-  return -1 * ascending(a, b);
-}

+ 0 - 21
zbytb/node_modules/asynckit/stream.js

@@ -1,21 +0,0 @@
-var inherits              = require('util').inherits
-  , Readable              = require('stream').Readable
-  , ReadableAsyncKit      = require('./lib/readable_asynckit.js')
-  , ReadableParallel      = require('./lib/readable_parallel.js')
-  , ReadableSerial        = require('./lib/readable_serial.js')
-  , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js')
-  ;
-
-// API
-module.exports =
-{
-  parallel      : ReadableParallel,
-  serial        : ReadableSerial,
-  serialOrdered : ReadableSerialOrdered, 
-};
-
-inherits(ReadableAsyncKit, Readable);
-
-inherits(ReadableParallel, ReadableAsyncKit);
-inherits(ReadableSerial, ReadableAsyncKit);
-inherits(ReadableSerialOrdered, ReadableAsyncKit);

+ 0 - 9
zbytb/node_modules/browser-process-hrtime/LICENSE

@@ -1,9 +0,0 @@
-Copyright 2014 kumavis
-
-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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT HOLDER 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.

+ 0 - 27
zbytb/node_modules/browser-process-hrtime/README.md

@@ -1,27 +0,0 @@
-# browser-process-hrtime
-
-Browser shim for Node.js `process.hrtime()`.
-See [documentation at nodejs.org](http://nodejs.org/api/process.html#process_process_hrtime)
-
-This module does not provide the same level of time precision as node.js, but provides a matching API and response format.
-
-### usage
-Use hrtime independent of environment (node or browser).
-It will use `process.hrtime` first and fallback if not present.
-```js
-const hrtime = require('browser-process-hrtime')
-const start = hrtime()
-// ...
-const delta = hrtime(start)
-```
-
-### monkey-patching
-You can monkey-patch `process.hrtime` for your dependency graph like this:
-```js
-process.hrtime = require('browser-process-hrtime')
-const coolTool = require('module-that-uses-hrtime-somewhere-in-its-depths')
-```
-
-### note
-This was originally pull-requested against [node-process](https://github.com/defunctzombie/node-process),
-but they are trying to stay lean.

+ 0 - 4
zbytb/node_modules/browser-process-hrtime/index.d.ts

@@ -1,4 +0,0 @@
-declare module "browser-process-hrtime" {
-  function hrtime(time?: [number, number]): [number, number];
-  export = hrtime;
-}

+ 0 - 28
zbytb/node_modules/browser-process-hrtime/index.js

@@ -1,28 +0,0 @@
-module.exports = process.hrtime || hrtime
-
-// polyfil for window.performance.now
-var performance = global.performance || {}
-var performanceNow =
-  performance.now        ||
-  performance.mozNow     ||
-  performance.msNow      ||
-  performance.oNow       ||
-  performance.webkitNow  ||
-  function(){ return (new Date()).getTime() }
-
-// generate timestamp or delta
-// see http://nodejs.org/api/process.html#process_process_hrtime
-function hrtime(previousTimestamp){
-  var clocktime = performanceNow.call(performance)*1e-3
-  var seconds = Math.floor(clocktime)
-  var nanoseconds = Math.floor((clocktime%1)*1e9)
-  if (previousTimestamp) {
-    seconds = seconds - previousTimestamp[0]
-    nanoseconds = nanoseconds - previousTimestamp[1]
-    if (nanoseconds<0) {
-      seconds--
-      nanoseconds += 1e9
-    }
-  }
-  return [seconds,nanoseconds]
-}

+ 0 - 15
zbytb/node_modules/browser-process-hrtime/package.json

@@ -1,15 +0,0 @@
-{
-  "name": "browser-process-hrtime",
-  "version": "1.0.0",
-  "description": "Shim for process.hrtime in the browser",
-  "main": "index.js",
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
-  },
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/kumavis/browser-process-hrtime.git"
-  },
-  "author": "kumavis",
-  "license": "BSD-2-Clause"
-}

+ 0 - 19
zbytb/node_modules/combined-stream/License

@@ -1,19 +0,0 @@
-Copyright (c) 2011 Debuggable Limited <felix@debuggable.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.

+ 0 - 138
zbytb/node_modules/combined-stream/Readme.md

@@ -1,138 +0,0 @@
-# combined-stream
-
-A stream that emits multiple other streams one after another.
-
-**NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`.
-
-- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module.
-
-- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another.
-
-## Installation
-
-``` bash
-npm install combined-stream
-```
-
-## Usage
-
-Here is a simple example that shows how you can use combined-stream to combine
-two files into one:
-
-``` javascript
-var CombinedStream = require('combined-stream');
-var fs = require('fs');
-
-var combinedStream = CombinedStream.create();
-combinedStream.append(fs.createReadStream('file1.txt'));
-combinedStream.append(fs.createReadStream('file2.txt'));
-
-combinedStream.pipe(fs.createWriteStream('combined.txt'));
-```
-
-While the example above works great, it will pause all source streams until
-they are needed. If you don't want that to happen, you can set `pauseStreams`
-to `false`:
-
-``` javascript
-var CombinedStream = require('combined-stream');
-var fs = require('fs');
-
-var combinedStream = CombinedStream.create({pauseStreams: false});
-combinedStream.append(fs.createReadStream('file1.txt'));
-combinedStream.append(fs.createReadStream('file2.txt'));
-
-combinedStream.pipe(fs.createWriteStream('combined.txt'));
-```
-
-However, what if you don't have all the source streams yet, or you don't want
-to allocate the resources (file descriptors, memory, etc.) for them right away?
-Well, in that case you can simply provide a callback that supplies the stream
-by calling a `next()` function:
-
-``` javascript
-var CombinedStream = require('combined-stream');
-var fs = require('fs');
-
-var combinedStream = CombinedStream.create();
-combinedStream.append(function(next) {
-  next(fs.createReadStream('file1.txt'));
-});
-combinedStream.append(function(next) {
-  next(fs.createReadStream('file2.txt'));
-});
-
-combinedStream.pipe(fs.createWriteStream('combined.txt'));
-```
-
-## API
-
-### CombinedStream.create([options])
-
-Returns a new combined stream object. Available options are:
-
-* `maxDataSize`
-* `pauseStreams`
-
-The effect of those options is described below.
-
-### combinedStream.pauseStreams = `true`
-
-Whether to apply back pressure to the underlaying streams. If set to `false`,
-the underlaying streams will never be paused. If set to `true`, the
-underlaying streams will be paused right after being appended, as well as when
-`delayedStream.pipe()` wants to throttle.
-
-### combinedStream.maxDataSize = `2 * 1024 * 1024`
-
-The maximum amount of bytes (or characters) to buffer for all source streams.
-If this value is exceeded, `combinedStream` emits an `'error'` event.
-
-### combinedStream.dataSize = `0`
-
-The amount of bytes (or characters) currently buffered by `combinedStream`.
-
-### combinedStream.append(stream)
-
-Appends the given `stream` to the combinedStream object. If `pauseStreams` is
-set to `true, this stream will also be paused right away.
-
-`streams` can also be a function that takes one parameter called `next`. `next`
-is a function that must be invoked in order to provide the `next` stream, see
-example above.
-
-Regardless of how the `stream` is appended, combined-stream always attaches an
-`'error'` listener to it, so you don't have to do that manually.
-
-Special case: `stream` can also be a String or Buffer.
-
-### combinedStream.write(data)
-
-You should not call this, `combinedStream` takes care of piping the appended
-streams into itself for you.
-
-### combinedStream.resume()
-
-Causes `combinedStream` to start drain the streams it manages. The function is
-idempotent, and also emits a `'resume'` event each time which usually goes to
-the stream that is currently being drained.
-
-### combinedStream.pause();
-
-If `combinedStream.pauseStreams` is set to `false`, this does nothing.
-Otherwise a `'pause'` event is emitted, this goes to the stream that is
-currently being drained, so you can use it to apply back pressure.
-
-### combinedStream.end();
-
-Sets `combinedStream.writable` to false, emits an `'end'` event, and removes
-all streams from the queue.
-
-### combinedStream.destroy();
-
-Same as `combinedStream.end()`, except it emits a `'close'` event instead of
-`'end'`.
-
-## License
-
-combined-stream is licensed under the MIT license.

+ 0 - 25
zbytb/node_modules/combined-stream/package.json

@@ -1,25 +0,0 @@
-{
-  "author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
-  "name": "combined-stream",
-  "description": "A stream that emits multiple other streams one after another.",
-  "version": "1.0.8",
-  "homepage": "https://github.com/felixge/node-combined-stream",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/felixge/node-combined-stream.git"
-  },
-  "main": "./lib/combined_stream",
-  "scripts": {
-    "test": "node test/run.js"
-  },
-  "engines": {
-    "node": ">= 0.8"
-  },
-  "dependencies": {
-    "delayed-stream": "~1.0.0"
-  },
-  "devDependencies": {
-    "far": "~0.0.7"
-  },
-  "license": "MIT"
-}

+ 0 - 17
zbytb/node_modules/combined-stream/yarn.lock

@@ -1,17 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-
-delayed-stream@~1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
-
-far@~0.0.7:
-  version "0.0.7"
-  resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7"
-  dependencies:
-    oop "0.0.3"
-
-oop@0.0.3:
-  version "0.0.3"
-  resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401"

+ 0 - 20
zbytb/node_modules/cssom/LICENSE.txt

@@ -1,20 +0,0 @@
-Copyright (c) Nikita Vasilyev
-
-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.

+ 0 - 67
zbytb/node_modules/cssom/README.mdown

@@ -1,67 +0,0 @@
-# CSSOM
-
-CSSOM.js is a CSS parser written in pure JavaScript. It is also a partial implementation of [CSS Object Model](http://dev.w3.org/csswg/cssom/). 
-
-    CSSOM.parse("body {color: black}")
-    -> {
-      cssRules: [
-        {
-          selectorText: "body",
-          style: {
-            0: "color",
-            color: "black",
-            length: 1
-          }
-        }
-      ]
-    }
-
-
-## [Parser demo](http://nv.github.com/CSSOM/docs/parse.html)
-
-Works well in Google Chrome 6+, Safari 5+, Firefox 3.6+, Opera 10.63+.
-Doesn't work in IE < 9 because of unsupported getters/setters.
-
-To use CSSOM.js in the browser you might want to build a one-file version that exposes a single `CSSOM` global variable:
-
-    ➤ git clone https://github.com/NV/CSSOM.git
-    ➤ cd CSSOM
-    ➤ node build.js
-    build/CSSOM.js is done
-
-To use it with Node.js or any other CommonJS loader:
-
-    ➤ npm install cssom
-
-## Don’t use it if...
-
-You parse CSS to mungle, minify or reformat code like this:
-
-```css
-div {
-  background: gray;
-  background: linear-gradient(to bottom, white 0%, black 100%);
-}
-```
-
-This pattern is often used to give browsers that don’t understand linear gradients a fallback solution (e.g. gray color in the example).
-In CSSOM, `background: gray` [gets overwritten](http://nv.github.io/CSSOM/docs/parse.html#css=div%20%7B%0A%20%20%20%20%20%20background%3A%20gray%3B%0A%20%20%20%20background%3A%20linear-gradient(to%20bottom%2C%20white%200%25%2C%20black%20100%25)%3B%0A%7D).
-It does **NOT** get preserved.
-
-If you do CSS mungling, minification, or image inlining, considere using one of the following:
-
-  * [postcss](https://github.com/postcss/postcss)
-  * [reworkcss/css](https://github.com/reworkcss/css)
-  * [csso](https://github.com/css/csso)
-  * [mensch](https://github.com/brettstimmerman/mensch)
-
-
-## [Tests](http://nv.github.com/CSSOM/spec/)
-
-To run tests locally:
-
-    ➤ git submodule init
-    ➤ git submodule update
-
-
-## [Who uses CSSOM.js](https://github.com/NV/CSSOM/wiki/Who-uses-CSSOM.js)

+ 0 - 18
zbytb/node_modules/cssom/package.json

@@ -1,18 +0,0 @@
-{
-  "name": "cssom",
-  "description": "CSS Object Model implementation and CSS parser",
-  "keywords": [
-    "CSS",
-    "CSSOM",
-    "parser",
-    "styleSheet"
-  ],
-  "version": "0.5.0",
-  "author": "Nikita Vasilyev <me@elv1s.ru>",
-  "repository": "NV/CSSOM",
-  "files": [
-    "lib/"
-  ],
-  "main": "./lib/index.js",
-  "license": "MIT"
-}

+ 0 - 20
zbytb/node_modules/cssstyle/LICENSE

@@ -1,20 +0,0 @@
-Copyright (c) Chad Walker
-
-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.

+ 0 - 15
zbytb/node_modules/cssstyle/README.md

@@ -1,15 +0,0 @@
-# CSSStyleDeclaration
-
-A Node JS implementation of the CSS Object Model [CSSStyleDeclaration interface](https://www.w3.org/TR/cssom-1/#the-cssstyledeclaration-interface).
-
-[![NpmVersion](https://img.shields.io/npm/v/cssstyle.svg)](https://www.npmjs.com/package/cssstyle) [![Build Status](https://travis-ci.org/jsdom/cssstyle.svg?branch=master)](https://travis-ci.org/jsdom/cssstyle) [![codecov](https://codecov.io/gh/jsdom/cssstyle/branch/master/graph/badge.svg)](https://codecov.io/gh/jsdom/cssstyle)
-
----
-
-#### Background
-
-This package is an extension of the CSSStyleDeclaration class in Nikita Vasilyev's [CSSOM](https://github.com/NV/CSSOM) with added support for CSS 2 & 3 properties. The primary use case is for testing browser code in a Node environment. 
-
-It was originally created by Chad Walker, it is now maintaind by Jon Sakas and other open source contributors.
-
-Bug reports and pull requests are welcome.

+ 0 - 20
zbytb/node_modules/cssstyle/node_modules/cssom/LICENSE.txt

@@ -1,20 +0,0 @@
-Copyright (c) Nikita Vasilyev
-
-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.

+ 0 - 67
zbytb/node_modules/cssstyle/node_modules/cssom/README.mdown

@@ -1,67 +0,0 @@
-# CSSOM
-
-CSSOM.js is a CSS parser written in pure JavaScript. It is also a partial implementation of [CSS Object Model](http://dev.w3.org/csswg/cssom/). 
-
-    CSSOM.parse("body {color: black}")
-    -> {
-      cssRules: [
-        {
-          selectorText: "body",
-          style: {
-            0: "color",
-            color: "black",
-            length: 1
-          }
-        }
-      ]
-    }
-
-
-## [Parser demo](http://nv.github.com/CSSOM/docs/parse.html)
-
-Works well in Google Chrome 6+, Safari 5+, Firefox 3.6+, Opera 10.63+.
-Doesn't work in IE < 9 because of unsupported getters/setters.
-
-To use CSSOM.js in the browser you might want to build a one-file version that exposes a single `CSSOM` global variable:
-
-    ➤ git clone https://github.com/NV/CSSOM.git
-    ➤ cd CSSOM
-    ➤ node build.js
-    build/CSSOM.js is done
-
-To use it with Node.js or any other CommonJS loader:
-
-    ➤ npm install cssom
-
-## Don’t use it if...
-
-You parse CSS to mungle, minify or reformat code like this:
-
-```css
-div {
-  background: gray;
-  background: linear-gradient(to bottom, white 0%, black 100%);
-}
-```
-
-This pattern is often used to give browsers that don’t understand linear gradients a fallback solution (e.g. gray color in the example).
-In CSSOM, `background: gray` [gets overwritten](http://nv.github.io/CSSOM/docs/parse.html#css=div%20%7B%0A%20%20%20%20%20%20background%3A%20gray%3B%0A%20%20%20%20background%3A%20linear-gradient(to%20bottom%2C%20white%200%25%2C%20black%20100%25)%3B%0A%7D).
-It doesn't get preserved.
-
-If you do CSS mungling, minification, image inlining, and such, CSSOM.js is no good for you, considere using one of the following:
-
-  * [postcss](https://github.com/postcss/postcss)
-  * [reworkcss/css](https://github.com/reworkcss/css)
-  * [csso](https://github.com/css/csso)
-  * [mensch](https://github.com/brettstimmerman/mensch)
-
-
-## [Tests](http://nv.github.com/CSSOM/spec/)
-
-To run tests locally:
-
-    ➤ git submodule init
-    ➤ git submodule update
-
-
-## [Who uses CSSOM.js](https://github.com/NV/CSSOM/wiki/Who-uses-CSSOM.js)

+ 0 - 18
zbytb/node_modules/cssstyle/node_modules/cssom/package.json

@@ -1,18 +0,0 @@
-{
-  "name": "cssom",
-  "description": "CSS Object Model implementation and CSS parser",
-  "keywords": [
-    "CSS",
-    "CSSOM",
-    "parser",
-    "styleSheet"
-  ],
-  "version": "0.3.8",
-  "author": "Nikita Vasilyev <me@elv1s.ru>",
-  "repository": "NV/CSSOM",
-  "files": [
-    "lib/"
-  ],
-  "main": "./lib/index.js",
-  "license": "MIT"
-}

+ 0 - 72
zbytb/node_modules/cssstyle/package.json

@@ -1,72 +0,0 @@
-{
-  "name": "cssstyle",
-  "description": "CSSStyleDeclaration Object Model implementation",
-  "keywords": [
-    "CSS",
-    "CSSStyleDeclaration",
-    "StyleSheet"
-  ],
-  "version": "2.3.0",
-  "homepage": "https://github.com/jsdom/cssstyle",
-  "maintainers": [
-    {
-      "name": "Jon Sakas",
-      "email": "jon.sakas@gmail.com",
-      "url": "https://jon.sakas.co/"
-    },
-    {
-      "name": "Rafał Ruciński",
-      "email": "fatfisz@gmail.com",
-      "url": "https://fatfisz.com"
-    }
-  ],
-  "contributors": [
-    {
-      "name": "Chad Walker",
-      "email": "chad@chad-cat-lore-eddie.com",
-      "url": "https://github.com/chad3814"
-    }
-  ],
-  "repository": "jsdom/cssstyle",
-  "bugs": "https://github.com/jsdom/cssstyle/issues",
-  "directories": {
-    "lib": "./lib"
-  },
-  "files": [
-    "lib/"
-  ],
-  "main": "./lib/CSSStyleDeclaration.js",
-  "dependencies": {
-    "cssom": "~0.3.6"
-  },
-  "devDependencies": {
-    "babel-generator": "~6.26.1",
-    "babel-traverse": "~6.26.0",
-    "babel-types": "~6.26.0",
-    "babylon": "~6.18.0",
-    "eslint": "~6.0.0",
-    "eslint-config-prettier": "~6.0.0",
-    "eslint-plugin-prettier": "~3.1.0",
-    "jest": "^24.8.0",
-    "npm-run-all": "^4.1.5",
-    "prettier": "~1.18.0",
-    "request": "^2.88.0",
-    "resolve": "~1.11.1"
-  },
-  "scripts": {
-    "download": "node ./scripts/download_latest_properties.js && eslint lib/allProperties.js --fix",
-    "generate": "run-p generate:*",
-    "generate:implemented_properties": "node ./scripts/generate_implemented_properties.js",
-    "generate:properties": "node ./scripts/generate_properties.js",
-    "lint": "npm run generate && eslint . --max-warnings 0",
-    "lint:fix": "eslint . --fix --max-warnings 0",
-    "prepublishOnly": "npm run lint && npm run test",
-    "test": "npm run generate && jest",
-    "test-ci": "npm run lint && npm run test && codecov",
-    "update-authors": "git log --format=\"%aN <%aE>\" | sort -f | uniq > AUTHORS"
-  },
-  "license": "MIT",
-  "engines": {
-    "node": ">=8"
-  }
-}

+ 0 - 7
zbytb/node_modules/data-urls/LICENSE.txt

@@ -1,7 +0,0 @@
-Copyright © Domenic Denicola <d@domenic.me>
-
-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.

+ 0 - 62
zbytb/node_modules/data-urls/README.md

@@ -1,62 +0,0 @@
-# Parse `data:` URLs
-
-This package helps you parse `data:` URLs [according to the WHATWG Fetch Standard](https://fetch.spec.whatwg.org/#data-urls):
-
-```js
-const parseDataURL = require("data-urls");
-
-const textExample = parseDataURL("data:,Hello%2C%20World!");
-console.log(textExample.mimeType.toString()); // "text/plain;charset=US-ASCII"
-console.log(textExample.body);                // Uint8Array(13) [ 72, 101, 108, 108, 111, 44, … ]
-
-const htmlExample = parseDataURL("data:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E");
-console.log(htmlExample.mimeType.toString()); // "text/html"
-console.log(htmlExample.body);                // Uint8Array(22) [ 60, 104, 49, 62, 72, 101, … ]
-
-const pngExample = parseDataURL("data:image/png;base64,iVBORw0KGgoAAA" +
-                                "ANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4" +
-                                "//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU" +
-                                "5ErkJggg==");
-console.log(pngExample.mimeType.toString()); // "image/png"
-console.log(pngExample.body);                // Uint8Array(85) [ 137, 80, 78, 71, 13, 10, … ]
-```
-
-## API
-
-This package's main module's default export is a function that accepts a string and returns a `{ mimeType, body }` object, or `null` if the result cannot be parsed as a `data:` URL.
-
-- The `mimeType` property is an instance of [whatwg-mimetype](https://www.npmjs.com/package/whatwg-mimetype)'s `MIMEType` class.
-- The `body` property is a `Uint8Array` instance.
-
-As shown in the examples above, you can easily get a stringified version of the MIME type using its `toString()` method. Read on for more on getting the stringified version of the body.
-
-### Decoding the body
-
-To decode the body bytes of a parsed data URL, you'll need to use the `charset` parameter of the MIME type, if any. This contains an encoding [label](https://encoding.spec.whatwg.org/#label); there are [various possible labels](https://encoding.spec.whatwg.org/#names-and-labels) for a given encoding. We suggest using the [whatwg-encoding](https://www.npmjs.com/package/whatwg-encoding) package as follows:
-
-```js
-const parseDataURL = require("data-urls");
-const { labelToName, decode } = require("whatwg-encoding");
-
-const dataURL = parseDataURL(arbitraryString);
-
-// If there's no charset parameter, let's just hope it's UTF-8; that seems like a good guess.
-const encodingName = labelToName(dataURL.mimeType.parameters.get("charset") || "utf-8");
-const bodyDecoded = decode(dataURL.body, encodingName);
-```
-
-This is especially important since the default, if no parseable MIME type is given, is "US-ASCII", [aka windows-1252](https://encoding.spec.whatwg.org/#names-and-labels), not UTF-8 like you might asume. So for example given an `arbitraryString` of `"data:,Héllo!"`, the above code snippet will correctly produce a `bodyDecoded` of `"Héllo!"` by using the windows-1252 decoder, whereas if you used a UTF-8 decoder you'd get back `"Héllo!"`.
-
-### Advanced functionality: parsing from a URL record
-
-If you are using the [whatwg-url](https://github.com/jsdom/whatwg-url) package, you may already have a "URL record" object on hand, as produced by that package's `parseURL` export. In that case, you can use this package's `fromURLRecord` export to save a bit of work:
-
-```js
-const { parseURL } = require("whatwg-url");
-const dataURLFromURLRecord = require("data-urls").fromURLRecord;
-
-const urlRecord = parseURL("data:,Hello%2C%20World!");
-const dataURL = dataURLFromURLRecord(urlRecord);
-```
-
-In practice, we expect this functionality only to be used by consumers like [jsdom](https://www.npmjs.com/package/jsdom), which are using these packages at a very low level.

+ 0 - 54
zbytb/node_modules/data-urls/package.json

@@ -1,54 +0,0 @@
-{
-  "name": "data-urls",
-  "description": "Parses data: URLs",
-  "keywords": [
-    "data url",
-    "data uri",
-    "data:",
-    "http",
-    "fetch",
-    "whatwg"
-  ],
-  "version": "3.0.1",
-  "author": "Domenic Denicola <d@domenic.me> (https://domenic.me/)",
-  "license": "MIT",
-  "repository": "jsdom/data-urls",
-  "main": "lib/parser.js",
-  "files": [
-    "lib/"
-  ],
-  "scripts": {
-    "test": "jest",
-    "coverage": "jest --coverage",
-    "lint": "eslint .",
-    "pretest": "node scripts/get-latest-platform-tests.js"
-  },
-  "dependencies": {
-    "abab": "^2.0.3",
-    "whatwg-mimetype": "^3.0.0",
-    "whatwg-url": "^10.0.0"
-  },
-  "devDependencies": {
-    "@domenic/eslint-config": "^1.4.0",
-    "eslint": "^7.32.0",
-    "jest": "^27.2.4",
-    "minipass-fetch": "^1.4.1"
-  },
-  "engines": {
-    "node": ">=12"
-  },
-  "jest": {
-    "coverageDirectory": "coverage",
-    "coverageReporters": [
-      "lcov",
-      "text-summary"
-    ],
-    "testEnvironment": "node",
-    "testMatch": [
-      "<rootDir>/test/**/*.js"
-    ],
-    "coveragePathIgnorePatterns": [
-      "<rootDir>/node_modules/(?!(abab/lib/atob.js))"
-    ]
-  }
-}

+ 0 - 20
zbytb/node_modules/debug/LICENSE

@@ -1,20 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
-Copyright (c) 2018-2021 Josh Junon
-
-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.
-

+ 0 - 478
zbytb/node_modules/debug/README.md

@@ -1,478 +0,0 @@
-# debug
-[![Build Status](https://travis-ci.org/debug-js/debug.svg?branch=master)](https://travis-ci.org/debug-js/debug)  [![Coverage Status](https://coveralls.io/repos/github/debug-js/debug/badge.svg?branch=master)](https://coveralls.io/github/debug-js/debug?branch=master)  [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
-[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
-
-<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
-
-A tiny JavaScript debugging utility modelled after Node.js core's debugging
-technique. Works in Node.js and web browsers.
-
-## Installation
-
-```bash
-$ npm install debug
-```
-
-## Usage
-
-`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.
-
-Example [_app.js_](./examples/node/app.js):
-
-```js
-var debug = require('debug')('http')
-  , http = require('http')
-  , name = 'My App';
-
-// fake app
-
-debug('booting %o', name);
-
-http.createServer(function(req, res){
-  debug(req.method + ' ' + req.url);
-  res.end('hello\n');
-}).listen(3000, function(){
-  debug('listening');
-});
-
-// fake worker of some kind
-
-require('./worker');
-```
-
-Example [_worker.js_](./examples/node/worker.js):
-
-```js
-var a = require('debug')('worker:a')
-  , b = require('debug')('worker:b');
-
-function work() {
-  a('doing lots of uninteresting work');
-  setTimeout(work, Math.random() * 1000);
-}
-
-work();
-
-function workb() {
-  b('doing some work');
-  setTimeout(workb, Math.random() * 2000);
-}
-
-workb();
-```
-
-The `DEBUG` environment variable is then used to enable these based on space or
-comma-delimited names.
-
-Here are some examples:
-
-<img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
-<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
-<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
-
-#### Windows command prompt notes
-
-##### CMD
-
-On Windows the environment variable is set using the `set` command.
-
-```cmd
-set DEBUG=*,-not_this
-```
-
-Example:
-
-```cmd
-set DEBUG=* & node app.js
-```
-
-##### PowerShell (VS Code default)
-
-PowerShell uses different syntax to set environment variables.
-
-```cmd
-$env:DEBUG = "*,-not_this"
-```
-
-Example:
-
-```cmd
-$env:DEBUG='app';node app.js
-```
-
-Then, run the program to be debugged as usual.
-
-npm script example:
-```js
-  "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
-```
-
-## Namespace Colors
-
-Every debug instance has a color generated for it based on its namespace name.
-This helps when visually parsing the debug output to identify which debug instance
-a debug line belongs to.
-
-#### Node.js
-
-In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
-the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
-otherwise debug will only use a small handful of basic colors.
-
-<img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
-
-#### Web Browser
-
-Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
-option. These are WebKit web inspectors, Firefox ([since version
-31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
-and the Firebug plugin for Firefox (any version).
-
-<img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
-
-
-## Millisecond diff
-
-When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
-
-<img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
-
-When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
-
-<img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
-
-
-## Conventions
-
-If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".  If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable.  You can then use it for normal output as well as debug output.
-
-## Wildcards
-
-The `*` character may be used as a wildcard. Suppose for example your library has
-debuggers named "connect:bodyParser", "connect:compress", "connect:session",
-instead of listing all three with
-`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
-`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
-
-You can also exclude specific debuggers by prefixing them with a "-" character.
-For example, `DEBUG=*,-connect:*` would include all debuggers except those
-starting with "connect:".
-
-## Environment Variables
-
-When running through Node.js, you can set a few environment variables that will
-change the behavior of the debug logging:
-
-| Name      | Purpose                                         |
-|-----------|-------------------------------------------------|
-| `DEBUG`   | Enables/disables specific debugging namespaces. |
-| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY).  |
-| `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
-| `DEBUG_DEPTH` | Object inspection depth.                    |
-| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
-
-
-__Note:__ The environment variables beginning with `DEBUG_` end up being
-converted into an Options object that gets used with `%o`/`%O` formatters.
-See the Node.js documentation for
-[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
-for the complete list.
-
-## Formatters
-
-Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
-Below are the officially supported formatters:
-
-| Formatter | Representation |
-|-----------|----------------|
-| `%O`      | Pretty-print an Object on multiple lines. |
-| `%o`      | Pretty-print an Object all on a single line. |
-| `%s`      | String. |
-| `%d`      | Number (both integer and float). |
-| `%j`      | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
-| `%%`      | Single percent sign ('%'). This does not consume an argument. |
-
-
-### Custom formatters
-
-You can add custom formatters by extending the `debug.formatters` object.
-For example, if you wanted to add support for rendering a Buffer as hex with
-`%h`, you could do something like:
-
-```js
-const createDebug = require('debug')
-createDebug.formatters.h = (v) => {
-  return v.toString('hex')
-}
-
-// …elsewhere
-const debug = createDebug('foo')
-debug('this is hex: %h', new Buffer('hello world'))
-//   foo this is hex: 68656c6c6f20776f726c6421 +0ms
-```
-
-
-## Browser Support
-
-You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
-or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
-if you don't want to build it yourself.
-
-Debug's enable state is currently persisted by `localStorage`.
-Consider the situation shown below where you have `worker:a` and `worker:b`,
-and wish to debug both. You can enable this using `localStorage.debug`:
-
-```js
-localStorage.debug = 'worker:*'
-```
-
-And then refresh the page.
-
-```js
-a = debug('worker:a');
-b = debug('worker:b');
-
-setInterval(function(){
-  a('doing some work');
-}, 1000);
-
-setInterval(function(){
-  b('doing some work');
-}, 1200);
-```
-
-
-## Output streams
-
-  By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
-
-Example [_stdout.js_](./examples/node/stdout.js):
-
-```js
-var debug = require('debug');
-var error = debug('app:error');
-
-// by default stderr is used
-error('goes to stderr!');
-
-var log = debug('app:log');
-// set this namespace to log via console.log
-log.log = console.log.bind(console); // don't forget to bind to console!
-log('goes to stdout');
-error('still goes to stderr!');
-
-// set all output to go via console.info
-// overrides all per-namespace log settings
-debug.log = console.info.bind(console);
-error('now goes to stdout via console.info');
-log('still goes to stdout, but via console.info now');
-```
-
-## Extend
-You can simply extend debugger 
-```js
-const log = require('debug')('auth');
-
-//creates new debug instance with extended namespace
-const logSign = log.extend('sign');
-const logLogin = log.extend('login');
-
-log('hello'); // auth hello
-logSign('hello'); //auth:sign hello
-logLogin('hello'); //auth:login hello
-```
-
-## Set dynamically
-
-You can also enable debug dynamically by calling the `enable()` method :
-
-```js
-let debug = require('debug');
-
-console.log(1, debug.enabled('test'));
-
-debug.enable('test');
-console.log(2, debug.enabled('test'));
-
-debug.disable();
-console.log(3, debug.enabled('test'));
-
-```
-
-print :   
-```
-1 false
-2 true
-3 false
-```
-
-Usage :  
-`enable(namespaces)`  
-`namespaces` can include modes separated by a colon and wildcards.
-   
-Note that calling `enable()` completely overrides previously set DEBUG variable : 
-
-```
-$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
-=> false
-```
-
-`disable()`
-
-Will disable all namespaces. The functions returns the namespaces currently
-enabled (and skipped). This can be useful if you want to disable debugging
-temporarily without knowing what was enabled to begin with.
-
-For example:
-
-```js
-let debug = require('debug');
-debug.enable('foo:*,-foo:bar');
-let namespaces = debug.disable();
-debug.enable(namespaces);
-```
-
-Note: There is no guarantee that the string will be identical to the initial
-enable string, but semantically they will be identical.
-
-## Checking whether a debug target is enabled
-
-After you've created a debug instance, you can determine whether or not it is
-enabled by checking the `enabled` property:
-
-```javascript
-const debug = require('debug')('http');
-
-if (debug.enabled) {
-  // do stuff...
-}
-```
-
-You can also manually toggle this property to force the debug instance to be
-enabled or disabled.
-
-## Usage in child processes
-
-Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process.  
-For example:
-
-```javascript
-worker = fork(WORKER_WRAP_PATH, [workerPath], {
-  stdio: [
-    /* stdin: */ 0,
-    /* stdout: */ 'pipe',
-    /* stderr: */ 'pipe',
-    'ipc',
-  ],
-  env: Object.assign({}, process.env, {
-    DEBUG_COLORS: 1 // without this settings, colors won't be shown
-  }),
-});
-
-worker.stderr.pipe(process.stderr, { end: false });
-```
-
-
-## Authors
-
- - TJ Holowaychuk
- - Nathan Rajlich
- - Andrew Rhyne
- - Josh Junon
-
-## Backers
-
-Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
-
-<a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
-<a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
-
-
-## Sponsors
-
-Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
-
-<a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
-<a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
-
-## License
-
-(The MIT License)
-
-Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
-Copyright (c) 2018-2021 Josh Junon
-
-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.

+ 0 - 59
zbytb/node_modules/debug/package.json

@@ -1,59 +0,0 @@
-{
-  "name": "debug",
-  "version": "4.3.3",
-  "repository": {
-    "type": "git",
-    "url": "git://github.com/debug-js/debug.git"
-  },
-  "description": "Lightweight debugging utility for Node.js and the browser",
-  "keywords": [
-    "debug",
-    "log",
-    "debugger"
-  ],
-  "files": [
-    "src",
-    "LICENSE",
-    "README.md"
-  ],
-  "author": "Josh Junon <josh.junon@protonmail.com>",
-  "contributors": [
-    "TJ Holowaychuk <tj@vision-media.ca>",
-    "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
-    "Andrew Rhyne <rhyneandrew@gmail.com>"
-  ],
-  "license": "MIT",
-  "scripts": {
-    "lint": "xo",
-    "test": "npm run test:node && npm run test:browser && npm run lint",
-    "test:node": "istanbul cover _mocha -- test.js",
-    "test:browser": "karma start --single-run",
-    "test:coverage": "cat ./coverage/lcov.info | coveralls"
-  },
-  "dependencies": {
-    "ms": "2.1.2"
-  },
-  "devDependencies": {
-    "brfs": "^2.0.1",
-    "browserify": "^16.2.3",
-    "coveralls": "^3.0.2",
-    "istanbul": "^0.4.5",
-    "karma": "^3.1.4",
-    "karma-browserify": "^6.0.0",
-    "karma-chrome-launcher": "^2.2.0",
-    "karma-mocha": "^1.3.0",
-    "mocha": "^5.2.0",
-    "mocha-lcov-reporter": "^1.2.0",
-    "xo": "^0.23.0"
-  },
-  "peerDependenciesMeta": {
-    "supports-color": {
-      "optional": true
-    }
-  },
-  "main": "./src/index.js",
-  "browser": "./src/browser.js",
-  "engines": {
-    "node": ">=6.0"
-  }
-}

+ 0 - 269
zbytb/node_modules/debug/src/browser.js

@@ -1,269 +0,0 @@
-/* eslint-env browser */
-
-/**
- * This is the web browser implementation of `debug()`.
- */
-
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.storage = localstorage();
-exports.destroy = (() => {
-	let warned = false;
-
-	return () => {
-		if (!warned) {
-			warned = true;
-			console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
-		}
-	};
-})();
-
-/**
- * Colors.
- */
-
-exports.colors = [
-	'#0000CC',
-	'#0000FF',
-	'#0033CC',
-	'#0033FF',
-	'#0066CC',
-	'#0066FF',
-	'#0099CC',
-	'#0099FF',
-	'#00CC00',
-	'#00CC33',
-	'#00CC66',
-	'#00CC99',
-	'#00CCCC',
-	'#00CCFF',
-	'#3300CC',
-	'#3300FF',
-	'#3333CC',
-	'#3333FF',
-	'#3366CC',
-	'#3366FF',
-	'#3399CC',
-	'#3399FF',
-	'#33CC00',
-	'#33CC33',
-	'#33CC66',
-	'#33CC99',
-	'#33CCCC',
-	'#33CCFF',
-	'#6600CC',
-	'#6600FF',
-	'#6633CC',
-	'#6633FF',
-	'#66CC00',
-	'#66CC33',
-	'#9900CC',
-	'#9900FF',
-	'#9933CC',
-	'#9933FF',
-	'#99CC00',
-	'#99CC33',
-	'#CC0000',
-	'#CC0033',
-	'#CC0066',
-	'#CC0099',
-	'#CC00CC',
-	'#CC00FF',
-	'#CC3300',
-	'#CC3333',
-	'#CC3366',
-	'#CC3399',
-	'#CC33CC',
-	'#CC33FF',
-	'#CC6600',
-	'#CC6633',
-	'#CC9900',
-	'#CC9933',
-	'#CCCC00',
-	'#CCCC33',
-	'#FF0000',
-	'#FF0033',
-	'#FF0066',
-	'#FF0099',
-	'#FF00CC',
-	'#FF00FF',
-	'#FF3300',
-	'#FF3333',
-	'#FF3366',
-	'#FF3399',
-	'#FF33CC',
-	'#FF33FF',
-	'#FF6600',
-	'#FF6633',
-	'#FF9900',
-	'#FF9933',
-	'#FFCC00',
-	'#FFCC33'
-];
-
-/**
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
- * and the Firebug extension (any Firefox version) are known
- * to support "%c" CSS customizations.
- *
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
- */
-
-// eslint-disable-next-line complexity
-function useColors() {
-	// NB: In an Electron preload script, document will be defined but not fully
-	// initialized. Since we know we're in Chrome, we'll just detect this case
-	// explicitly
-	if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
-		return true;
-	}
-
-	// Internet Explorer and Edge do not support colors.
-	if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
-		return false;
-	}
-
-	// Is webkit? http://stackoverflow.com/a/16459606/376773
-	// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
-	return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
-		// Is firebug? http://stackoverflow.com/a/398120/376773
-		(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
-		// Is firefox >= v31?
-		// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
-		(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
-		// Double check webkit in userAgent just in case we are in a worker
-		(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
-}
-
-/**
- * Colorize log arguments if enabled.
- *
- * @api public
- */
-
-function formatArgs(args) {
-	args[0] = (this.useColors ? '%c' : '') +
-		this.namespace +
-		(this.useColors ? ' %c' : ' ') +
-		args[0] +
-		(this.useColors ? '%c ' : ' ') +
-		'+' + module.exports.humanize(this.diff);
-
-	if (!this.useColors) {
-		return;
-	}
-
-	const c = 'color: ' + this.color;
-	args.splice(1, 0, c, 'color: inherit');
-
-	// The final "%c" is somewhat tricky, because there could be other
-	// arguments passed either before or after the %c, so we need to
-	// figure out the correct index to insert the CSS into
-	let index = 0;
-	let lastC = 0;
-	args[0].replace(/%[a-zA-Z%]/g, match => {
-		if (match === '%%') {
-			return;
-		}
-		index++;
-		if (match === '%c') {
-			// We only are interested in the *last* %c
-			// (the user may have provided their own)
-			lastC = index;
-		}
-	});
-
-	args.splice(lastC, 0, c);
-}
-
-/**
- * Invokes `console.debug()` when available.
- * No-op when `console.debug` is not a "function".
- * If `console.debug` is not available, falls back
- * to `console.log`.
- *
- * @api public
- */
-exports.log = console.debug || console.log || (() => {});
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-function save(namespaces) {
-	try {
-		if (namespaces) {
-			exports.storage.setItem('debug', namespaces);
-		} else {
-			exports.storage.removeItem('debug');
-		}
-	} catch (error) {
-		// Swallow
-		// XXX (@Qix-) should we be logging these?
-	}
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-function load() {
-	let r;
-	try {
-		r = exports.storage.getItem('debug');
-	} catch (error) {
-		// Swallow
-		// XXX (@Qix-) should we be logging these?
-	}
-
-	// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
-	if (!r && typeof process !== 'undefined' && 'env' in process) {
-		r = process.env.DEBUG;
-	}
-
-	return r;
-}
-
-/**
- * Localstorage attempts to return the localstorage.
- *
- * This is necessary because safari throws
- * when a user disables cookies/localstorage
- * and you attempt to access it.
- *
- * @return {LocalStorage}
- * @api private
- */
-
-function localstorage() {
-	try {
-		// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
-		// The Browser also has localStorage in the global context.
-		return localStorage;
-	} catch (error) {
-		// Swallow
-		// XXX (@Qix-) should we be logging these?
-	}
-}
-
-module.exports = require('./common')(exports);
-
-const {formatters} = module.exports;
-
-/**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
-
-formatters.j = function (v) {
-	try {
-		return JSON.stringify(v);
-	} catch (error) {
-		return '[UnexpectedJSONParseError]: ' + error.message;
-	}
-};

+ 0 - 274
zbytb/node_modules/debug/src/common.js

@@ -1,274 +0,0 @@
-
-/**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- */
-
-function setup(env) {
-	createDebug.debug = createDebug;
-	createDebug.default = createDebug;
-	createDebug.coerce = coerce;
-	createDebug.disable = disable;
-	createDebug.enable = enable;
-	createDebug.enabled = enabled;
-	createDebug.humanize = require('ms');
-	createDebug.destroy = destroy;
-
-	Object.keys(env).forEach(key => {
-		createDebug[key] = env[key];
-	});
-
-	/**
-	* The currently active debug mode names, and names to skip.
-	*/
-
-	createDebug.names = [];
-	createDebug.skips = [];
-
-	/**
-	* Map of special "%n" handling functions, for the debug "format" argument.
-	*
-	* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
-	*/
-	createDebug.formatters = {};
-
-	/**
-	* Selects a color for a debug namespace
-	* @param {String} namespace The namespace string for the debug instance to be colored
-	* @return {Number|String} An ANSI color code for the given namespace
-	* @api private
-	*/
-	function selectColor(namespace) {
-		let hash = 0;
-
-		for (let i = 0; i < namespace.length; i++) {
-			hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
-			hash |= 0; // Convert to 32bit integer
-		}
-
-		return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
-	}
-	createDebug.selectColor = selectColor;
-
-	/**
-	* Create a debugger with the given `namespace`.
-	*
-	* @param {String} namespace
-	* @return {Function}
-	* @api public
-	*/
-	function createDebug(namespace) {
-		let prevTime;
-		let enableOverride = null;
-		let namespacesCache;
-		let enabledCache;
-
-		function debug(...args) {
-			// Disabled?
-			if (!debug.enabled) {
-				return;
-			}
-
-			const self = debug;
-
-			// Set `diff` timestamp
-			const curr = Number(new Date());
-			const ms = curr - (prevTime || curr);
-			self.diff = ms;
-			self.prev = prevTime;
-			self.curr = curr;
-			prevTime = curr;
-
-			args[0] = createDebug.coerce(args[0]);
-
-			if (typeof args[0] !== 'string') {
-				// Anything else let's inspect with %O
-				args.unshift('%O');
-			}
-
-			// Apply any `formatters` transformations
-			let index = 0;
-			args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
-				// If we encounter an escaped % then don't increase the array index
-				if (match === '%%') {
-					return '%';
-				}
-				index++;
-				const formatter = createDebug.formatters[format];
-				if (typeof formatter === 'function') {
-					const val = args[index];
-					match = formatter.call(self, val);
-
-					// Now we need to remove `args[index]` since it's inlined in the `format`
-					args.splice(index, 1);
-					index--;
-				}
-				return match;
-			});
-
-			// Apply env-specific formatting (colors, etc.)
-			createDebug.formatArgs.call(self, args);
-
-			const logFn = self.log || createDebug.log;
-			logFn.apply(self, args);
-		}
-
-		debug.namespace = namespace;
-		debug.useColors = createDebug.useColors();
-		debug.color = createDebug.selectColor(namespace);
-		debug.extend = extend;
-		debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
-
-		Object.defineProperty(debug, 'enabled', {
-			enumerable: true,
-			configurable: false,
-			get: () => {
-				if (enableOverride !== null) {
-					return enableOverride;
-				}
-				if (namespacesCache !== createDebug.namespaces) {
-					namespacesCache = createDebug.namespaces;
-					enabledCache = createDebug.enabled(namespace);
-				}
-
-				return enabledCache;
-			},
-			set: v => {
-				enableOverride = v;
-			}
-		});
-
-		// Env-specific initialization logic for debug instances
-		if (typeof createDebug.init === 'function') {
-			createDebug.init(debug);
-		}
-
-		return debug;
-	}
-
-	function extend(namespace, delimiter) {
-		const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
-		newDebug.log = this.log;
-		return newDebug;
-	}
-
-	/**
-	* Enables a debug mode by namespaces. This can include modes
-	* separated by a colon and wildcards.
-	*
-	* @param {String} namespaces
-	* @api public
-	*/
-	function enable(namespaces) {
-		createDebug.save(namespaces);
-		createDebug.namespaces = namespaces;
-
-		createDebug.names = [];
-		createDebug.skips = [];
-
-		let i;
-		const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
-		const len = split.length;
-
-		for (i = 0; i < len; i++) {
-			if (!split[i]) {
-				// ignore empty strings
-				continue;
-			}
-
-			namespaces = split[i].replace(/\*/g, '.*?');
-
-			if (namespaces[0] === '-') {
-				createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
-			} else {
-				createDebug.names.push(new RegExp('^' + namespaces + '$'));
-			}
-		}
-	}
-
-	/**
-	* Disable debug output.
-	*
-	* @return {String} namespaces
-	* @api public
-	*/
-	function disable() {
-		const namespaces = [
-			...createDebug.names.map(toNamespace),
-			...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
-		].join(',');
-		createDebug.enable('');
-		return namespaces;
-	}
-
-	/**
-	* Returns true if the given mode name is enabled, false otherwise.
-	*
-	* @param {String} name
-	* @return {Boolean}
-	* @api public
-	*/
-	function enabled(name) {
-		if (name[name.length - 1] === '*') {
-			return true;
-		}
-
-		let i;
-		let len;
-
-		for (i = 0, len = createDebug.skips.length; i < len; i++) {
-			if (createDebug.skips[i].test(name)) {
-				return false;
-			}
-		}
-
-		for (i = 0, len = createDebug.names.length; i < len; i++) {
-			if (createDebug.names[i].test(name)) {
-				return true;
-			}
-		}
-
-		return false;
-	}
-
-	/**
-	* Convert regexp to namespace
-	*
-	* @param {RegExp} regxep
-	* @return {String} namespace
-	* @api private
-	*/
-	function toNamespace(regexp) {
-		return regexp.toString()
-			.substring(2, regexp.toString().length - 2)
-			.replace(/\.\*\?$/, '*');
-	}
-
-	/**
-	* Coerce `val`.
-	*
-	* @param {Mixed} val
-	* @return {Mixed}
-	* @api private
-	*/
-	function coerce(val) {
-		if (val instanceof Error) {
-			return val.stack || val.message;
-		}
-		return val;
-	}
-
-	/**
-	* XXX DO NOT USE. This is a temporary stub function.
-	* XXX It WILL be removed in the next major release.
-	*/
-	function destroy() {
-		console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
-	}
-
-	createDebug.enable(createDebug.load());
-
-	return createDebug;
-}
-
-module.exports = setup;

+ 0 - 10
zbytb/node_modules/debug/src/index.js

@@ -1,10 +0,0 @@
-/**
- * Detect Electron renderer / nwjs process, which is node, but we should
- * treat as a browser.
- */
-
-if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
-	module.exports = require('./browser.js');
-} else {
-	module.exports = require('./node.js');
-}

+ 0 - 263
zbytb/node_modules/debug/src/node.js

@@ -1,263 +0,0 @@
-/**
- * Module dependencies.
- */
-
-const tty = require('tty');
-const util = require('util');
-
-/**
- * This is the Node.js implementation of `debug()`.
- */
-
-exports.init = init;
-exports.log = log;
-exports.formatArgs = formatArgs;
-exports.save = save;
-exports.load = load;
-exports.useColors = useColors;
-exports.destroy = util.deprecate(
-	() => {},
-	'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
-);
-
-/**
- * Colors.
- */
-
-exports.colors = [6, 2, 3, 4, 5, 1];
-
-try {
-	// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
-	// eslint-disable-next-line import/no-extraneous-dependencies
-	const supportsColor = require('supports-color');
-
-	if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
-		exports.colors = [
-			20,
-			21,
-			26,
-			27,
-			32,
-			33,
-			38,
-			39,
-			40,
-			41,
-			42,
-			43,
-			44,
-			45,
-			56,
-			57,
-			62,
-			63,
-			68,
-			69,
-			74,
-			75,
-			76,
-			77,
-			78,
-			79,
-			80,
-			81,
-			92,
-			93,
-			98,
-			99,
-			112,
-			113,
-			128,
-			129,
-			134,
-			135,
-			148,
-			149,
-			160,
-			161,
-			162,
-			163,
-			164,
-			165,
-			166,
-			167,
-			168,
-			169,
-			170,
-			171,
-			172,
-			173,
-			178,
-			179,
-			184,
-			185,
-			196,
-			197,
-			198,
-			199,
-			200,
-			201,
-			202,
-			203,
-			204,
-			205,
-			206,
-			207,
-			208,
-			209,
-			214,
-			215,
-			220,
-			221
-		];
-	}
-} catch (error) {
-	// Swallow - we only care if `supports-color` is available; it doesn't have to be.
-}
-
-/**
- * Build up the default `inspectOpts` object from the environment variables.
- *
- *   $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
- */
-
-exports.inspectOpts = Object.keys(process.env).filter(key => {
-	return /^debug_/i.test(key);
-}).reduce((obj, key) => {
-	// Camel-case
-	const prop = key
-		.substring(6)
-		.toLowerCase()
-		.replace(/_([a-z])/g, (_, k) => {
-			return k.toUpperCase();
-		});
-
-	// Coerce string value into JS value
-	let val = process.env[key];
-	if (/^(yes|on|true|enabled)$/i.test(val)) {
-		val = true;
-	} else if (/^(no|off|false|disabled)$/i.test(val)) {
-		val = false;
-	} else if (val === 'null') {
-		val = null;
-	} else {
-		val = Number(val);
-	}
-
-	obj[prop] = val;
-	return obj;
-}, {});
-
-/**
- * Is stdout a TTY? Colored output is enabled when `true`.
- */
-
-function useColors() {
-	return 'colors' in exports.inspectOpts ?
-		Boolean(exports.inspectOpts.colors) :
-		tty.isatty(process.stderr.fd);
-}
-
-/**
- * Adds ANSI color escape codes if enabled.
- *
- * @api public
- */
-
-function formatArgs(args) {
-	const {namespace: name, useColors} = this;
-
-	if (useColors) {
-		const c = this.color;
-		const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
-		const prefix = `  ${colorCode};1m${name} \u001B[0m`;
-
-		args[0] = prefix + args[0].split('\n').join('\n' + prefix);
-		args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
-	} else {
-		args[0] = getDate() + name + ' ' + args[0];
-	}
-}
-
-function getDate() {
-	if (exports.inspectOpts.hideDate) {
-		return '';
-	}
-	return new Date().toISOString() + ' ';
-}
-
-/**
- * Invokes `util.format()` with the specified arguments and writes to stderr.
- */
-
-function log(...args) {
-	return process.stderr.write(util.format(...args) + '\n');
-}
-
-/**
- * Save `namespaces`.
- *
- * @param {String} namespaces
- * @api private
- */
-function save(namespaces) {
-	if (namespaces) {
-		process.env.DEBUG = namespaces;
-	} else {
-		// If you set a process.env field to null or undefined, it gets cast to the
-		// string 'null' or 'undefined'. Just delete instead.
-		delete process.env.DEBUG;
-	}
-}
-
-/**
- * Load `namespaces`.
- *
- * @return {String} returns the previously persisted debug modes
- * @api private
- */
-
-function load() {
-	return process.env.DEBUG;
-}
-
-/**
- * Init logic for `debug` instances.
- *
- * Create a new `inspectOpts` object in case `useColors` is set
- * differently for a particular `debug` instance.
- */
-
-function init(debug) {
-	debug.inspectOpts = {};
-
-	const keys = Object.keys(exports.inspectOpts);
-	for (let i = 0; i < keys.length; i++) {
-		debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
-	}
-}
-
-module.exports = require('./common')(exports);
-
-const {formatters} = module.exports;
-
-/**
- * Map %o to `util.inspect()`, all on a single line.
- */
-
-formatters.o = function (v) {
-	this.inspectOpts.colors = this.useColors;
-	return util.inspect(v, this.inspectOpts)
-		.split('\n')
-		.map(str => str.trim())
-		.join(' ');
-};
-
-/**
- * Map %O to `util.inspect()`, allowing multiple lines if needed.
- */
-
-formatters.O = function (v) {
-	this.inspectOpts.colors = this.useColors;
-	return util.inspect(v, this.inspectOpts);
-};

+ 0 - 231
zbytb/node_modules/decimal.js/CHANGELOG.md

@@ -1,231 +0,0 @@
-#### 10.3.1
-* 25/06/2021
-* Remove minified versions. Refresh *README*.
-
-#### 10.3.0
-* 22/06/2021
-* Support underscores as separators.
-* #101 Add `Decimal.clamp` method.
-* #161 Fix Decimal instances deemed plain objects.
-* #100 Add `Decimal.sum` method.
-* #146 `Symbol.for` to `Symbol['for']` for IE8.
-* #132 Fix possible infinite loop when `minE` is very low.
-* #180 Accept Decimals of different origin.
-* Update Typescript definitions.
-* Update minification examples in *README*.
-* Add minified versions for both *decimal.js* and *decimal.mjs*.
-* Add *files* field to *package.json*, and remove build script.
-
-#### 10.2.1
-* 28/09/2020
-* Correct `sqrt` initial estimate.
-
-#### 10.2.0
-* 08/05/2019
-* #128 Workaround V8 `Math.pow` change.
-* #93 Accept `+` prefix when parsing string values.
-* #129 Fix typo.
-
-#### 10.1.1
-* 27/02/2019
-* Check `Symbol` properly.
-
-#### 10.1.0
-* 26/02/2019
-* #122 Add custom `util.inspect()` function.
-* Add `Symbol.toStringTag`.
-* #121 Constructor: add range check for arguments of type number and Decimal.
-* Remove premable from uglifyjs build script.
-* Move *decimal.min.js.map* to root directory.
-
-#### 10.0.2
-* 13/12/2018
-* #114 Remove soureMappingURL from *decimal.min.js*.
-* Remove *bower.json*.
-
-#### 10.0.1
-* 24/05/2018
-* Add `browser` field to *package.json*.
-
-#### 10.0.0
-* 10/03/2018
-* #88 `toNearest` to return the nearest multiple in the direction of the rounding mode.
-* #82 #91 `const` to `var`.
-* Add trigonometric precision limit explanantion to documentation.
-* Put global ts definitions in separate file (see *bignumber.js* #143).
-
-#### 9.0.1
-* 15/12/2017
-* #80 Typings: correct return type.
-
-#### 9.0.0
-* 14/12/2017
-* #78 Typings: remove `toFormat`.
-
-#### 8.0.0
-* 10/12/2017
-* Correct typings: `toFraction` returns `Decimal[]`.
-* Type-checking: add `Decimal.isDecimal` method.
-* Enable configuration reset with `defaults: true`.
-* Add named export, Decimal, to *decimal.mjs*.
-
-#### 7.5.1
-* 03/12/2017
-* Remove typo.
-
-#### 7.5.0
-* 03/12/2017
-* Use TypeScript declarations outside modules.
-
-#### 7.4.0
-* 25/11/2017
-* Add TypeScript typings.
-
-#### 7.3.0
-* 26/09/2017
-* Rename *decimal.es6.js* to *decimal.mjs*.
-* Amend  *.travis.yml*.
-
-#### 7.2.4
-* 09/09/2017
-* Update docs regarding `global.crypto`.
-* Fix `import` issues.
-
-#### 7.2.3
-* 27/06/2017
-* Bugfix: #58 `pow` sometimes throws when result is `Infinity`.
-
-#### 7.2.2
-* 25/06/2017
-* Bugfix: #57 Powers of -1 for integers over `Number.MAX_SAFE_INTEGER`.
-
-#### 7.2.1
-* 04/05/2017
-* Fix *README* badges.
-
-#### 7.2.0
-* 09/04/2017
-* Add *decimal.es6.js*
-
-#### 7.1.2
-* 05/04/2017
-* `Decimal.default` to `Decimal['default']` IE8 issue
-
-#### 7.1.1
-* 10/01/2017
-* Remove duplicated for-loop
-* Minor refactoring
-
-#### 7.1.0
-* 09/11/2016
-* Support ES6 imports.
-
-#### 7.0.0
-* 09/11/2016
-* Remove `require('crypto')` - leave it to the user
-* Default `Decimal.crypto` to `false`
-* Add `Decimal.set` as `Decimal.config` alias
-
-#### 6.0.0
-* 30/06/2016
-* Removed base-88 serialization format
-* Amended `toJSON` and removed `Decimal.fromJSON` accordingly
-
-#### 5.0.8
-* 09/03/2016
-* Add newline to single test results
-* Correct year
-
-#### 5.0.7
-* 29/02/2016
-* Add decimal.js-light link
-* Remove outdated example from docs
-
-#### 5.0.6
-* 22/02/2016
-* Add bower.json
-
-#### 5.0.5
-* 20/02/2016
-* Bugfix: #26 wrong precision applied
-
-#### 5.0.4
-* 14/02/2016
-* Bugfix: #26 clone
-
-#### 5.0.3
-* 06/02/2016
-* Refactor tests
-
-#### 5.0.2
-* 05/02/2016
-* Added immutability tests
-* Minor *decimal.js* clean-up
-
-#### 5.0.1
-* 28/01/2016
-* Bugfix: #20 cos mutates value
-* Add pi info to docs
-
-#### 5.0.0
-* 25/01/2016
-* Added trigonometric functions and `cubeRoot` method
-* Added most of JavaScript's `Math` object methods as Decimal methods
-* Added `toBinary`, `toHexadecimal` and `toOctal` methods
-* Added `isPositive` method
-* Removed the 15 significant digit limit for numbers
-* `toFraction` now returns an array of two Decimals, not two strings
-* String values containing whitespace or a plus sign are no longer accepted
-* `valueOf` now returns `'-0'` for minus zero
-* `comparedTo` now returns `NaN` not `null` for comparisons with `NaN`
-* `Decimal.max` and `Decimal.min` no longer accept an array
-* The Decimal constructor and `toString` no longer accept a base argument
-* Binary, hexadecimal and octal prefixes are now recognised for string values
-* Removed `Decimal.errors` configuration property
-* Removed `toFormat` method
-* Removed `Decimal.ONE`
-* Renamed `exponential` method to `naturalExponential`
-* Renamed `Decimal.constructor` method to `Decimal.clone`
-* Simplified error handling and amended error messages
-* Refactored the test suite
-* `Decimal.crypto` is now `undefined` by default, and the `crypto` object will be used if available
-* Major internal refactoring
-* Removed *bower.json*
-
-#### 4.0.2
-* 20/02/2015 Add bower.json. Add source map. Amend travis CI. Amend doc/comments
-
-#### 4.0.1
-* 11/12/2014 Assign correct constructor when duplicating a Decimal
-
-#### 4.0.0
-* 10/11/2014 `toFormat` amended to use `Decimal.format` object for more flexible configuration
-
-#### 3.0.1
-* 8/06/2014 Surround crypto require in try catch. See issue #5
-
-#### 3.0.0
-* 4/06/2014 `random` simplified. Major internal changes mean the properties of a Decimal must now be considered read-only
-
-#### 2.1.0
-* 4/06/2014 Amend UMD
-
-#### 2.0.3
-* 8/05/2014 Fix NaN toNumber
-
-#### 2.0.2
-* 30/04/2014 Correct doc links
-
-#### 2.0.1
-* 10/04/2014 Update npmignore
-
-#### 2.0.0
-* 10/04/2014 Add `toSignificantDigits`
-* Remove `toInteger`
-* No arguments to `ceil`, `floor`, `round` and `trunc`
-
-#### 1.0.1
-* 07/04/2014 Minor documentation clean-up
-
-#### 1.0.0
-* 02/04/2014 Initial release

+ 0 - 23
zbytb/node_modules/decimal.js/LICENCE.md

@@ -1,23 +0,0 @@
-The MIT Licence.
-
-Copyright (c) 2021 Michael Mclaughlin
-
-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.
-

+ 0 - 246
zbytb/node_modules/decimal.js/README.md

@@ -1,246 +0,0 @@
-![decimal.js](https://raw.githubusercontent.com/MikeMcl/decimal.js/gh-pages/decimaljs.png)
-
-An arbitrary-precision Decimal type for JavaScript.
-
-[![npm version](https://img.shields.io/npm/v/decimal.js.svg)](https://www.npmjs.com/package/decimal.js)
-[![npm downloads](https://img.shields.io/npm/dw/decimal.js)](https://www.npmjs.com/package/decimal.js)
-[![Build Status](https://travis-ci.org/MikeMcl/decimal.js.svg)](https://travis-ci.org/MikeMcl/decimal.js)
-[![CDNJS](https://img.shields.io/cdnjs/v/decimal.js.svg)](https://cdnjs.com/libraries/decimal.js)
-
-<br>
-
-## Features
-
-  - Integers and floats
-  - Simple but full-featured API
-  - Replicates many of the methods of JavaScript's `Number.prototype` and `Math` objects
-  - Also handles hexadecimal, binary and octal values
-  - Faster, smaller, and perhaps easier to use than JavaScript versions of Java's BigDecimal
-  - No dependencies
-  - Wide platform compatibility: uses JavaScript 1.5 (ECMAScript 3) features only
-  - Comprehensive [documentation](https://mikemcl.github.io/decimal.js/) and test set
-  - Used under the hood by [math.js](https://github.com/josdejong/mathjs)
-  - Includes a TypeScript declaration file: *decimal.d.ts*
-
-![API](https://raw.githubusercontent.com/MikeMcl/decimal.js/gh-pages/API.png)
-
-The library is similar to [bignumber.js](https://github.com/MikeMcl/bignumber.js/), but here
-precision is specified in terms of significant digits rather than decimal places, and all
-calculations are rounded to the precision (similar to Python's decimal module) rather than just
-those involving division.
-
-This library also adds the trigonometric functions, among others, and supports non-integer powers,
-which makes it a significantly larger library than *bignumber.js* and the even smaller
-[big.js](https://github.com/MikeMcl/big.js/).
-
-For a lighter version of this library without the trigonometric functions see
-[decimal.js-light](https://github.com/MikeMcl/decimal.js-light/).
-
-## Load
-
-The library is the single JavaScript file *decimal.js* or ES module *decimal.mjs*.
-
-Browser:
-
-```html
-<script src='path/to/decimal.js'></script>
-
-<script type="module">
-  import Decimal from './path/to/decimal.mjs';
-  ...
-</script>
-```
-
-[Node.js](https://nodejs.org):
-
-```bash
-npm install decimal.js
-```
-```js
-const Decimal = require('decimal.js');
-
-import Decimal from 'decimal.js';
-
-import {Decimal} from 'decimal.js';
-```
-
-## Use
-
-*In all examples below, semicolons and `toString` calls are not shown.
-If a commented-out value is in quotes it means `toString` has been called on the preceding expression.*
-
-The library exports a single constructor function, `Decimal`, which expects a single argument that is a number, string or Decimal instance.
-
-```js
-x = new Decimal(123.4567)
-y = new Decimal('123456.7e-3')
-z = new Decimal(x)
-x.equals(y) && y.equals(z) && x.equals(z)        // true
-```
-
-If using values with more than a few digits, it is recommended to pass strings rather than numbers to avoid a potential loss of precision.
-
-```js
-// Precision loss from using numeric literals with more than 15 significant digits.
-new Decimal(1.0000000000000001)         // '1'
-new Decimal(88259496234518.57)          // '88259496234518.56'
-new Decimal(99999999999999999999)       // '100000000000000000000'
-
-// Precision loss from using numeric literals outside the range of Number values.
-new Decimal(2e+308)                     // 'Infinity'
-new Decimal(1e-324)                     // '0'
-
-// Precision loss from the unexpected result of arithmetic with Number values.
-new Decimal(0.7 + 0.1)                  // '0.7999999999999999'
-```
-
-As with JavaScript numbers, strings can contain underscores as separators to improve readability.
-
-```js
-x = new Decimal('2_147_483_647')
-```
-
-String values in binary, hexadecimal or octal notation are also accepted if the appropriate prefix is included.
-
-```js
-x = new Decimal('0xff.f')            // '255.9375'
-y = new Decimal('0b10101100')        // '172'
-z = x.plus(y)                        // '427.9375'
-
-z.toBinary()                         // '0b110101011.1111'
-z.toBinary(13)                       // '0b1.101010111111p+8'
-
-// Using binary exponential notation to create a Decimal with the value of `Number.MAX_VALUE`.
-x = new Decimal('0b1.1111111111111111111111111111111111111111111111111111p+1023')
-// '1.7976931348623157081e+308'
-```
-
-Decimal instances are immutable in the sense that they are not changed by their methods.
-
-```js
-0.3 - 0.1                     // 0.19999999999999998
-x = new Decimal(0.3)
-x.minus(0.1)                  // '0.2'
-x                             // '0.3'
-```
-
-The methods that return a Decimal can be chained.
-
-```js
-x.dividedBy(y).plus(z).times(9).floor()
-x.times('1.23456780123456789e+9').plus(9876.5432321).dividedBy('4444562598.111772').ceil()
-```
-
-Many method names have a shorter alias.
-
-```js
-x.squareRoot().dividedBy(y).toPower(3).equals(x.sqrt().div(y).pow(3))     // true
-x.comparedTo(y.modulo(z).negated() === x.cmp(y.mod(z).neg())              // true
-```
-
-Most of the methods of JavaScript's `Number.prototype` and `Math` objects are replicated.
-
-```js
-x = new Decimal(255.5)
-x.toExponential(5)                       // '2.55500e+2'
-x.toFixed(5)                             // '255.50000'
-x.toPrecision(5)                         // '255.50'
-
-Decimal.sqrt('6.98372465832e+9823')      // '8.3568682281821340204e+4911'
-Decimal.pow(2, 0.0979843)                // '1.0702770511687781839'
-
-// Using `toFixed()` to avoid exponential notation:
-x = new Decimal('0.0000001')
-x.toString()                             // '1e-7'
-x.toFixed()                              // '0.0000001'
-```
-
-And there are `isNaN` and `isFinite` methods, as `NaN` and `Infinity` are valid `Decimal` values.
-
-```js
-x = new Decimal(NaN)                                           // 'NaN'
-y = new Decimal(Infinity)                                      // 'Infinity'
-x.isNaN() && !y.isNaN() && !x.isFinite() && !y.isFinite()      // true
-```
-
-There is also a `toFraction` method with an optional *maximum denominator* argument.
-
-```js
-z = new Decimal(355)
-pi = z.dividedBy(113)        // '3.1415929204'
-pi.toFraction()              // [ '7853982301', '2500000000' ]
-pi.toFraction(1000)          // [ '355', '113' ]
-```
-
-All calculations are rounded according to the number of significant digits and rounding mode specified
-by the `precision` and `rounding` properties of the Decimal constructor.
-
-For advanced usage, multiple Decimal constructors can be created, each with their own independent
-configuration which applies to all Decimal numbers created from it.
-
-```js
-// Set the precision and rounding of the default Decimal constructor
-Decimal.set({ precision: 5, rounding: 4 })
-
-// Create another Decimal constructor, optionally passing in a configuration object
-Dec = Decimal.clone({ precision: 9, rounding: 1 })
-
-x = new Decimal(5)
-y = new Dec(5)
-
-x.div(3)                           // '1.6667'
-y.div(3)                           // '1.66666666'
-```
-
-The value of a Decimal is stored in a floating point format in terms of its digits, exponent and sign, but these properties should be considered read-only.
-
-```js
-x = new Decimal(-12345.67);
-x.d                            // [ 12345, 6700000 ]    digits (base 10000000)
-x.e                            // 4                     exponent (base 10)
-x.s                            // -1                    sign
-```
-
-For further information see the [API](http://mikemcl.github.io/decimal.js/) reference in the *doc* directory.
-
-## Test
-
-To run the tests using Node.js from the root directory:
-
-```bash
-npm test
-```
-
-Each separate test module can also be executed individually, for example:
-
-```bash
-node test/modules/toFraction
-```
-
-To run the tests in a browser, open *test/test.html*.
-
-## Minify
-
-Two minification examples:
-
-Using [uglify-js](https://github.com/mishoo/UglifyJS) to minify the *decimal.js* file:
-
-```bash
-npm install uglify-js -g
-uglifyjs decimal.js --source-map url=decimal.min.js.map -c -m -o decimal.min.js
-```
-
-Using [terser](https://github.com/terser/terser) to minify the ES module version, *decimal.mjs*:
-
-```bash
-npm install terser -g
-terser decimal.mjs --source-map url=decimal.min.mjs.map -c -m --toplevel -o decimal.min.mjs
-```
-
-```js
-import Decimal from './decimal.min.mjs';
-```
-
-## Licence
-
-[The MIT Licence (Expat).](LICENCE.md)

+ 0 - 300
zbytb/node_modules/decimal.js/decimal.d.ts

@@ -1,300 +0,0 @@
-// Type definitions for decimal.js >=7.0.0
-// Project: https://github.com/MikeMcl/decimal.js
-// Definitions by: Michael Mclaughlin <https://github.com/MikeMcl>
-// Definitions: https://github.com/MikeMcl/decimal.js
-//
-// Documentation: http://mikemcl.github.io/decimal.js/
-//
-// Exports:
-//
-//   class     Decimal (default export)
-//   type      Decimal.Constructor
-//   type      Decimal.Instance
-//   type      Decimal.Modulo
-//   type      Decimal.Rounding
-//   type      Decimal.Value
-//   interface Decimal.Config
-//
-// Example (alternative syntax commented-out):
-//
-//   import {Decimal} from "decimal.js"
-//   //import Decimal from "decimal.js"
-//
-//   let r: Decimal.Rounding = Decimal.ROUND_UP;
-//   let c: Decimal.Configuration = {precision: 4, rounding: r};
-//   Decimal.set(c);
-//   let v: Decimal.Value = '12345.6789';
-//   let d: Decimal = new Decimal(v);
-//   //let d: Decimal.Instance = new Decimal(v);
-//
-// The use of compiler option `--strictNullChecks` is recommended.
-
-export default Decimal;
-
-export namespace Decimal {
-  export type Constructor = typeof Decimal;
-  export type Instance = Decimal;
-  export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
-  export type Modulo = Rounding | 9;
-  export type Value = string | number | Decimal;
-
-  // http://mikemcl.github.io/decimal.js/#constructor-properties
-  export interface Config {
-    precision?: number;
-    rounding?: Rounding;
-    toExpNeg?: number;
-    toExpPos?: number;
-    minE?: number;
-    maxE?: number;
-    crypto?: boolean;
-    modulo?: Modulo;
-    defaults?: boolean;
-  }
-}
-
-export declare class Decimal {
-  readonly d: number[];
-  readonly e: number;
-  readonly s: number;
-  private readonly toStringTag: string;
-
-  constructor(n: Decimal.Value);
-
-  absoluteValue(): Decimal;
-  abs(): Decimal;
-
-  ceil(): Decimal;
-  
-  clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
-  clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
-
-  comparedTo(n: Decimal.Value): number;
-  cmp(n: Decimal.Value): number;
-
-  cosine(): Decimal;
-  cos(): Decimal;
-
-  cubeRoot(): Decimal;
-  cbrt(): Decimal;
-
-  decimalPlaces(): number;
-  dp(): number;
-
-  dividedBy(n: Decimal.Value): Decimal;
-  div(n: Decimal.Value): Decimal;
-
-  dividedToIntegerBy(n: Decimal.Value): Decimal;
-  divToInt(n: Decimal.Value): Decimal;
-
-  equals(n: Decimal.Value): boolean;
-  eq(n: Decimal.Value): boolean;
-
-  floor(): Decimal;
-
-  greaterThan(n: Decimal.Value): boolean;
-  gt(n: Decimal.Value): boolean;
-
-  greaterThanOrEqualTo(n: Decimal.Value): boolean;
-  gte(n: Decimal.Value): boolean;
-
-  hyperbolicCosine(): Decimal;
-  cosh(): Decimal;
-
-  hyperbolicSine(): Decimal;
-  sinh(): Decimal;
-
-  hyperbolicTangent(): Decimal;
-  tanh(): Decimal;
-
-  inverseCosine(): Decimal;
-  acos(): Decimal;
-
-  inverseHyperbolicCosine(): Decimal;
-  acosh(): Decimal;
-
-  inverseHyperbolicSine(): Decimal;
-  asinh(): Decimal;
-
-  inverseHyperbolicTangent(): Decimal;
-  atanh(): Decimal;
-
-  inverseSine(): Decimal;
-  asin(): Decimal;
-
-  inverseTangent(): Decimal;
-  atan(): Decimal;
-
-  isFinite(): boolean;
-
-  isInteger(): boolean;
-  isInt(): boolean;
-
-  isNaN(): boolean;
-
-  isNegative(): boolean;
-  isNeg(): boolean;
-
-  isPositive(): boolean;
-  isPos(): boolean;
-
-  isZero(): boolean;
-
-  lessThan(n: Decimal.Value): boolean;
-  lt(n: Decimal.Value): boolean;
-
-  lessThanOrEqualTo(n: Decimal.Value): boolean;
-  lte(n: Decimal.Value): boolean;
-
-  logarithm(n?: Decimal.Value): Decimal;
-  log(n?: Decimal.Value): Decimal;
-
-  minus(n: Decimal.Value): Decimal;
-  sub(n: Decimal.Value): Decimal;
-
-  modulo(n: Decimal.Value): Decimal;
-  mod(n: Decimal.Value): Decimal;
-
-  naturalExponential(): Decimal;
-  exp(): Decimal;
-
-  naturalLogarithm(): Decimal;
-  ln(): Decimal;
-
-  negated(): Decimal;
-  neg(): Decimal;
-
-  plus(n: Decimal.Value): Decimal;
-  add(n: Decimal.Value): Decimal;
-
-  precision(includeZeros?: boolean): number;
-  sd(includeZeros?: boolean): number;
-
-  round(): Decimal;
-
-  sine() : Decimal;
-  sin() : Decimal;
-
-  squareRoot(): Decimal;
-  sqrt(): Decimal;
-
-  tangent() : Decimal;
-  tan() : Decimal;
-
-  times(n: Decimal.Value): Decimal;
-  mul(n: Decimal.Value) : Decimal;
-
-  toBinary(significantDigits?: number): string;
-  toBinary(significantDigits: number, rounding: Decimal.Rounding): string;
-
-  toDecimalPlaces(decimalPlaces?: number): Decimal;
-  toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
-  toDP(decimalPlaces?: number): Decimal;
-  toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
-
-  toExponential(decimalPlaces?: number): string;
-  toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string;
-
-  toFixed(decimalPlaces?: number): string;
-  toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string;
-
-  toFraction(max_denominator?: Decimal.Value): Decimal[];
-
-  toHexadecimal(significantDigits?: number): string;
-  toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string;
-  toHex(significantDigits?: number): string;
-  toHex(significantDigits: number, rounding?: Decimal.Rounding): string;
-
-  toJSON(): string;
-
-  toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal;
-
-  toNumber(): number;
-
-  toOctal(significantDigits?: number): string;
-  toOctal(significantDigits: number, rounding: Decimal.Rounding): string;
-
-  toPower(n: Decimal.Value): Decimal;
-  pow(n: Decimal.Value): Decimal;
-
-  toPrecision(significantDigits?: number): string;
-  toPrecision(significantDigits: number, rounding: Decimal.Rounding): string;
-
-  toSignificantDigits(significantDigits?: number): Decimal;
-  toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal;
-  toSD(significantDigits?: number): Decimal;
-  toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal;
-
-  toString(): string;
-
-  truncated(): Decimal;
-  trunc(): Decimal;
-
-  valueOf(): string;
-
-  static abs(n: Decimal.Value): Decimal;
-  static acos(n: Decimal.Value): Decimal;
-  static acosh(n: Decimal.Value): Decimal;
-  static add(x: Decimal.Value, y: Decimal.Value): Decimal;
-  static asin(n: Decimal.Value): Decimal;
-  static asinh(n: Decimal.Value): Decimal;
-  static atan(n: Decimal.Value): Decimal;
-  static atanh(n: Decimal.Value): Decimal;
-  static atan2(y: Decimal.Value, x: Decimal.Value): Decimal;
-  static cbrt(n: Decimal.Value): Decimal;
-  static ceil(n: Decimal.Value): Decimal;
-  static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
-  static clone(object?: Decimal.Config): Decimal.Constructor;
-  static config(object: Decimal.Config): Decimal.Constructor;
-  static cos(n: Decimal.Value): Decimal;
-  static cosh(n: Decimal.Value): Decimal;
-  static div(x: Decimal.Value, y: Decimal.Value): Decimal;
-  static exp(n: Decimal.Value): Decimal;
-  static floor(n: Decimal.Value): Decimal;
-  static hypot(...n: Decimal.Value[]): Decimal;
-  static isDecimal(object: any): boolean
-  static ln(n: Decimal.Value): Decimal;
-  static log(n: Decimal.Value, base?: Decimal.Value): Decimal;
-  static log2(n: Decimal.Value): Decimal;
-  static log10(n: Decimal.Value): Decimal;
-  static max(...n: Decimal.Value[]): Decimal;
-  static min(...n: Decimal.Value[]): Decimal;
-  static mod(x: Decimal.Value, y: Decimal.Value): Decimal;
-  static mul(x: Decimal.Value, y: Decimal.Value): Decimal;
-  static noConflict(): Decimal.Constructor;   // Browser only
-  static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal;
-  static random(significantDigits?: number): Decimal;
-  static round(n: Decimal.Value): Decimal;
-  static set(object: Decimal.Config): Decimal.Constructor;
-  static sign(n: Decimal.Value): Decimal;
-  static sin(n: Decimal.Value): Decimal;
-  static sinh(n: Decimal.Value): Decimal;
-  static sqrt(n: Decimal.Value): Decimal;
-  static sub(x: Decimal.Value, y: Decimal.Value): Decimal;
-  static sum(...n: Decimal.Value[]): Decimal;
-  static tan(n: Decimal.Value): Decimal;
-  static tanh(n: Decimal.Value): Decimal;
-  static trunc(n: Decimal.Value): Decimal;
-
-  static readonly default?: Decimal.Constructor;
-  static readonly Decimal?: Decimal.Constructor;
-
-  static readonly precision: number;
-  static readonly rounding: Decimal.Rounding;
-  static readonly toExpNeg: number;
-  static readonly toExpPos: number;
-  static readonly minE: number;
-  static readonly maxE: number;
-  static readonly crypto: boolean;
-  static readonly modulo: Decimal.Modulo;
-
-  static readonly ROUND_UP: 0;
-  static readonly ROUND_DOWN: 1;
-  static readonly ROUND_CEIL: 2;
-  static readonly ROUND_FLOOR: 3;
-  static readonly ROUND_HALF_UP: 4;
-  static readonly ROUND_HALF_DOWN: 5;
-  static readonly ROUND_HALF_EVEN: 6;
-  static readonly ROUND_HALF_CEIL: 7;
-  static readonly ROUND_HALF_FLOOR: 8;
-  static readonly EUCLID: 9;
-}

+ 0 - 4934
zbytb/node_modules/decimal.js/decimal.js

@@ -1,4934 +0,0 @@
-;(function (globalScope) {
-  'use strict';
-
-
-  /*
-   *  decimal.js v10.3.1
-   *  An arbitrary-precision Decimal type for JavaScript.
-   *  https://github.com/MikeMcl/decimal.js
-   *  Copyright (c) 2021 Michael Mclaughlin <M8ch88l@gmail.com>
-   *  MIT Licence
-   */
-
-
-  // -----------------------------------  EDITABLE DEFAULTS  ------------------------------------ //
-
-
-    // The maximum exponent magnitude.
-    // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`.
-  var EXP_LIMIT = 9e15,                      // 0 to 9e15
-
-    // The limit on the value of `precision`, and on the value of the first argument to
-    // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`.
-    MAX_DIGITS = 1e9,                        // 0 to 1e9
-
-    // Base conversion alphabet.
-    NUMERALS = '0123456789abcdef',
-
-    // The natural logarithm of 10 (1025 digits).
-    LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058',
-
-    // Pi (1025 digits).
-    PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789',
-
-
-    // The initial configuration properties of the Decimal constructor.
-    DEFAULTS = {
-
-      // These values must be integers within the stated ranges (inclusive).
-      // Most of these values can be changed at run-time using the `Decimal.config` method.
-
-      // The maximum number of significant digits of the result of a calculation or base conversion.
-      // E.g. `Decimal.config({ precision: 20 });`
-      precision: 20,                         // 1 to MAX_DIGITS
-
-      // The rounding mode used when rounding to `precision`.
-      //
-      // ROUND_UP         0 Away from zero.
-      // ROUND_DOWN       1 Towards zero.
-      // ROUND_CEIL       2 Towards +Infinity.
-      // ROUND_FLOOR      3 Towards -Infinity.
-      // ROUND_HALF_UP    4 Towards nearest neighbour. If equidistant, up.
-      // ROUND_HALF_DOWN  5 Towards nearest neighbour. If equidistant, down.
-      // ROUND_HALF_EVEN  6 Towards nearest neighbour. If equidistant, towards even neighbour.
-      // ROUND_HALF_CEIL  7 Towards nearest neighbour. If equidistant, towards +Infinity.
-      // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.
-      //
-      // E.g.
-      // `Decimal.rounding = 4;`
-      // `Decimal.rounding = Decimal.ROUND_HALF_UP;`
-      rounding: 4,                           // 0 to 8
-
-      // The modulo mode used when calculating the modulus: a mod n.
-      // The quotient (q = a / n) is calculated according to the corresponding rounding mode.
-      // The remainder (r) is calculated as: r = a - n * q.
-      //
-      // UP         0 The remainder is positive if the dividend is negative, else is negative.
-      // DOWN       1 The remainder has the same sign as the dividend (JavaScript %).
-      // FLOOR      3 The remainder has the same sign as the divisor (Python %).
-      // HALF_EVEN  6 The IEEE 754 remainder function.
-      // EUCLID     9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.
-      //
-      // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian
-      // division (9) are commonly used for the modulus operation. The other rounding modes can also
-      // be used, but they may not give useful results.
-      modulo: 1,                             // 0 to 9
-
-      // The exponent value at and beneath which `toString` returns exponential notation.
-      // JavaScript numbers: -7
-      toExpNeg: -7,                          // 0 to -EXP_LIMIT
-
-      // The exponent value at and above which `toString` returns exponential notation.
-      // JavaScript numbers: 21
-      toExpPos:  21,                         // 0 to EXP_LIMIT
-
-      // The minimum exponent value, beneath which underflow to zero occurs.
-      // JavaScript numbers: -324  (5e-324)
-      minE: -EXP_LIMIT,                      // -1 to -EXP_LIMIT
-
-      // The maximum exponent value, above which overflow to Infinity occurs.
-      // JavaScript numbers: 308  (1.7976931348623157e+308)
-      maxE: EXP_LIMIT,                       // 1 to EXP_LIMIT
-
-      // Whether to use cryptographically-secure random number generation, if available.
-      crypto: false                          // true/false
-    },
-
-
-  // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- //
-
-
-    Decimal, inexact, noConflict, quadrant,
-    external = true,
-
-    decimalError = '[DecimalError] ',
-    invalidArgument = decimalError + 'Invalid argument: ',
-    precisionLimitExceeded = decimalError + 'Precision limit exceeded',
-    cryptoUnavailable = decimalError + 'crypto unavailable',
-    tag = '[object Decimal]',
-
-    mathfloor = Math.floor,
-    mathpow = Math.pow,
-
-    isBinary = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,
-    isHex = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,
-    isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,
-    isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,
-
-    BASE = 1e7,
-    LOG_BASE = 7,
-    MAX_SAFE_INTEGER = 9007199254740991,
-
-    LN10_PRECISION = LN10.length - 1,
-    PI_PRECISION = PI.length - 1,
-
-    // Decimal.prototype object
-    P = { toStringTag: tag };
-
-
-  // Decimal prototype methods
-
-
-  /*
-   *  absoluteValue             abs
-   *  ceil
-   *  clampedTo                 clamp
-   *  comparedTo                cmp
-   *  cosine                    cos
-   *  cubeRoot                  cbrt
-   *  decimalPlaces             dp
-   *  dividedBy                 div
-   *  dividedToIntegerBy        divToInt
-   *  equals                    eq
-   *  floor
-   *  greaterThan               gt
-   *  greaterThanOrEqualTo      gte
-   *  hyperbolicCosine          cosh
-   *  hyperbolicSine            sinh
-   *  hyperbolicTangent         tanh
-   *  inverseCosine             acos
-   *  inverseHyperbolicCosine   acosh
-   *  inverseHyperbolicSine     asinh
-   *  inverseHyperbolicTangent  atanh
-   *  inverseSine               asin
-   *  inverseTangent            atan
-   *  isFinite
-   *  isInteger                 isInt
-   *  isNaN
-   *  isNegative                isNeg
-   *  isPositive                isPos
-   *  isZero
-   *  lessThan                  lt
-   *  lessThanOrEqualTo         lte
-   *  logarithm                 log
-   *  [maximum]                 [max]
-   *  [minimum]                 [min]
-   *  minus                     sub
-   *  modulo                    mod
-   *  naturalExponential        exp
-   *  naturalLogarithm          ln
-   *  negated                   neg
-   *  plus                      add
-   *  precision                 sd
-   *  round
-   *  sine                      sin
-   *  squareRoot                sqrt
-   *  tangent                   tan
-   *  times                     mul
-   *  toBinary
-   *  toDecimalPlaces           toDP
-   *  toExponential
-   *  toFixed
-   *  toFraction
-   *  toHexadecimal             toHex
-   *  toNearest
-   *  toNumber
-   *  toOctal
-   *  toPower                   pow
-   *  toPrecision
-   *  toSignificantDigits       toSD
-   *  toString
-   *  truncated                 trunc
-   *  valueOf                   toJSON
-   */
-
-
-  /*
-   * Return a new Decimal whose value is the absolute value of this Decimal.
-   *
-   */
-  P.absoluteValue = P.abs = function () {
-    var x = new this.constructor(this);
-    if (x.s < 0) x.s = 1;
-    return finalise(x);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the
-   * direction of positive Infinity.
-   *
-   */
-  P.ceil = function () {
-    return finalise(new this.constructor(this), this.e + 1, 2);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the value of this Decimal clamped to the range
-   * delineated by `min` and `max`.
-   *
-   * min {number|string|Decimal}
-   * max {number|string|Decimal}
-   *
-   */
-  P.clampedTo = P.clamp = function (min, max) {
-    var k,
-      x = this,
-      Ctor = x.constructor;
-    min = new Ctor(min);
-    max = new Ctor(max);
-    if (!min.s || !max.s) return new Ctor(NaN);
-    if (min.gt(max)) throw Error(invalidArgument + max);
-    k = x.cmp(min);
-    return k < 0 ? min : x.cmp(max) > 0 ? max : new Ctor(x);
-  };
-
-
-  /*
-   * Return
-   *   1    if the value of this Decimal is greater than the value of `y`,
-   *  -1    if the value of this Decimal is less than the value of `y`,
-   *   0    if they have the same value,
-   *   NaN  if the value of either Decimal is NaN.
-   *
-   */
-  P.comparedTo = P.cmp = function (y) {
-    var i, j, xdL, ydL,
-      x = this,
-      xd = x.d,
-      yd = (y = new x.constructor(y)).d,
-      xs = x.s,
-      ys = y.s;
-
-    // Either NaN or ±Infinity?
-    if (!xd || !yd) {
-      return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1;
-    }
-
-    // Either zero?
-    if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0;
-
-    // Signs differ?
-    if (xs !== ys) return xs;
-
-    // Compare exponents.
-    if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1;
-
-    xdL = xd.length;
-    ydL = yd.length;
-
-    // Compare digit by digit.
-    for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {
-      if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1;
-    }
-
-    // Compare lengths.
-    return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1;
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the cosine of the value in radians of this Decimal.
-   *
-   * Domain: [-Infinity, Infinity]
-   * Range: [-1, 1]
-   *
-   * cos(0)         = 1
-   * cos(-0)        = 1
-   * cos(Infinity)  = NaN
-   * cos(-Infinity) = NaN
-   * cos(NaN)       = NaN
-   *
-   */
-  P.cosine = P.cos = function () {
-    var pr, rm,
-      x = this,
-      Ctor = x.constructor;
-
-    if (!x.d) return new Ctor(NaN);
-
-    // cos(0) = cos(-0) = 1
-    if (!x.d[0]) return new Ctor(1);
-
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-    Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;
-    Ctor.rounding = 1;
-
-    x = cosine(Ctor, toLessThanHalfPi(Ctor, x));
-
-    Ctor.precision = pr;
-    Ctor.rounding = rm;
-
-    return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true);
-  };
-
-
-  /*
-   *
-   * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to
-   * `precision` significant digits using rounding mode `rounding`.
-   *
-   *  cbrt(0)  =  0
-   *  cbrt(-0) = -0
-   *  cbrt(1)  =  1
-   *  cbrt(-1) = -1
-   *  cbrt(N)  =  N
-   *  cbrt(-I) = -I
-   *  cbrt(I)  =  I
-   *
-   * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3))
-   *
-   */
-  P.cubeRoot = P.cbrt = function () {
-    var e, m, n, r, rep, s, sd, t, t3, t3plusx,
-      x = this,
-      Ctor = x.constructor;
-
-    if (!x.isFinite() || x.isZero()) return new Ctor(x);
-    external = false;
-
-    // Initial estimate.
-    s = x.s * mathpow(x.s * x, 1 / 3);
-
-     // Math.cbrt underflow/overflow?
-     // Pass x to Math.pow as integer, then adjust the exponent of the result.
-    if (!s || Math.abs(s) == 1 / 0) {
-      n = digitsToString(x.d);
-      e = x.e;
-
-      // Adjust n exponent so it is a multiple of 3 away from x exponent.
-      if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00');
-      s = mathpow(n, 1 / 3);
-
-      // Rarely, e may be one less than the result exponent value.
-      e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2));
-
-      if (s == 1 / 0) {
-        n = '5e' + e;
-      } else {
-        n = s.toExponential();
-        n = n.slice(0, n.indexOf('e') + 1) + e;
-      }
-
-      r = new Ctor(n);
-      r.s = x.s;
-    } else {
-      r = new Ctor(s.toString());
-    }
-
-    sd = (e = Ctor.precision) + 3;
-
-    // Halley's method.
-    // TODO? Compare Newton's method.
-    for (;;) {
-      t = r;
-      t3 = t.times(t).times(t);
-      t3plusx = t3.plus(x);
-      r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1);
-
-      // TODO? Replace with for-loop and checkRoundingDigits.
-      if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {
-        n = n.slice(sd - 3, sd + 1);
-
-        // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999
-        // , i.e. approaching a rounding boundary, continue the iteration.
-        if (n == '9999' || !rep && n == '4999') {
-
-          // On the first iteration only, check to see if rounding up gives the exact result as the
-          // nines may infinitely repeat.
-          if (!rep) {
-            finalise(t, e + 1, 0);
-
-            if (t.times(t).times(t).eq(x)) {
-              r = t;
-              break;
-            }
-          }
-
-          sd += 4;
-          rep = 1;
-        } else {
-
-          // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.
-          // If not, then there are further digits and m will be truthy.
-          if (!+n || !+n.slice(1) && n.charAt(0) == '5') {
-
-            // Truncate to the first rounding digit.
-            finalise(r, e + 1, 1);
-            m = !r.times(r).times(r).eq(x);
-          }
-
-          break;
-        }
-      }
-    }
-
-    external = true;
-
-    return finalise(r, e, Ctor.rounding, m);
-  };
-
-
-  /*
-   * Return the number of decimal places of the value of this Decimal.
-   *
-   */
-  P.decimalPlaces = P.dp = function () {
-    var w,
-      d = this.d,
-      n = NaN;
-
-    if (d) {
-      w = d.length - 1;
-      n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE;
-
-      // Subtract the number of trailing zeros of the last word.
-      w = d[w];
-      if (w) for (; w % 10 == 0; w /= 10) n--;
-      if (n < 0) n = 0;
-    }
-
-    return n;
-  };
-
-
-  /*
-   *  n / 0 = I
-   *  n / N = N
-   *  n / I = 0
-   *  0 / n = 0
-   *  0 / 0 = N
-   *  0 / N = N
-   *  0 / I = 0
-   *  N / n = N
-   *  N / 0 = N
-   *  N / N = N
-   *  N / I = N
-   *  I / n = I
-   *  I / 0 = I
-   *  I / N = N
-   *  I / I = N
-   *
-   * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to
-   * `precision` significant digits using rounding mode `rounding`.
-   *
-   */
-  P.dividedBy = P.div = function (y) {
-    return divide(this, new this.constructor(y));
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the integer part of dividing the value of this Decimal
-   * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`.
-   *
-   */
-  P.dividedToIntegerBy = P.divToInt = function (y) {
-    var x = this,
-      Ctor = x.constructor;
-    return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding);
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.
-   *
-   */
-  P.equals = P.eq = function (y) {
-    return this.cmp(y) === 0;
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the
-   * direction of negative Infinity.
-   *
-   */
-  P.floor = function () {
-    return finalise(new this.constructor(this), this.e + 1, 3);
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is greater than the value of `y`, otherwise return
-   * false.
-   *
-   */
-  P.greaterThan = P.gt = function (y) {
-    return this.cmp(y) > 0;
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is greater than or equal to the value of `y`,
-   * otherwise return false.
-   *
-   */
-  P.greaterThanOrEqualTo = P.gte = function (y) {
-    var k = this.cmp(y);
-    return k == 1 || k === 0;
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this
-   * Decimal.
-   *
-   * Domain: [-Infinity, Infinity]
-   * Range: [1, Infinity]
-   *
-   * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ...
-   *
-   * cosh(0)         = 1
-   * cosh(-0)        = 1
-   * cosh(Infinity)  = Infinity
-   * cosh(-Infinity) = Infinity
-   * cosh(NaN)       = NaN
-   *
-   *  x        time taken (ms)   result
-   * 1000      9                 9.8503555700852349694e+433
-   * 10000     25                4.4034091128314607936e+4342
-   * 100000    171               1.4033316802130615897e+43429
-   * 1000000   3817              1.5166076984010437725e+434294
-   * 10000000  abandoned after 2 minute wait
-   *
-   * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x))
-   *
-   */
-  P.hyperbolicCosine = P.cosh = function () {
-    var k, n, pr, rm, len,
-      x = this,
-      Ctor = x.constructor,
-      one = new Ctor(1);
-
-    if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN);
-    if (x.isZero()) return one;
-
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-    Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;
-    Ctor.rounding = 1;
-    len = x.d.length;
-
-    // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1
-    // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4))
-
-    // Estimate the optimum number of times to use the argument reduction.
-    // TODO? Estimation reused from cosine() and may not be optimal here.
-    if (len < 32) {
-      k = Math.ceil(len / 3);
-      n = (1 / tinyPow(4, k)).toString();
-    } else {
-      k = 16;
-      n = '2.3283064365386962890625e-10';
-    }
-
-    x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true);
-
-    // Reverse argument reduction
-    var cosh2_x,
-      i = k,
-      d8 = new Ctor(8);
-    for (; i--;) {
-      cosh2_x = x.times(x);
-      x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8))));
-    }
-
-    return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this
-   * Decimal.
-   *
-   * Domain: [-Infinity, Infinity]
-   * Range: [-Infinity, Infinity]
-   *
-   * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ...
-   *
-   * sinh(0)         = 0
-   * sinh(-0)        = -0
-   * sinh(Infinity)  = Infinity
-   * sinh(-Infinity) = -Infinity
-   * sinh(NaN)       = NaN
-   *
-   * x        time taken (ms)
-   * 10       2 ms
-   * 100      5 ms
-   * 1000     14 ms
-   * 10000    82 ms
-   * 100000   886 ms            1.4033316802130615897e+43429
-   * 200000   2613 ms
-   * 300000   5407 ms
-   * 400000   8824 ms
-   * 500000   13026 ms          8.7080643612718084129e+217146
-   * 1000000  48543 ms
-   *
-   * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x))
-   *
-   */
-  P.hyperbolicSine = P.sinh = function () {
-    var k, pr, rm, len,
-      x = this,
-      Ctor = x.constructor;
-
-    if (!x.isFinite() || x.isZero()) return new Ctor(x);
-
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-    Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;
-    Ctor.rounding = 1;
-    len = x.d.length;
-
-    if (len < 3) {
-      x = taylorSeries(Ctor, 2, x, x, true);
-    } else {
-
-      // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x))
-      // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3))
-      // 3 multiplications and 1 addition
-
-      // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x)))
-      // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5)))
-      // 4 multiplications and 2 additions
-
-      // Estimate the optimum number of times to use the argument reduction.
-      k = 1.4 * Math.sqrt(len);
-      k = k > 16 ? 16 : k | 0;
-
-      x = x.times(1 / tinyPow(5, k));
-      x = taylorSeries(Ctor, 2, x, x, true);
-
-      // Reverse argument reduction
-      var sinh2_x,
-        d5 = new Ctor(5),
-        d16 = new Ctor(16),
-        d20 = new Ctor(20);
-      for (; k--;) {
-        sinh2_x = x.times(x);
-        x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20))));
-      }
-    }
-
-    Ctor.precision = pr;
-    Ctor.rounding = rm;
-
-    return finalise(x, pr, rm, true);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this
-   * Decimal.
-   *
-   * Domain: [-Infinity, Infinity]
-   * Range: [-1, 1]
-   *
-   * tanh(x) = sinh(x) / cosh(x)
-   *
-   * tanh(0)         = 0
-   * tanh(-0)        = -0
-   * tanh(Infinity)  = 1
-   * tanh(-Infinity) = -1
-   * tanh(NaN)       = NaN
-   *
-   */
-  P.hyperbolicTangent = P.tanh = function () {
-    var pr, rm,
-      x = this,
-      Ctor = x.constructor;
-
-    if (!x.isFinite()) return new Ctor(x.s);
-    if (x.isZero()) return new Ctor(x);
-
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-    Ctor.precision = pr + 7;
-    Ctor.rounding = 1;
-
-    return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of
-   * this Decimal.
-   *
-   * Domain: [-1, 1]
-   * Range: [0, pi]
-   *
-   * acos(x) = pi/2 - asin(x)
-   *
-   * acos(0)       = pi/2
-   * acos(-0)      = pi/2
-   * acos(1)       = 0
-   * acos(-1)      = pi
-   * acos(1/2)     = pi/3
-   * acos(-1/2)    = 2*pi/3
-   * acos(|x| > 1) = NaN
-   * acos(NaN)     = NaN
-   *
-   */
-  P.inverseCosine = P.acos = function () {
-    var halfPi,
-      x = this,
-      Ctor = x.constructor,
-      k = x.abs().cmp(1),
-      pr = Ctor.precision,
-      rm = Ctor.rounding;
-
-    if (k !== -1) {
-      return k === 0
-        // |x| is 1
-        ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0)
-        // |x| > 1 or x is NaN
-        : new Ctor(NaN);
-    }
-
-    if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5);
-
-    // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3
-
-    Ctor.precision = pr + 6;
-    Ctor.rounding = 1;
-
-    x = x.asin();
-    halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
-
-    Ctor.precision = pr;
-    Ctor.rounding = rm;
-
-    return halfPi.minus(x);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the
-   * value of this Decimal.
-   *
-   * Domain: [1, Infinity]
-   * Range: [0, Infinity]
-   *
-   * acosh(x) = ln(x + sqrt(x^2 - 1))
-   *
-   * acosh(x < 1)     = NaN
-   * acosh(NaN)       = NaN
-   * acosh(Infinity)  = Infinity
-   * acosh(-Infinity) = NaN
-   * acosh(0)         = NaN
-   * acosh(-0)        = NaN
-   * acosh(1)         = 0
-   * acosh(-1)        = NaN
-   *
-   */
-  P.inverseHyperbolicCosine = P.acosh = function () {
-    var pr, rm,
-      x = this,
-      Ctor = x.constructor;
-
-    if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN);
-    if (!x.isFinite()) return new Ctor(x);
-
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-    Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4;
-    Ctor.rounding = 1;
-    external = false;
-
-    x = x.times(x).minus(1).sqrt().plus(x);
-
-    external = true;
-    Ctor.precision = pr;
-    Ctor.rounding = rm;
-
-    return x.ln();
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value
-   * of this Decimal.
-   *
-   * Domain: [-Infinity, Infinity]
-   * Range: [-Infinity, Infinity]
-   *
-   * asinh(x) = ln(x + sqrt(x^2 + 1))
-   *
-   * asinh(NaN)       = NaN
-   * asinh(Infinity)  = Infinity
-   * asinh(-Infinity) = -Infinity
-   * asinh(0)         = 0
-   * asinh(-0)        = -0
-   *
-   */
-  P.inverseHyperbolicSine = P.asinh = function () {
-    var pr, rm,
-      x = this,
-      Ctor = x.constructor;
-
-    if (!x.isFinite() || x.isZero()) return new Ctor(x);
-
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-    Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6;
-    Ctor.rounding = 1;
-    external = false;
-
-    x = x.times(x).plus(1).sqrt().plus(x);
-
-    external = true;
-    Ctor.precision = pr;
-    Ctor.rounding = rm;
-
-    return x.ln();
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the
-   * value of this Decimal.
-   *
-   * Domain: [-1, 1]
-   * Range: [-Infinity, Infinity]
-   *
-   * atanh(x) = 0.5 * ln((1 + x) / (1 - x))
-   *
-   * atanh(|x| > 1)   = NaN
-   * atanh(NaN)       = NaN
-   * atanh(Infinity)  = NaN
-   * atanh(-Infinity) = NaN
-   * atanh(0)         = 0
-   * atanh(-0)        = -0
-   * atanh(1)         = Infinity
-   * atanh(-1)        = -Infinity
-   *
-   */
-  P.inverseHyperbolicTangent = P.atanh = function () {
-    var pr, rm, wpr, xsd,
-      x = this,
-      Ctor = x.constructor;
-
-    if (!x.isFinite()) return new Ctor(NaN);
-    if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN);
-
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-    xsd = x.sd();
-
-    if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true);
-
-    Ctor.precision = wpr = xsd - x.e;
-
-    x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1);
-
-    Ctor.precision = pr + 4;
-    Ctor.rounding = 1;
-
-    x = x.ln();
-
-    Ctor.precision = pr;
-    Ctor.rounding = rm;
-
-    return x.times(0.5);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this
-   * Decimal.
-   *
-   * Domain: [-Infinity, Infinity]
-   * Range: [-pi/2, pi/2]
-   *
-   * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2)))
-   *
-   * asin(0)       = 0
-   * asin(-0)      = -0
-   * asin(1/2)     = pi/6
-   * asin(-1/2)    = -pi/6
-   * asin(1)       = pi/2
-   * asin(-1)      = -pi/2
-   * asin(|x| > 1) = NaN
-   * asin(NaN)     = NaN
-   *
-   * TODO? Compare performance of Taylor series.
-   *
-   */
-  P.inverseSine = P.asin = function () {
-    var halfPi, k,
-      pr, rm,
-      x = this,
-      Ctor = x.constructor;
-
-    if (x.isZero()) return new Ctor(x);
-
-    k = x.abs().cmp(1);
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-
-    if (k !== -1) {
-
-      // |x| is 1
-      if (k === 0) {
-        halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
-        halfPi.s = x.s;
-        return halfPi;
-      }
-
-      // |x| > 1 or x is NaN
-      return new Ctor(NaN);
-    }
-
-    // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6
-
-    Ctor.precision = pr + 6;
-    Ctor.rounding = 1;
-
-    x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan();
-
-    Ctor.precision = pr;
-    Ctor.rounding = rm;
-
-    return x.times(2);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value
-   * of this Decimal.
-   *
-   * Domain: [-Infinity, Infinity]
-   * Range: [-pi/2, pi/2]
-   *
-   * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...
-   *
-   * atan(0)         = 0
-   * atan(-0)        = -0
-   * atan(1)         = pi/4
-   * atan(-1)        = -pi/4
-   * atan(Infinity)  = pi/2
-   * atan(-Infinity) = -pi/2
-   * atan(NaN)       = NaN
-   *
-   */
-  P.inverseTangent = P.atan = function () {
-    var i, j, k, n, px, t, r, wpr, x2,
-      x = this,
-      Ctor = x.constructor,
-      pr = Ctor.precision,
-      rm = Ctor.rounding;
-
-    if (!x.isFinite()) {
-      if (!x.s) return new Ctor(NaN);
-      if (pr + 4 <= PI_PRECISION) {
-        r = getPi(Ctor, pr + 4, rm).times(0.5);
-        r.s = x.s;
-        return r;
-      }
-    } else if (x.isZero()) {
-      return new Ctor(x);
-    } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) {
-      r = getPi(Ctor, pr + 4, rm).times(0.25);
-      r.s = x.s;
-      return r;
-    }
-
-    Ctor.precision = wpr = pr + 10;
-    Ctor.rounding = 1;
-
-    // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x);
-
-    // Argument reduction
-    // Ensure |x| < 0.42
-    // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2)))
-
-    k = Math.min(28, wpr / LOG_BASE + 2 | 0);
-
-    for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1));
-
-    external = false;
-
-    j = Math.ceil(wpr / LOG_BASE);
-    n = 1;
-    x2 = x.times(x);
-    r = new Ctor(x);
-    px = x;
-
-    // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...
-    for (; i !== -1;) {
-      px = px.times(x2);
-      t = r.minus(px.div(n += 2));
-
-      px = px.times(x2);
-      r = t.plus(px.div(n += 2));
-
-      if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;);
-    }
-
-    if (k) r = r.times(2 << (k - 1));
-
-    external = true;
-
-    return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true);
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is a finite number, otherwise return false.
-   *
-   */
-  P.isFinite = function () {
-    return !!this.d;
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is an integer, otherwise return false.
-   *
-   */
-  P.isInteger = P.isInt = function () {
-    return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2;
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is NaN, otherwise return false.
-   *
-   */
-  P.isNaN = function () {
-    return !this.s;
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is negative, otherwise return false.
-   *
-   */
-  P.isNegative = P.isNeg = function () {
-    return this.s < 0;
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is positive, otherwise return false.
-   *
-   */
-  P.isPositive = P.isPos = function () {
-    return this.s > 0;
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is 0 or -0, otherwise return false.
-   *
-   */
-  P.isZero = function () {
-    return !!this.d && this.d[0] === 0;
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is less than `y`, otherwise return false.
-   *
-   */
-  P.lessThan = P.lt = function (y) {
-    return this.cmp(y) < 0;
-  };
-
-
-  /*
-   * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.
-   *
-   */
-  P.lessThanOrEqualTo = P.lte = function (y) {
-    return this.cmp(y) < 1;
-  };
-
-
-  /*
-   * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   * If no base is specified, return log[10](arg).
-   *
-   * log[base](arg) = ln(arg) / ln(base)
-   *
-   * The result will always be correctly rounded if the base of the log is 10, and 'almost always'
-   * otherwise:
-   *
-   * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen
-   * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error
-   * between the result and the correctly rounded result will be one ulp (unit in the last place).
-   *
-   * log[-b](a)       = NaN
-   * log[0](a)        = NaN
-   * log[1](a)        = NaN
-   * log[NaN](a)      = NaN
-   * log[Infinity](a) = NaN
-   * log[b](0)        = -Infinity
-   * log[b](-0)       = -Infinity
-   * log[b](-a)       = NaN
-   * log[b](1)        = 0
-   * log[b](Infinity) = Infinity
-   * log[b](NaN)      = NaN
-   *
-   * [base] {number|string|Decimal} The base of the logarithm.
-   *
-   */
-  P.logarithm = P.log = function (base) {
-    var isBase10, d, denominator, k, inf, num, sd, r,
-      arg = this,
-      Ctor = arg.constructor,
-      pr = Ctor.precision,
-      rm = Ctor.rounding,
-      guard = 5;
-
-    // Default base is 10.
-    if (base == null) {
-      base = new Ctor(10);
-      isBase10 = true;
-    } else {
-      base = new Ctor(base);
-      d = base.d;
-
-      // Return NaN if base is negative, or non-finite, or is 0 or 1.
-      if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN);
-
-      isBase10 = base.eq(10);
-    }
-
-    d = arg.d;
-
-    // Is arg negative, non-finite, 0 or 1?
-    if (arg.s < 0 || !d || !d[0] || arg.eq(1)) {
-      return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0);
-    }
-
-    // The result will have a non-terminating decimal expansion if base is 10 and arg is not an
-    // integer power of 10.
-    if (isBase10) {
-      if (d.length > 1) {
-        inf = true;
-      } else {
-        for (k = d[0]; k % 10 === 0;) k /= 10;
-        inf = k !== 1;
-      }
-    }
-
-    external = false;
-    sd = pr + guard;
-    num = naturalLogarithm(arg, sd);
-    denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);
-
-    // The result will have 5 rounding digits.
-    r = divide(num, denominator, sd, 1);
-
-    // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000,
-    // calculate 10 further digits.
-    //
-    // If the result is known to have an infinite decimal expansion, repeat this until it is clear
-    // that the result is above or below the boundary. Otherwise, if after calculating the 10
-    // further digits, the last 14 are nines, round up and assume the result is exact.
-    // Also assume the result is exact if the last 14 are zero.
-    //
-    // Example of a result that will be incorrectly rounded:
-    // log[1048576](4503599627370502) = 2.60000000000000009610279511444746...
-    // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it
-    // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so
-    // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal
-    // place is still 2.6.
-    if (checkRoundingDigits(r.d, k = pr, rm)) {
-
-      do {
-        sd += 10;
-        num = naturalLogarithm(arg, sd);
-        denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);
-        r = divide(num, denominator, sd, 1);
-
-        if (!inf) {
-
-          // Check for 14 nines from the 2nd rounding digit, as the first may be 4.
-          if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) {
-            r = finalise(r, pr + 1, 0);
-          }
-
-          break;
-        }
-      } while (checkRoundingDigits(r.d, k += 10, rm));
-    }
-
-    external = true;
-
-    return finalise(r, pr, rm);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal.
-   *
-   * arguments {number|string|Decimal}
-   *
-  P.max = function () {
-    Array.prototype.push.call(arguments, this);
-    return maxOrMin(this.constructor, arguments, 'lt');
-  };
-   */
-
-
-  /*
-   * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal.
-   *
-   * arguments {number|string|Decimal}
-   *
-  P.min = function () {
-    Array.prototype.push.call(arguments, this);
-    return maxOrMin(this.constructor, arguments, 'gt');
-  };
-   */
-
-
-  /*
-   *  n - 0 = n
-   *  n - N = N
-   *  n - I = -I
-   *  0 - n = -n
-   *  0 - 0 = 0
-   *  0 - N = N
-   *  0 - I = -I
-   *  N - n = N
-   *  N - 0 = N
-   *  N - N = N
-   *  N - I = N
-   *  I - n = I
-   *  I - 0 = I
-   *  I - N = N
-   *  I - I = N
-   *
-   * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   */
-  P.minus = P.sub = function (y) {
-    var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd,
-      x = this,
-      Ctor = x.constructor;
-
-    y = new Ctor(y);
-
-    // If either is not finite...
-    if (!x.d || !y.d) {
-
-      // Return NaN if either is NaN.
-      if (!x.s || !y.s) y = new Ctor(NaN);
-
-      // Return y negated if x is finite and y is ±Infinity.
-      else if (x.d) y.s = -y.s;
-
-      // Return x if y is finite and x is ±Infinity.
-      // Return x if both are ±Infinity with different signs.
-      // Return NaN if both are ±Infinity with the same sign.
-      else y = new Ctor(y.d || x.s !== y.s ? x : NaN);
-
-      return y;
-    }
-
-    // If signs differ...
-    if (x.s != y.s) {
-      y.s = -y.s;
-      return x.plus(y);
-    }
-
-    xd = x.d;
-    yd = y.d;
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-
-    // If either is zero...
-    if (!xd[0] || !yd[0]) {
-
-      // Return y negated if x is zero and y is non-zero.
-      if (yd[0]) y.s = -y.s;
-
-      // Return x if y is zero and x is non-zero.
-      else if (xd[0]) y = new Ctor(x);
-
-      // Return zero if both are zero.
-      // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity.
-      else return new Ctor(rm === 3 ? -0 : 0);
-
-      return external ? finalise(y, pr, rm) : y;
-    }
-
-    // x and y are finite, non-zero numbers with the same sign.
-
-    // Calculate base 1e7 exponents.
-    e = mathfloor(y.e / LOG_BASE);
-    xe = mathfloor(x.e / LOG_BASE);
-
-    xd = xd.slice();
-    k = xe - e;
-
-    // If base 1e7 exponents differ...
-    if (k) {
-      xLTy = k < 0;
-
-      if (xLTy) {
-        d = xd;
-        k = -k;
-        len = yd.length;
-      } else {
-        d = yd;
-        e = xe;
-        len = xd.length;
-      }
-
-      // Numbers with massively different exponents would result in a very high number of
-      // zeros needing to be prepended, but this can be avoided while still ensuring correct
-      // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`.
-      i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2;
-
-      if (k > i) {
-        k = i;
-        d.length = 1;
-      }
-
-      // Prepend zeros to equalise exponents.
-      d.reverse();
-      for (i = k; i--;) d.push(0);
-      d.reverse();
-
-    // Base 1e7 exponents equal.
-    } else {
-
-      // Check digits to determine which is the bigger number.
-
-      i = xd.length;
-      len = yd.length;
-      xLTy = i < len;
-      if (xLTy) len = i;
-
-      for (i = 0; i < len; i++) {
-        if (xd[i] != yd[i]) {
-          xLTy = xd[i] < yd[i];
-          break;
-        }
-      }
-
-      k = 0;
-    }
-
-    if (xLTy) {
-      d = xd;
-      xd = yd;
-      yd = d;
-      y.s = -y.s;
-    }
-
-    len = xd.length;
-
-    // Append zeros to `xd` if shorter.
-    // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length.
-    for (i = yd.length - len; i > 0; --i) xd[len++] = 0;
-
-    // Subtract yd from xd.
-    for (i = yd.length; i > k;) {
-
-      if (xd[--i] < yd[i]) {
-        for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;
-        --xd[j];
-        xd[i] += BASE;
-      }
-
-      xd[i] -= yd[i];
-    }
-
-    // Remove trailing zeros.
-    for (; xd[--len] === 0;) xd.pop();
-
-    // Remove leading zeros and adjust exponent accordingly.
-    for (; xd[0] === 0; xd.shift()) --e;
-
-    // Zero?
-    if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0);
-
-    y.d = xd;
-    y.e = getBase10Exponent(xd, e);
-
-    return external ? finalise(y, pr, rm) : y;
-  };
-
-
-  /*
-   *   n % 0 =  N
-   *   n % N =  N
-   *   n % I =  n
-   *   0 % n =  0
-   *  -0 % n = -0
-   *   0 % 0 =  N
-   *   0 % N =  N
-   *   0 % I =  0
-   *   N % n =  N
-   *   N % 0 =  N
-   *   N % N =  N
-   *   N % I =  N
-   *   I % n =  N
-   *   I % 0 =  N
-   *   I % N =  N
-   *   I % I =  N
-   *
-   * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to
-   * `precision` significant digits using rounding mode `rounding`.
-   *
-   * The result depends on the modulo mode.
-   *
-   */
-  P.modulo = P.mod = function (y) {
-    var q,
-      x = this,
-      Ctor = x.constructor;
-
-    y = new Ctor(y);
-
-    // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0.
-    if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN);
-
-    // Return x if y is ±Infinity or x is ±0.
-    if (!y.d || x.d && !x.d[0]) {
-      return finalise(new Ctor(x), Ctor.precision, Ctor.rounding);
-    }
-
-    // Prevent rounding of intermediate calculations.
-    external = false;
-
-    if (Ctor.modulo == 9) {
-
-      // Euclidian division: q = sign(y) * floor(x / abs(y))
-      // result = x - q * y    where  0 <= result < abs(y)
-      q = divide(x, y.abs(), 0, 3, 1);
-      q.s *= y.s;
-    } else {
-      q = divide(x, y, 0, Ctor.modulo, 1);
-    }
-
-    q = q.times(y);
-
-    external = true;
-
-    return x.minus(q);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the natural exponential of the value of this Decimal,
-   * i.e. the base e raised to the power the value of this Decimal, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   */
-  P.naturalExponential = P.exp = function () {
-    return naturalExponential(this);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,
-   * rounded to `precision` significant digits using rounding mode `rounding`.
-   *
-   */
-  P.naturalLogarithm = P.ln = function () {
-    return naturalLogarithm(this);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by
-   * -1.
-   *
-   */
-  P.negated = P.neg = function () {
-    var x = new this.constructor(this);
-    x.s = -x.s;
-    return finalise(x);
-  };
-
-
-  /*
-   *  n + 0 = n
-   *  n + N = N
-   *  n + I = I
-   *  0 + n = n
-   *  0 + 0 = 0
-   *  0 + N = N
-   *  0 + I = I
-   *  N + n = N
-   *  N + 0 = N
-   *  N + N = N
-   *  N + I = N
-   *  I + n = I
-   *  I + 0 = I
-   *  I + N = N
-   *  I + I = I
-   *
-   * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   */
-  P.plus = P.add = function (y) {
-    var carry, d, e, i, k, len, pr, rm, xd, yd,
-      x = this,
-      Ctor = x.constructor;
-
-    y = new Ctor(y);
-
-    // If either is not finite...
-    if (!x.d || !y.d) {
-
-      // Return NaN if either is NaN.
-      if (!x.s || !y.s) y = new Ctor(NaN);
-
-      // Return x if y is finite and x is ±Infinity.
-      // Return x if both are ±Infinity with the same sign.
-      // Return NaN if both are ±Infinity with different signs.
-      // Return y if x is finite and y is ±Infinity.
-      else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN);
-
-      return y;
-    }
-
-     // If signs differ...
-    if (x.s != y.s) {
-      y.s = -y.s;
-      return x.minus(y);
-    }
-
-    xd = x.d;
-    yd = y.d;
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-
-    // If either is zero...
-    if (!xd[0] || !yd[0]) {
-
-      // Return x if y is zero.
-      // Return y if y is non-zero.
-      if (!yd[0]) y = new Ctor(x);
-
-      return external ? finalise(y, pr, rm) : y;
-    }
-
-    // x and y are finite, non-zero numbers with the same sign.
-
-    // Calculate base 1e7 exponents.
-    k = mathfloor(x.e / LOG_BASE);
-    e = mathfloor(y.e / LOG_BASE);
-
-    xd = xd.slice();
-    i = k - e;
-
-    // If base 1e7 exponents differ...
-    if (i) {
-
-      if (i < 0) {
-        d = xd;
-        i = -i;
-        len = yd.length;
-      } else {
-        d = yd;
-        e = k;
-        len = xd.length;
-      }
-
-      // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1.
-      k = Math.ceil(pr / LOG_BASE);
-      len = k > len ? k + 1 : len + 1;
-
-      if (i > len) {
-        i = len;
-        d.length = 1;
-      }
-
-      // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts.
-      d.reverse();
-      for (; i--;) d.push(0);
-      d.reverse();
-    }
-
-    len = xd.length;
-    i = yd.length;
-
-    // If yd is longer than xd, swap xd and yd so xd points to the longer array.
-    if (len - i < 0) {
-      i = len;
-      d = yd;
-      yd = xd;
-      xd = d;
-    }
-
-    // Only start adding at yd.length - 1 as the further digits of xd can be left as they are.
-    for (carry = 0; i;) {
-      carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;
-      xd[i] %= BASE;
-    }
-
-    if (carry) {
-      xd.unshift(carry);
-      ++e;
-    }
-
-    // Remove trailing zeros.
-    // No need to check for zero, as +x + +y != 0 && -x + -y != 0
-    for (len = xd.length; xd[--len] == 0;) xd.pop();
-
-    y.d = xd;
-    y.e = getBase10Exponent(xd, e);
-
-    return external ? finalise(y, pr, rm) : y;
-  };
-
-
-  /*
-   * Return the number of significant digits of the value of this Decimal.
-   *
-   * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.
-   *
-   */
-  P.precision = P.sd = function (z) {
-    var k,
-      x = this;
-
-    if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z);
-
-    if (x.d) {
-      k = getPrecision(x.d);
-      if (z && x.e + 1 > k) k = x.e + 1;
-    } else {
-      k = NaN;
-    }
-
-    return k;
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using
-   * rounding mode `rounding`.
-   *
-   */
-  P.round = function () {
-    var x = this,
-      Ctor = x.constructor;
-
-    return finalise(new Ctor(x), x.e + 1, Ctor.rounding);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the sine of the value in radians of this Decimal.
-   *
-   * Domain: [-Infinity, Infinity]
-   * Range: [-1, 1]
-   *
-   * sin(x) = x - x^3/3! + x^5/5! - ...
-   *
-   * sin(0)         = 0
-   * sin(-0)        = -0
-   * sin(Infinity)  = NaN
-   * sin(-Infinity) = NaN
-   * sin(NaN)       = NaN
-   *
-   */
-  P.sine = P.sin = function () {
-    var pr, rm,
-      x = this,
-      Ctor = x.constructor;
-
-    if (!x.isFinite()) return new Ctor(NaN);
-    if (x.isZero()) return new Ctor(x);
-
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-    Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;
-    Ctor.rounding = 1;
-
-    x = sine(Ctor, toLessThanHalfPi(Ctor, x));
-
-    Ctor.precision = pr;
-    Ctor.rounding = rm;
-
-    return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   *  sqrt(-n) =  N
-   *  sqrt(N)  =  N
-   *  sqrt(-I) =  N
-   *  sqrt(I)  =  I
-   *  sqrt(0)  =  0
-   *  sqrt(-0) = -0
-   *
-   */
-  P.squareRoot = P.sqrt = function () {
-    var m, n, sd, r, rep, t,
-      x = this,
-      d = x.d,
-      e = x.e,
-      s = x.s,
-      Ctor = x.constructor;
-
-    // Negative/NaN/Infinity/zero?
-    if (s !== 1 || !d || !d[0]) {
-      return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0);
-    }
-
-    external = false;
-
-    // Initial estimate.
-    s = Math.sqrt(+x);
-
-    // Math.sqrt underflow/overflow?
-    // Pass x to Math.sqrt as integer, then adjust the exponent of the result.
-    if (s == 0 || s == 1 / 0) {
-      n = digitsToString(d);
-
-      if ((n.length + e) % 2 == 0) n += '0';
-      s = Math.sqrt(n);
-      e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);
-
-      if (s == 1 / 0) {
-        n = '5e' + e;
-      } else {
-        n = s.toExponential();
-        n = n.slice(0, n.indexOf('e') + 1) + e;
-      }
-
-      r = new Ctor(n);
-    } else {
-      r = new Ctor(s.toString());
-    }
-
-    sd = (e = Ctor.precision) + 3;
-
-    // Newton-Raphson iteration.
-    for (;;) {
-      t = r;
-      r = t.plus(divide(x, t, sd + 2, 1)).times(0.5);
-
-      // TODO? Replace with for-loop and checkRoundingDigits.
-      if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {
-        n = n.slice(sd - 3, sd + 1);
-
-        // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or
-        // 4999, i.e. approaching a rounding boundary, continue the iteration.
-        if (n == '9999' || !rep && n == '4999') {
-
-          // On the first iteration only, check to see if rounding up gives the exact result as the
-          // nines may infinitely repeat.
-          if (!rep) {
-            finalise(t, e + 1, 0);
-
-            if (t.times(t).eq(x)) {
-              r = t;
-              break;
-            }
-          }
-
-          sd += 4;
-          rep = 1;
-        } else {
-
-          // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.
-          // If not, then there are further digits and m will be truthy.
-          if (!+n || !+n.slice(1) && n.charAt(0) == '5') {
-
-            // Truncate to the first rounding digit.
-            finalise(r, e + 1, 1);
-            m = !r.times(r).eq(x);
-          }
-
-          break;
-        }
-      }
-    }
-
-    external = true;
-
-    return finalise(r, e, Ctor.rounding, m);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the tangent of the value in radians of this Decimal.
-   *
-   * Domain: [-Infinity, Infinity]
-   * Range: [-Infinity, Infinity]
-   *
-   * tan(0)         = 0
-   * tan(-0)        = -0
-   * tan(Infinity)  = NaN
-   * tan(-Infinity) = NaN
-   * tan(NaN)       = NaN
-   *
-   */
-  P.tangent = P.tan = function () {
-    var pr, rm,
-      x = this,
-      Ctor = x.constructor;
-
-    if (!x.isFinite()) return new Ctor(NaN);
-    if (x.isZero()) return new Ctor(x);
-
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-    Ctor.precision = pr + 10;
-    Ctor.rounding = 1;
-
-    x = x.sin();
-    x.s = 1;
-    x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0);
-
-    Ctor.precision = pr;
-    Ctor.rounding = rm;
-
-    return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true);
-  };
-
-
-  /*
-   *  n * 0 = 0
-   *  n * N = N
-   *  n * I = I
-   *  0 * n = 0
-   *  0 * 0 = 0
-   *  0 * N = N
-   *  0 * I = N
-   *  N * n = N
-   *  N * 0 = N
-   *  N * N = N
-   *  N * I = N
-   *  I * n = I
-   *  I * 0 = N
-   *  I * N = N
-   *  I * I = I
-   *
-   * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant
-   * digits using rounding mode `rounding`.
-   *
-   */
-  P.times = P.mul = function (y) {
-    var carry, e, i, k, r, rL, t, xdL, ydL,
-      x = this,
-      Ctor = x.constructor,
-      xd = x.d,
-      yd = (y = new Ctor(y)).d;
-
-    y.s *= x.s;
-
-     // If either is NaN, ±Infinity or ±0...
-    if (!xd || !xd[0] || !yd || !yd[0]) {
-
-      return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd
-
-        // Return NaN if either is NaN.
-        // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity.
-        ? NaN
-
-        // Return ±Infinity if either is ±Infinity.
-        // Return ±0 if either is ±0.
-        : !xd || !yd ? y.s / 0 : y.s * 0);
-    }
-
-    e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE);
-    xdL = xd.length;
-    ydL = yd.length;
-
-    // Ensure xd points to the longer array.
-    if (xdL < ydL) {
-      r = xd;
-      xd = yd;
-      yd = r;
-      rL = xdL;
-      xdL = ydL;
-      ydL = rL;
-    }
-
-    // Initialise the result array with zeros.
-    r = [];
-    rL = xdL + ydL;
-    for (i = rL; i--;) r.push(0);
-
-    // Multiply!
-    for (i = ydL; --i >= 0;) {
-      carry = 0;
-      for (k = xdL + i; k > i;) {
-        t = r[k] + yd[i] * xd[k - i - 1] + carry;
-        r[k--] = t % BASE | 0;
-        carry = t / BASE | 0;
-      }
-
-      r[k] = (r[k] + carry) % BASE | 0;
-    }
-
-    // Remove trailing zeros.
-    for (; !r[--rL];) r.pop();
-
-    if (carry) ++e;
-    else r.shift();
-
-    y.d = r;
-    y.e = getBase10Exponent(r, e);
-
-    return external ? finalise(y, Ctor.precision, Ctor.rounding) : y;
-  };
-
-
-  /*
-   * Return a string representing the value of this Decimal in base 2, round to `sd` significant
-   * digits using rounding mode `rm`.
-   *
-   * If the optional `sd` argument is present then return binary exponential notation.
-   *
-   * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
-   * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
-   *
-   */
-  P.toBinary = function (sd, rm) {
-    return toStringBinary(this, 2, sd, rm);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`
-   * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.
-   *
-   * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.
-   *
-   * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.
-   * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
-   *
-   */
-  P.toDecimalPlaces = P.toDP = function (dp, rm) {
-    var x = this,
-      Ctor = x.constructor;
-
-    x = new Ctor(x);
-    if (dp === void 0) return x;
-
-    checkInt32(dp, 0, MAX_DIGITS);
-
-    if (rm === void 0) rm = Ctor.rounding;
-    else checkInt32(rm, 0, 8);
-
-    return finalise(x, dp + x.e + 1, rm);
-  };
-
-
-  /*
-   * Return a string representing the value of this Decimal in exponential notation rounded to
-   * `dp` fixed decimal places using rounding mode `rounding`.
-   *
-   * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.
-   * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
-   *
-   */
-  P.toExponential = function (dp, rm) {
-    var str,
-      x = this,
-      Ctor = x.constructor;
-
-    if (dp === void 0) {
-      str = finiteToString(x, true);
-    } else {
-      checkInt32(dp, 0, MAX_DIGITS);
-
-      if (rm === void 0) rm = Ctor.rounding;
-      else checkInt32(rm, 0, 8);
-
-      x = finalise(new Ctor(x), dp + 1, rm);
-      str = finiteToString(x, true, dp + 1);
-    }
-
-    return x.isNeg() && !x.isZero() ? '-' + str : str;
-  };
-
-
-  /*
-   * Return a string representing the value of this Decimal in normal (fixed-point) notation to
-   * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is
-   * omitted.
-   *
-   * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.
-   *
-   * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.
-   * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
-   *
-   * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.
-   * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.
-   * (-0).toFixed(3) is '0.000'.
-   * (-0.5).toFixed(0) is '-0'.
-   *
-   */
-  P.toFixed = function (dp, rm) {
-    var str, y,
-      x = this,
-      Ctor = x.constructor;
-
-    if (dp === void 0) {
-      str = finiteToString(x);
-    } else {
-      checkInt32(dp, 0, MAX_DIGITS);
-
-      if (rm === void 0) rm = Ctor.rounding;
-      else checkInt32(rm, 0, 8);
-
-      y = finalise(new Ctor(x), dp + x.e + 1, rm);
-      str = finiteToString(y, false, dp + y.e + 1);
-    }
-
-    // To determine whether to add the minus sign look at the value before it was rounded,
-    // i.e. look at `x` rather than `y`.
-    return x.isNeg() && !x.isZero() ? '-' + str : str;
-  };
-
-
-  /*
-   * Return an array representing the value of this Decimal as a simple fraction with an integer
-   * numerator and an integer denominator.
-   *
-   * The denominator will be a positive non-zero value less than or equal to the specified maximum
-   * denominator. If a maximum denominator is not specified, the denominator will be the lowest
-   * value necessary to represent the number exactly.
-   *
-   * [maxD] {number|string|Decimal} Maximum denominator. Integer >= 1 and < Infinity.
-   *
-   */
-  P.toFraction = function (maxD) {
-    var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r,
-      x = this,
-      xd = x.d,
-      Ctor = x.constructor;
-
-    if (!xd) return new Ctor(x);
-
-    n1 = d0 = new Ctor(1);
-    d1 = n0 = new Ctor(0);
-
-    d = new Ctor(d1);
-    e = d.e = getPrecision(xd) - x.e - 1;
-    k = e % LOG_BASE;
-    d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k);
-
-    if (maxD == null) {
-
-      // d is 10**e, the minimum max-denominator needed.
-      maxD = e > 0 ? d : n1;
-    } else {
-      n = new Ctor(maxD);
-      if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n);
-      maxD = n.gt(d) ? (e > 0 ? d : n1) : n;
-    }
-
-    external = false;
-    n = new Ctor(digitsToString(xd));
-    pr = Ctor.precision;
-    Ctor.precision = e = xd.length * LOG_BASE * 2;
-
-    for (;;)  {
-      q = divide(n, d, 0, 1, 1);
-      d2 = d0.plus(q.times(d1));
-      if (d2.cmp(maxD) == 1) break;
-      d0 = d1;
-      d1 = d2;
-      d2 = n1;
-      n1 = n0.plus(q.times(d2));
-      n0 = d2;
-      d2 = d;
-      d = n.minus(q.times(d2));
-      n = d2;
-    }
-
-    d2 = divide(maxD.minus(d0), d1, 0, 1, 1);
-    n0 = n0.plus(d2.times(n1));
-    d0 = d0.plus(d2.times(d1));
-    n0.s = n1.s = x.s;
-
-    // Determine which fraction is closer to x, n0/d0 or n1/d1?
-    r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1
-        ? [n1, d1] : [n0, d0];
-
-    Ctor.precision = pr;
-    external = true;
-
-    return r;
-  };
-
-
-  /*
-   * Return a string representing the value of this Decimal in base 16, round to `sd` significant
-   * digits using rounding mode `rm`.
-   *
-   * If the optional `sd` argument is present then return binary exponential notation.
-   *
-   * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
-   * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
-   *
-   */
-  P.toHexadecimal = P.toHex = function (sd, rm) {
-    return toStringBinary(this, 16, sd, rm);
-  };
-
-
-  /*
-   * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding
-   * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal.
-   *
-   * The return value will always have the same sign as this Decimal, unless either this Decimal
-   * or `y` is NaN, in which case the return value will be also be NaN.
-   *
-   * The return value is not affected by the value of `precision`.
-   *
-   * y {number|string|Decimal} The magnitude to round to a multiple of.
-   * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
-   *
-   * 'toNearest() rounding mode not an integer: {rm}'
-   * 'toNearest() rounding mode out of range: {rm}'
-   *
-   */
-  P.toNearest = function (y, rm) {
-    var x = this,
-      Ctor = x.constructor;
-
-    x = new Ctor(x);
-
-    if (y == null) {
-
-      // If x is not finite, return x.
-      if (!x.d) return x;
-
-      y = new Ctor(1);
-      rm = Ctor.rounding;
-    } else {
-      y = new Ctor(y);
-      if (rm === void 0) {
-        rm = Ctor.rounding;
-      } else {
-        checkInt32(rm, 0, 8);
-      }
-
-      // If x is not finite, return x if y is not NaN, else NaN.
-      if (!x.d) return y.s ? x : y;
-
-      // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN.
-      if (!y.d) {
-        if (y.s) y.s = x.s;
-        return y;
-      }
-    }
-
-    // If y is not zero, calculate the nearest multiple of y to x.
-    if (y.d[0]) {
-      external = false;
-      x = divide(x, y, 0, rm, 1).times(y);
-      external = true;
-      finalise(x);
-
-    // If y is zero, return zero with the sign of x.
-    } else {
-      y.s = x.s;
-      x = y;
-    }
-
-    return x;
-  };
-
-
-  /*
-   * Return the value of this Decimal converted to a number primitive.
-   * Zero keeps its sign.
-   *
-   */
-  P.toNumber = function () {
-    return +this;
-  };
-
-
-  /*
-   * Return a string representing the value of this Decimal in base 8, round to `sd` significant
-   * digits using rounding mode `rm`.
-   *
-   * If the optional `sd` argument is present then return binary exponential notation.
-   *
-   * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
-   * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
-   *
-   */
-  P.toOctal = function (sd, rm) {
-    return toStringBinary(this, 8, sd, rm);
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded
-   * to `precision` significant digits using rounding mode `rounding`.
-   *
-   * ECMAScript compliant.
-   *
-   *   pow(x, NaN)                           = NaN
-   *   pow(x, ±0)                            = 1
-
-   *   pow(NaN, non-zero)                    = NaN
-   *   pow(abs(x) > 1, +Infinity)            = +Infinity
-   *   pow(abs(x) > 1, -Infinity)            = +0
-   *   pow(abs(x) == 1, ±Infinity)           = NaN
-   *   pow(abs(x) < 1, +Infinity)            = +0
-   *   pow(abs(x) < 1, -Infinity)            = +Infinity
-   *   pow(+Infinity, y > 0)                 = +Infinity
-   *   pow(+Infinity, y < 0)                 = +0
-   *   pow(-Infinity, odd integer > 0)       = -Infinity
-   *   pow(-Infinity, even integer > 0)      = +Infinity
-   *   pow(-Infinity, odd integer < 0)       = -0
-   *   pow(-Infinity, even integer < 0)      = +0
-   *   pow(+0, y > 0)                        = +0
-   *   pow(+0, y < 0)                        = +Infinity
-   *   pow(-0, odd integer > 0)              = -0
-   *   pow(-0, even integer > 0)             = +0
-   *   pow(-0, odd integer < 0)              = -Infinity
-   *   pow(-0, even integer < 0)             = +Infinity
-   *   pow(finite x < 0, finite non-integer) = NaN
-   *
-   * For non-integer or very large exponents pow(x, y) is calculated using
-   *
-   *   x^y = exp(y*ln(x))
-   *
-   * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the
-   * probability of an incorrectly rounded result
-   * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14
-   * i.e. 1 in 250,000,000,000,000
-   *
-   * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place).
-   *
-   * y {number|string|Decimal} The power to which to raise this Decimal.
-   *
-   */
-  P.toPower = P.pow = function (y) {
-    var e, k, pr, r, rm, s,
-      x = this,
-      Ctor = x.constructor,
-      yn = +(y = new Ctor(y));
-
-    // Either ±Infinity, NaN or ±0?
-    if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn));
-
-    x = new Ctor(x);
-
-    if (x.eq(1)) return x;
-
-    pr = Ctor.precision;
-    rm = Ctor.rounding;
-
-    if (y.eq(1)) return finalise(x, pr, rm);
-
-    // y exponent
-    e = mathfloor(y.e / LOG_BASE);
-
-    // If y is a small integer use the 'exponentiation by squaring' algorithm.
-    if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {
-      r = intPow(Ctor, x, k, pr);
-      return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm);
-    }
-
-    s = x.s;
-
-    // if x is negative
-    if (s < 0) {
-
-      // if y is not an integer
-      if (e < y.d.length - 1) return new Ctor(NaN);
-
-      // Result is positive if x is negative and the last digit of integer y is even.
-      if ((y.d[e] & 1) == 0) s = 1;
-
-      // if x.eq(-1)
-      if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) {
-        x.s = s;
-        return x;
-      }
-    }
-
-    // Estimate result exponent.
-    // x^y = 10^e,  where e = y * log10(x)
-    // log10(x) = log10(x_significand) + x_exponent
-    // log10(x_significand) = ln(x_significand) / ln(10)
-    k = mathpow(+x, yn);
-    e = k == 0 || !isFinite(k)
-      ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1))
-      : new Ctor(k + '').e;
-
-    // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1.
-
-    // Overflow/underflow?
-    if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0);
-
-    external = false;
-    Ctor.rounding = x.s = 1;
-
-    // Estimate the extra guard digits needed to ensure five correct rounding digits from
-    // naturalLogarithm(x). Example of failure without these extra digits (precision: 10):
-    // new Decimal(2.32456).pow('2087987436534566.46411')
-    // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815
-    k = Math.min(12, (e + '').length);
-
-    // r = x^y = exp(y*ln(x))
-    r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr);
-
-    // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40)
-    if (r.d) {
-
-      // Truncate to the required precision plus five rounding digits.
-      r = finalise(r, pr + 5, 1);
-
-      // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate
-      // the result.
-      if (checkRoundingDigits(r.d, pr, rm)) {
-        e = pr + 10;
-
-        // Truncate to the increased precision plus five rounding digits.
-        r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1);
-
-        // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9).
-        if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) {
-          r = finalise(r, pr + 1, 0);
-        }
-      }
-    }
-
-    r.s = s;
-    external = true;
-    Ctor.rounding = rm;
-
-    return finalise(r, pr, rm);
-  };
-
-
-  /*
-   * Return a string representing the value of this Decimal rounded to `sd` significant digits
-   * using rounding mode `rounding`.
-   *
-   * Return exponential notation if `sd` is less than the number of digits necessary to represent
-   * the integer part of the value in normal notation.
-   *
-   * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
-   * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
-   *
-   */
-  P.toPrecision = function (sd, rm) {
-    var str,
-      x = this,
-      Ctor = x.constructor;
-
-    if (sd === void 0) {
-      str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);
-    } else {
-      checkInt32(sd, 1, MAX_DIGITS);
-
-      if (rm === void 0) rm = Ctor.rounding;
-      else checkInt32(rm, 0, 8);
-
-      x = finalise(new Ctor(x), sd, rm);
-      str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd);
-    }
-
-    return x.isNeg() && !x.isZero() ? '-' + str : str;
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`
-   * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if
-   * omitted.
-   *
-   * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
-   * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
-   *
-   * 'toSD() digits out of range: {sd}'
-   * 'toSD() digits not an integer: {sd}'
-   * 'toSD() rounding mode not an integer: {rm}'
-   * 'toSD() rounding mode out of range: {rm}'
-   *
-   */
-  P.toSignificantDigits = P.toSD = function (sd, rm) {
-    var x = this,
-      Ctor = x.constructor;
-
-    if (sd === void 0) {
-      sd = Ctor.precision;
-      rm = Ctor.rounding;
-    } else {
-      checkInt32(sd, 1, MAX_DIGITS);
-
-      if (rm === void 0) rm = Ctor.rounding;
-      else checkInt32(rm, 0, 8);
-    }
-
-    return finalise(new Ctor(x), sd, rm);
-  };
-
-
-  /*
-   * Return a string representing the value of this Decimal.
-   *
-   * Return exponential notation if this Decimal has a positive exponent equal to or greater than
-   * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.
-   *
-   */
-  P.toString = function () {
-    var x = this,
-      Ctor = x.constructor,
-      str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);
-
-    return x.isNeg() && !x.isZero() ? '-' + str : str;
-  };
-
-
-  /*
-   * Return a new Decimal whose value is the value of this Decimal truncated to a whole number.
-   *
-   */
-  P.truncated = P.trunc = function () {
-    return finalise(new this.constructor(this), this.e + 1, 1);
-  };
-
-
-  /*
-   * Return a string representing the value of this Decimal.
-   * Unlike `toString`, negative zero will include the minus sign.
-   *
-   */
-  P.valueOf = P.toJSON = function () {
-    var x = this,
-      Ctor = x.constructor,
-      str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);
-
-    return x.isNeg() ? '-' + str : str;
-  };
-
-
-  // Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.
-
-
-  /*
-   *  digitsToString           P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower,
-   *                           finiteToString, naturalExponential, naturalLogarithm
-   *  checkInt32               P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest,
-   *                           P.toPrecision, P.toSignificantDigits, toStringBinary, random
-   *  checkRoundingDigits      P.logarithm, P.toPower, naturalExponential, naturalLogarithm
-   *  convertBase              toStringBinary, parseOther
-   *  cos                      P.cos
-   *  divide                   P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy,
-   *                           P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction,
-   *                           P.toNearest, toStringBinary, naturalExponential, naturalLogarithm,
-   *                           taylorSeries, atan2, parseOther
-   *  finalise                 P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh,
-   *                           P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus,
-   *                           P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot,
-   *                           P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed,
-   *                           P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits,
-   *                           P.truncated, divide, getLn10, getPi, naturalExponential,
-   *                           naturalLogarithm, ceil, floor, round, trunc
-   *  finiteToString           P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf,
-   *                           toStringBinary
-   *  getBase10Exponent        P.minus, P.plus, P.times, parseOther
-   *  getLn10                  P.logarithm, naturalLogarithm
-   *  getPi                    P.acos, P.asin, P.atan, toLessThanHalfPi, atan2
-   *  getPrecision             P.precision, P.toFraction
-   *  getZeroString            digitsToString, finiteToString
-   *  intPow                   P.toPower, parseOther
-   *  isOdd                    toLessThanHalfPi
-   *  maxOrMin                 max, min
-   *  naturalExponential       P.naturalExponential, P.toPower
-   *  naturalLogarithm         P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm,
-   *                           P.toPower, naturalExponential
-   *  nonFiniteToString        finiteToString, toStringBinary
-   *  parseDecimal             Decimal
-   *  parseOther               Decimal
-   *  sin                      P.sin
-   *  taylorSeries             P.cosh, P.sinh, cos, sin
-   *  toLessThanHalfPi         P.cos, P.sin
-   *  toStringBinary           P.toBinary, P.toHexadecimal, P.toOctal
-   *  truncate                 intPow
-   *
-   *  Throws:                  P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi,
-   *                           naturalLogarithm, config, parseOther, random, Decimal
-   */
-
-
-  function digitsToString(d) {
-    var i, k, ws,
-      indexOfLastWord = d.length - 1,
-      str = '',
-      w = d[0];
-
-    if (indexOfLastWord > 0) {
-      str += w;
-      for (i = 1; i < indexOfLastWord; i++) {
-        ws = d[i] + '';
-        k = LOG_BASE - ws.length;
-        if (k) str += getZeroString(k);
-        str += ws;
-      }
-
-      w = d[i];
-      ws = w + '';
-      k = LOG_BASE - ws.length;
-      if (k) str += getZeroString(k);
-    } else if (w === 0) {
-      return '0';
-    }
-
-    // Remove trailing zeros of last w.
-    for (; w % 10 === 0;) w /= 10;
-
-    return str + w;
-  }
-
-
-  function checkInt32(i, min, max) {
-    if (i !== ~~i || i < min || i > max) {
-      throw Error(invalidArgument + i);
-    }
-  }
-
-
-  /*
-   * Check 5 rounding digits if `repeating` is null, 4 otherwise.
-   * `repeating == null` if caller is `log` or `pow`,
-   * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`.
-   */
-  function checkRoundingDigits(d, i, rm, repeating) {
-    var di, k, r, rd;
-
-    // Get the length of the first word of the array d.
-    for (k = d[0]; k >= 10; k /= 10) --i;
-
-    // Is the rounding digit in the first word of d?
-    if (--i < 0) {
-      i += LOG_BASE;
-      di = 0;
-    } else {
-      di = Math.ceil((i + 1) / LOG_BASE);
-      i %= LOG_BASE;
-    }
-
-    // i is the index (0 - 6) of the rounding digit.
-    // E.g. if within the word 3487563 the first rounding digit is 5,
-    // then i = 4, k = 1000, rd = 3487563 % 1000 = 563
-    k = mathpow(10, LOG_BASE - i);
-    rd = d[di] % k | 0;
-
-    if (repeating == null) {
-      if (i < 3) {
-        if (i == 0) rd = rd / 100 | 0;
-        else if (i == 1) rd = rd / 10 | 0;
-        r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0;
-      } else {
-        r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) &&
-          (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 ||
-            (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0;
-      }
-    } else {
-      if (i < 4) {
-        if (i == 0) rd = rd / 1000 | 0;
-        else if (i == 1) rd = rd / 100 | 0;
-        else if (i == 2) rd = rd / 10 | 0;
-        r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999;
-      } else {
-        r = ((repeating || rm < 4) && rd + 1 == k ||
-        (!repeating && rm > 3) && rd + 1 == k / 2) &&
-          (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1;
-      }
-    }
-
-    return r;
-  }
-
-
-  // Convert string of `baseIn` to an array of numbers of `baseOut`.
-  // Eg. convertBase('255', 10, 16) returns [15, 15].
-  // Eg. convertBase('ff', 16, 10) returns [2, 5, 5].
-  function convertBase(str, baseIn, baseOut) {
-    var j,
-      arr = [0],
-      arrL,
-      i = 0,
-      strL = str.length;
-
-    for (; i < strL;) {
-      for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn;
-      arr[0] += NUMERALS.indexOf(str.charAt(i++));
-      for (j = 0; j < arr.length; j++) {
-        if (arr[j] > baseOut - 1) {
-          if (arr[j + 1] === void 0) arr[j + 1] = 0;
-          arr[j + 1] += arr[j] / baseOut | 0;
-          arr[j] %= baseOut;
-        }
-      }
-    }
-
-    return arr.reverse();
-  }
-
-
-  /*
-   * cos(x) = 1 - x^2/2! + x^4/4! - ...
-   * |x| < pi/2
-   *
-   */
-  function cosine(Ctor, x) {
-    var k, len, y;
-
-    if (x.isZero()) return x;
-
-    // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1
-    // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1
-
-    // Estimate the optimum number of times to use the argument reduction.
-    len = x.d.length;
-    if (len < 32) {
-      k = Math.ceil(len / 3);
-      y = (1 / tinyPow(4, k)).toString();
-    } else {
-      k = 16;
-      y = '2.3283064365386962890625e-10';
-    }
-
-    Ctor.precision += k;
-
-    x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1));
-
-    // Reverse argument reduction
-    for (var i = k; i--;) {
-      var cos2x = x.times(x);
-      x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1);
-    }
-
-    Ctor.precision -= k;
-
-    return x;
-  }
-
-
-  /*
-   * Perform division in the specified base.
-   */
-  var divide = (function () {
-
-    // Assumes non-zero x and k, and hence non-zero result.
-    function multiplyInteger(x, k, base) {
-      var temp,
-        carry = 0,
-        i = x.length;
-
-      for (x = x.slice(); i--;) {
-        temp = x[i] * k + carry;
-        x[i] = temp % base | 0;
-        carry = temp / base | 0;
-      }
-
-      if (carry) x.unshift(carry);
-
-      return x;
-    }
-
-    function compare(a, b, aL, bL) {
-      var i, r;
-
-      if (aL != bL) {
-        r = aL > bL ? 1 : -1;
-      } else {
-        for (i = r = 0; i < aL; i++) {
-          if (a[i] != b[i]) {
-            r = a[i] > b[i] ? 1 : -1;
-            break;
-          }
-        }
-      }
-
-      return r;
-    }
-
-    function subtract(a, b, aL, base) {
-      var i = 0;
-
-      // Subtract b from a.
-      for (; aL--;) {
-        a[aL] -= i;
-        i = a[aL] < b[aL] ? 1 : 0;
-        a[aL] = i * base + a[aL] - b[aL];
-      }
-
-      // Remove leading zeros.
-      for (; !a[0] && a.length > 1;) a.shift();
-    }
-
-    return function (x, y, pr, rm, dp, base) {
-      var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0,
-        yL, yz,
-        Ctor = x.constructor,
-        sign = x.s == y.s ? 1 : -1,
-        xd = x.d,
-        yd = y.d;
-
-      // Either NaN, Infinity or 0?
-      if (!xd || !xd[0] || !yd || !yd[0]) {
-
-        return new Ctor(// Return NaN if either NaN, or both Infinity or 0.
-          !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN :
-
-          // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
-          xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0);
-      }
-
-      if (base) {
-        logBase = 1;
-        e = x.e - y.e;
-      } else {
-        base = BASE;
-        logBase = LOG_BASE;
-        e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase);
-      }
-
-      yL = yd.length;
-      xL = xd.length;
-      q = new Ctor(sign);
-      qd = q.d = [];
-
-      // Result exponent may be one less than e.
-      // The digit array of a Decimal from toStringBinary may have trailing zeros.
-      for (i = 0; yd[i] == (xd[i] || 0); i++);
-
-      if (yd[i] > (xd[i] || 0)) e--;
-
-      if (pr == null) {
-        sd = pr = Ctor.precision;
-        rm = Ctor.rounding;
-      } else if (dp) {
-        sd = pr + (x.e - y.e) + 1;
-      } else {
-        sd = pr;
-      }
-
-      if (sd < 0) {
-        qd.push(1);
-        more = true;
-      } else {
-
-        // Convert precision in number of base 10 digits to base 1e7 digits.
-        sd = sd / logBase + 2 | 0;
-        i = 0;
-
-        // divisor < 1e7
-        if (yL == 1) {
-          k = 0;
-          yd = yd[0];
-          sd++;
-
-          // k is the carry.
-          for (; (i < xL || k) && sd--; i++) {
-            t = k * base + (xd[i] || 0);
-            qd[i] = t / yd | 0;
-            k = t % yd | 0;
-          }
-
-          more = k || i < xL;
-
-        // divisor >= 1e7
-        } else {
-
-          // Normalise xd and yd so highest order digit of yd is >= base/2
-          k = base / (yd[0] + 1) | 0;
-
-          if (k > 1) {
-            yd = multiplyInteger(yd, k, base);
-            xd = multiplyInteger(xd, k, base);
-            yL = yd.length;
-            xL = xd.length;
-          }
-
-          xi = yL;
-          rem = xd.slice(0, yL);
-          remL = rem.length;
-
-          // Add zeros to make remainder as long as divisor.
-          for (; remL < yL;) rem[remL++] = 0;
-
-          yz = yd.slice();
-          yz.unshift(0);
-          yd0 = yd[0];
-
-          if (yd[1] >= base / 2) ++yd0;
-
-          do {
-            k = 0;
-
-            // Compare divisor and remainder.
-            cmp = compare(yd, rem, yL, remL);
-
-            // If divisor < remainder.
-            if (cmp < 0) {
-
-              // Calculate trial digit, k.
-              rem0 = rem[0];
-              if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);
-
-              // k will be how many times the divisor goes into the current remainder.
-              k = rem0 / yd0 | 0;
-
-              //  Algorithm:
-              //  1. product = divisor * trial digit (k)
-              //  2. if product > remainder: product -= divisor, k--
-              //  3. remainder -= product
-              //  4. if product was < remainder at 2:
-              //    5. compare new remainder and divisor
-              //    6. If remainder > divisor: remainder -= divisor, k++
-
-              if (k > 1) {
-                if (k >= base) k = base - 1;
-
-                // product = divisor * trial digit.
-                prod = multiplyInteger(yd, k, base);
-                prodL = prod.length;
-                remL = rem.length;
-
-                // Compare product and remainder.
-                cmp = compare(prod, rem, prodL, remL);
-
-                // product > remainder.
-                if (cmp == 1) {
-                  k--;
-
-                  // Subtract divisor from product.
-                  subtract(prod, yL < prodL ? yz : yd, prodL, base);
-                }
-              } else {
-
-                // cmp is -1.
-                // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1
-                // to avoid it. If k is 1 there is a need to compare yd and rem again below.
-                if (k == 0) cmp = k = 1;
-                prod = yd.slice();
-              }
-
-              prodL = prod.length;
-              if (prodL < remL) prod.unshift(0);
-
-              // Subtract product from remainder.
-              subtract(rem, prod, remL, base);
-
-              // If product was < previous remainder.
-              if (cmp == -1) {
-                remL = rem.length;
-
-                // Compare divisor and new remainder.
-                cmp = compare(yd, rem, yL, remL);
-
-                // If divisor < new remainder, subtract divisor from remainder.
-                if (cmp < 1) {
-                  k++;
-
-                  // Subtract divisor from remainder.
-                  subtract(rem, yL < remL ? yz : yd, remL, base);
-                }
-              }
-
-              remL = rem.length;
-            } else if (cmp === 0) {
-              k++;
-              rem = [0];
-            }    // if cmp === 1, k will be 0
-
-            // Add the next digit, k, to the result array.
-            qd[i++] = k;
-
-            // Update the remainder.
-            if (cmp && rem[0]) {
-              rem[remL++] = xd[xi] || 0;
-            } else {
-              rem = [xd[xi]];
-              remL = 1;
-            }
-
-          } while ((xi++ < xL || rem[0] !== void 0) && sd--);
-
-          more = rem[0] !== void 0;
-        }
-
-        // Leading zero?
-        if (!qd[0]) qd.shift();
-      }
-
-      // logBase is 1 when divide is being used for base conversion.
-      if (logBase == 1) {
-        q.e = e;
-        inexact = more;
-      } else {
-
-        // To calculate q.e, first get the number of digits of qd[0].
-        for (i = 1, k = qd[0]; k >= 10; k /= 10) i++;
-        q.e = i + e * logBase - 1;
-
-        finalise(q, dp ? pr + q.e + 1 : pr, rm, more);
-      }
-
-      return q;
-    };
-  })();
-
-
-  /*
-   * Round `x` to `sd` significant digits using rounding mode `rm`.
-   * Check for over/under-flow.
-   */
-   function finalise(x, sd, rm, isTruncated) {
-    var digits, i, j, k, rd, roundUp, w, xd, xdi,
-      Ctor = x.constructor;
-
-    // Don't round if sd is null or undefined.
-    out: if (sd != null) {
-      xd = x.d;
-
-      // Infinity/NaN.
-      if (!xd) return x;
-
-      // rd: the rounding digit, i.e. the digit after the digit that may be rounded up.
-      // w: the word of xd containing rd, a base 1e7 number.
-      // xdi: the index of w within xd.
-      // digits: the number of digits of w.
-      // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if
-      // they had leading zeros)
-      // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero).
-
-      // Get the length of the first word of the digits array xd.
-      for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++;
-      i = sd - digits;
-
-      // Is the rounding digit in the first word of xd?
-      if (i < 0) {
-        i += LOG_BASE;
-        j = sd;
-        w = xd[xdi = 0];
-
-        // Get the rounding digit at index j of w.
-        rd = w / mathpow(10, digits - j - 1) % 10 | 0;
-      } else {
-        xdi = Math.ceil((i + 1) / LOG_BASE);
-        k = xd.length;
-        if (xdi >= k) {
-          if (isTruncated) {
-
-            // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`.
-            for (; k++ <= xdi;) xd.push(0);
-            w = rd = 0;
-            digits = 1;
-            i %= LOG_BASE;
-            j = i - LOG_BASE + 1;
-          } else {
-            break out;
-          }
-        } else {
-          w = k = xd[xdi];
-
-          // Get the number of digits of w.
-          for (digits = 1; k >= 10; k /= 10) digits++;
-
-          // Get the index of rd within w.
-          i %= LOG_BASE;
-
-          // Get the index of rd within w, adjusted for leading zeros.
-          // The number of leading zeros of w is given by LOG_BASE - digits.
-          j = i - LOG_BASE + digits;
-
-          // Get the rounding digit at index j of w.
-          rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0;
-        }
-      }
-
-      // Are there any non-zero digits after the rounding digit?
-      isTruncated = isTruncated || sd < 0 ||
-        xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1));
-
-      // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right
-      // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression
-      // will give 714.
-
-      roundUp = rm < 4
-        ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))
-        : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 &&
-
-          // Check whether the digit to the left of the rounding digit is odd.
-          ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 ||
-            rm == (x.s < 0 ? 8 : 7));
-
-      if (sd < 1 || !xd[0]) {
-        xd.length = 0;
-        if (roundUp) {
-
-          // Convert sd to decimal places.
-          sd -= x.e + 1;
-
-          // 1, 0.1, 0.01, 0.001, 0.0001 etc.
-          xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE);
-          x.e = -sd || 0;
-        } else {
-
-          // Zero.
-          xd[0] = x.e = 0;
-        }
-
-        return x;
-      }
-
-      // Remove excess digits.
-      if (i == 0) {
-        xd.length = xdi;
-        k = 1;
-        xdi--;
-      } else {
-        xd.length = xdi + 1;
-        k = mathpow(10, LOG_BASE - i);
-
-        // E.g. 56700 becomes 56000 if 7 is the rounding digit.
-        // j > 0 means i > number of leading zeros of w.
-        xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0;
-      }
-
-      if (roundUp) {
-        for (;;) {
-
-          // Is the digit to be rounded up in the first word of xd?
-          if (xdi == 0) {
-
-            // i will be the length of xd[0] before k is added.
-            for (i = 1, j = xd[0]; j >= 10; j /= 10) i++;
-            j = xd[0] += k;
-            for (k = 1; j >= 10; j /= 10) k++;
-
-            // if i != k the length has increased.
-            if (i != k) {
-              x.e++;
-              if (xd[0] == BASE) xd[0] = 1;
-            }
-
-            break;
-          } else {
-            xd[xdi] += k;
-            if (xd[xdi] != BASE) break;
-            xd[xdi--] = 0;
-            k = 1;
-          }
-        }
-      }
-
-      // Remove trailing zeros.
-      for (i = xd.length; xd[--i] === 0;) xd.pop();
-    }
-
-    if (external) {
-
-      // Overflow?
-      if (x.e > Ctor.maxE) {
-
-        // Infinity.
-        x.d = null;
-        x.e = NaN;
-
-      // Underflow?
-      } else if (x.e < Ctor.minE) {
-
-        // Zero.
-        x.e = 0;
-        x.d = [0];
-        // Ctor.underflow = true;
-      } // else Ctor.underflow = false;
-    }
-
-    return x;
-  }
-
-
-  function finiteToString(x, isExp, sd) {
-    if (!x.isFinite()) return nonFiniteToString(x);
-    var k,
-      e = x.e,
-      str = digitsToString(x.d),
-      len = str.length;
-
-    if (isExp) {
-      if (sd && (k = sd - len) > 0) {
-        str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k);
-      } else if (len > 1) {
-        str = str.charAt(0) + '.' + str.slice(1);
-      }
-
-      str = str + (x.e < 0 ? 'e' : 'e+') + x.e;
-    } else if (e < 0) {
-      str = '0.' + getZeroString(-e - 1) + str;
-      if (sd && (k = sd - len) > 0) str += getZeroString(k);
-    } else if (e >= len) {
-      str += getZeroString(e + 1 - len);
-      if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k);
-    } else {
-      if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k);
-      if (sd && (k = sd - len) > 0) {
-        if (e + 1 === len) str += '.';
-        str += getZeroString(k);
-      }
-    }
-
-    return str;
-  }
-
-
-  // Calculate the base 10 exponent from the base 1e7 exponent.
-  function getBase10Exponent(digits, e) {
-    var w = digits[0];
-
-    // Add the number of digits of the first word of the digits array.
-    for ( e *= LOG_BASE; w >= 10; w /= 10) e++;
-    return e;
-  }
-
-
-  function getLn10(Ctor, sd, pr) {
-    if (sd > LN10_PRECISION) {
-
-      // Reset global state in case the exception is caught.
-      external = true;
-      if (pr) Ctor.precision = pr;
-      throw Error(precisionLimitExceeded);
-    }
-    return finalise(new Ctor(LN10), sd, 1, true);
-  }
-
-
-  function getPi(Ctor, sd, rm) {
-    if (sd > PI_PRECISION) throw Error(precisionLimitExceeded);
-    return finalise(new Ctor(PI), sd, rm, true);
-  }
-
-
-  function getPrecision(digits) {
-    var w = digits.length - 1,
-      len = w * LOG_BASE + 1;
-
-    w = digits[w];
-
-    // If non-zero...
-    if (w) {
-
-      // Subtract the number of trailing zeros of the last word.
-      for (; w % 10 == 0; w /= 10) len--;
-
-      // Add the number of digits of the first word.
-      for (w = digits[0]; w >= 10; w /= 10) len++;
-    }
-
-    return len;
-  }
-
-
-  function getZeroString(k) {
-    var zs = '';
-    for (; k--;) zs += '0';
-    return zs;
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an
-   * integer of type number.
-   *
-   * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`.
-   *
-   */
-  function intPow(Ctor, x, n, pr) {
-    var isTruncated,
-      r = new Ctor(1),
-
-      // Max n of 9007199254740991 takes 53 loop iterations.
-      // Maximum digits array length; leaves [28, 34] guard digits.
-      k = Math.ceil(pr / LOG_BASE + 4);
-
-    external = false;
-
-    for (;;) {
-      if (n % 2) {
-        r = r.times(x);
-        if (truncate(r.d, k)) isTruncated = true;
-      }
-
-      n = mathfloor(n / 2);
-      if (n === 0) {
-
-        // To ensure correct rounding when r.d is truncated, increment the last word if it is zero.
-        n = r.d.length - 1;
-        if (isTruncated && r.d[n] === 0) ++r.d[n];
-        break;
-      }
-
-      x = x.times(x);
-      truncate(x.d, k);
-    }
-
-    external = true;
-
-    return r;
-  }
-
-
-  function isOdd(n) {
-    return n.d[n.d.length - 1] & 1;
-  }
-
-
-  /*
-   * Handle `max` and `min`. `ltgt` is 'lt' or 'gt'.
-   */
-  function maxOrMin(Ctor, args, ltgt) {
-    var y,
-      x = new Ctor(args[0]),
-      i = 0;
-
-    for (; ++i < args.length;) {
-      y = new Ctor(args[i]);
-      if (!y.s) {
-        x = y;
-        break;
-      } else if (x[ltgt](y)) {
-        x = y;
-      }
-    }
-
-    return x;
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant
-   * digits.
-   *
-   * Taylor/Maclaurin series.
-   *
-   * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...
-   *
-   * Argument reduction:
-   *   Repeat x = x / 32, k += 5, until |x| < 0.1
-   *   exp(x) = exp(x / 2^k)^(2^k)
-   *
-   * Previously, the argument was initially reduced by
-   * exp(x) = exp(r) * 10^k  where r = x - k * ln10, k = floor(x / ln10)
-   * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was
-   * found to be slower than just dividing repeatedly by 32 as above.
-   *
-   * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000
-   * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000
-   * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)
-   *
-   *  exp(Infinity)  = Infinity
-   *  exp(-Infinity) = 0
-   *  exp(NaN)       = NaN
-   *  exp(±0)        = 1
-   *
-   *  exp(x) is non-terminating for any finite, non-zero x.
-   *
-   *  The result will always be correctly rounded.
-   *
-   */
-  function naturalExponential(x, sd) {
-    var denominator, guard, j, pow, sum, t, wpr,
-      rep = 0,
-      i = 0,
-      k = 0,
-      Ctor = x.constructor,
-      rm = Ctor.rounding,
-      pr = Ctor.precision;
-
-    // 0/NaN/Infinity?
-    if (!x.d || !x.d[0] || x.e > 17) {
-
-      return new Ctor(x.d
-        ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0
-        : x.s ? x.s < 0 ? 0 : x : 0 / 0);
-    }
-
-    if (sd == null) {
-      external = false;
-      wpr = pr;
-    } else {
-      wpr = sd;
-    }
-
-    t = new Ctor(0.03125);
-
-    // while abs(x) >= 0.1
-    while (x.e > -2) {
-
-      // x = x / 2^5
-      x = x.times(t);
-      k += 5;
-    }
-
-    // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision
-    // necessary to ensure the first 4 rounding digits are correct.
-    guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0;
-    wpr += guard;
-    denominator = pow = sum = new Ctor(1);
-    Ctor.precision = wpr;
-
-    for (;;) {
-      pow = finalise(pow.times(x), wpr, 1);
-      denominator = denominator.times(++i);
-      t = sum.plus(divide(pow, denominator, wpr, 1));
-
-      if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {
-        j = k;
-        while (j--) sum = finalise(sum.times(sum), wpr, 1);
-
-        // Check to see if the first 4 rounding digits are [49]999.
-        // If so, repeat the summation with a higher precision, otherwise
-        // e.g. with precision: 18, rounding: 1
-        // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123)
-        // `wpr - guard` is the index of first rounding digit.
-        if (sd == null) {
-
-          if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {
-            Ctor.precision = wpr += 10;
-            denominator = pow = t = new Ctor(1);
-            i = 0;
-            rep++;
-          } else {
-            return finalise(sum, Ctor.precision = pr, rm, external = true);
-          }
-        } else {
-          Ctor.precision = pr;
-          return sum;
-        }
-      }
-
-      sum = t;
-    }
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant
-   * digits.
-   *
-   *  ln(-n)        = NaN
-   *  ln(0)         = -Infinity
-   *  ln(-0)        = -Infinity
-   *  ln(1)         = 0
-   *  ln(Infinity)  = Infinity
-   *  ln(-Infinity) = NaN
-   *  ln(NaN)       = NaN
-   *
-   *  ln(n) (n != 1) is non-terminating.
-   *
-   */
-  function naturalLogarithm(y, sd) {
-    var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2,
-      n = 1,
-      guard = 10,
-      x = y,
-      xd = x.d,
-      Ctor = x.constructor,
-      rm = Ctor.rounding,
-      pr = Ctor.precision;
-
-    // Is x negative or Infinity, NaN, 0 or 1?
-    if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) {
-      return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x);
-    }
-
-    if (sd == null) {
-      external = false;
-      wpr = pr;
-    } else {
-      wpr = sd;
-    }
-
-    Ctor.precision = wpr += guard;
-    c = digitsToString(xd);
-    c0 = c.charAt(0);
-
-    if (Math.abs(e = x.e) < 1.5e15) {
-
-      // Argument reduction.
-      // The series converges faster the closer the argument is to 1, so using
-      // ln(a^b) = b * ln(a),   ln(a) = ln(a^b) / b
-      // multiply the argument by itself until the leading digits of the significand are 7, 8, 9,
-      // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can
-      // later be divided by this number, then separate out the power of 10 using
-      // ln(a*10^b) = ln(a) + b*ln(10).
-
-      // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14).
-      //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) {
-      // max n is 6 (gives 0.7 - 1.3)
-      while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) {
-        x = x.times(y);
-        c = digitsToString(x.d);
-        c0 = c.charAt(0);
-        n++;
-      }
-
-      e = x.e;
-
-      if (c0 > 1) {
-        x = new Ctor('0.' + c);
-        e++;
-      } else {
-        x = new Ctor(c0 + '.' + c.slice(1));
-      }
-    } else {
-
-      // The argument reduction method above may result in overflow if the argument y is a massive
-      // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this
-      // function using ln(x*10^e) = ln(x) + e*ln(10).
-      t = getLn10(Ctor, wpr + 2, pr).times(e + '');
-      x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t);
-      Ctor.precision = pr;
-
-      return sd == null ? finalise(x, pr, rm, external = true) : x;
-    }
-
-    // x1 is x reduced to a value near 1.
-    x1 = x;
-
-    // Taylor series.
-    // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...)
-    // where x = (y - 1)/(y + 1)    (|x| < 1)
-    sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1);
-    x2 = finalise(x.times(x), wpr, 1);
-    denominator = 3;
-
-    for (;;) {
-      numerator = finalise(numerator.times(x2), wpr, 1);
-      t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1));
-
-      if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {
-        sum = sum.times(2);
-
-        // Reverse the argument reduction. Check that e is not 0 because, besides preventing an
-        // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0.
-        if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ''));
-        sum = divide(sum, new Ctor(n), wpr, 1);
-
-        // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has
-        // been repeated previously) and the first 4 rounding digits 9999?
-        // If so, restart the summation with a higher precision, otherwise
-        // e.g. with precision: 12, rounding: 1
-        // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463.
-        // `wpr - guard` is the index of first rounding digit.
-        if (sd == null) {
-          if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {
-            Ctor.precision = wpr += guard;
-            t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1);
-            x2 = finalise(x.times(x), wpr, 1);
-            denominator = rep = 1;
-          } else {
-            return finalise(sum, Ctor.precision = pr, rm, external = true);
-          }
-        } else {
-          Ctor.precision = pr;
-          return sum;
-        }
-      }
-
-      sum = t;
-      denominator += 2;
-    }
-  }
-
-
-  // ±Infinity, NaN.
-  function nonFiniteToString(x) {
-    // Unsigned.
-    return String(x.s * x.s / 0);
-  }
-
-
-  /*
-   * Parse the value of a new Decimal `x` from string `str`.
-   */
-  function parseDecimal(x, str) {
-    var e, i, len;
-
-    // Decimal point?
-    if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');
-
-    // Exponential form?
-    if ((i = str.search(/e/i)) > 0) {
-
-      // Determine exponent.
-      if (e < 0) e = i;
-      e += +str.slice(i + 1);
-      str = str.substring(0, i);
-    } else if (e < 0) {
-
-      // Integer.
-      e = str.length;
-    }
-
-    // Determine leading zeros.
-    for (i = 0; str.charCodeAt(i) === 48; i++);
-
-    // Determine trailing zeros.
-    for (len = str.length; str.charCodeAt(len - 1) === 48; --len);
-    str = str.slice(i, len);
-
-    if (str) {
-      len -= i;
-      x.e = e = e - i - 1;
-      x.d = [];
-
-      // Transform base
-
-      // e is the base 10 exponent.
-      // i is where to slice str to get the first word of the digits array.
-      i = (e + 1) % LOG_BASE;
-      if (e < 0) i += LOG_BASE;
-
-      if (i < len) {
-        if (i) x.d.push(+str.slice(0, i));
-        for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));
-        str = str.slice(i);
-        i = LOG_BASE - str.length;
-      } else {
-        i -= len;
-      }
-
-      for (; i--;) str += '0';
-      x.d.push(+str);
-
-      if (external) {
-
-        // Overflow?
-        if (x.e > x.constructor.maxE) {
-
-          // Infinity.
-          x.d = null;
-          x.e = NaN;
-
-        // Underflow?
-        } else if (x.e < x.constructor.minE) {
-
-          // Zero.
-          x.e = 0;
-          x.d = [0];
-          // x.constructor.underflow = true;
-        } // else x.constructor.underflow = false;
-      }
-    } else {
-
-      // Zero.
-      x.e = 0;
-      x.d = [0];
-    }
-
-    return x;
-  }
-
-
-  /*
-   * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value.
-   */
-  function parseOther(x, str) {
-    var base, Ctor, divisor, i, isFloat, len, p, xd, xe;
-
-    if (str.indexOf('_') > -1) {
-      str = str.replace(/(\d)_(?=\d)/g, '$1');
-      if (isDecimal.test(str)) return parseDecimal(x, str);
-    } else if (str === 'Infinity' || str === 'NaN') {
-      if (!+str) x.s = NaN;
-      x.e = NaN;
-      x.d = null;
-      return x;
-    }
-
-    if (isHex.test(str))  {
-      base = 16;
-      str = str.toLowerCase();
-    } else if (isBinary.test(str))  {
-      base = 2;
-    } else if (isOctal.test(str))  {
-      base = 8;
-    } else {
-      throw Error(invalidArgument + str);
-    }
-
-    // Is there a binary exponent part?
-    i = str.search(/p/i);
-
-    if (i > 0) {
-      p = +str.slice(i + 1);
-      str = str.substring(2, i);
-    } else {
-      str = str.slice(2);
-    }
-
-    // Convert `str` as an integer then divide the result by `base` raised to a power such that the
-    // fraction part will be restored.
-    i = str.indexOf('.');
-    isFloat = i >= 0;
-    Ctor = x.constructor;
-
-    if (isFloat) {
-      str = str.replace('.', '');
-      len = str.length;
-      i = len - i;
-
-      // log[10](16) = 1.2041... , log[10](88) = 1.9444....
-      divisor = intPow(Ctor, new Ctor(base), i, i * 2);
-    }
-
-    xd = convertBase(str, base, BASE);
-    xe = xd.length - 1;
-
-    // Remove trailing zeros.
-    for (i = xe; xd[i] === 0; --i) xd.pop();
-    if (i < 0) return new Ctor(x.s * 0);
-    x.e = getBase10Exponent(xd, xe);
-    x.d = xd;
-    external = false;
-
-    // At what precision to perform the division to ensure exact conversion?
-    // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount)
-    // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412
-    // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits.
-    // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount
-    // Therefore using 4 * the number of digits of str will always be enough.
-    if (isFloat) x = divide(x, divisor, len * 4);
-
-    // Multiply by the binary exponent part if present.
-    if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p));
-    external = true;
-
-    return x;
-  }
-
-
-  /*
-   * sin(x) = x - x^3/3! + x^5/5! - ...
-   * |x| < pi/2
-   *
-   */
-  function sine(Ctor, x) {
-    var k,
-      len = x.d.length;
-
-    if (len < 3) {
-      return x.isZero() ? x : taylorSeries(Ctor, 2, x, x);
-    }
-
-    // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x)
-    // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5)
-    // and  sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20))
-
-    // Estimate the optimum number of times to use the argument reduction.
-    k = 1.4 * Math.sqrt(len);
-    k = k > 16 ? 16 : k | 0;
-
-    x = x.times(1 / tinyPow(5, k));
-    x = taylorSeries(Ctor, 2, x, x);
-
-    // Reverse argument reduction
-    var sin2_x,
-      d5 = new Ctor(5),
-      d16 = new Ctor(16),
-      d20 = new Ctor(20);
-    for (; k--;) {
-      sin2_x = x.times(x);
-      x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20))));
-    }
-
-    return x;
-  }
-
-
-  // Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`.
-  function taylorSeries(Ctor, n, x, y, isHyperbolic) {
-    var j, t, u, x2,
-      i = 1,
-      pr = Ctor.precision,
-      k = Math.ceil(pr / LOG_BASE);
-
-    external = false;
-    x2 = x.times(x);
-    u = new Ctor(y);
-
-    for (;;) {
-      t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1);
-      u = isHyperbolic ? y.plus(t) : y.minus(t);
-      y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1);
-      t = u.plus(y);
-
-      if (t.d[k] !== void 0) {
-        for (j = k; t.d[j] === u.d[j] && j--;);
-        if (j == -1) break;
-      }
-
-      j = u;
-      u = y;
-      y = t;
-      t = j;
-      i++;
-    }
-
-    external = true;
-    t.d.length = k + 1;
-
-    return t;
-  }
-
-
-  // Exponent e must be positive and non-zero.
-  function tinyPow(b, e) {
-    var n = b;
-    while (--e) n *= b;
-    return n;
-  }
-
-
-  // Return the absolute value of `x` reduced to less than or equal to half pi.
-  function toLessThanHalfPi(Ctor, x) {
-    var t,
-      isNeg = x.s < 0,
-      pi = getPi(Ctor, Ctor.precision, 1),
-      halfPi = pi.times(0.5);
-
-    x = x.abs();
-
-    if (x.lte(halfPi)) {
-      quadrant = isNeg ? 4 : 1;
-      return x;
-    }
-
-    t = x.divToInt(pi);
-
-    if (t.isZero()) {
-      quadrant = isNeg ? 3 : 2;
-    } else {
-      x = x.minus(t.times(pi));
-
-      // 0 <= x < pi
-      if (x.lte(halfPi)) {
-        quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1);
-        return x;
-      }
-
-      quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2);
-    }
-
-    return x.minus(pi).abs();
-  }
-
-
-  /*
-   * Return the value of Decimal `x` as a string in base `baseOut`.
-   *
-   * If the optional `sd` argument is present include a binary exponent suffix.
-   */
-  function toStringBinary(x, baseOut, sd, rm) {
-    var base, e, i, k, len, roundUp, str, xd, y,
-      Ctor = x.constructor,
-      isExp = sd !== void 0;
-
-    if (isExp) {
-      checkInt32(sd, 1, MAX_DIGITS);
-      if (rm === void 0) rm = Ctor.rounding;
-      else checkInt32(rm, 0, 8);
-    } else {
-      sd = Ctor.precision;
-      rm = Ctor.rounding;
-    }
-
-    if (!x.isFinite()) {
-      str = nonFiniteToString(x);
-    } else {
-      str = finiteToString(x);
-      i = str.indexOf('.');
-
-      // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required:
-      // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10))
-      // minBinaryExponent = floor(decimalExponent * log[2](10))
-      // log[2](10) = 3.321928094887362347870319429489390175864
-
-      if (isExp) {
-        base = 2;
-        if (baseOut == 16) {
-          sd = sd * 4 - 3;
-        } else if (baseOut == 8) {
-          sd = sd * 3 - 2;
-        }
-      } else {
-        base = baseOut;
-      }
-
-      // Convert the number as an integer then divide the result by its base raised to a power such
-      // that the fraction part will be restored.
-
-      // Non-integer.
-      if (i >= 0) {
-        str = str.replace('.', '');
-        y = new Ctor(1);
-        y.e = str.length - i;
-        y.d = convertBase(finiteToString(y), 10, base);
-        y.e = y.d.length;
-      }
-
-      xd = convertBase(str, 10, base);
-      e = len = xd.length;
-
-      // Remove trailing zeros.
-      for (; xd[--len] == 0;) xd.pop();
-
-      if (!xd[0]) {
-        str = isExp ? '0p+0' : '0';
-      } else {
-        if (i < 0) {
-          e--;
-        } else {
-          x = new Ctor(x);
-          x.d = xd;
-          x.e = e;
-          x = divide(x, y, sd, rm, 0, base);
-          xd = x.d;
-          e = x.e;
-          roundUp = inexact;
-        }
-
-        // The rounding digit, i.e. the digit after the digit that may be rounded up.
-        i = xd[sd];
-        k = base / 2;
-        roundUp = roundUp || xd[sd + 1] !== void 0;
-
-        roundUp = rm < 4
-          ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2))
-          : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 ||
-            rm === (x.s < 0 ? 8 : 7));
-
-        xd.length = sd;
-
-        if (roundUp) {
-
-          // Rounding up may mean the previous digit has to be rounded up and so on.
-          for (; ++xd[--sd] > base - 1;) {
-            xd[sd] = 0;
-            if (!sd) {
-              ++e;
-              xd.unshift(1);
-            }
-          }
-        }
-
-        // Determine trailing zeros.
-        for (len = xd.length; !xd[len - 1]; --len);
-
-        // E.g. [4, 11, 15] becomes 4bf.
-        for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]);
-
-        // Add binary exponent suffix?
-        if (isExp) {
-          if (len > 1) {
-            if (baseOut == 16 || baseOut == 8) {
-              i = baseOut == 16 ? 4 : 3;
-              for (--len; len % i; len++) str += '0';
-              xd = convertBase(str, base, baseOut);
-              for (len = xd.length; !xd[len - 1]; --len);
-
-              // xd[0] will always be be 1
-              for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]);
-            } else {
-              str = str.charAt(0) + '.' + str.slice(1);
-            }
-          }
-
-          str =  str + (e < 0 ? 'p' : 'p+') + e;
-        } else if (e < 0) {
-          for (; ++e;) str = '0' + str;
-          str = '0.' + str;
-        } else {
-          if (++e > len) for (e -= len; e-- ;) str += '0';
-          else if (e < len) str = str.slice(0, e) + '.' + str.slice(e);
-        }
-      }
-
-      str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str;
-    }
-
-    return x.s < 0 ? '-' + str : str;
-  }
-
-
-  // Does not strip trailing zeros.
-  function truncate(arr, len) {
-    if (arr.length > len) {
-      arr.length = len;
-      return true;
-    }
-  }
-
-
-  // Decimal methods
-
-
-  /*
-   *  abs
-   *  acos
-   *  acosh
-   *  add
-   *  asin
-   *  asinh
-   *  atan
-   *  atanh
-   *  atan2
-   *  cbrt
-   *  ceil
-   *  clamp
-   *  clone
-   *  config
-   *  cos
-   *  cosh
-   *  div
-   *  exp
-   *  floor
-   *  hypot
-   *  ln
-   *  log
-   *  log2
-   *  log10
-   *  max
-   *  min
-   *  mod
-   *  mul
-   *  pow
-   *  random
-   *  round
-   *  set
-   *  sign
-   *  sin
-   *  sinh
-   *  sqrt
-   *  sub
-   *  sum
-   *  tan
-   *  tanh
-   *  trunc
-   */
-
-
-  /*
-   * Return a new Decimal whose value is the absolute value of `x`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function abs(x) {
-    return new this(x).abs();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the arccosine in radians of `x`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function acos(x) {
-    return new this(x).acos();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to
-   * `precision` significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} A value in radians.
-   *
-   */
-  function acosh(x) {
-    return new this(x).acosh();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant
-   * digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   * y {number|string|Decimal}
-   *
-   */
-  function add(x, y) {
-    return new this(x).plus(y);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function asin(x) {
-    return new this(x).asin();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to
-   * `precision` significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} A value in radians.
-   *
-   */
-  function asinh(x) {
-    return new this(x).asinh();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function atan(x) {
-    return new this(x).atan();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to
-   * `precision` significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} A value in radians.
-   *
-   */
-  function atanh(x) {
-    return new this(x).atanh();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi
-   * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`.
-   *
-   * Domain: [-Infinity, Infinity]
-   * Range: [-pi, pi]
-   *
-   * y {number|string|Decimal} The y-coordinate.
-   * x {number|string|Decimal} The x-coordinate.
-   *
-   * atan2(±0, -0)               = ±pi
-   * atan2(±0, +0)               = ±0
-   * atan2(±0, -x)               = ±pi for x > 0
-   * atan2(±0, x)                = ±0 for x > 0
-   * atan2(-y, ±0)               = -pi/2 for y > 0
-   * atan2(y, ±0)                = pi/2 for y > 0
-   * atan2(±y, -Infinity)        = ±pi for finite y > 0
-   * atan2(±y, +Infinity)        = ±0 for finite y > 0
-   * atan2(±Infinity, x)         = ±pi/2 for finite x
-   * atan2(±Infinity, -Infinity) = ±3*pi/4
-   * atan2(±Infinity, +Infinity) = ±pi/4
-   * atan2(NaN, x) = NaN
-   * atan2(y, NaN) = NaN
-   *
-   */
-  function atan2(y, x) {
-    y = new this(y);
-    x = new this(x);
-    var r,
-      pr = this.precision,
-      rm = this.rounding,
-      wpr = pr + 4;
-
-    // Either NaN
-    if (!y.s || !x.s) {
-      r = new this(NaN);
-
-    // Both ±Infinity
-    } else if (!y.d && !x.d) {
-      r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75);
-      r.s = y.s;
-
-    // x is ±Infinity or y is ±0
-    } else if (!x.d || y.isZero()) {
-      r = x.s < 0 ? getPi(this, pr, rm) : new this(0);
-      r.s = y.s;
-
-    // y is ±Infinity or x is ±0
-    } else if (!y.d || x.isZero()) {
-      r = getPi(this, wpr, 1).times(0.5);
-      r.s = y.s;
-
-    // Both non-zero and finite
-    } else if (x.s < 0) {
-      this.precision = wpr;
-      this.rounding = 1;
-      r = this.atan(divide(y, x, wpr, 1));
-      x = getPi(this, wpr, 1);
-      this.precision = pr;
-      this.rounding = rm;
-      r = y.s < 0 ? r.minus(x) : r.plus(x);
-    } else {
-      r = this.atan(divide(y, x, wpr, 1));
-    }
-
-    return r;
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant
-   * digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function cbrt(x) {
-    return new this(x).cbrt();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function ceil(x) {
-    return finalise(x = new this(x), x.e + 1, 2);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is `x` clamped to the range delineated by `min` and `max`.
-   *
-   * x {number|string|Decimal}
-   * min {number|string|Decimal}
-   * max {number|string|Decimal}
-   *
-   */
-  function clamp(x, min, max) {
-    return new this(x).clamp(min, max);
-  }
-
-
-  /*
-   * Configure global settings for a Decimal constructor.
-   *
-   * `obj` is an object with one or more of the following properties,
-   *
-   *   precision  {number}
-   *   rounding   {number}
-   *   toExpNeg   {number}
-   *   toExpPos   {number}
-   *   maxE       {number}
-   *   minE       {number}
-   *   modulo     {number}
-   *   crypto     {boolean|number}
-   *   defaults   {true}
-   *
-   * E.g. Decimal.config({ precision: 20, rounding: 4 })
-   *
-   */
-  function config(obj) {
-    if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected');
-    var i, p, v,
-      useDefaults = obj.defaults === true,
-      ps = [
-        'precision', 1, MAX_DIGITS,
-        'rounding', 0, 8,
-        'toExpNeg', -EXP_LIMIT, 0,
-        'toExpPos', 0, EXP_LIMIT,
-        'maxE', 0, EXP_LIMIT,
-        'minE', -EXP_LIMIT, 0,
-        'modulo', 0, 9
-      ];
-
-    for (i = 0; i < ps.length; i += 3) {
-      if (p = ps[i], useDefaults) this[p] = DEFAULTS[p];
-      if ((v = obj[p]) !== void 0) {
-        if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;
-        else throw Error(invalidArgument + p + ': ' + v);
-      }
-    }
-
-    if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p];
-    if ((v = obj[p]) !== void 0) {
-      if (v === true || v === false || v === 0 || v === 1) {
-        if (v) {
-          if (typeof crypto != 'undefined' && crypto &&
-            (crypto.getRandomValues || crypto.randomBytes)) {
-            this[p] = true;
-          } else {
-            throw Error(cryptoUnavailable);
-          }
-        } else {
-          this[p] = false;
-        }
-      } else {
-        throw Error(invalidArgument + p + ': ' + v);
-      }
-    }
-
-    return this;
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant
-   * digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} A value in radians.
-   *
-   */
-  function cos(x) {
-    return new this(x).cos();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision
-   * significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} A value in radians.
-   *
-   */
-  function cosh(x) {
-    return new this(x).cosh();
-  }
-
-
-  /*
-   * Create and return a Decimal constructor with the same configuration properties as this Decimal
-   * constructor.
-   *
-   */
-  function clone(obj) {
-    var i, p, ps;
-
-    /*
-     * The Decimal constructor and exported function.
-     * Return a new Decimal instance.
-     *
-     * v {number|string|Decimal} A numeric value.
-     *
-     */
-    function Decimal(v) {
-      var e, i, t,
-        x = this;
-
-      // Decimal called without new.
-      if (!(x instanceof Decimal)) return new Decimal(v);
-
-      // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor
-      // which points to Object.
-      x.constructor = Decimal;
-
-      // Duplicate.
-      if (isDecimalInstance(v)) {
-        x.s = v.s;
-
-        if (external) {
-          if (!v.d || v.e > Decimal.maxE) {
-
-            // Infinity.
-            x.e = NaN;
-            x.d = null;
-          } else if (v.e < Decimal.minE) {
-
-            // Zero.
-            x.e = 0;
-            x.d = [0];
-          } else {
-            x.e = v.e;
-            x.d = v.d.slice();
-          }
-        } else {
-          x.e = v.e;
-          x.d = v.d ? v.d.slice() : v.d;
-        }
-
-        return;
-      }
-
-      t = typeof v;
-
-      if (t === 'number') {
-        if (v === 0) {
-          x.s = 1 / v < 0 ? -1 : 1;
-          x.e = 0;
-          x.d = [0];
-          return;
-        }
-
-        if (v < 0) {
-          v = -v;
-          x.s = -1;
-        } else {
-          x.s = 1;
-        }
-
-        // Fast path for small integers.
-        if (v === ~~v && v < 1e7) {
-          for (e = 0, i = v; i >= 10; i /= 10) e++;
-
-          if (external) {
-            if (e > Decimal.maxE) {
-              x.e = NaN;
-              x.d = null;
-            } else if (e < Decimal.minE) {
-              x.e = 0;
-              x.d = [0];
-            } else {
-              x.e = e;
-              x.d = [v];
-            }
-          } else {
-            x.e = e;
-            x.d = [v];
-          }
-
-          return;
-
-        // Infinity, NaN.
-        } else if (v * 0 !== 0) {
-          if (!v) x.s = NaN;
-          x.e = NaN;
-          x.d = null;
-          return;
-        }
-
-        return parseDecimal(x, v.toString());
-
-      } else if (t !== 'string') {
-        throw Error(invalidArgument + v);
-      }
-
-      // Minus sign?
-      if ((i = v.charCodeAt(0)) === 45) {
-        v = v.slice(1);
-        x.s = -1;
-      } else {
-        // Plus sign?
-        if (i === 43) v = v.slice(1);
-        x.s = 1;
-      }
-
-      return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
-    }
-
-    Decimal.prototype = P;
-
-    Decimal.ROUND_UP = 0;
-    Decimal.ROUND_DOWN = 1;
-    Decimal.ROUND_CEIL = 2;
-    Decimal.ROUND_FLOOR = 3;
-    Decimal.ROUND_HALF_UP = 4;
-    Decimal.ROUND_HALF_DOWN = 5;
-    Decimal.ROUND_HALF_EVEN = 6;
-    Decimal.ROUND_HALF_CEIL = 7;
-    Decimal.ROUND_HALF_FLOOR = 8;
-    Decimal.EUCLID = 9;
-
-    Decimal.config = Decimal.set = config;
-    Decimal.clone = clone;
-    Decimal.isDecimal = isDecimalInstance;
-
-    Decimal.abs = abs;
-    Decimal.acos = acos;
-    Decimal.acosh = acosh;        // ES6
-    Decimal.add = add;
-    Decimal.asin = asin;
-    Decimal.asinh = asinh;        // ES6
-    Decimal.atan = atan;
-    Decimal.atanh = atanh;        // ES6
-    Decimal.atan2 = atan2;
-    Decimal.cbrt = cbrt;          // ES6
-    Decimal.ceil = ceil;
-    Decimal.clamp = clamp;
-    Decimal.cos = cos;
-    Decimal.cosh = cosh;          // ES6
-    Decimal.div = div;
-    Decimal.exp = exp;
-    Decimal.floor = floor;
-    Decimal.hypot = hypot;        // ES6
-    Decimal.ln = ln;
-    Decimal.log = log;
-    Decimal.log10 = log10;        // ES6
-    Decimal.log2 = log2;          // ES6
-    Decimal.max = max;
-    Decimal.min = min;
-    Decimal.mod = mod;
-    Decimal.mul = mul;
-    Decimal.pow = pow;
-    Decimal.random = random;
-    Decimal.round = round;
-    Decimal.sign = sign;          // ES6
-    Decimal.sin = sin;
-    Decimal.sinh = sinh;          // ES6
-    Decimal.sqrt = sqrt;
-    Decimal.sub = sub;
-    Decimal.sum = sum;
-    Decimal.tan = tan;
-    Decimal.tanh = tanh;          // ES6
-    Decimal.trunc = trunc;        // ES6
-
-    if (obj === void 0) obj = {};
-    if (obj) {
-      if (obj.defaults !== true) {
-        ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'];
-        for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p];
-      }
-    }
-
-    Decimal.config(obj);
-
-    return Decimal;
-  }
-
-
-  /*
-   * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant
-   * digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   * y {number|string|Decimal}
-   *
-   */
-  function div(x, y) {
-    return new this(x).div(y);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} The power to which to raise the base of the natural log.
-   *
-   */
-  function exp(x) {
-    return new this(x).exp();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function floor(x) {
-    return finalise(x = new this(x), x.e + 1, 3);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the square root of the sum of the squares of the arguments,
-   * rounded to `precision` significant digits using rounding mode `rounding`.
-   *
-   * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...)
-   *
-   * arguments {number|string|Decimal}
-   *
-   */
-  function hypot() {
-    var i, n,
-      t = new this(0);
-
-    external = false;
-
-    for (i = 0; i < arguments.length;) {
-      n = new this(arguments[i++]);
-      if (!n.d) {
-        if (n.s) {
-          external = true;
-          return new this(1 / 0);
-        }
-        t = n;
-      } else if (t.d) {
-        t = t.plus(n.times(n));
-      }
-    }
-
-    external = true;
-
-    return t.sqrt();
-  }
-
-
-  /*
-   * Return true if object is a Decimal instance (where Decimal is any Decimal constructor),
-   * otherwise return false.
-   *
-   */
-  function isDecimalInstance(obj) {
-    return obj instanceof Decimal || obj && obj.toStringTag === tag || false;
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function ln(x) {
-    return new this(x).ln();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base
-   * is specified, rounded to `precision` significant digits using rounding mode `rounding`.
-   *
-   * log[y](x)
-   *
-   * x {number|string|Decimal} The argument of the logarithm.
-   * y {number|string|Decimal} The base of the logarithm.
-   *
-   */
-  function log(x, y) {
-    return new this(x).log(y);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function log2(x) {
-    return new this(x).log(2);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function log10(x) {
-    return new this(x).log(10);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the maximum of the arguments.
-   *
-   * arguments {number|string|Decimal}
-   *
-   */
-  function max() {
-    return maxOrMin(this, arguments, 'lt');
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the minimum of the arguments.
-   *
-   * arguments {number|string|Decimal}
-   *
-   */
-  function min() {
-    return maxOrMin(this, arguments, 'gt');
-  }
-
-
-  /*
-   * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits
-   * using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   * y {number|string|Decimal}
-   *
-   */
-  function mod(x, y) {
-    return new this(x).mod(y);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant
-   * digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   * y {number|string|Decimal}
-   *
-   */
-  function mul(x, y) {
-    return new this(x).mul(y);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision
-   * significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} The base.
-   * y {number|string|Decimal} The exponent.
-   *
-   */
-  function pow(x, y) {
-    return new this(x).pow(y);
-  }
-
-
-  /*
-   * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with
-   * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros
-   * are produced).
-   *
-   * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive.
-   *
-   */
-  function random(sd) {
-    var d, e, k, n,
-      i = 0,
-      r = new this(1),
-      rd = [];
-
-    if (sd === void 0) sd = this.precision;
-    else checkInt32(sd, 1, MAX_DIGITS);
-
-    k = Math.ceil(sd / LOG_BASE);
-
-    if (!this.crypto) {
-      for (; i < k;) rd[i++] = Math.random() * 1e7 | 0;
-
-    // Browsers supporting crypto.getRandomValues.
-    } else if (crypto.getRandomValues) {
-      d = crypto.getRandomValues(new Uint32Array(k));
-
-      for (; i < k;) {
-        n = d[i];
-
-        // 0 <= n < 4294967296
-        // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865).
-        if (n >= 4.29e9) {
-          d[i] = crypto.getRandomValues(new Uint32Array(1))[0];
-        } else {
-
-          // 0 <= n <= 4289999999
-          // 0 <= (n % 1e7) <= 9999999
-          rd[i++] = n % 1e7;
-        }
-      }
-
-    // Node.js supporting crypto.randomBytes.
-    } else if (crypto.randomBytes) {
-
-      // buffer
-      d = crypto.randomBytes(k *= 4);
-
-      for (; i < k;) {
-
-        // 0 <= n < 2147483648
-        n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24);
-
-        // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286).
-        if (n >= 2.14e9) {
-          crypto.randomBytes(4).copy(d, i);
-        } else {
-
-          // 0 <= n <= 2139999999
-          // 0 <= (n % 1e7) <= 9999999
-          rd.push(n % 1e7);
-          i += 4;
-        }
-      }
-
-      i = k / 4;
-    } else {
-      throw Error(cryptoUnavailable);
-    }
-
-    k = rd[--i];
-    sd %= LOG_BASE;
-
-    // Convert trailing digits to zeros according to sd.
-    if (k && sd) {
-      n = mathpow(10, LOG_BASE - sd);
-      rd[i] = (k / n | 0) * n;
-    }
-
-    // Remove trailing words which are zero.
-    for (; rd[i] === 0; i--) rd.pop();
-
-    // Zero?
-    if (i < 0) {
-      e = 0;
-      rd = [0];
-    } else {
-      e = -1;
-
-      // Remove leading words which are zero and adjust exponent accordingly.
-      for (; rd[0] === 0; e -= LOG_BASE) rd.shift();
-
-      // Count the digits of the first word of rd to determine leading zeros.
-      for (k = 1, n = rd[0]; n >= 10; n /= 10) k++;
-
-      // Adjust the exponent for leading zeros of the first word of rd.
-      if (k < LOG_BASE) e -= LOG_BASE - k;
-    }
-
-    r.e = e;
-    r.d = rd;
-
-    return r;
-  }
-
-
-  /*
-   * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`.
-   *
-   * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL).
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function round(x) {
-    return finalise(x = new this(x), x.e + 1, this.rounding);
-  }
-
-
-  /*
-   * Return
-   *   1    if x > 0,
-   *  -1    if x < 0,
-   *   0    if x is 0,
-   *  -0    if x is -0,
-   *   NaN  otherwise
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function sign(x) {
-    x = new this(x);
-    return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits
-   * using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} A value in radians.
-   *
-   */
-  function sin(x) {
-    return new this(x).sin();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} A value in radians.
-   *
-   */
-  function sinh(x) {
-    return new this(x).sinh();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant
-   * digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function sqrt(x) {
-    return new this(x).sqrt();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits
-   * using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal}
-   * y {number|string|Decimal}
-   *
-   */
-  function sub(x, y) {
-    return new this(x).sub(y);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the sum of the arguments, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   * Only the result is rounded, not the intermediate calculations.
-   *
-   * arguments {number|string|Decimal}
-   *
-   */
-  function sum() {
-    var i = 0,
-      args = arguments,
-      x = new this(args[i]);
-
-    external = false;
-    for (; x.s && ++i < args.length;) x = x.plus(args[i]);
-    external = true;
-
-    return finalise(x, this.precision, this.rounding);
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant
-   * digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} A value in radians.
-   *
-   */
-  function tan(x) {
-    return new this(x).tan();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision`
-   * significant digits using rounding mode `rounding`.
-   *
-   * x {number|string|Decimal} A value in radians.
-   *
-   */
-  function tanh(x) {
-    return new this(x).tanh();
-  }
-
-
-  /*
-   * Return a new Decimal whose value is `x` truncated to an integer.
-   *
-   * x {number|string|Decimal}
-   *
-   */
-  function trunc(x) {
-    return finalise(x = new this(x), x.e + 1, 1);
-  }
-
-
-  // Create and configure initial Decimal constructor.
-  Decimal = clone(DEFAULTS);
-  Decimal.prototype.constructor = Decimal;
-  Decimal['default'] = Decimal.Decimal = Decimal;
-
-  // Create the internal constants from their string values.
-  LN10 = new Decimal(LN10);
-  PI = new Decimal(PI);
-
-
-  // Export.
-
-
-  // AMD.
-  if (typeof define == 'function' && define.amd) {
-    define(function () {
-      return Decimal;
-    });
-
-  // Node and other environments that support module.exports.
-  } else if (typeof module != 'undefined' && module.exports) {
-    if (typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol') {
-      P[Symbol['for']('nodejs.util.inspect.custom')] = P.toString;
-      P[Symbol.toStringTag] = 'Decimal';
-    }
-
-    module.exports = Decimal;
-
-  // Browser.
-  } else {
-    if (!globalScope) {
-      globalScope = typeof self != 'undefined' && self && self.self == self ? self : window;
-    }
-
-    noConflict = globalScope.Decimal;
-    Decimal.noConflict = function () {
-      globalScope.Decimal = noConflict;
-      return Decimal;
-    };
-
-    globalScope.Decimal = Decimal;
-  }
-})(this);

+ 0 - 4898
zbytb/node_modules/decimal.js/decimal.mjs

@@ -1,4898 +0,0 @@
-/*
- *  decimal.js v10.3.1
- *  An arbitrary-precision Decimal type for JavaScript.
- *  https://github.com/MikeMcl/decimal.js
- *  Copyright (c) 2021 Michael Mclaughlin <M8ch88l@gmail.com>
- *  MIT Licence
- */
-
-
-// -----------------------------------  EDITABLE DEFAULTS  ------------------------------------ //
-
-
-  // The maximum exponent magnitude.
-  // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`.
-var EXP_LIMIT = 9e15,                      // 0 to 9e15
-
-  // The limit on the value of `precision`, and on the value of the first argument to
-  // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`.
-  MAX_DIGITS = 1e9,                        // 0 to 1e9
-
-  // Base conversion alphabet.
-  NUMERALS = '0123456789abcdef',
-
-  // The natural logarithm of 10 (1025 digits).
-  LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058',
-
-  // Pi (1025 digits).
-  PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789',
-
-
-  // The initial configuration properties of the Decimal constructor.
-  DEFAULTS = {
-
-    // These values must be integers within the stated ranges (inclusive).
-    // Most of these values can be changed at run-time using the `Decimal.config` method.
-
-    // The maximum number of significant digits of the result of a calculation or base conversion.
-    // E.g. `Decimal.config({ precision: 20 });`
-    precision: 20,                         // 1 to MAX_DIGITS
-
-    // The rounding mode used when rounding to `precision`.
-    //
-    // ROUND_UP         0 Away from zero.
-    // ROUND_DOWN       1 Towards zero.
-    // ROUND_CEIL       2 Towards +Infinity.
-    // ROUND_FLOOR      3 Towards -Infinity.
-    // ROUND_HALF_UP    4 Towards nearest neighbour. If equidistant, up.
-    // ROUND_HALF_DOWN  5 Towards nearest neighbour. If equidistant, down.
-    // ROUND_HALF_EVEN  6 Towards nearest neighbour. If equidistant, towards even neighbour.
-    // ROUND_HALF_CEIL  7 Towards nearest neighbour. If equidistant, towards +Infinity.
-    // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.
-    //
-    // E.g.
-    // `Decimal.rounding = 4;`
-    // `Decimal.rounding = Decimal.ROUND_HALF_UP;`
-    rounding: 4,                           // 0 to 8
-
-    // The modulo mode used when calculating the modulus: a mod n.
-    // The quotient (q = a / n) is calculated according to the corresponding rounding mode.
-    // The remainder (r) is calculated as: r = a - n * q.
-    //
-    // UP         0 The remainder is positive if the dividend is negative, else is negative.
-    // DOWN       1 The remainder has the same sign as the dividend (JavaScript %).
-    // FLOOR      3 The remainder has the same sign as the divisor (Python %).
-    // HALF_EVEN  6 The IEEE 754 remainder function.
-    // EUCLID     9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.
-    //
-    // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian
-    // division (9) are commonly used for the modulus operation. The other rounding modes can also
-    // be used, but they may not give useful results.
-    modulo: 1,                             // 0 to 9
-
-    // The exponent value at and beneath which `toString` returns exponential notation.
-    // JavaScript numbers: -7
-    toExpNeg: -7,                          // 0 to -EXP_LIMIT
-
-    // The exponent value at and above which `toString` returns exponential notation.
-    // JavaScript numbers: 21
-    toExpPos:  21,                         // 0 to EXP_LIMIT
-
-    // The minimum exponent value, beneath which underflow to zero occurs.
-    // JavaScript numbers: -324  (5e-324)
-    minE: -EXP_LIMIT,                      // -1 to -EXP_LIMIT
-
-    // The maximum exponent value, above which overflow to Infinity occurs.
-    // JavaScript numbers: 308  (1.7976931348623157e+308)
-    maxE: EXP_LIMIT,                       // 1 to EXP_LIMIT
-
-    // Whether to use cryptographically-secure random number generation, if available.
-    crypto: false                          // true/false
-  },
-
-
-// ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- //
-
-
-  inexact, quadrant,
-  external = true,
-
-  decimalError = '[DecimalError] ',
-  invalidArgument = decimalError + 'Invalid argument: ',
-  precisionLimitExceeded = decimalError + 'Precision limit exceeded',
-  cryptoUnavailable = decimalError + 'crypto unavailable',
-  tag = '[object Decimal]',
-
-  mathfloor = Math.floor,
-  mathpow = Math.pow,
-
-  isBinary = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,
-  isHex = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,
-  isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,
-  isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,
-
-  BASE = 1e7,
-  LOG_BASE = 7,
-  MAX_SAFE_INTEGER = 9007199254740991,
-
-  LN10_PRECISION = LN10.length - 1,
-  PI_PRECISION = PI.length - 1,
-
-  // Decimal.prototype object
-  P = { toStringTag: tag };
-
-
-// Decimal prototype methods
-
-
-/*
- *  absoluteValue             abs
- *  ceil
- *  clampedTo                 clamp
- *  comparedTo                cmp
- *  cosine                    cos
- *  cubeRoot                  cbrt
- *  decimalPlaces             dp
- *  dividedBy                 div
- *  dividedToIntegerBy        divToInt
- *  equals                    eq
- *  floor
- *  greaterThan               gt
- *  greaterThanOrEqualTo      gte
- *  hyperbolicCosine          cosh
- *  hyperbolicSine            sinh
- *  hyperbolicTangent         tanh
- *  inverseCosine             acos
- *  inverseHyperbolicCosine   acosh
- *  inverseHyperbolicSine     asinh
- *  inverseHyperbolicTangent  atanh
- *  inverseSine               asin
- *  inverseTangent            atan
- *  isFinite
- *  isInteger                 isInt
- *  isNaN
- *  isNegative                isNeg
- *  isPositive                isPos
- *  isZero
- *  lessThan                  lt
- *  lessThanOrEqualTo         lte
- *  logarithm                 log
- *  [maximum]                 [max]
- *  [minimum]                 [min]
- *  minus                     sub
- *  modulo                    mod
- *  naturalExponential        exp
- *  naturalLogarithm          ln
- *  negated                   neg
- *  plus                      add
- *  precision                 sd
- *  round
- *  sine                      sin
- *  squareRoot                sqrt
- *  tangent                   tan
- *  times                     mul
- *  toBinary
- *  toDecimalPlaces           toDP
- *  toExponential
- *  toFixed
- *  toFraction
- *  toHexadecimal             toHex
- *  toNearest
- *  toNumber
- *  toOctal
- *  toPower                   pow
- *  toPrecision
- *  toSignificantDigits       toSD
- *  toString
- *  truncated                 trunc
- *  valueOf                   toJSON
- */
-
-
-/*
- * Return a new Decimal whose value is the absolute value of this Decimal.
- *
- */
-P.absoluteValue = P.abs = function () {
-  var x = new this.constructor(this);
-  if (x.s < 0) x.s = 1;
-  return finalise(x);
-};
-
-
-/*
- * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the
- * direction of positive Infinity.
- *
- */
-P.ceil = function () {
-  return finalise(new this.constructor(this), this.e + 1, 2);
-};
-
-
-/*
- * Return a new Decimal whose value is the value of this Decimal clamped to the range
- * delineated by `min` and `max`.
- *
- * min {number|string|Decimal}
- * max {number|string|Decimal}
- *
- */
-P.clampedTo = P.clamp = function (min, max) {
-  var k,
-    x = this,
-    Ctor = x.constructor;
-  min = new Ctor(min);
-  max = new Ctor(max);
-  if (!min.s || !max.s) return new Ctor(NaN);
-  if (min.gt(max)) throw Error(invalidArgument + max);
-  k = x.cmp(min);
-  return k < 0 ? min : x.cmp(max) > 0 ? max : new Ctor(x);
-};
-
-
-/*
- * Return
- *   1    if the value of this Decimal is greater than the value of `y`,
- *  -1    if the value of this Decimal is less than the value of `y`,
- *   0    if they have the same value,
- *   NaN  if the value of either Decimal is NaN.
- *
- */
-P.comparedTo = P.cmp = function (y) {
-  var i, j, xdL, ydL,
-    x = this,
-    xd = x.d,
-    yd = (y = new x.constructor(y)).d,
-    xs = x.s,
-    ys = y.s;
-
-  // Either NaN or ±Infinity?
-  if (!xd || !yd) {
-    return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1;
-  }
-
-  // Either zero?
-  if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0;
-
-  // Signs differ?
-  if (xs !== ys) return xs;
-
-  // Compare exponents.
-  if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1;
-
-  xdL = xd.length;
-  ydL = yd.length;
-
-  // Compare digit by digit.
-  for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {
-    if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1;
-  }
-
-  // Compare lengths.
-  return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1;
-};
-
-
-/*
- * Return a new Decimal whose value is the cosine of the value in radians of this Decimal.
- *
- * Domain: [-Infinity, Infinity]
- * Range: [-1, 1]
- *
- * cos(0)         = 1
- * cos(-0)        = 1
- * cos(Infinity)  = NaN
- * cos(-Infinity) = NaN
- * cos(NaN)       = NaN
- *
- */
-P.cosine = P.cos = function () {
-  var pr, rm,
-    x = this,
-    Ctor = x.constructor;
-
-  if (!x.d) return new Ctor(NaN);
-
-  // cos(0) = cos(-0) = 1
-  if (!x.d[0]) return new Ctor(1);
-
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-  Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;
-  Ctor.rounding = 1;
-
-  x = cosine(Ctor, toLessThanHalfPi(Ctor, x));
-
-  Ctor.precision = pr;
-  Ctor.rounding = rm;
-
-  return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true);
-};
-
-
-/*
- *
- * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to
- * `precision` significant digits using rounding mode `rounding`.
- *
- *  cbrt(0)  =  0
- *  cbrt(-0) = -0
- *  cbrt(1)  =  1
- *  cbrt(-1) = -1
- *  cbrt(N)  =  N
- *  cbrt(-I) = -I
- *  cbrt(I)  =  I
- *
- * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3))
- *
- */
-P.cubeRoot = P.cbrt = function () {
-  var e, m, n, r, rep, s, sd, t, t3, t3plusx,
-    x = this,
-    Ctor = x.constructor;
-
-  if (!x.isFinite() || x.isZero()) return new Ctor(x);
-  external = false;
-
-  // Initial estimate.
-  s = x.s * mathpow(x.s * x, 1 / 3);
-
-   // Math.cbrt underflow/overflow?
-   // Pass x to Math.pow as integer, then adjust the exponent of the result.
-  if (!s || Math.abs(s) == 1 / 0) {
-    n = digitsToString(x.d);
-    e = x.e;
-
-    // Adjust n exponent so it is a multiple of 3 away from x exponent.
-    if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00');
-    s = mathpow(n, 1 / 3);
-
-    // Rarely, e may be one less than the result exponent value.
-    e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2));
-
-    if (s == 1 / 0) {
-      n = '5e' + e;
-    } else {
-      n = s.toExponential();
-      n = n.slice(0, n.indexOf('e') + 1) + e;
-    }
-
-    r = new Ctor(n);
-    r.s = x.s;
-  } else {
-    r = new Ctor(s.toString());
-  }
-
-  sd = (e = Ctor.precision) + 3;
-
-  // Halley's method.
-  // TODO? Compare Newton's method.
-  for (;;) {
-    t = r;
-    t3 = t.times(t).times(t);
-    t3plusx = t3.plus(x);
-    r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1);
-
-    // TODO? Replace with for-loop and checkRoundingDigits.
-    if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {
-      n = n.slice(sd - 3, sd + 1);
-
-      // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999
-      // , i.e. approaching a rounding boundary, continue the iteration.
-      if (n == '9999' || !rep && n == '4999') {
-
-        // On the first iteration only, check to see if rounding up gives the exact result as the
-        // nines may infinitely repeat.
-        if (!rep) {
-          finalise(t, e + 1, 0);
-
-          if (t.times(t).times(t).eq(x)) {
-            r = t;
-            break;
-          }
-        }
-
-        sd += 4;
-        rep = 1;
-      } else {
-
-        // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.
-        // If not, then there are further digits and m will be truthy.
-        if (!+n || !+n.slice(1) && n.charAt(0) == '5') {
-
-          // Truncate to the first rounding digit.
-          finalise(r, e + 1, 1);
-          m = !r.times(r).times(r).eq(x);
-        }
-
-        break;
-      }
-    }
-  }
-
-  external = true;
-
-  return finalise(r, e, Ctor.rounding, m);
-};
-
-
-/*
- * Return the number of decimal places of the value of this Decimal.
- *
- */
-P.decimalPlaces = P.dp = function () {
-  var w,
-    d = this.d,
-    n = NaN;
-
-  if (d) {
-    w = d.length - 1;
-    n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE;
-
-    // Subtract the number of trailing zeros of the last word.
-    w = d[w];
-    if (w) for (; w % 10 == 0; w /= 10) n--;
-    if (n < 0) n = 0;
-  }
-
-  return n;
-};
-
-
-/*
- *  n / 0 = I
- *  n / N = N
- *  n / I = 0
- *  0 / n = 0
- *  0 / 0 = N
- *  0 / N = N
- *  0 / I = 0
- *  N / n = N
- *  N / 0 = N
- *  N / N = N
- *  N / I = N
- *  I / n = I
- *  I / 0 = I
- *  I / N = N
- *  I / I = N
- *
- * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to
- * `precision` significant digits using rounding mode `rounding`.
- *
- */
-P.dividedBy = P.div = function (y) {
-  return divide(this, new this.constructor(y));
-};
-
-
-/*
- * Return a new Decimal whose value is the integer part of dividing the value of this Decimal
- * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`.
- *
- */
-P.dividedToIntegerBy = P.divToInt = function (y) {
-  var x = this,
-    Ctor = x.constructor;
-  return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding);
-};
-
-
-/*
- * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.
- *
- */
-P.equals = P.eq = function (y) {
-  return this.cmp(y) === 0;
-};
-
-
-/*
- * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the
- * direction of negative Infinity.
- *
- */
-P.floor = function () {
-  return finalise(new this.constructor(this), this.e + 1, 3);
-};
-
-
-/*
- * Return true if the value of this Decimal is greater than the value of `y`, otherwise return
- * false.
- *
- */
-P.greaterThan = P.gt = function (y) {
-  return this.cmp(y) > 0;
-};
-
-
-/*
- * Return true if the value of this Decimal is greater than or equal to the value of `y`,
- * otherwise return false.
- *
- */
-P.greaterThanOrEqualTo = P.gte = function (y) {
-  var k = this.cmp(y);
-  return k == 1 || k === 0;
-};
-
-
-/*
- * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this
- * Decimal.
- *
- * Domain: [-Infinity, Infinity]
- * Range: [1, Infinity]
- *
- * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ...
- *
- * cosh(0)         = 1
- * cosh(-0)        = 1
- * cosh(Infinity)  = Infinity
- * cosh(-Infinity) = Infinity
- * cosh(NaN)       = NaN
- *
- *  x        time taken (ms)   result
- * 1000      9                 9.8503555700852349694e+433
- * 10000     25                4.4034091128314607936e+4342
- * 100000    171               1.4033316802130615897e+43429
- * 1000000   3817              1.5166076984010437725e+434294
- * 10000000  abandoned after 2 minute wait
- *
- * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x))
- *
- */
-P.hyperbolicCosine = P.cosh = function () {
-  var k, n, pr, rm, len,
-    x = this,
-    Ctor = x.constructor,
-    one = new Ctor(1);
-
-  if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN);
-  if (x.isZero()) return one;
-
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-  Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;
-  Ctor.rounding = 1;
-  len = x.d.length;
-
-  // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1
-  // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4))
-
-  // Estimate the optimum number of times to use the argument reduction.
-  // TODO? Estimation reused from cosine() and may not be optimal here.
-  if (len < 32) {
-    k = Math.ceil(len / 3);
-    n = (1 / tinyPow(4, k)).toString();
-  } else {
-    k = 16;
-    n = '2.3283064365386962890625e-10';
-  }
-
-  x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true);
-
-  // Reverse argument reduction
-  var cosh2_x,
-    i = k,
-    d8 = new Ctor(8);
-  for (; i--;) {
-    cosh2_x = x.times(x);
-    x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8))));
-  }
-
-  return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true);
-};
-
-
-/*
- * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this
- * Decimal.
- *
- * Domain: [-Infinity, Infinity]
- * Range: [-Infinity, Infinity]
- *
- * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ...
- *
- * sinh(0)         = 0
- * sinh(-0)        = -0
- * sinh(Infinity)  = Infinity
- * sinh(-Infinity) = -Infinity
- * sinh(NaN)       = NaN
- *
- * x        time taken (ms)
- * 10       2 ms
- * 100      5 ms
- * 1000     14 ms
- * 10000    82 ms
- * 100000   886 ms            1.4033316802130615897e+43429
- * 200000   2613 ms
- * 300000   5407 ms
- * 400000   8824 ms
- * 500000   13026 ms          8.7080643612718084129e+217146
- * 1000000  48543 ms
- *
- * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x))
- *
- */
-P.hyperbolicSine = P.sinh = function () {
-  var k, pr, rm, len,
-    x = this,
-    Ctor = x.constructor;
-
-  if (!x.isFinite() || x.isZero()) return new Ctor(x);
-
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-  Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;
-  Ctor.rounding = 1;
-  len = x.d.length;
-
-  if (len < 3) {
-    x = taylorSeries(Ctor, 2, x, x, true);
-  } else {
-
-    // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x))
-    // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3))
-    // 3 multiplications and 1 addition
-
-    // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x)))
-    // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5)))
-    // 4 multiplications and 2 additions
-
-    // Estimate the optimum number of times to use the argument reduction.
-    k = 1.4 * Math.sqrt(len);
-    k = k > 16 ? 16 : k | 0;
-
-    x = x.times(1 / tinyPow(5, k));
-    x = taylorSeries(Ctor, 2, x, x, true);
-
-    // Reverse argument reduction
-    var sinh2_x,
-      d5 = new Ctor(5),
-      d16 = new Ctor(16),
-      d20 = new Ctor(20);
-    for (; k--;) {
-      sinh2_x = x.times(x);
-      x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20))));
-    }
-  }
-
-  Ctor.precision = pr;
-  Ctor.rounding = rm;
-
-  return finalise(x, pr, rm, true);
-};
-
-
-/*
- * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this
- * Decimal.
- *
- * Domain: [-Infinity, Infinity]
- * Range: [-1, 1]
- *
- * tanh(x) = sinh(x) / cosh(x)
- *
- * tanh(0)         = 0
- * tanh(-0)        = -0
- * tanh(Infinity)  = 1
- * tanh(-Infinity) = -1
- * tanh(NaN)       = NaN
- *
- */
-P.hyperbolicTangent = P.tanh = function () {
-  var pr, rm,
-    x = this,
-    Ctor = x.constructor;
-
-  if (!x.isFinite()) return new Ctor(x.s);
-  if (x.isZero()) return new Ctor(x);
-
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-  Ctor.precision = pr + 7;
-  Ctor.rounding = 1;
-
-  return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);
-};
-
-
-/*
- * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of
- * this Decimal.
- *
- * Domain: [-1, 1]
- * Range: [0, pi]
- *
- * acos(x) = pi/2 - asin(x)
- *
- * acos(0)       = pi/2
- * acos(-0)      = pi/2
- * acos(1)       = 0
- * acos(-1)      = pi
- * acos(1/2)     = pi/3
- * acos(-1/2)    = 2*pi/3
- * acos(|x| > 1) = NaN
- * acos(NaN)     = NaN
- *
- */
-P.inverseCosine = P.acos = function () {
-  var halfPi,
-    x = this,
-    Ctor = x.constructor,
-    k = x.abs().cmp(1),
-    pr = Ctor.precision,
-    rm = Ctor.rounding;
-
-  if (k !== -1) {
-    return k === 0
-      // |x| is 1
-      ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0)
-      // |x| > 1 or x is NaN
-      : new Ctor(NaN);
-  }
-
-  if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5);
-
-  // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3
-
-  Ctor.precision = pr + 6;
-  Ctor.rounding = 1;
-
-  x = x.asin();
-  halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
-
-  Ctor.precision = pr;
-  Ctor.rounding = rm;
-
-  return halfPi.minus(x);
-};
-
-
-/*
- * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the
- * value of this Decimal.
- *
- * Domain: [1, Infinity]
- * Range: [0, Infinity]
- *
- * acosh(x) = ln(x + sqrt(x^2 - 1))
- *
- * acosh(x < 1)     = NaN
- * acosh(NaN)       = NaN
- * acosh(Infinity)  = Infinity
- * acosh(-Infinity) = NaN
- * acosh(0)         = NaN
- * acosh(-0)        = NaN
- * acosh(1)         = 0
- * acosh(-1)        = NaN
- *
- */
-P.inverseHyperbolicCosine = P.acosh = function () {
-  var pr, rm,
-    x = this,
-    Ctor = x.constructor;
-
-  if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN);
-  if (!x.isFinite()) return new Ctor(x);
-
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-  Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4;
-  Ctor.rounding = 1;
-  external = false;
-
-  x = x.times(x).minus(1).sqrt().plus(x);
-
-  external = true;
-  Ctor.precision = pr;
-  Ctor.rounding = rm;
-
-  return x.ln();
-};
-
-
-/*
- * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value
- * of this Decimal.
- *
- * Domain: [-Infinity, Infinity]
- * Range: [-Infinity, Infinity]
- *
- * asinh(x) = ln(x + sqrt(x^2 + 1))
- *
- * asinh(NaN)       = NaN
- * asinh(Infinity)  = Infinity
- * asinh(-Infinity) = -Infinity
- * asinh(0)         = 0
- * asinh(-0)        = -0
- *
- */
-P.inverseHyperbolicSine = P.asinh = function () {
-  var pr, rm,
-    x = this,
-    Ctor = x.constructor;
-
-  if (!x.isFinite() || x.isZero()) return new Ctor(x);
-
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-  Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6;
-  Ctor.rounding = 1;
-  external = false;
-
-  x = x.times(x).plus(1).sqrt().plus(x);
-
-  external = true;
-  Ctor.precision = pr;
-  Ctor.rounding = rm;
-
-  return x.ln();
-};
-
-
-/*
- * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the
- * value of this Decimal.
- *
- * Domain: [-1, 1]
- * Range: [-Infinity, Infinity]
- *
- * atanh(x) = 0.5 * ln((1 + x) / (1 - x))
- *
- * atanh(|x| > 1)   = NaN
- * atanh(NaN)       = NaN
- * atanh(Infinity)  = NaN
- * atanh(-Infinity) = NaN
- * atanh(0)         = 0
- * atanh(-0)        = -0
- * atanh(1)         = Infinity
- * atanh(-1)        = -Infinity
- *
- */
-P.inverseHyperbolicTangent = P.atanh = function () {
-  var pr, rm, wpr, xsd,
-    x = this,
-    Ctor = x.constructor;
-
-  if (!x.isFinite()) return new Ctor(NaN);
-  if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN);
-
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-  xsd = x.sd();
-
-  if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true);
-
-  Ctor.precision = wpr = xsd - x.e;
-
-  x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1);
-
-  Ctor.precision = pr + 4;
-  Ctor.rounding = 1;
-
-  x = x.ln();
-
-  Ctor.precision = pr;
-  Ctor.rounding = rm;
-
-  return x.times(0.5);
-};
-
-
-/*
- * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this
- * Decimal.
- *
- * Domain: [-Infinity, Infinity]
- * Range: [-pi/2, pi/2]
- *
- * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2)))
- *
- * asin(0)       = 0
- * asin(-0)      = -0
- * asin(1/2)     = pi/6
- * asin(-1/2)    = -pi/6
- * asin(1)       = pi/2
- * asin(-1)      = -pi/2
- * asin(|x| > 1) = NaN
- * asin(NaN)     = NaN
- *
- * TODO? Compare performance of Taylor series.
- *
- */
-P.inverseSine = P.asin = function () {
-  var halfPi, k,
-    pr, rm,
-    x = this,
-    Ctor = x.constructor;
-
-  if (x.isZero()) return new Ctor(x);
-
-  k = x.abs().cmp(1);
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-
-  if (k !== -1) {
-
-    // |x| is 1
-    if (k === 0) {
-      halfPi = getPi(Ctor, pr + 4, rm).times(0.5);
-      halfPi.s = x.s;
-      return halfPi;
-    }
-
-    // |x| > 1 or x is NaN
-    return new Ctor(NaN);
-  }
-
-  // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6
-
-  Ctor.precision = pr + 6;
-  Ctor.rounding = 1;
-
-  x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan();
-
-  Ctor.precision = pr;
-  Ctor.rounding = rm;
-
-  return x.times(2);
-};
-
-
-/*
- * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value
- * of this Decimal.
- *
- * Domain: [-Infinity, Infinity]
- * Range: [-pi/2, pi/2]
- *
- * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...
- *
- * atan(0)         = 0
- * atan(-0)        = -0
- * atan(1)         = pi/4
- * atan(-1)        = -pi/4
- * atan(Infinity)  = pi/2
- * atan(-Infinity) = -pi/2
- * atan(NaN)       = NaN
- *
- */
-P.inverseTangent = P.atan = function () {
-  var i, j, k, n, px, t, r, wpr, x2,
-    x = this,
-    Ctor = x.constructor,
-    pr = Ctor.precision,
-    rm = Ctor.rounding;
-
-  if (!x.isFinite()) {
-    if (!x.s) return new Ctor(NaN);
-    if (pr + 4 <= PI_PRECISION) {
-      r = getPi(Ctor, pr + 4, rm).times(0.5);
-      r.s = x.s;
-      return r;
-    }
-  } else if (x.isZero()) {
-    return new Ctor(x);
-  } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) {
-    r = getPi(Ctor, pr + 4, rm).times(0.25);
-    r.s = x.s;
-    return r;
-  }
-
-  Ctor.precision = wpr = pr + 10;
-  Ctor.rounding = 1;
-
-  // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x);
-
-  // Argument reduction
-  // Ensure |x| < 0.42
-  // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2)))
-
-  k = Math.min(28, wpr / LOG_BASE + 2 | 0);
-
-  for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1));
-
-  external = false;
-
-  j = Math.ceil(wpr / LOG_BASE);
-  n = 1;
-  x2 = x.times(x);
-  r = new Ctor(x);
-  px = x;
-
-  // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...
-  for (; i !== -1;) {
-    px = px.times(x2);
-    t = r.minus(px.div(n += 2));
-
-    px = px.times(x2);
-    r = t.plus(px.div(n += 2));
-
-    if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;);
-  }
-
-  if (k) r = r.times(2 << (k - 1));
-
-  external = true;
-
-  return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true);
-};
-
-
-/*
- * Return true if the value of this Decimal is a finite number, otherwise return false.
- *
- */
-P.isFinite = function () {
-  return !!this.d;
-};
-
-
-/*
- * Return true if the value of this Decimal is an integer, otherwise return false.
- *
- */
-P.isInteger = P.isInt = function () {
-  return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2;
-};
-
-
-/*
- * Return true if the value of this Decimal is NaN, otherwise return false.
- *
- */
-P.isNaN = function () {
-  return !this.s;
-};
-
-
-/*
- * Return true if the value of this Decimal is negative, otherwise return false.
- *
- */
-P.isNegative = P.isNeg = function () {
-  return this.s < 0;
-};
-
-
-/*
- * Return true if the value of this Decimal is positive, otherwise return false.
- *
- */
-P.isPositive = P.isPos = function () {
-  return this.s > 0;
-};
-
-
-/*
- * Return true if the value of this Decimal is 0 or -0, otherwise return false.
- *
- */
-P.isZero = function () {
-  return !!this.d && this.d[0] === 0;
-};
-
-
-/*
- * Return true if the value of this Decimal is less than `y`, otherwise return false.
- *
- */
-P.lessThan = P.lt = function (y) {
-  return this.cmp(y) < 0;
-};
-
-
-/*
- * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.
- *
- */
-P.lessThanOrEqualTo = P.lte = function (y) {
-  return this.cmp(y) < 1;
-};
-
-
-/*
- * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- * If no base is specified, return log[10](arg).
- *
- * log[base](arg) = ln(arg) / ln(base)
- *
- * The result will always be correctly rounded if the base of the log is 10, and 'almost always'
- * otherwise:
- *
- * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen
- * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error
- * between the result and the correctly rounded result will be one ulp (unit in the last place).
- *
- * log[-b](a)       = NaN
- * log[0](a)        = NaN
- * log[1](a)        = NaN
- * log[NaN](a)      = NaN
- * log[Infinity](a) = NaN
- * log[b](0)        = -Infinity
- * log[b](-0)       = -Infinity
- * log[b](-a)       = NaN
- * log[b](1)        = 0
- * log[b](Infinity) = Infinity
- * log[b](NaN)      = NaN
- *
- * [base] {number|string|Decimal} The base of the logarithm.
- *
- */
-P.logarithm = P.log = function (base) {
-  var isBase10, d, denominator, k, inf, num, sd, r,
-    arg = this,
-    Ctor = arg.constructor,
-    pr = Ctor.precision,
-    rm = Ctor.rounding,
-    guard = 5;
-
-  // Default base is 10.
-  if (base == null) {
-    base = new Ctor(10);
-    isBase10 = true;
-  } else {
-    base = new Ctor(base);
-    d = base.d;
-
-    // Return NaN if base is negative, or non-finite, or is 0 or 1.
-    if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN);
-
-    isBase10 = base.eq(10);
-  }
-
-  d = arg.d;
-
-  // Is arg negative, non-finite, 0 or 1?
-  if (arg.s < 0 || !d || !d[0] || arg.eq(1)) {
-    return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0);
-  }
-
-  // The result will have a non-terminating decimal expansion if base is 10 and arg is not an
-  // integer power of 10.
-  if (isBase10) {
-    if (d.length > 1) {
-      inf = true;
-    } else {
-      for (k = d[0]; k % 10 === 0;) k /= 10;
-      inf = k !== 1;
-    }
-  }
-
-  external = false;
-  sd = pr + guard;
-  num = naturalLogarithm(arg, sd);
-  denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);
-
-  // The result will have 5 rounding digits.
-  r = divide(num, denominator, sd, 1);
-
-  // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000,
-  // calculate 10 further digits.
-  //
-  // If the result is known to have an infinite decimal expansion, repeat this until it is clear
-  // that the result is above or below the boundary. Otherwise, if after calculating the 10
-  // further digits, the last 14 are nines, round up and assume the result is exact.
-  // Also assume the result is exact if the last 14 are zero.
-  //
-  // Example of a result that will be incorrectly rounded:
-  // log[1048576](4503599627370502) = 2.60000000000000009610279511444746...
-  // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it
-  // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so
-  // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal
-  // place is still 2.6.
-  if (checkRoundingDigits(r.d, k = pr, rm)) {
-
-    do {
-      sd += 10;
-      num = naturalLogarithm(arg, sd);
-      denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);
-      r = divide(num, denominator, sd, 1);
-
-      if (!inf) {
-
-        // Check for 14 nines from the 2nd rounding digit, as the first may be 4.
-        if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) {
-          r = finalise(r, pr + 1, 0);
-        }
-
-        break;
-      }
-    } while (checkRoundingDigits(r.d, k += 10, rm));
-  }
-
-  external = true;
-
-  return finalise(r, pr, rm);
-};
-
-
-/*
- * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal.
- *
- * arguments {number|string|Decimal}
- *
-P.max = function () {
-  Array.prototype.push.call(arguments, this);
-  return maxOrMin(this.constructor, arguments, 'lt');
-};
- */
-
-
-/*
- * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal.
- *
- * arguments {number|string|Decimal}
- *
-P.min = function () {
-  Array.prototype.push.call(arguments, this);
-  return maxOrMin(this.constructor, arguments, 'gt');
-};
- */
-
-
-/*
- *  n - 0 = n
- *  n - N = N
- *  n - I = -I
- *  0 - n = -n
- *  0 - 0 = 0
- *  0 - N = N
- *  0 - I = -I
- *  N - n = N
- *  N - 0 = N
- *  N - N = N
- *  N - I = N
- *  I - n = I
- *  I - 0 = I
- *  I - N = N
- *  I - I = N
- *
- * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- */
-P.minus = P.sub = function (y) {
-  var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd,
-    x = this,
-    Ctor = x.constructor;
-
-  y = new Ctor(y);
-
-  // If either is not finite...
-  if (!x.d || !y.d) {
-
-    // Return NaN if either is NaN.
-    if (!x.s || !y.s) y = new Ctor(NaN);
-
-    // Return y negated if x is finite and y is ±Infinity.
-    else if (x.d) y.s = -y.s;
-
-    // Return x if y is finite and x is ±Infinity.
-    // Return x if both are ±Infinity with different signs.
-    // Return NaN if both are ±Infinity with the same sign.
-    else y = new Ctor(y.d || x.s !== y.s ? x : NaN);
-
-    return y;
-  }
-
-  // If signs differ...
-  if (x.s != y.s) {
-    y.s = -y.s;
-    return x.plus(y);
-  }
-
-  xd = x.d;
-  yd = y.d;
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-
-  // If either is zero...
-  if (!xd[0] || !yd[0]) {
-
-    // Return y negated if x is zero and y is non-zero.
-    if (yd[0]) y.s = -y.s;
-
-    // Return x if y is zero and x is non-zero.
-    else if (xd[0]) y = new Ctor(x);
-
-    // Return zero if both are zero.
-    // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity.
-    else return new Ctor(rm === 3 ? -0 : 0);
-
-    return external ? finalise(y, pr, rm) : y;
-  }
-
-  // x and y are finite, non-zero numbers with the same sign.
-
-  // Calculate base 1e7 exponents.
-  e = mathfloor(y.e / LOG_BASE);
-  xe = mathfloor(x.e / LOG_BASE);
-
-  xd = xd.slice();
-  k = xe - e;
-
-  // If base 1e7 exponents differ...
-  if (k) {
-    xLTy = k < 0;
-
-    if (xLTy) {
-      d = xd;
-      k = -k;
-      len = yd.length;
-    } else {
-      d = yd;
-      e = xe;
-      len = xd.length;
-    }
-
-    // Numbers with massively different exponents would result in a very high number of
-    // zeros needing to be prepended, but this can be avoided while still ensuring correct
-    // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`.
-    i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2;
-
-    if (k > i) {
-      k = i;
-      d.length = 1;
-    }
-
-    // Prepend zeros to equalise exponents.
-    d.reverse();
-    for (i = k; i--;) d.push(0);
-    d.reverse();
-
-  // Base 1e7 exponents equal.
-  } else {
-
-    // Check digits to determine which is the bigger number.
-
-    i = xd.length;
-    len = yd.length;
-    xLTy = i < len;
-    if (xLTy) len = i;
-
-    for (i = 0; i < len; i++) {
-      if (xd[i] != yd[i]) {
-        xLTy = xd[i] < yd[i];
-        break;
-      }
-    }
-
-    k = 0;
-  }
-
-  if (xLTy) {
-    d = xd;
-    xd = yd;
-    yd = d;
-    y.s = -y.s;
-  }
-
-  len = xd.length;
-
-  // Append zeros to `xd` if shorter.
-  // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length.
-  for (i = yd.length - len; i > 0; --i) xd[len++] = 0;
-
-  // Subtract yd from xd.
-  for (i = yd.length; i > k;) {
-
-    if (xd[--i] < yd[i]) {
-      for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;
-      --xd[j];
-      xd[i] += BASE;
-    }
-
-    xd[i] -= yd[i];
-  }
-
-  // Remove trailing zeros.
-  for (; xd[--len] === 0;) xd.pop();
-
-  // Remove leading zeros and adjust exponent accordingly.
-  for (; xd[0] === 0; xd.shift()) --e;
-
-  // Zero?
-  if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0);
-
-  y.d = xd;
-  y.e = getBase10Exponent(xd, e);
-
-  return external ? finalise(y, pr, rm) : y;
-};
-
-
-/*
- *   n % 0 =  N
- *   n % N =  N
- *   n % I =  n
- *   0 % n =  0
- *  -0 % n = -0
- *   0 % 0 =  N
- *   0 % N =  N
- *   0 % I =  0
- *   N % n =  N
- *   N % 0 =  N
- *   N % N =  N
- *   N % I =  N
- *   I % n =  N
- *   I % 0 =  N
- *   I % N =  N
- *   I % I =  N
- *
- * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to
- * `precision` significant digits using rounding mode `rounding`.
- *
- * The result depends on the modulo mode.
- *
- */
-P.modulo = P.mod = function (y) {
-  var q,
-    x = this,
-    Ctor = x.constructor;
-
-  y = new Ctor(y);
-
-  // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0.
-  if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN);
-
-  // Return x if y is ±Infinity or x is ±0.
-  if (!y.d || x.d && !x.d[0]) {
-    return finalise(new Ctor(x), Ctor.precision, Ctor.rounding);
-  }
-
-  // Prevent rounding of intermediate calculations.
-  external = false;
-
-  if (Ctor.modulo == 9) {
-
-    // Euclidian division: q = sign(y) * floor(x / abs(y))
-    // result = x - q * y    where  0 <= result < abs(y)
-    q = divide(x, y.abs(), 0, 3, 1);
-    q.s *= y.s;
-  } else {
-    q = divide(x, y, 0, Ctor.modulo, 1);
-  }
-
-  q = q.times(y);
-
-  external = true;
-
-  return x.minus(q);
-};
-
-
-/*
- * Return a new Decimal whose value is the natural exponential of the value of this Decimal,
- * i.e. the base e raised to the power the value of this Decimal, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- */
-P.naturalExponential = P.exp = function () {
-  return naturalExponential(this);
-};
-
-
-/*
- * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,
- * rounded to `precision` significant digits using rounding mode `rounding`.
- *
- */
-P.naturalLogarithm = P.ln = function () {
-  return naturalLogarithm(this);
-};
-
-
-/*
- * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by
- * -1.
- *
- */
-P.negated = P.neg = function () {
-  var x = new this.constructor(this);
-  x.s = -x.s;
-  return finalise(x);
-};
-
-
-/*
- *  n + 0 = n
- *  n + N = N
- *  n + I = I
- *  0 + n = n
- *  0 + 0 = 0
- *  0 + N = N
- *  0 + I = I
- *  N + n = N
- *  N + 0 = N
- *  N + N = N
- *  N + I = N
- *  I + n = I
- *  I + 0 = I
- *  I + N = N
- *  I + I = I
- *
- * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- */
-P.plus = P.add = function (y) {
-  var carry, d, e, i, k, len, pr, rm, xd, yd,
-    x = this,
-    Ctor = x.constructor;
-
-  y = new Ctor(y);
-
-  // If either is not finite...
-  if (!x.d || !y.d) {
-
-    // Return NaN if either is NaN.
-    if (!x.s || !y.s) y = new Ctor(NaN);
-
-    // Return x if y is finite and x is ±Infinity.
-    // Return x if both are ±Infinity with the same sign.
-    // Return NaN if both are ±Infinity with different signs.
-    // Return y if x is finite and y is ±Infinity.
-    else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN);
-
-    return y;
-  }
-
-   // If signs differ...
-  if (x.s != y.s) {
-    y.s = -y.s;
-    return x.minus(y);
-  }
-
-  xd = x.d;
-  yd = y.d;
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-
-  // If either is zero...
-  if (!xd[0] || !yd[0]) {
-
-    // Return x if y is zero.
-    // Return y if y is non-zero.
-    if (!yd[0]) y = new Ctor(x);
-
-    return external ? finalise(y, pr, rm) : y;
-  }
-
-  // x and y are finite, non-zero numbers with the same sign.
-
-  // Calculate base 1e7 exponents.
-  k = mathfloor(x.e / LOG_BASE);
-  e = mathfloor(y.e / LOG_BASE);
-
-  xd = xd.slice();
-  i = k - e;
-
-  // If base 1e7 exponents differ...
-  if (i) {
-
-    if (i < 0) {
-      d = xd;
-      i = -i;
-      len = yd.length;
-    } else {
-      d = yd;
-      e = k;
-      len = xd.length;
-    }
-
-    // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1.
-    k = Math.ceil(pr / LOG_BASE);
-    len = k > len ? k + 1 : len + 1;
-
-    if (i > len) {
-      i = len;
-      d.length = 1;
-    }
-
-    // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts.
-    d.reverse();
-    for (; i--;) d.push(0);
-    d.reverse();
-  }
-
-  len = xd.length;
-  i = yd.length;
-
-  // If yd is longer than xd, swap xd and yd so xd points to the longer array.
-  if (len - i < 0) {
-    i = len;
-    d = yd;
-    yd = xd;
-    xd = d;
-  }
-
-  // Only start adding at yd.length - 1 as the further digits of xd can be left as they are.
-  for (carry = 0; i;) {
-    carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;
-    xd[i] %= BASE;
-  }
-
-  if (carry) {
-    xd.unshift(carry);
-    ++e;
-  }
-
-  // Remove trailing zeros.
-  // No need to check for zero, as +x + +y != 0 && -x + -y != 0
-  for (len = xd.length; xd[--len] == 0;) xd.pop();
-
-  y.d = xd;
-  y.e = getBase10Exponent(xd, e);
-
-  return external ? finalise(y, pr, rm) : y;
-};
-
-
-/*
- * Return the number of significant digits of the value of this Decimal.
- *
- * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.
- *
- */
-P.precision = P.sd = function (z) {
-  var k,
-    x = this;
-
-  if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z);
-
-  if (x.d) {
-    k = getPrecision(x.d);
-    if (z && x.e + 1 > k) k = x.e + 1;
-  } else {
-    k = NaN;
-  }
-
-  return k;
-};
-
-
-/*
- * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using
- * rounding mode `rounding`.
- *
- */
-P.round = function () {
-  var x = this,
-    Ctor = x.constructor;
-
-  return finalise(new Ctor(x), x.e + 1, Ctor.rounding);
-};
-
-
-/*
- * Return a new Decimal whose value is the sine of the value in radians of this Decimal.
- *
- * Domain: [-Infinity, Infinity]
- * Range: [-1, 1]
- *
- * sin(x) = x - x^3/3! + x^5/5! - ...
- *
- * sin(0)         = 0
- * sin(-0)        = -0
- * sin(Infinity)  = NaN
- * sin(-Infinity) = NaN
- * sin(NaN)       = NaN
- *
- */
-P.sine = P.sin = function () {
-  var pr, rm,
-    x = this,
-    Ctor = x.constructor;
-
-  if (!x.isFinite()) return new Ctor(NaN);
-  if (x.isZero()) return new Ctor(x);
-
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-  Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;
-  Ctor.rounding = 1;
-
-  x = sine(Ctor, toLessThanHalfPi(Ctor, x));
-
-  Ctor.precision = pr;
-  Ctor.rounding = rm;
-
-  return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true);
-};
-
-
-/*
- * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- *  sqrt(-n) =  N
- *  sqrt(N)  =  N
- *  sqrt(-I) =  N
- *  sqrt(I)  =  I
- *  sqrt(0)  =  0
- *  sqrt(-0) = -0
- *
- */
-P.squareRoot = P.sqrt = function () {
-  var m, n, sd, r, rep, t,
-    x = this,
-    d = x.d,
-    e = x.e,
-    s = x.s,
-    Ctor = x.constructor;
-
-  // Negative/NaN/Infinity/zero?
-  if (s !== 1 || !d || !d[0]) {
-    return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0);
-  }
-
-  external = false;
-
-  // Initial estimate.
-  s = Math.sqrt(+x);
-
-  // Math.sqrt underflow/overflow?
-  // Pass x to Math.sqrt as integer, then adjust the exponent of the result.
-  if (s == 0 || s == 1 / 0) {
-    n = digitsToString(d);
-
-    if ((n.length + e) % 2 == 0) n += '0';
-    s = Math.sqrt(n);
-    e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);
-
-    if (s == 1 / 0) {
-      n = '5e' + e;
-    } else {
-      n = s.toExponential();
-      n = n.slice(0, n.indexOf('e') + 1) + e;
-    }
-
-    r = new Ctor(n);
-  } else {
-    r = new Ctor(s.toString());
-  }
-
-  sd = (e = Ctor.precision) + 3;
-
-  // Newton-Raphson iteration.
-  for (;;) {
-    t = r;
-    r = t.plus(divide(x, t, sd + 2, 1)).times(0.5);
-
-    // TODO? Replace with for-loop and checkRoundingDigits.
-    if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {
-      n = n.slice(sd - 3, sd + 1);
-
-      // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or
-      // 4999, i.e. approaching a rounding boundary, continue the iteration.
-      if (n == '9999' || !rep && n == '4999') {
-
-        // On the first iteration only, check to see if rounding up gives the exact result as the
-        // nines may infinitely repeat.
-        if (!rep) {
-          finalise(t, e + 1, 0);
-
-          if (t.times(t).eq(x)) {
-            r = t;
-            break;
-          }
-        }
-
-        sd += 4;
-        rep = 1;
-      } else {
-
-        // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.
-        // If not, then there are further digits and m will be truthy.
-        if (!+n || !+n.slice(1) && n.charAt(0) == '5') {
-
-          // Truncate to the first rounding digit.
-          finalise(r, e + 1, 1);
-          m = !r.times(r).eq(x);
-        }
-
-        break;
-      }
-    }
-  }
-
-  external = true;
-
-  return finalise(r, e, Ctor.rounding, m);
-};
-
-
-/*
- * Return a new Decimal whose value is the tangent of the value in radians of this Decimal.
- *
- * Domain: [-Infinity, Infinity]
- * Range: [-Infinity, Infinity]
- *
- * tan(0)         = 0
- * tan(-0)        = -0
- * tan(Infinity)  = NaN
- * tan(-Infinity) = NaN
- * tan(NaN)       = NaN
- *
- */
-P.tangent = P.tan = function () {
-  var pr, rm,
-    x = this,
-    Ctor = x.constructor;
-
-  if (!x.isFinite()) return new Ctor(NaN);
-  if (x.isZero()) return new Ctor(x);
-
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-  Ctor.precision = pr + 10;
-  Ctor.rounding = 1;
-
-  x = x.sin();
-  x.s = 1;
-  x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0);
-
-  Ctor.precision = pr;
-  Ctor.rounding = rm;
-
-  return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true);
-};
-
-
-/*
- *  n * 0 = 0
- *  n * N = N
- *  n * I = I
- *  0 * n = 0
- *  0 * 0 = 0
- *  0 * N = N
- *  0 * I = N
- *  N * n = N
- *  N * 0 = N
- *  N * N = N
- *  N * I = N
- *  I * n = I
- *  I * 0 = N
- *  I * N = N
- *  I * I = I
- *
- * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant
- * digits using rounding mode `rounding`.
- *
- */
-P.times = P.mul = function (y) {
-  var carry, e, i, k, r, rL, t, xdL, ydL,
-    x = this,
-    Ctor = x.constructor,
-    xd = x.d,
-    yd = (y = new Ctor(y)).d;
-
-  y.s *= x.s;
-
-   // If either is NaN, ±Infinity or ±0...
-  if (!xd || !xd[0] || !yd || !yd[0]) {
-
-    return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd
-
-      // Return NaN if either is NaN.
-      // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity.
-      ? NaN
-
-      // Return ±Infinity if either is ±Infinity.
-      // Return ±0 if either is ±0.
-      : !xd || !yd ? y.s / 0 : y.s * 0);
-  }
-
-  e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE);
-  xdL = xd.length;
-  ydL = yd.length;
-
-  // Ensure xd points to the longer array.
-  if (xdL < ydL) {
-    r = xd;
-    xd = yd;
-    yd = r;
-    rL = xdL;
-    xdL = ydL;
-    ydL = rL;
-  }
-
-  // Initialise the result array with zeros.
-  r = [];
-  rL = xdL + ydL;
-  for (i = rL; i--;) r.push(0);
-
-  // Multiply!
-  for (i = ydL; --i >= 0;) {
-    carry = 0;
-    for (k = xdL + i; k > i;) {
-      t = r[k] + yd[i] * xd[k - i - 1] + carry;
-      r[k--] = t % BASE | 0;
-      carry = t / BASE | 0;
-    }
-
-    r[k] = (r[k] + carry) % BASE | 0;
-  }
-
-  // Remove trailing zeros.
-  for (; !r[--rL];) r.pop();
-
-  if (carry) ++e;
-  else r.shift();
-
-  y.d = r;
-  y.e = getBase10Exponent(r, e);
-
-  return external ? finalise(y, Ctor.precision, Ctor.rounding) : y;
-};
-
-
-/*
- * Return a string representing the value of this Decimal in base 2, round to `sd` significant
- * digits using rounding mode `rm`.
- *
- * If the optional `sd` argument is present then return binary exponential notation.
- *
- * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- */
-P.toBinary = function (sd, rm) {
-  return toStringBinary(this, 2, sd, rm);
-};
-
-
-/*
- * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`
- * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.
- *
- * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- */
-P.toDecimalPlaces = P.toDP = function (dp, rm) {
-  var x = this,
-    Ctor = x.constructor;
-
-  x = new Ctor(x);
-  if (dp === void 0) return x;
-
-  checkInt32(dp, 0, MAX_DIGITS);
-
-  if (rm === void 0) rm = Ctor.rounding;
-  else checkInt32(rm, 0, 8);
-
-  return finalise(x, dp + x.e + 1, rm);
-};
-
-
-/*
- * Return a string representing the value of this Decimal in exponential notation rounded to
- * `dp` fixed decimal places using rounding mode `rounding`.
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- */
-P.toExponential = function (dp, rm) {
-  var str,
-    x = this,
-    Ctor = x.constructor;
-
-  if (dp === void 0) {
-    str = finiteToString(x, true);
-  } else {
-    checkInt32(dp, 0, MAX_DIGITS);
-
-    if (rm === void 0) rm = Ctor.rounding;
-    else checkInt32(rm, 0, 8);
-
-    x = finalise(new Ctor(x), dp + 1, rm);
-    str = finiteToString(x, true, dp + 1);
-  }
-
-  return x.isNeg() && !x.isZero() ? '-' + str : str;
-};
-
-
-/*
- * Return a string representing the value of this Decimal in normal (fixed-point) notation to
- * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is
- * omitted.
- *
- * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.
- *
- * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.
- * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.
- * (-0).toFixed(3) is '0.000'.
- * (-0.5).toFixed(0) is '-0'.
- *
- */
-P.toFixed = function (dp, rm) {
-  var str, y,
-    x = this,
-    Ctor = x.constructor;
-
-  if (dp === void 0) {
-    str = finiteToString(x);
-  } else {
-    checkInt32(dp, 0, MAX_DIGITS);
-
-    if (rm === void 0) rm = Ctor.rounding;
-    else checkInt32(rm, 0, 8);
-
-    y = finalise(new Ctor(x), dp + x.e + 1, rm);
-    str = finiteToString(y, false, dp + y.e + 1);
-  }
-
-  // To determine whether to add the minus sign look at the value before it was rounded,
-  // i.e. look at `x` rather than `y`.
-  return x.isNeg() && !x.isZero() ? '-' + str : str;
-};
-
-
-/*
- * Return an array representing the value of this Decimal as a simple fraction with an integer
- * numerator and an integer denominator.
- *
- * The denominator will be a positive non-zero value less than or equal to the specified maximum
- * denominator. If a maximum denominator is not specified, the denominator will be the lowest
- * value necessary to represent the number exactly.
- *
- * [maxD] {number|string|Decimal} Maximum denominator. Integer >= 1 and < Infinity.
- *
- */
-P.toFraction = function (maxD) {
-  var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r,
-    x = this,
-    xd = x.d,
-    Ctor = x.constructor;
-
-  if (!xd) return new Ctor(x);
-
-  n1 = d0 = new Ctor(1);
-  d1 = n0 = new Ctor(0);
-
-  d = new Ctor(d1);
-  e = d.e = getPrecision(xd) - x.e - 1;
-  k = e % LOG_BASE;
-  d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k);
-
-  if (maxD == null) {
-
-    // d is 10**e, the minimum max-denominator needed.
-    maxD = e > 0 ? d : n1;
-  } else {
-    n = new Ctor(maxD);
-    if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n);
-    maxD = n.gt(d) ? (e > 0 ? d : n1) : n;
-  }
-
-  external = false;
-  n = new Ctor(digitsToString(xd));
-  pr = Ctor.precision;
-  Ctor.precision = e = xd.length * LOG_BASE * 2;
-
-  for (;;)  {
-    q = divide(n, d, 0, 1, 1);
-    d2 = d0.plus(q.times(d1));
-    if (d2.cmp(maxD) == 1) break;
-    d0 = d1;
-    d1 = d2;
-    d2 = n1;
-    n1 = n0.plus(q.times(d2));
-    n0 = d2;
-    d2 = d;
-    d = n.minus(q.times(d2));
-    n = d2;
-  }
-
-  d2 = divide(maxD.minus(d0), d1, 0, 1, 1);
-  n0 = n0.plus(d2.times(n1));
-  d0 = d0.plus(d2.times(d1));
-  n0.s = n1.s = x.s;
-
-  // Determine which fraction is closer to x, n0/d0 or n1/d1?
-  r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1
-      ? [n1, d1] : [n0, d0];
-
-  Ctor.precision = pr;
-  external = true;
-
-  return r;
-};
-
-
-/*
- * Return a string representing the value of this Decimal in base 16, round to `sd` significant
- * digits using rounding mode `rm`.
- *
- * If the optional `sd` argument is present then return binary exponential notation.
- *
- * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- */
-P.toHexadecimal = P.toHex = function (sd, rm) {
-  return toStringBinary(this, 16, sd, rm);
-};
-
-
-/*
- * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding
- * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal.
- *
- * The return value will always have the same sign as this Decimal, unless either this Decimal
- * or `y` is NaN, in which case the return value will be also be NaN.
- *
- * The return value is not affected by the value of `precision`.
- *
- * y {number|string|Decimal} The magnitude to round to a multiple of.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * 'toNearest() rounding mode not an integer: {rm}'
- * 'toNearest() rounding mode out of range: {rm}'
- *
- */
-P.toNearest = function (y, rm) {
-  var x = this,
-    Ctor = x.constructor;
-
-  x = new Ctor(x);
-
-  if (y == null) {
-
-    // If x is not finite, return x.
-    if (!x.d) return x;
-
-    y = new Ctor(1);
-    rm = Ctor.rounding;
-  } else {
-    y = new Ctor(y);
-    if (rm === void 0) {
-      rm = Ctor.rounding;
-    } else {
-      checkInt32(rm, 0, 8);
-    }
-
-    // If x is not finite, return x if y is not NaN, else NaN.
-    if (!x.d) return y.s ? x : y;
-
-    // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN.
-    if (!y.d) {
-      if (y.s) y.s = x.s;
-      return y;
-    }
-  }
-
-  // If y is not zero, calculate the nearest multiple of y to x.
-  if (y.d[0]) {
-    external = false;
-    x = divide(x, y, 0, rm, 1).times(y);
-    external = true;
-    finalise(x);
-
-  // If y is zero, return zero with the sign of x.
-  } else {
-    y.s = x.s;
-    x = y;
-  }
-
-  return x;
-};
-
-
-/*
- * Return the value of this Decimal converted to a number primitive.
- * Zero keeps its sign.
- *
- */
-P.toNumber = function () {
-  return +this;
-};
-
-
-/*
- * Return a string representing the value of this Decimal in base 8, round to `sd` significant
- * digits using rounding mode `rm`.
- *
- * If the optional `sd` argument is present then return binary exponential notation.
- *
- * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- */
-P.toOctal = function (sd, rm) {
-  return toStringBinary(this, 8, sd, rm);
-};
-
-
-/*
- * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded
- * to `precision` significant digits using rounding mode `rounding`.
- *
- * ECMAScript compliant.
- *
- *   pow(x, NaN)                           = NaN
- *   pow(x, ±0)                            = 1
-
- *   pow(NaN, non-zero)                    = NaN
- *   pow(abs(x) > 1, +Infinity)            = +Infinity
- *   pow(abs(x) > 1, -Infinity)            = +0
- *   pow(abs(x) == 1, ±Infinity)           = NaN
- *   pow(abs(x) < 1, +Infinity)            = +0
- *   pow(abs(x) < 1, -Infinity)            = +Infinity
- *   pow(+Infinity, y > 0)                 = +Infinity
- *   pow(+Infinity, y < 0)                 = +0
- *   pow(-Infinity, odd integer > 0)       = -Infinity
- *   pow(-Infinity, even integer > 0)      = +Infinity
- *   pow(-Infinity, odd integer < 0)       = -0
- *   pow(-Infinity, even integer < 0)      = +0
- *   pow(+0, y > 0)                        = +0
- *   pow(+0, y < 0)                        = +Infinity
- *   pow(-0, odd integer > 0)              = -0
- *   pow(-0, even integer > 0)             = +0
- *   pow(-0, odd integer < 0)              = -Infinity
- *   pow(-0, even integer < 0)             = +Infinity
- *   pow(finite x < 0, finite non-integer) = NaN
- *
- * For non-integer or very large exponents pow(x, y) is calculated using
- *
- *   x^y = exp(y*ln(x))
- *
- * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the
- * probability of an incorrectly rounded result
- * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14
- * i.e. 1 in 250,000,000,000,000
- *
- * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place).
- *
- * y {number|string|Decimal} The power to which to raise this Decimal.
- *
- */
-P.toPower = P.pow = function (y) {
-  var e, k, pr, r, rm, s,
-    x = this,
-    Ctor = x.constructor,
-    yn = +(y = new Ctor(y));
-
-  // Either ±Infinity, NaN or ±0?
-  if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn));
-
-  x = new Ctor(x);
-
-  if (x.eq(1)) return x;
-
-  pr = Ctor.precision;
-  rm = Ctor.rounding;
-
-  if (y.eq(1)) return finalise(x, pr, rm);
-
-  // y exponent
-  e = mathfloor(y.e / LOG_BASE);
-
-  // If y is a small integer use the 'exponentiation by squaring' algorithm.
-  if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {
-    r = intPow(Ctor, x, k, pr);
-    return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm);
-  }
-
-  s = x.s;
-
-  // if x is negative
-  if (s < 0) {
-
-    // if y is not an integer
-    if (e < y.d.length - 1) return new Ctor(NaN);
-
-    // Result is positive if x is negative and the last digit of integer y is even.
-    if ((y.d[e] & 1) == 0) s = 1;
-
-    // if x.eq(-1)
-    if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) {
-      x.s = s;
-      return x;
-    }
-  }
-
-  // Estimate result exponent.
-  // x^y = 10^e,  where e = y * log10(x)
-  // log10(x) = log10(x_significand) + x_exponent
-  // log10(x_significand) = ln(x_significand) / ln(10)
-  k = mathpow(+x, yn);
-  e = k == 0 || !isFinite(k)
-    ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1))
-    : new Ctor(k + '').e;
-
-  // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1.
-
-  // Overflow/underflow?
-  if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0);
-
-  external = false;
-  Ctor.rounding = x.s = 1;
-
-  // Estimate the extra guard digits needed to ensure five correct rounding digits from
-  // naturalLogarithm(x). Example of failure without these extra digits (precision: 10):
-  // new Decimal(2.32456).pow('2087987436534566.46411')
-  // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815
-  k = Math.min(12, (e + '').length);
-
-  // r = x^y = exp(y*ln(x))
-  r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr);
-
-  // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40)
-  if (r.d) {
-
-    // Truncate to the required precision plus five rounding digits.
-    r = finalise(r, pr + 5, 1);
-
-    // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate
-    // the result.
-    if (checkRoundingDigits(r.d, pr, rm)) {
-      e = pr + 10;
-
-      // Truncate to the increased precision plus five rounding digits.
-      r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1);
-
-      // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9).
-      if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) {
-        r = finalise(r, pr + 1, 0);
-      }
-    }
-  }
-
-  r.s = s;
-  external = true;
-  Ctor.rounding = rm;
-
-  return finalise(r, pr, rm);
-};
-
-
-/*
- * Return a string representing the value of this Decimal rounded to `sd` significant digits
- * using rounding mode `rounding`.
- *
- * Return exponential notation if `sd` is less than the number of digits necessary to represent
- * the integer part of the value in normal notation.
- *
- * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- */
-P.toPrecision = function (sd, rm) {
-  var str,
-    x = this,
-    Ctor = x.constructor;
-
-  if (sd === void 0) {
-    str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);
-  } else {
-    checkInt32(sd, 1, MAX_DIGITS);
-
-    if (rm === void 0) rm = Ctor.rounding;
-    else checkInt32(rm, 0, 8);
-
-    x = finalise(new Ctor(x), sd, rm);
-    str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd);
-  }
-
-  return x.isNeg() && !x.isZero() ? '-' + str : str;
-};
-
-
-/*
- * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`
- * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if
- * omitted.
- *
- * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.
- * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.
- *
- * 'toSD() digits out of range: {sd}'
- * 'toSD() digits not an integer: {sd}'
- * 'toSD() rounding mode not an integer: {rm}'
- * 'toSD() rounding mode out of range: {rm}'
- *
- */
-P.toSignificantDigits = P.toSD = function (sd, rm) {
-  var x = this,
-    Ctor = x.constructor;
-
-  if (sd === void 0) {
-    sd = Ctor.precision;
-    rm = Ctor.rounding;
-  } else {
-    checkInt32(sd, 1, MAX_DIGITS);
-
-    if (rm === void 0) rm = Ctor.rounding;
-    else checkInt32(rm, 0, 8);
-  }
-
-  return finalise(new Ctor(x), sd, rm);
-};
-
-
-/*
- * Return a string representing the value of this Decimal.
- *
- * Return exponential notation if this Decimal has a positive exponent equal to or greater than
- * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.
- *
- */
-P.toString = function () {
-  var x = this,
-    Ctor = x.constructor,
-    str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);
-
-  return x.isNeg() && !x.isZero() ? '-' + str : str;
-};
-
-
-/*
- * Return a new Decimal whose value is the value of this Decimal truncated to a whole number.
- *
- */
-P.truncated = P.trunc = function () {
-  return finalise(new this.constructor(this), this.e + 1, 1);
-};
-
-
-/*
- * Return a string representing the value of this Decimal.
- * Unlike `toString`, negative zero will include the minus sign.
- *
- */
-P.valueOf = P.toJSON = function () {
-  var x = this,
-    Ctor = x.constructor,
-    str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);
-
-  return x.isNeg() ? '-' + str : str;
-};
-
-
-// Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.
-
-
-/*
- *  digitsToString           P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower,
- *                           finiteToString, naturalExponential, naturalLogarithm
- *  checkInt32               P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest,
- *                           P.toPrecision, P.toSignificantDigits, toStringBinary, random
- *  checkRoundingDigits      P.logarithm, P.toPower, naturalExponential, naturalLogarithm
- *  convertBase              toStringBinary, parseOther
- *  cos                      P.cos
- *  divide                   P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy,
- *                           P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction,
- *                           P.toNearest, toStringBinary, naturalExponential, naturalLogarithm,
- *                           taylorSeries, atan2, parseOther
- *  finalise                 P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh,
- *                           P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus,
- *                           P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot,
- *                           P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed,
- *                           P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits,
- *                           P.truncated, divide, getLn10, getPi, naturalExponential,
- *                           naturalLogarithm, ceil, floor, round, trunc
- *  finiteToString           P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf,
- *                           toStringBinary
- *  getBase10Exponent        P.minus, P.plus, P.times, parseOther
- *  getLn10                  P.logarithm, naturalLogarithm
- *  getPi                    P.acos, P.asin, P.atan, toLessThanHalfPi, atan2
- *  getPrecision             P.precision, P.toFraction
- *  getZeroString            digitsToString, finiteToString
- *  intPow                   P.toPower, parseOther
- *  isOdd                    toLessThanHalfPi
- *  maxOrMin                 max, min
- *  naturalExponential       P.naturalExponential, P.toPower
- *  naturalLogarithm         P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm,
- *                           P.toPower, naturalExponential
- *  nonFiniteToString        finiteToString, toStringBinary
- *  parseDecimal             Decimal
- *  parseOther               Decimal
- *  sin                      P.sin
- *  taylorSeries             P.cosh, P.sinh, cos, sin
- *  toLessThanHalfPi         P.cos, P.sin
- *  toStringBinary           P.toBinary, P.toHexadecimal, P.toOctal
- *  truncate                 intPow
- *
- *  Throws:                  P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi,
- *                           naturalLogarithm, config, parseOther, random, Decimal
- */
-
-
-function digitsToString(d) {
-  var i, k, ws,
-    indexOfLastWord = d.length - 1,
-    str = '',
-    w = d[0];
-
-  if (indexOfLastWord > 0) {
-    str += w;
-    for (i = 1; i < indexOfLastWord; i++) {
-      ws = d[i] + '';
-      k = LOG_BASE - ws.length;
-      if (k) str += getZeroString(k);
-      str += ws;
-    }
-
-    w = d[i];
-    ws = w + '';
-    k = LOG_BASE - ws.length;
-    if (k) str += getZeroString(k);
-  } else if (w === 0) {
-    return '0';
-  }
-
-  // Remove trailing zeros of last w.
-  for (; w % 10 === 0;) w /= 10;
-
-  return str + w;
-}
-
-
-function checkInt32(i, min, max) {
-  if (i !== ~~i || i < min || i > max) {
-    throw Error(invalidArgument + i);
-  }
-}
-
-
-/*
- * Check 5 rounding digits if `repeating` is null, 4 otherwise.
- * `repeating == null` if caller is `log` or `pow`,
- * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`.
- */
-function checkRoundingDigits(d, i, rm, repeating) {
-  var di, k, r, rd;
-
-  // Get the length of the first word of the array d.
-  for (k = d[0]; k >= 10; k /= 10) --i;
-
-  // Is the rounding digit in the first word of d?
-  if (--i < 0) {
-    i += LOG_BASE;
-    di = 0;
-  } else {
-    di = Math.ceil((i + 1) / LOG_BASE);
-    i %= LOG_BASE;
-  }
-
-  // i is the index (0 - 6) of the rounding digit.
-  // E.g. if within the word 3487563 the first rounding digit is 5,
-  // then i = 4, k = 1000, rd = 3487563 % 1000 = 563
-  k = mathpow(10, LOG_BASE - i);
-  rd = d[di] % k | 0;
-
-  if (repeating == null) {
-    if (i < 3) {
-      if (i == 0) rd = rd / 100 | 0;
-      else if (i == 1) rd = rd / 10 | 0;
-      r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0;
-    } else {
-      r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) &&
-        (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 ||
-          (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0;
-    }
-  } else {
-    if (i < 4) {
-      if (i == 0) rd = rd / 1000 | 0;
-      else if (i == 1) rd = rd / 100 | 0;
-      else if (i == 2) rd = rd / 10 | 0;
-      r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999;
-    } else {
-      r = ((repeating || rm < 4) && rd + 1 == k ||
-      (!repeating && rm > 3) && rd + 1 == k / 2) &&
-        (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1;
-    }
-  }
-
-  return r;
-}
-
-
-// Convert string of `baseIn` to an array of numbers of `baseOut`.
-// Eg. convertBase('255', 10, 16) returns [15, 15].
-// Eg. convertBase('ff', 16, 10) returns [2, 5, 5].
-function convertBase(str, baseIn, baseOut) {
-  var j,
-    arr = [0],
-    arrL,
-    i = 0,
-    strL = str.length;
-
-  for (; i < strL;) {
-    for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn;
-    arr[0] += NUMERALS.indexOf(str.charAt(i++));
-    for (j = 0; j < arr.length; j++) {
-      if (arr[j] > baseOut - 1) {
-        if (arr[j + 1] === void 0) arr[j + 1] = 0;
-        arr[j + 1] += arr[j] / baseOut | 0;
-        arr[j] %= baseOut;
-      }
-    }
-  }
-
-  return arr.reverse();
-}
-
-
-/*
- * cos(x) = 1 - x^2/2! + x^4/4! - ...
- * |x| < pi/2
- *
- */
-function cosine(Ctor, x) {
-  var k, len, y;
-
-  if (x.isZero()) return x;
-
-  // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1
-  // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1
-
-  // Estimate the optimum number of times to use the argument reduction.
-  len = x.d.length;
-  if (len < 32) {
-    k = Math.ceil(len / 3);
-    y = (1 / tinyPow(4, k)).toString();
-  } else {
-    k = 16;
-    y = '2.3283064365386962890625e-10';
-  }
-
-  Ctor.precision += k;
-
-  x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1));
-
-  // Reverse argument reduction
-  for (var i = k; i--;) {
-    var cos2x = x.times(x);
-    x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1);
-  }
-
-  Ctor.precision -= k;
-
-  return x;
-}
-
-
-/*
- * Perform division in the specified base.
- */
-var divide = (function () {
-
-  // Assumes non-zero x and k, and hence non-zero result.
-  function multiplyInteger(x, k, base) {
-    var temp,
-      carry = 0,
-      i = x.length;
-
-    for (x = x.slice(); i--;) {
-      temp = x[i] * k + carry;
-      x[i] = temp % base | 0;
-      carry = temp / base | 0;
-    }
-
-    if (carry) x.unshift(carry);
-
-    return x;
-  }
-
-  function compare(a, b, aL, bL) {
-    var i, r;
-
-    if (aL != bL) {
-      r = aL > bL ? 1 : -1;
-    } else {
-      for (i = r = 0; i < aL; i++) {
-        if (a[i] != b[i]) {
-          r = a[i] > b[i] ? 1 : -1;
-          break;
-        }
-      }
-    }
-
-    return r;
-  }
-
-  function subtract(a, b, aL, base) {
-    var i = 0;
-
-    // Subtract b from a.
-    for (; aL--;) {
-      a[aL] -= i;
-      i = a[aL] < b[aL] ? 1 : 0;
-      a[aL] = i * base + a[aL] - b[aL];
-    }
-
-    // Remove leading zeros.
-    for (; !a[0] && a.length > 1;) a.shift();
-  }
-
-  return function (x, y, pr, rm, dp, base) {
-    var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0,
-      yL, yz,
-      Ctor = x.constructor,
-      sign = x.s == y.s ? 1 : -1,
-      xd = x.d,
-      yd = y.d;
-
-    // Either NaN, Infinity or 0?
-    if (!xd || !xd[0] || !yd || !yd[0]) {
-
-      return new Ctor(// Return NaN if either NaN, or both Infinity or 0.
-        !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN :
-
-        // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
-        xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0);
-    }
-
-    if (base) {
-      logBase = 1;
-      e = x.e - y.e;
-    } else {
-      base = BASE;
-      logBase = LOG_BASE;
-      e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase);
-    }
-
-    yL = yd.length;
-    xL = xd.length;
-    q = new Ctor(sign);
-    qd = q.d = [];
-
-    // Result exponent may be one less than e.
-    // The digit array of a Decimal from toStringBinary may have trailing zeros.
-    for (i = 0; yd[i] == (xd[i] || 0); i++);
-
-    if (yd[i] > (xd[i] || 0)) e--;
-
-    if (pr == null) {
-      sd = pr = Ctor.precision;
-      rm = Ctor.rounding;
-    } else if (dp) {
-      sd = pr + (x.e - y.e) + 1;
-    } else {
-      sd = pr;
-    }
-
-    if (sd < 0) {
-      qd.push(1);
-      more = true;
-    } else {
-
-      // Convert precision in number of base 10 digits to base 1e7 digits.
-      sd = sd / logBase + 2 | 0;
-      i = 0;
-
-      // divisor < 1e7
-      if (yL == 1) {
-        k = 0;
-        yd = yd[0];
-        sd++;
-
-        // k is the carry.
-        for (; (i < xL || k) && sd--; i++) {
-          t = k * base + (xd[i] || 0);
-          qd[i] = t / yd | 0;
-          k = t % yd | 0;
-        }
-
-        more = k || i < xL;
-
-      // divisor >= 1e7
-      } else {
-
-        // Normalise xd and yd so highest order digit of yd is >= base/2
-        k = base / (yd[0] + 1) | 0;
-
-        if (k > 1) {
-          yd = multiplyInteger(yd, k, base);
-          xd = multiplyInteger(xd, k, base);
-          yL = yd.length;
-          xL = xd.length;
-        }
-
-        xi = yL;
-        rem = xd.slice(0, yL);
-        remL = rem.length;
-
-        // Add zeros to make remainder as long as divisor.
-        for (; remL < yL;) rem[remL++] = 0;
-
-        yz = yd.slice();
-        yz.unshift(0);
-        yd0 = yd[0];
-
-        if (yd[1] >= base / 2) ++yd0;
-
-        do {
-          k = 0;
-
-          // Compare divisor and remainder.
-          cmp = compare(yd, rem, yL, remL);
-
-          // If divisor < remainder.
-          if (cmp < 0) {
-
-            // Calculate trial digit, k.
-            rem0 = rem[0];
-            if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);
-
-            // k will be how many times the divisor goes into the current remainder.
-            k = rem0 / yd0 | 0;
-
-            //  Algorithm:
-            //  1. product = divisor * trial digit (k)
-            //  2. if product > remainder: product -= divisor, k--
-            //  3. remainder -= product
-            //  4. if product was < remainder at 2:
-            //    5. compare new remainder and divisor
-            //    6. If remainder > divisor: remainder -= divisor, k++
-
-            if (k > 1) {
-              if (k >= base) k = base - 1;
-
-              // product = divisor * trial digit.
-              prod = multiplyInteger(yd, k, base);
-              prodL = prod.length;
-              remL = rem.length;
-
-              // Compare product and remainder.
-              cmp = compare(prod, rem, prodL, remL);
-
-              // product > remainder.
-              if (cmp == 1) {
-                k--;
-
-                // Subtract divisor from product.
-                subtract(prod, yL < prodL ? yz : yd, prodL, base);
-              }
-            } else {
-
-              // cmp is -1.
-              // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1
-              // to avoid it. If k is 1 there is a need to compare yd and rem again below.
-              if (k == 0) cmp = k = 1;
-              prod = yd.slice();
-            }
-
-            prodL = prod.length;
-            if (prodL < remL) prod.unshift(0);
-
-            // Subtract product from remainder.
-            subtract(rem, prod, remL, base);
-
-            // If product was < previous remainder.
-            if (cmp == -1) {
-              remL = rem.length;
-
-              // Compare divisor and new remainder.
-              cmp = compare(yd, rem, yL, remL);
-
-              // If divisor < new remainder, subtract divisor from remainder.
-              if (cmp < 1) {
-                k++;
-
-                // Subtract divisor from remainder.
-                subtract(rem, yL < remL ? yz : yd, remL, base);
-              }
-            }
-
-            remL = rem.length;
-          } else if (cmp === 0) {
-            k++;
-            rem = [0];
-          }    // if cmp === 1, k will be 0
-
-          // Add the next digit, k, to the result array.
-          qd[i++] = k;
-
-          // Update the remainder.
-          if (cmp && rem[0]) {
-            rem[remL++] = xd[xi] || 0;
-          } else {
-            rem = [xd[xi]];
-            remL = 1;
-          }
-
-        } while ((xi++ < xL || rem[0] !== void 0) && sd--);
-
-        more = rem[0] !== void 0;
-      }
-
-      // Leading zero?
-      if (!qd[0]) qd.shift();
-    }
-
-    // logBase is 1 when divide is being used for base conversion.
-    if (logBase == 1) {
-      q.e = e;
-      inexact = more;
-    } else {
-
-      // To calculate q.e, first get the number of digits of qd[0].
-      for (i = 1, k = qd[0]; k >= 10; k /= 10) i++;
-      q.e = i + e * logBase - 1;
-
-      finalise(q, dp ? pr + q.e + 1 : pr, rm, more);
-    }
-
-    return q;
-  };
-})();
-
-
-/*
- * Round `x` to `sd` significant digits using rounding mode `rm`.
- * Check for over/under-flow.
- */
- function finalise(x, sd, rm, isTruncated) {
-  var digits, i, j, k, rd, roundUp, w, xd, xdi,
-    Ctor = x.constructor;
-
-  // Don't round if sd is null or undefined.
-  out: if (sd != null) {
-    xd = x.d;
-
-    // Infinity/NaN.
-    if (!xd) return x;
-
-    // rd: the rounding digit, i.e. the digit after the digit that may be rounded up.
-    // w: the word of xd containing rd, a base 1e7 number.
-    // xdi: the index of w within xd.
-    // digits: the number of digits of w.
-    // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if
-    // they had leading zeros)
-    // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero).
-
-    // Get the length of the first word of the digits array xd.
-    for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++;
-    i = sd - digits;
-
-    // Is the rounding digit in the first word of xd?
-    if (i < 0) {
-      i += LOG_BASE;
-      j = sd;
-      w = xd[xdi = 0];
-
-      // Get the rounding digit at index j of w.
-      rd = w / mathpow(10, digits - j - 1) % 10 | 0;
-    } else {
-      xdi = Math.ceil((i + 1) / LOG_BASE);
-      k = xd.length;
-      if (xdi >= k) {
-        if (isTruncated) {
-
-          // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`.
-          for (; k++ <= xdi;) xd.push(0);
-          w = rd = 0;
-          digits = 1;
-          i %= LOG_BASE;
-          j = i - LOG_BASE + 1;
-        } else {
-          break out;
-        }
-      } else {
-        w = k = xd[xdi];
-
-        // Get the number of digits of w.
-        for (digits = 1; k >= 10; k /= 10) digits++;
-
-        // Get the index of rd within w.
-        i %= LOG_BASE;
-
-        // Get the index of rd within w, adjusted for leading zeros.
-        // The number of leading zeros of w is given by LOG_BASE - digits.
-        j = i - LOG_BASE + digits;
-
-        // Get the rounding digit at index j of w.
-        rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0;
-      }
-    }
-
-    // Are there any non-zero digits after the rounding digit?
-    isTruncated = isTruncated || sd < 0 ||
-      xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1));
-
-    // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right
-    // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression
-    // will give 714.
-
-    roundUp = rm < 4
-      ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))
-      : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 &&
-
-        // Check whether the digit to the left of the rounding digit is odd.
-        ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 ||
-          rm == (x.s < 0 ? 8 : 7));
-
-    if (sd < 1 || !xd[0]) {
-      xd.length = 0;
-      if (roundUp) {
-
-        // Convert sd to decimal places.
-        sd -= x.e + 1;
-
-        // 1, 0.1, 0.01, 0.001, 0.0001 etc.
-        xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE);
-        x.e = -sd || 0;
-      } else {
-
-        // Zero.
-        xd[0] = x.e = 0;
-      }
-
-      return x;
-    }
-
-    // Remove excess digits.
-    if (i == 0) {
-      xd.length = xdi;
-      k = 1;
-      xdi--;
-    } else {
-      xd.length = xdi + 1;
-      k = mathpow(10, LOG_BASE - i);
-
-      // E.g. 56700 becomes 56000 if 7 is the rounding digit.
-      // j > 0 means i > number of leading zeros of w.
-      xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0;
-    }
-
-    if (roundUp) {
-      for (;;) {
-
-        // Is the digit to be rounded up in the first word of xd?
-        if (xdi == 0) {
-
-          // i will be the length of xd[0] before k is added.
-          for (i = 1, j = xd[0]; j >= 10; j /= 10) i++;
-          j = xd[0] += k;
-          for (k = 1; j >= 10; j /= 10) k++;
-
-          // if i != k the length has increased.
-          if (i != k) {
-            x.e++;
-            if (xd[0] == BASE) xd[0] = 1;
-          }
-
-          break;
-        } else {
-          xd[xdi] += k;
-          if (xd[xdi] != BASE) break;
-          xd[xdi--] = 0;
-          k = 1;
-        }
-      }
-    }
-
-    // Remove trailing zeros.
-    for (i = xd.length; xd[--i] === 0;) xd.pop();
-  }
-
-  if (external) {
-
-    // Overflow?
-    if (x.e > Ctor.maxE) {
-
-      // Infinity.
-      x.d = null;
-      x.e = NaN;
-
-    // Underflow?
-    } else if (x.e < Ctor.minE) {
-
-      // Zero.
-      x.e = 0;
-      x.d = [0];
-      // Ctor.underflow = true;
-    } // else Ctor.underflow = false;
-  }
-
-  return x;
-}
-
-
-function finiteToString(x, isExp, sd) {
-  if (!x.isFinite()) return nonFiniteToString(x);
-  var k,
-    e = x.e,
-    str = digitsToString(x.d),
-    len = str.length;
-
-  if (isExp) {
-    if (sd && (k = sd - len) > 0) {
-      str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k);
-    } else if (len > 1) {
-      str = str.charAt(0) + '.' + str.slice(1);
-    }
-
-    str = str + (x.e < 0 ? 'e' : 'e+') + x.e;
-  } else if (e < 0) {
-    str = '0.' + getZeroString(-e - 1) + str;
-    if (sd && (k = sd - len) > 0) str += getZeroString(k);
-  } else if (e >= len) {
-    str += getZeroString(e + 1 - len);
-    if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k);
-  } else {
-    if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k);
-    if (sd && (k = sd - len) > 0) {
-      if (e + 1 === len) str += '.';
-      str += getZeroString(k);
-    }
-  }
-
-  return str;
-}
-
-
-// Calculate the base 10 exponent from the base 1e7 exponent.
-function getBase10Exponent(digits, e) {
-  var w = digits[0];
-
-  // Add the number of digits of the first word of the digits array.
-  for ( e *= LOG_BASE; w >= 10; w /= 10) e++;
-  return e;
-}
-
-
-function getLn10(Ctor, sd, pr) {
-  if (sd > LN10_PRECISION) {
-
-    // Reset global state in case the exception is caught.
-    external = true;
-    if (pr) Ctor.precision = pr;
-    throw Error(precisionLimitExceeded);
-  }
-  return finalise(new Ctor(LN10), sd, 1, true);
-}
-
-
-function getPi(Ctor, sd, rm) {
-  if (sd > PI_PRECISION) throw Error(precisionLimitExceeded);
-  return finalise(new Ctor(PI), sd, rm, true);
-}
-
-
-function getPrecision(digits) {
-  var w = digits.length - 1,
-    len = w * LOG_BASE + 1;
-
-  w = digits[w];
-
-  // If non-zero...
-  if (w) {
-
-    // Subtract the number of trailing zeros of the last word.
-    for (; w % 10 == 0; w /= 10) len--;
-
-    // Add the number of digits of the first word.
-    for (w = digits[0]; w >= 10; w /= 10) len++;
-  }
-
-  return len;
-}
-
-
-function getZeroString(k) {
-  var zs = '';
-  for (; k--;) zs += '0';
-  return zs;
-}
-
-
-/*
- * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an
- * integer of type number.
- *
- * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`.
- *
- */
-function intPow(Ctor, x, n, pr) {
-  var isTruncated,
-    r = new Ctor(1),
-
-    // Max n of 9007199254740991 takes 53 loop iterations.
-    // Maximum digits array length; leaves [28, 34] guard digits.
-    k = Math.ceil(pr / LOG_BASE + 4);
-
-  external = false;
-
-  for (;;) {
-    if (n % 2) {
-      r = r.times(x);
-      if (truncate(r.d, k)) isTruncated = true;
-    }
-
-    n = mathfloor(n / 2);
-    if (n === 0) {
-
-      // To ensure correct rounding when r.d is truncated, increment the last word if it is zero.
-      n = r.d.length - 1;
-      if (isTruncated && r.d[n] === 0) ++r.d[n];
-      break;
-    }
-
-    x = x.times(x);
-    truncate(x.d, k);
-  }
-
-  external = true;
-
-  return r;
-}
-
-
-function isOdd(n) {
-  return n.d[n.d.length - 1] & 1;
-}
-
-
-/*
- * Handle `max` and `min`. `ltgt` is 'lt' or 'gt'.
- */
-function maxOrMin(Ctor, args, ltgt) {
-  var y,
-    x = new Ctor(args[0]),
-    i = 0;
-
-  for (; ++i < args.length;) {
-    y = new Ctor(args[i]);
-    if (!y.s) {
-      x = y;
-      break;
-    } else if (x[ltgt](y)) {
-      x = y;
-    }
-  }
-
-  return x;
-}
-
-
-/*
- * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant
- * digits.
- *
- * Taylor/Maclaurin series.
- *
- * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...
- *
- * Argument reduction:
- *   Repeat x = x / 32, k += 5, until |x| < 0.1
- *   exp(x) = exp(x / 2^k)^(2^k)
- *
- * Previously, the argument was initially reduced by
- * exp(x) = exp(r) * 10^k  where r = x - k * ln10, k = floor(x / ln10)
- * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was
- * found to be slower than just dividing repeatedly by 32 as above.
- *
- * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000
- * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000
- * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)
- *
- *  exp(Infinity)  = Infinity
- *  exp(-Infinity) = 0
- *  exp(NaN)       = NaN
- *  exp(±0)        = 1
- *
- *  exp(x) is non-terminating for any finite, non-zero x.
- *
- *  The result will always be correctly rounded.
- *
- */
-function naturalExponential(x, sd) {
-  var denominator, guard, j, pow, sum, t, wpr,
-    rep = 0,
-    i = 0,
-    k = 0,
-    Ctor = x.constructor,
-    rm = Ctor.rounding,
-    pr = Ctor.precision;
-
-  // 0/NaN/Infinity?
-  if (!x.d || !x.d[0] || x.e > 17) {
-
-    return new Ctor(x.d
-      ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0
-      : x.s ? x.s < 0 ? 0 : x : 0 / 0);
-  }
-
-  if (sd == null) {
-    external = false;
-    wpr = pr;
-  } else {
-    wpr = sd;
-  }
-
-  t = new Ctor(0.03125);
-
-  // while abs(x) >= 0.1
-  while (x.e > -2) {
-
-    // x = x / 2^5
-    x = x.times(t);
-    k += 5;
-  }
-
-  // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision
-  // necessary to ensure the first 4 rounding digits are correct.
-  guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0;
-  wpr += guard;
-  denominator = pow = sum = new Ctor(1);
-  Ctor.precision = wpr;
-
-  for (;;) {
-    pow = finalise(pow.times(x), wpr, 1);
-    denominator = denominator.times(++i);
-    t = sum.plus(divide(pow, denominator, wpr, 1));
-
-    if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {
-      j = k;
-      while (j--) sum = finalise(sum.times(sum), wpr, 1);
-
-      // Check to see if the first 4 rounding digits are [49]999.
-      // If so, repeat the summation with a higher precision, otherwise
-      // e.g. with precision: 18, rounding: 1
-      // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123)
-      // `wpr - guard` is the index of first rounding digit.
-      if (sd == null) {
-
-        if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {
-          Ctor.precision = wpr += 10;
-          denominator = pow = t = new Ctor(1);
-          i = 0;
-          rep++;
-        } else {
-          return finalise(sum, Ctor.precision = pr, rm, external = true);
-        }
-      } else {
-        Ctor.precision = pr;
-        return sum;
-      }
-    }
-
-    sum = t;
-  }
-}
-
-
-/*
- * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant
- * digits.
- *
- *  ln(-n)        = NaN
- *  ln(0)         = -Infinity
- *  ln(-0)        = -Infinity
- *  ln(1)         = 0
- *  ln(Infinity)  = Infinity
- *  ln(-Infinity) = NaN
- *  ln(NaN)       = NaN
- *
- *  ln(n) (n != 1) is non-terminating.
- *
- */
-function naturalLogarithm(y, sd) {
-  var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2,
-    n = 1,
-    guard = 10,
-    x = y,
-    xd = x.d,
-    Ctor = x.constructor,
-    rm = Ctor.rounding,
-    pr = Ctor.precision;
-
-  // Is x negative or Infinity, NaN, 0 or 1?
-  if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) {
-    return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x);
-  }
-
-  if (sd == null) {
-    external = false;
-    wpr = pr;
-  } else {
-    wpr = sd;
-  }
-
-  Ctor.precision = wpr += guard;
-  c = digitsToString(xd);
-  c0 = c.charAt(0);
-
-  if (Math.abs(e = x.e) < 1.5e15) {
-
-    // Argument reduction.
-    // The series converges faster the closer the argument is to 1, so using
-    // ln(a^b) = b * ln(a),   ln(a) = ln(a^b) / b
-    // multiply the argument by itself until the leading digits of the significand are 7, 8, 9,
-    // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can
-    // later be divided by this number, then separate out the power of 10 using
-    // ln(a*10^b) = ln(a) + b*ln(10).
-
-    // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14).
-    //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) {
-    // max n is 6 (gives 0.7 - 1.3)
-    while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) {
-      x = x.times(y);
-      c = digitsToString(x.d);
-      c0 = c.charAt(0);
-      n++;
-    }
-
-    e = x.e;
-
-    if (c0 > 1) {
-      x = new Ctor('0.' + c);
-      e++;
-    } else {
-      x = new Ctor(c0 + '.' + c.slice(1));
-    }
-  } else {
-
-    // The argument reduction method above may result in overflow if the argument y is a massive
-    // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this
-    // function using ln(x*10^e) = ln(x) + e*ln(10).
-    t = getLn10(Ctor, wpr + 2, pr).times(e + '');
-    x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t);
-    Ctor.precision = pr;
-
-    return sd == null ? finalise(x, pr, rm, external = true) : x;
-  }
-
-  // x1 is x reduced to a value near 1.
-  x1 = x;
-
-  // Taylor series.
-  // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...)
-  // where x = (y - 1)/(y + 1)    (|x| < 1)
-  sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1);
-  x2 = finalise(x.times(x), wpr, 1);
-  denominator = 3;
-
-  for (;;) {
-    numerator = finalise(numerator.times(x2), wpr, 1);
-    t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1));
-
-    if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {
-      sum = sum.times(2);
-
-      // Reverse the argument reduction. Check that e is not 0 because, besides preventing an
-      // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0.
-      if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ''));
-      sum = divide(sum, new Ctor(n), wpr, 1);
-
-      // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has
-      // been repeated previously) and the first 4 rounding digits 9999?
-      // If so, restart the summation with a higher precision, otherwise
-      // e.g. with precision: 12, rounding: 1
-      // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463.
-      // `wpr - guard` is the index of first rounding digit.
-      if (sd == null) {
-        if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {
-          Ctor.precision = wpr += guard;
-          t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1);
-          x2 = finalise(x.times(x), wpr, 1);
-          denominator = rep = 1;
-        } else {
-          return finalise(sum, Ctor.precision = pr, rm, external = true);
-        }
-      } else {
-        Ctor.precision = pr;
-        return sum;
-      }
-    }
-
-    sum = t;
-    denominator += 2;
-  }
-}
-
-
-// ±Infinity, NaN.
-function nonFiniteToString(x) {
-  // Unsigned.
-  return String(x.s * x.s / 0);
-}
-
-
-/*
- * Parse the value of a new Decimal `x` from string `str`.
- */
-function parseDecimal(x, str) {
-  var e, i, len;
-
-  // Decimal point?
-  if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');
-
-  // Exponential form?
-  if ((i = str.search(/e/i)) > 0) {
-
-    // Determine exponent.
-    if (e < 0) e = i;
-    e += +str.slice(i + 1);
-    str = str.substring(0, i);
-  } else if (e < 0) {
-
-    // Integer.
-    e = str.length;
-  }
-
-  // Determine leading zeros.
-  for (i = 0; str.charCodeAt(i) === 48; i++);
-
-  // Determine trailing zeros.
-  for (len = str.length; str.charCodeAt(len - 1) === 48; --len);
-  str = str.slice(i, len);
-
-  if (str) {
-    len -= i;
-    x.e = e = e - i - 1;
-    x.d = [];
-
-    // Transform base
-
-    // e is the base 10 exponent.
-    // i is where to slice str to get the first word of the digits array.
-    i = (e + 1) % LOG_BASE;
-    if (e < 0) i += LOG_BASE;
-
-    if (i < len) {
-      if (i) x.d.push(+str.slice(0, i));
-      for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));
-      str = str.slice(i);
-      i = LOG_BASE - str.length;
-    } else {
-      i -= len;
-    }
-
-    for (; i--;) str += '0';
-    x.d.push(+str);
-
-    if (external) {
-
-      // Overflow?
-      if (x.e > x.constructor.maxE) {
-
-        // Infinity.
-        x.d = null;
-        x.e = NaN;
-
-      // Underflow?
-      } else if (x.e < x.constructor.minE) {
-
-        // Zero.
-        x.e = 0;
-        x.d = [0];
-        // x.constructor.underflow = true;
-      } // else x.constructor.underflow = false;
-    }
-  } else {
-
-    // Zero.
-    x.e = 0;
-    x.d = [0];
-  }
-
-  return x;
-}
-
-
-/*
- * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value.
- */
-function parseOther(x, str) {
-  var base, Ctor, divisor, i, isFloat, len, p, xd, xe;
-
-  if (str.indexOf('_') > -1) {
-    str = str.replace(/(\d)_(?=\d)/g, '$1');
-    if (isDecimal.test(str)) return parseDecimal(x, str);
-  } else if (str === 'Infinity' || str === 'NaN') {
-    if (!+str) x.s = NaN;
-    x.e = NaN;
-    x.d = null;
-    return x;
-  }
-
-  if (isHex.test(str))  {
-    base = 16;
-    str = str.toLowerCase();
-  } else if (isBinary.test(str))  {
-    base = 2;
-  } else if (isOctal.test(str))  {
-    base = 8;
-  } else {
-    throw Error(invalidArgument + str);
-  }
-
-  // Is there a binary exponent part?
-  i = str.search(/p/i);
-
-  if (i > 0) {
-    p = +str.slice(i + 1);
-    str = str.substring(2, i);
-  } else {
-    str = str.slice(2);
-  }
-
-  // Convert `str` as an integer then divide the result by `base` raised to a power such that the
-  // fraction part will be restored.
-  i = str.indexOf('.');
-  isFloat = i >= 0;
-  Ctor = x.constructor;
-
-  if (isFloat) {
-    str = str.replace('.', '');
-    len = str.length;
-    i = len - i;
-
-    // log[10](16) = 1.2041... , log[10](88) = 1.9444....
-    divisor = intPow(Ctor, new Ctor(base), i, i * 2);
-  }
-
-  xd = convertBase(str, base, BASE);
-  xe = xd.length - 1;
-
-  // Remove trailing zeros.
-  for (i = xe; xd[i] === 0; --i) xd.pop();
-  if (i < 0) return new Ctor(x.s * 0);
-  x.e = getBase10Exponent(xd, xe);
-  x.d = xd;
-  external = false;
-
-  // At what precision to perform the division to ensure exact conversion?
-  // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount)
-  // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412
-  // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits.
-  // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount
-  // Therefore using 4 * the number of digits of str will always be enough.
-  if (isFloat) x = divide(x, divisor, len * 4);
-
-  // Multiply by the binary exponent part if present.
-  if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p));
-  external = true;
-
-  return x;
-}
-
-
-/*
- * sin(x) = x - x^3/3! + x^5/5! - ...
- * |x| < pi/2
- *
- */
-function sine(Ctor, x) {
-  var k,
-    len = x.d.length;
-
-  if (len < 3) {
-    return x.isZero() ? x : taylorSeries(Ctor, 2, x, x);
-  }
-
-  // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x)
-  // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5)
-  // and  sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20))
-
-  // Estimate the optimum number of times to use the argument reduction.
-  k = 1.4 * Math.sqrt(len);
-  k = k > 16 ? 16 : k | 0;
-
-  x = x.times(1 / tinyPow(5, k));
-  x = taylorSeries(Ctor, 2, x, x);
-
-  // Reverse argument reduction
-  var sin2_x,
-    d5 = new Ctor(5),
-    d16 = new Ctor(16),
-    d20 = new Ctor(20);
-  for (; k--;) {
-    sin2_x = x.times(x);
-    x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20))));
-  }
-
-  return x;
-}
-
-
-// Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`.
-function taylorSeries(Ctor, n, x, y, isHyperbolic) {
-  var j, t, u, x2,
-    i = 1,
-    pr = Ctor.precision,
-    k = Math.ceil(pr / LOG_BASE);
-
-  external = false;
-  x2 = x.times(x);
-  u = new Ctor(y);
-
-  for (;;) {
-    t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1);
-    u = isHyperbolic ? y.plus(t) : y.minus(t);
-    y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1);
-    t = u.plus(y);
-
-    if (t.d[k] !== void 0) {
-      for (j = k; t.d[j] === u.d[j] && j--;);
-      if (j == -1) break;
-    }
-
-    j = u;
-    u = y;
-    y = t;
-    t = j;
-    i++;
-  }
-
-  external = true;
-  t.d.length = k + 1;
-
-  return t;
-}
-
-
-// Exponent e must be positive and non-zero.
-function tinyPow(b, e) {
-  var n = b;
-  while (--e) n *= b;
-  return n;
-}
-
-
-// Return the absolute value of `x` reduced to less than or equal to half pi.
-function toLessThanHalfPi(Ctor, x) {
-  var t,
-    isNeg = x.s < 0,
-    pi = getPi(Ctor, Ctor.precision, 1),
-    halfPi = pi.times(0.5);
-
-  x = x.abs();
-
-  if (x.lte(halfPi)) {
-    quadrant = isNeg ? 4 : 1;
-    return x;
-  }
-
-  t = x.divToInt(pi);
-
-  if (t.isZero()) {
-    quadrant = isNeg ? 3 : 2;
-  } else {
-    x = x.minus(t.times(pi));
-
-    // 0 <= x < pi
-    if (x.lte(halfPi)) {
-      quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1);
-      return x;
-    }
-
-    quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2);
-  }
-
-  return x.minus(pi).abs();
-}
-
-
-/*
- * Return the value of Decimal `x` as a string in base `baseOut`.
- *
- * If the optional `sd` argument is present include a binary exponent suffix.
- */
-function toStringBinary(x, baseOut, sd, rm) {
-  var base, e, i, k, len, roundUp, str, xd, y,
-    Ctor = x.constructor,
-    isExp = sd !== void 0;
-
-  if (isExp) {
-    checkInt32(sd, 1, MAX_DIGITS);
-    if (rm === void 0) rm = Ctor.rounding;
-    else checkInt32(rm, 0, 8);
-  } else {
-    sd = Ctor.precision;
-    rm = Ctor.rounding;
-  }
-
-  if (!x.isFinite()) {
-    str = nonFiniteToString(x);
-  } else {
-    str = finiteToString(x);
-    i = str.indexOf('.');
-
-    // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required:
-    // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10))
-    // minBinaryExponent = floor(decimalExponent * log[2](10))
-    // log[2](10) = 3.321928094887362347870319429489390175864
-
-    if (isExp) {
-      base = 2;
-      if (baseOut == 16) {
-        sd = sd * 4 - 3;
-      } else if (baseOut == 8) {
-        sd = sd * 3 - 2;
-      }
-    } else {
-      base = baseOut;
-    }
-
-    // Convert the number as an integer then divide the result by its base raised to a power such
-    // that the fraction part will be restored.
-
-    // Non-integer.
-    if (i >= 0) {
-      str = str.replace('.', '');
-      y = new Ctor(1);
-      y.e = str.length - i;
-      y.d = convertBase(finiteToString(y), 10, base);
-      y.e = y.d.length;
-    }
-
-    xd = convertBase(str, 10, base);
-    e = len = xd.length;
-
-    // Remove trailing zeros.
-    for (; xd[--len] == 0;) xd.pop();
-
-    if (!xd[0]) {
-      str = isExp ? '0p+0' : '0';
-    } else {
-      if (i < 0) {
-        e--;
-      } else {
-        x = new Ctor(x);
-        x.d = xd;
-        x.e = e;
-        x = divide(x, y, sd, rm, 0, base);
-        xd = x.d;
-        e = x.e;
-        roundUp = inexact;
-      }
-
-      // The rounding digit, i.e. the digit after the digit that may be rounded up.
-      i = xd[sd];
-      k = base / 2;
-      roundUp = roundUp || xd[sd + 1] !== void 0;
-
-      roundUp = rm < 4
-        ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2))
-        : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 ||
-          rm === (x.s < 0 ? 8 : 7));
-
-      xd.length = sd;
-
-      if (roundUp) {
-
-        // Rounding up may mean the previous digit has to be rounded up and so on.
-        for (; ++xd[--sd] > base - 1;) {
-          xd[sd] = 0;
-          if (!sd) {
-            ++e;
-            xd.unshift(1);
-          }
-        }
-      }
-
-      // Determine trailing zeros.
-      for (len = xd.length; !xd[len - 1]; --len);
-
-      // E.g. [4, 11, 15] becomes 4bf.
-      for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]);
-
-      // Add binary exponent suffix?
-      if (isExp) {
-        if (len > 1) {
-          if (baseOut == 16 || baseOut == 8) {
-            i = baseOut == 16 ? 4 : 3;
-            for (--len; len % i; len++) str += '0';
-            xd = convertBase(str, base, baseOut);
-            for (len = xd.length; !xd[len - 1]; --len);
-
-            // xd[0] will always be be 1
-            for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]);
-          } else {
-            str = str.charAt(0) + '.' + str.slice(1);
-          }
-        }
-
-        str =  str + (e < 0 ? 'p' : 'p+') + e;
-      } else if (e < 0) {
-        for (; ++e;) str = '0' + str;
-        str = '0.' + str;
-      } else {
-        if (++e > len) for (e -= len; e-- ;) str += '0';
-        else if (e < len) str = str.slice(0, e) + '.' + str.slice(e);
-      }
-    }
-
-    str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str;
-  }
-
-  return x.s < 0 ? '-' + str : str;
-}
-
-
-// Does not strip trailing zeros.
-function truncate(arr, len) {
-  if (arr.length > len) {
-    arr.length = len;
-    return true;
-  }
-}
-
-
-// Decimal methods
-
-
-/*
- *  abs
- *  acos
- *  acosh
- *  add
- *  asin
- *  asinh
- *  atan
- *  atanh
- *  atan2
- *  cbrt
- *  ceil
- *  clamp
- *  clone
- *  config
- *  cos
- *  cosh
- *  div
- *  exp
- *  floor
- *  hypot
- *  ln
- *  log
- *  log2
- *  log10
- *  max
- *  min
- *  mod
- *  mul
- *  pow
- *  random
- *  round
- *  set
- *  sign
- *  sin
- *  sinh
- *  sqrt
- *  sub
- *  sum
- *  tan
- *  tanh
- *  trunc
- */
-
-
-/*
- * Return a new Decimal whose value is the absolute value of `x`.
- *
- * x {number|string|Decimal}
- *
- */
-function abs(x) {
-  return new this(x).abs();
-}
-
-
-/*
- * Return a new Decimal whose value is the arccosine in radians of `x`.
- *
- * x {number|string|Decimal}
- *
- */
-function acos(x) {
-  return new this(x).acos();
-}
-
-
-/*
- * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to
- * `precision` significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal} A value in radians.
- *
- */
-function acosh(x) {
-  return new this(x).acosh();
-}
-
-
-/*
- * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant
- * digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- * y {number|string|Decimal}
- *
- */
-function add(x, y) {
-  return new this(x).plus(y);
-}
-
-
-/*
- * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- *
- */
-function asin(x) {
-  return new this(x).asin();
-}
-
-
-/*
- * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to
- * `precision` significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal} A value in radians.
- *
- */
-function asinh(x) {
-  return new this(x).asinh();
-}
-
-
-/*
- * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- *
- */
-function atan(x) {
-  return new this(x).atan();
-}
-
-
-/*
- * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to
- * `precision` significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal} A value in radians.
- *
- */
-function atanh(x) {
-  return new this(x).atanh();
-}
-
-
-/*
- * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi
- * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`.
- *
- * Domain: [-Infinity, Infinity]
- * Range: [-pi, pi]
- *
- * y {number|string|Decimal} The y-coordinate.
- * x {number|string|Decimal} The x-coordinate.
- *
- * atan2(±0, -0)               = ±pi
- * atan2(±0, +0)               = ±0
- * atan2(±0, -x)               = ±pi for x > 0
- * atan2(±0, x)                = ±0 for x > 0
- * atan2(-y, ±0)               = -pi/2 for y > 0
- * atan2(y, ±0)                = pi/2 for y > 0
- * atan2(±y, -Infinity)        = ±pi for finite y > 0
- * atan2(±y, +Infinity)        = ±0 for finite y > 0
- * atan2(±Infinity, x)         = ±pi/2 for finite x
- * atan2(±Infinity, -Infinity) = ±3*pi/4
- * atan2(±Infinity, +Infinity) = ±pi/4
- * atan2(NaN, x) = NaN
- * atan2(y, NaN) = NaN
- *
- */
-function atan2(y, x) {
-  y = new this(y);
-  x = new this(x);
-  var r,
-    pr = this.precision,
-    rm = this.rounding,
-    wpr = pr + 4;
-
-  // Either NaN
-  if (!y.s || !x.s) {
-    r = new this(NaN);
-
-  // Both ±Infinity
-  } else if (!y.d && !x.d) {
-    r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75);
-    r.s = y.s;
-
-  // x is ±Infinity or y is ±0
-  } else if (!x.d || y.isZero()) {
-    r = x.s < 0 ? getPi(this, pr, rm) : new this(0);
-    r.s = y.s;
-
-  // y is ±Infinity or x is ±0
-  } else if (!y.d || x.isZero()) {
-    r = getPi(this, wpr, 1).times(0.5);
-    r.s = y.s;
-
-  // Both non-zero and finite
-  } else if (x.s < 0) {
-    this.precision = wpr;
-    this.rounding = 1;
-    r = this.atan(divide(y, x, wpr, 1));
-    x = getPi(this, wpr, 1);
-    this.precision = pr;
-    this.rounding = rm;
-    r = y.s < 0 ? r.minus(x) : r.plus(x);
-  } else {
-    r = this.atan(divide(y, x, wpr, 1));
-  }
-
-  return r;
-}
-
-
-/*
- * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant
- * digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- *
- */
-function cbrt(x) {
-  return new this(x).cbrt();
-}
-
-
-/*
- * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`.
- *
- * x {number|string|Decimal}
- *
- */
-function ceil(x) {
-  return finalise(x = new this(x), x.e + 1, 2);
-}
-
-
-/*
- * Return a new Decimal whose value is `x` clamped to the range delineated by `min` and `max`.
- *
- * x {number|string|Decimal}
- * min {number|string|Decimal}
- * max {number|string|Decimal}
- *
- */
-function clamp(x, min, max) {
-  return new this(x).clamp(min, max);
-}
-
-
-/*
- * Configure global settings for a Decimal constructor.
- *
- * `obj` is an object with one or more of the following properties,
- *
- *   precision  {number}
- *   rounding   {number}
- *   toExpNeg   {number}
- *   toExpPos   {number}
- *   maxE       {number}
- *   minE       {number}
- *   modulo     {number}
- *   crypto     {boolean|number}
- *   defaults   {true}
- *
- * E.g. Decimal.config({ precision: 20, rounding: 4 })
- *
- */
-function config(obj) {
-  if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected');
-  var i, p, v,
-    useDefaults = obj.defaults === true,
-    ps = [
-      'precision', 1, MAX_DIGITS,
-      'rounding', 0, 8,
-      'toExpNeg', -EXP_LIMIT, 0,
-      'toExpPos', 0, EXP_LIMIT,
-      'maxE', 0, EXP_LIMIT,
-      'minE', -EXP_LIMIT, 0,
-      'modulo', 0, 9
-    ];
-
-  for (i = 0; i < ps.length; i += 3) {
-    if (p = ps[i], useDefaults) this[p] = DEFAULTS[p];
-    if ((v = obj[p]) !== void 0) {
-      if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;
-      else throw Error(invalidArgument + p + ': ' + v);
-    }
-  }
-
-  if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p];
-  if ((v = obj[p]) !== void 0) {
-    if (v === true || v === false || v === 0 || v === 1) {
-      if (v) {
-        if (typeof crypto != 'undefined' && crypto &&
-          (crypto.getRandomValues || crypto.randomBytes)) {
-          this[p] = true;
-        } else {
-          throw Error(cryptoUnavailable);
-        }
-      } else {
-        this[p] = false;
-      }
-    } else {
-      throw Error(invalidArgument + p + ': ' + v);
-    }
-  }
-
-  return this;
-}
-
-
-/*
- * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant
- * digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal} A value in radians.
- *
- */
-function cos(x) {
-  return new this(x).cos();
-}
-
-
-/*
- * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision
- * significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal} A value in radians.
- *
- */
-function cosh(x) {
-  return new this(x).cosh();
-}
-
-
-/*
- * Create and return a Decimal constructor with the same configuration properties as this Decimal
- * constructor.
- *
- */
-function clone(obj) {
-  var i, p, ps;
-
-  /*
-   * The Decimal constructor and exported function.
-   * Return a new Decimal instance.
-   *
-   * v {number|string|Decimal} A numeric value.
-   *
-   */
-  function Decimal(v) {
-    var e, i, t,
-      x = this;
-
-    // Decimal called without new.
-    if (!(x instanceof Decimal)) return new Decimal(v);
-
-    // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor
-    // which points to Object.
-    x.constructor = Decimal;
-
-    // Duplicate.
-    if (isDecimalInstance(v)) {
-      x.s = v.s;
-
-      if (external) {
-        if (!v.d || v.e > Decimal.maxE) {
-
-          // Infinity.
-          x.e = NaN;
-          x.d = null;
-        } else if (v.e < Decimal.minE) {
-
-          // Zero.
-          x.e = 0;
-          x.d = [0];
-        } else {
-          x.e = v.e;
-          x.d = v.d.slice();
-        }
-      } else {
-        x.e = v.e;
-        x.d = v.d ? v.d.slice() : v.d;
-      }
-
-      return;
-    }
-
-    t = typeof v;
-
-    if (t === 'number') {
-      if (v === 0) {
-        x.s = 1 / v < 0 ? -1 : 1;
-        x.e = 0;
-        x.d = [0];
-        return;
-      }
-
-      if (v < 0) {
-        v = -v;
-        x.s = -1;
-      } else {
-        x.s = 1;
-      }
-
-      // Fast path for small integers.
-      if (v === ~~v && v < 1e7) {
-        for (e = 0, i = v; i >= 10; i /= 10) e++;
-
-        if (external) {
-          if (e > Decimal.maxE) {
-            x.e = NaN;
-            x.d = null;
-          } else if (e < Decimal.minE) {
-            x.e = 0;
-            x.d = [0];
-          } else {
-            x.e = e;
-            x.d = [v];
-          }
-        } else {
-          x.e = e;
-          x.d = [v];
-        }
-
-        return;
-
-      // Infinity, NaN.
-      } else if (v * 0 !== 0) {
-        if (!v) x.s = NaN;
-        x.e = NaN;
-        x.d = null;
-        return;
-      }
-
-      return parseDecimal(x, v.toString());
-
-    } else if (t !== 'string') {
-      throw Error(invalidArgument + v);
-    }
-
-    // Minus sign?
-    if ((i = v.charCodeAt(0)) === 45) {
-      v = v.slice(1);
-      x.s = -1;
-    } else {
-      // Plus sign?
-      if (i === 43) v = v.slice(1);
-      x.s = 1;
-    }
-
-    return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);
-  }
-
-  Decimal.prototype = P;
-
-  Decimal.ROUND_UP = 0;
-  Decimal.ROUND_DOWN = 1;
-  Decimal.ROUND_CEIL = 2;
-  Decimal.ROUND_FLOOR = 3;
-  Decimal.ROUND_HALF_UP = 4;
-  Decimal.ROUND_HALF_DOWN = 5;
-  Decimal.ROUND_HALF_EVEN = 6;
-  Decimal.ROUND_HALF_CEIL = 7;
-  Decimal.ROUND_HALF_FLOOR = 8;
-  Decimal.EUCLID = 9;
-
-  Decimal.config = Decimal.set = config;
-  Decimal.clone = clone;
-  Decimal.isDecimal = isDecimalInstance;
-
-  Decimal.abs = abs;
-  Decimal.acos = acos;
-  Decimal.acosh = acosh;        // ES6
-  Decimal.add = add;
-  Decimal.asin = asin;
-  Decimal.asinh = asinh;        // ES6
-  Decimal.atan = atan;
-  Decimal.atanh = atanh;        // ES6
-  Decimal.atan2 = atan2;
-  Decimal.cbrt = cbrt;          // ES6
-  Decimal.ceil = ceil;
-  Decimal.clamp = clamp;
-  Decimal.cos = cos;
-  Decimal.cosh = cosh;          // ES6
-  Decimal.div = div;
-  Decimal.exp = exp;
-  Decimal.floor = floor;
-  Decimal.hypot = hypot;        // ES6
-  Decimal.ln = ln;
-  Decimal.log = log;
-  Decimal.log10 = log10;        // ES6
-  Decimal.log2 = log2;          // ES6
-  Decimal.max = max;
-  Decimal.min = min;
-  Decimal.mod = mod;
-  Decimal.mul = mul;
-  Decimal.pow = pow;
-  Decimal.random = random;
-  Decimal.round = round;
-  Decimal.sign = sign;          // ES6
-  Decimal.sin = sin;
-  Decimal.sinh = sinh;          // ES6
-  Decimal.sqrt = sqrt;
-  Decimal.sub = sub;
-  Decimal.sum = sum;
-  Decimal.tan = tan;
-  Decimal.tanh = tanh;          // ES6
-  Decimal.trunc = trunc;        // ES6
-
-  if (obj === void 0) obj = {};
-  if (obj) {
-    if (obj.defaults !== true) {
-      ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'];
-      for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p];
-    }
-  }
-
-  Decimal.config(obj);
-
-  return Decimal;
-}
-
-
-/*
- * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant
- * digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- * y {number|string|Decimal}
- *
- */
-function div(x, y) {
-  return new this(x).div(y);
-}
-
-
-/*
- * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal} The power to which to raise the base of the natural log.
- *
- */
-function exp(x) {
-  return new this(x).exp();
-}
-
-
-/*
- * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`.
- *
- * x {number|string|Decimal}
- *
- */
-function floor(x) {
-  return finalise(x = new this(x), x.e + 1, 3);
-}
-
-
-/*
- * Return a new Decimal whose value is the square root of the sum of the squares of the arguments,
- * rounded to `precision` significant digits using rounding mode `rounding`.
- *
- * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...)
- *
- * arguments {number|string|Decimal}
- *
- */
-function hypot() {
-  var i, n,
-    t = new this(0);
-
-  external = false;
-
-  for (i = 0; i < arguments.length;) {
-    n = new this(arguments[i++]);
-    if (!n.d) {
-      if (n.s) {
-        external = true;
-        return new this(1 / 0);
-      }
-      t = n;
-    } else if (t.d) {
-      t = t.plus(n.times(n));
-    }
-  }
-
-  external = true;
-
-  return t.sqrt();
-}
-
-
-/*
- * Return true if object is a Decimal instance (where Decimal is any Decimal constructor),
- * otherwise return false.
- *
- */
-function isDecimalInstance(obj) {
-  return obj instanceof Decimal || obj && obj.toStringTag === tag || false;
-}
-
-
-/*
- * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- *
- */
-function ln(x) {
-  return new this(x).ln();
-}
-
-
-/*
- * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base
- * is specified, rounded to `precision` significant digits using rounding mode `rounding`.
- *
- * log[y](x)
- *
- * x {number|string|Decimal} The argument of the logarithm.
- * y {number|string|Decimal} The base of the logarithm.
- *
- */
-function log(x, y) {
-  return new this(x).log(y);
-}
-
-
-/*
- * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- *
- */
-function log2(x) {
-  return new this(x).log(2);
-}
-
-
-/*
- * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- *
- */
-function log10(x) {
-  return new this(x).log(10);
-}
-
-
-/*
- * Return a new Decimal whose value is the maximum of the arguments.
- *
- * arguments {number|string|Decimal}
- *
- */
-function max() {
-  return maxOrMin(this, arguments, 'lt');
-}
-
-
-/*
- * Return a new Decimal whose value is the minimum of the arguments.
- *
- * arguments {number|string|Decimal}
- *
- */
-function min() {
-  return maxOrMin(this, arguments, 'gt');
-}
-
-
-/*
- * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits
- * using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- * y {number|string|Decimal}
- *
- */
-function mod(x, y) {
-  return new this(x).mod(y);
-}
-
-
-/*
- * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant
- * digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- * y {number|string|Decimal}
- *
- */
-function mul(x, y) {
-  return new this(x).mul(y);
-}
-
-
-/*
- * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision
- * significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal} The base.
- * y {number|string|Decimal} The exponent.
- *
- */
-function pow(x, y) {
-  return new this(x).pow(y);
-}
-
-
-/*
- * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with
- * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros
- * are produced).
- *
- * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive.
- *
- */
-function random(sd) {
-  var d, e, k, n,
-    i = 0,
-    r = new this(1),
-    rd = [];
-
-  if (sd === void 0) sd = this.precision;
-  else checkInt32(sd, 1, MAX_DIGITS);
-
-  k = Math.ceil(sd / LOG_BASE);
-
-  if (!this.crypto) {
-    for (; i < k;) rd[i++] = Math.random() * 1e7 | 0;
-
-  // Browsers supporting crypto.getRandomValues.
-  } else if (crypto.getRandomValues) {
-    d = crypto.getRandomValues(new Uint32Array(k));
-
-    for (; i < k;) {
-      n = d[i];
-
-      // 0 <= n < 4294967296
-      // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865).
-      if (n >= 4.29e9) {
-        d[i] = crypto.getRandomValues(new Uint32Array(1))[0];
-      } else {
-
-        // 0 <= n <= 4289999999
-        // 0 <= (n % 1e7) <= 9999999
-        rd[i++] = n % 1e7;
-      }
-    }
-
-  // Node.js supporting crypto.randomBytes.
-  } else if (crypto.randomBytes) {
-
-    // buffer
-    d = crypto.randomBytes(k *= 4);
-
-    for (; i < k;) {
-
-      // 0 <= n < 2147483648
-      n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24);
-
-      // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286).
-      if (n >= 2.14e9) {
-        crypto.randomBytes(4).copy(d, i);
-      } else {
-
-        // 0 <= n <= 2139999999
-        // 0 <= (n % 1e7) <= 9999999
-        rd.push(n % 1e7);
-        i += 4;
-      }
-    }
-
-    i = k / 4;
-  } else {
-    throw Error(cryptoUnavailable);
-  }
-
-  k = rd[--i];
-  sd %= LOG_BASE;
-
-  // Convert trailing digits to zeros according to sd.
-  if (k && sd) {
-    n = mathpow(10, LOG_BASE - sd);
-    rd[i] = (k / n | 0) * n;
-  }
-
-  // Remove trailing words which are zero.
-  for (; rd[i] === 0; i--) rd.pop();
-
-  // Zero?
-  if (i < 0) {
-    e = 0;
-    rd = [0];
-  } else {
-    e = -1;
-
-    // Remove leading words which are zero and adjust exponent accordingly.
-    for (; rd[0] === 0; e -= LOG_BASE) rd.shift();
-
-    // Count the digits of the first word of rd to determine leading zeros.
-    for (k = 1, n = rd[0]; n >= 10; n /= 10) k++;
-
-    // Adjust the exponent for leading zeros of the first word of rd.
-    if (k < LOG_BASE) e -= LOG_BASE - k;
-  }
-
-  r.e = e;
-  r.d = rd;
-
-  return r;
-}
-
-
-/*
- * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`.
- *
- * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL).
- *
- * x {number|string|Decimal}
- *
- */
-function round(x) {
-  return finalise(x = new this(x), x.e + 1, this.rounding);
-}
-
-
-/*
- * Return
- *   1    if x > 0,
- *  -1    if x < 0,
- *   0    if x is 0,
- *  -0    if x is -0,
- *   NaN  otherwise
- *
- * x {number|string|Decimal}
- *
- */
-function sign(x) {
-  x = new this(x);
-  return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;
-}
-
-
-/*
- * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits
- * using rounding mode `rounding`.
- *
- * x {number|string|Decimal} A value in radians.
- *
- */
-function sin(x) {
-  return new this(x).sin();
-}
-
-
-/*
- * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal} A value in radians.
- *
- */
-function sinh(x) {
-  return new this(x).sinh();
-}
-
-
-/*
- * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant
- * digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- *
- */
-function sqrt(x) {
-  return new this(x).sqrt();
-}
-
-
-/*
- * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits
- * using rounding mode `rounding`.
- *
- * x {number|string|Decimal}
- * y {number|string|Decimal}
- *
- */
-function sub(x, y) {
-  return new this(x).sub(y);
-}
-
-
-/*
- * Return a new Decimal whose value is the sum of the arguments, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- * Only the result is rounded, not the intermediate calculations.
- *
- * arguments {number|string|Decimal}
- *
- */
-function sum() {
-  var i = 0,
-    args = arguments,
-    x = new this(args[i]);
-
-  external = false;
-  for (; x.s && ++i < args.length;) x = x.plus(args[i]);
-  external = true;
-
-  return finalise(x, this.precision, this.rounding);
-}
-
-
-/*
- * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant
- * digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal} A value in radians.
- *
- */
-function tan(x) {
-  return new this(x).tan();
-}
-
-
-/*
- * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision`
- * significant digits using rounding mode `rounding`.
- *
- * x {number|string|Decimal} A value in radians.
- *
- */
-function tanh(x) {
-  return new this(x).tanh();
-}
-
-
-/*
- * Return a new Decimal whose value is `x` truncated to an integer.
- *
- * x {number|string|Decimal}
- *
- */
-function trunc(x) {
-  return finalise(x = new this(x), x.e + 1, 1);
-}
-
-
-P[Symbol.for('nodejs.util.inspect.custom')] = P.toString;
-P[Symbol.toStringTag] = 'Decimal';
-
-// Create and configure initial Decimal constructor.
-export var Decimal = P.constructor = clone(DEFAULTS);
-
-// Create the internal constants from their string values.
-LN10 = new Decimal(LN10);
-PI = new Decimal(PI);
-
-export default Decimal;

+ 0 - 40
zbytb/node_modules/decimal.js/package.json

@@ -1,40 +0,0 @@
-{
-  "name": "decimal.js",
-  "description": "An arbitrary-precision Decimal type for JavaScript.",
-  "version": "10.3.1",
-  "keywords": [
-    "arbitrary",
-    "precision",
-    "arithmetic",
-    "big",
-    "number",
-    "decimal",
-    "float",
-    "biginteger",
-    "bigdecimal",
-    "bignumber",
-    "bigint",
-    "bignum"
-  ],
-  "repository" : {
-    "type": "git",
-    "url": "https://github.com/MikeMcl/decimal.js.git"
-  },
-  "main": "decimal",
-  "module": "decimal.mjs",
-  "browser": "decimal.js",
-  "author": {
-    "name": "Michael Mclaughlin",
-    "email": "M8ch88l@gmail.com"
-  },
-  "license": "MIT",
-  "scripts": {
-    "test": "node ./test/test.js"
-  },
-  "types": "decimal.d.ts",
-  "files": [
-    "decimal.js",
-    "decimal.mjs",
-    "decimal.d.ts"
-  ]
-}

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