@ht-sdks/events-sdk-js-browser 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/cjs/generated/version.js +1 -1
  2. package/dist/cjs/lib/tsub/index.js +13 -0
  3. package/dist/cjs/lib/tsub/index.js.map +1 -0
  4. package/dist/cjs/lib/tsub/matchers.js +416 -0
  5. package/dist/cjs/lib/tsub/matchers.js.map +1 -0
  6. package/dist/cjs/lib/tsub/store.js +23 -0
  7. package/dist/cjs/lib/tsub/store.js.map +1 -0
  8. package/dist/cjs/lib/tsub/transformers.js +218 -0
  9. package/dist/cjs/lib/tsub/transformers.js.map +1 -0
  10. package/dist/cjs/lib/tsub/unset.js +20 -0
  11. package/dist/cjs/lib/tsub/unset.js.map +1 -0
  12. package/dist/cjs/plugins/routing-middleware/index.js +1 -1
  13. package/dist/cjs/plugins/routing-middleware/index.js.map +1 -1
  14. package/dist/pkg/generated/version.js +1 -1
  15. package/dist/pkg/lib/tsub/index.js +4 -0
  16. package/dist/pkg/lib/tsub/index.js.map +1 -0
  17. package/dist/pkg/lib/tsub/matchers.js +412 -0
  18. package/dist/pkg/lib/tsub/matchers.js.map +1 -0
  19. package/dist/pkg/lib/tsub/store.js +21 -0
  20. package/dist/pkg/lib/tsub/store.js.map +1 -0
  21. package/dist/pkg/lib/tsub/transformers.js +214 -0
  22. package/dist/pkg/lib/tsub/transformers.js.map +1 -0
  23. package/dist/pkg/lib/tsub/unset.js +15 -0
  24. package/dist/pkg/lib/tsub/unset.js.map +1 -0
  25. package/dist/pkg/plugins/routing-middleware/index.js +1 -1
  26. package/dist/pkg/plugins/routing-middleware/index.js.map +1 -1
  27. package/dist/types/core/buffer/index.d.ts +1 -1
  28. package/dist/types/generated/version.d.ts +1 -1
  29. package/dist/types/lib/tsub/index.d.ts +4 -0
  30. package/dist/types/lib/tsub/index.d.ts.map +1 -0
  31. package/dist/types/lib/tsub/matchers.d.ts +5 -0
  32. package/dist/types/lib/tsub/matchers.d.ts.map +1 -0
  33. package/dist/types/lib/tsub/store.d.ts +22 -0
  34. package/dist/types/lib/tsub/store.d.ts.map +1 -0
  35. package/dist/types/lib/tsub/transformers.d.ts +20 -0
  36. package/dist/types/lib/tsub/transformers.d.ts.map +1 -0
  37. package/dist/types/lib/tsub/unset.d.ts +2 -0
  38. package/dist/types/lib/tsub/unset.d.ts.map +1 -0
  39. package/dist/types/plugins/routing-middleware/index.d.ts +3 -3
  40. package/dist/types/plugins/routing-middleware/index.d.ts.map +1 -1
  41. package/dist/umd/events.min.js +1 -1
  42. package/dist/umd/events.min.js.map +1 -1
  43. package/dist/umd/index.js +1 -1
  44. package/dist/umd/index.js.map +1 -1
  45. package/dist/umd/tsub-middleware.bundle.59e8d6916920ab24b51c.js +2 -0
  46. package/dist/umd/tsub-middleware.bundle.59e8d6916920ab24b51c.js.map +1 -0
  47. package/package.json +3 -2
  48. package/src/generated/version.ts +1 -1
  49. package/src/lib/tsub/README.md +9 -0
  50. package/src/lib/tsub/index.ts +3 -0
  51. package/src/lib/tsub/matchers.ts +498 -0
  52. package/src/lib/tsub/store.ts +42 -0
  53. package/src/lib/tsub/transformers.ts +282 -0
  54. package/src/lib/tsub/unset.ts +14 -0
  55. package/src/plugins/routing-middleware/index.ts +3 -4
  56. package/dist/umd/870.bundle.6d7307379da86a3bf277.js +0 -2
  57. package/dist/umd/870.bundle.6d7307379da86a3bf277.js.map +0 -1
  58. package/dist/umd/tsub-middleware.bundle.a9604b3195f6189e429b.js +0 -2
  59. package/dist/umd/tsub-middleware.bundle.a9604b3195f6189e429b.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"870.bundle.6d7307379da86a3bf277.js","mappings":"qJACA,IAAIA,EAAmBC,MAAQA,KAAKD,iBAAoB,SAAUE,GAC9D,OAAQA,GAAOA,EAAIC,WAAcD,EAAM,CAAE,QAAWA,EACxD,EACAE,OAAOC,eAAeC,EAAS,aAA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AAE,EAAE,EAAEA,GAAGG,OAAOA,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,IAAI,EAAEA,EAAEH,IAAI,IAAIT,KAAKY,GAAGzL,EAAEmL,GAAGnL,EAAE,EAAEyL,EAAE,GAAGN,EAAEM,EAAE,GAAG,IAAIH,EAAE,EAAEA,GAAGF,IAAIE,IAAIG,EAAEH,EAAE,CAAC,IAAI7M,EAAE,GAAG6M,EAAE,IAAI7M,IAAI2M,EAAEE,GAAG,IAAI,GAAG,EAAEA,KAAK,IAAIX,SAAS,IAAI,OAAOlM,CAAC,C","sources":["webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@segment/tsub/dist/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@segment/tsub/dist/matchers.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@segment/tsub/dist/store.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@segment/tsub/dist/transformers.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@segment/tsub/dist/unset.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-float64/lib/float64array.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-float64/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-float64/lib/polyfill.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-uint16/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-uint16/lib/polyfill.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-uint16/lib/uint16array.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-uint32/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-uint32/lib/polyfill.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-uint32/lib/uint32array.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-uint8/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-uint8/lib/polyfill.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/array-uint8/lib/uint8array.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-float64array-support/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-own-property/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-own-property/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-symbol-support/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-tostringtag-support/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-uint16array-support/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-uint32array-support/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-uint8array-support/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-float64array/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-float64array/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-little-endian/lib/ctors.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-little-endian/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-little-endian/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-uint16array/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-uint16array/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-uint32array/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-uint32array/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-uint8array/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/assert-is-uint8array/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-float64-exponent-bias/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-float64-high-word-exponent-mask/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-float64-max-base2-exponent-subnormal/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-float64-max-base2-exponent/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-float64-min-base2-exponent-subnormal/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-float64-ninf/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-float64-pinf/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-float64-smallest-normal/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-uint16-max/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-uint32-max/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/constants-uint8-max/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/math-base-assert-is-infinite/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/math-base-assert-is-infinite/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/math-base-assert-is-nan/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/math-base-assert-is-nan/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/math-base-special-abs/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/math-base-special-abs/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/math-base-special-copysign/lib/copysign.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/math-base-special-copysign/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/math-base-special-ldexp/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/math-base-special-ldexp/lib/ldexp.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-ctor/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-ctor/lib/number.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-exponent/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-exponent/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-from-words/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-from-words/lib/indices.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-from-words/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-get-high-word/lib/high.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-get-high-word/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-get-high-word/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-normalize/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-normalize/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-normalize/lib/normalize.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-to-words/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-to-words/lib/indices.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-to-words/lib/main.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/number-float64-base-to-words/lib/to_words.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/utils-native-class/lib/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/utils-native-class/lib/native_class.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/utils-native-class/lib/polyfill.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/utils-native-class/lib/tostring.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/dlv/dist/dlv.umd.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/dset/dist/index.js","webpack://@ht-sdks/events-sdk-js-browser/../../node_modules/tiny-hashes/md5/index.mjs"],"sourcesContent":["\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Store = exports.matches = exports.transform = void 0;\nvar transformers_1 = require(\"./transformers\");\nObject.defineProperty(exports, \"transform\", { enumerable: true, get: function () { return __importDefault(transformers_1).default; } });\nvar matchers_1 = require(\"./matchers\");\nObject.defineProperty(exports, \"matches\", { enumerable: true, get: function () { return __importDefault(matchers_1).default; } });\nvar store_1 = require(\"./store\");\nObject.defineProperty(exports, \"Store\", { enumerable: true, get: function () { return __importDefault(store_1).default; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar dlv_1 = __importDefault(require(\"dlv\"));\nfunction matches(event, matcher) {\n if (!matcher) {\n throw new Error('No matcher supplied!');\n }\n switch (matcher.type) {\n case 'all':\n return all();\n case 'fql':\n return fql(matcher.ir, event);\n default:\n throw new Error(\"Matcher of type \".concat(matcher.type, \" unsupported.\"));\n }\n}\nexports.default = matches;\nfunction all() {\n return true;\n}\nfunction fql(ir, event) {\n if (!ir) {\n return false;\n }\n try {\n ir = JSON.parse(ir);\n }\n catch (e) {\n throw new Error(\"Failed to JSON.parse FQL intermediate representation \\\"\".concat(ir, \"\\\": \").concat(e));\n }\n var result = fqlEvaluate(ir, event);\n if (typeof result !== 'boolean') {\n // An error was returned, or a lowercase, typeof, or similar function was run alone. Nothing to evaluate.\n return false;\n }\n return result;\n}\n// FQL is 100% type strict in Go. Show no mercy to types which do not comply.\nfunction fqlEvaluate(ir, event) {\n // If the given ir chunk is not an array, then we should check the single given path or value for literally `true`.\n if (!Array.isArray(ir)) {\n return getValue(ir, event) === true;\n }\n // Otherwise, it is a sequence of ordered steps to follow to reach our solution!\n var item = ir[0];\n switch (item) {\n /*** Unary cases ***/\n // '!' => Invert the result\n case '!':\n return !fqlEvaluate(ir[1], event);\n /*** Binary cases ***/\n // 'or' => Any condition being true returns true\n case 'or':\n for (var i = 1; i < ir.length; i++) {\n if (fqlEvaluate(ir[i], event)) {\n return true;\n }\n }\n return false;\n // 'and' => Any condition being false returns false\n case 'and':\n for (var i = 1; i < ir.length; i++) {\n if (!fqlEvaluate(ir[i], event)) {\n return false;\n }\n }\n return true;\n // Equivalence comparisons\n case '=':\n case '!=':\n return compareItems(getValue(ir[1], event), getValue(ir[2], event), item, event);\n // Numerical comparisons\n case '<=':\n case '<':\n case '>':\n case '>=':\n // Compare the two values with the given operator.\n return compareNumbers(getValue(ir[1], event), getValue(ir[2], event), item, event);\n // item in [list]' => Checks whether item is in list\n case 'in':\n return checkInList(getValue(ir[1], event), getValue(ir[2], event), event);\n /*** Functions ***/\n // 'contains(str1, str2)' => The first string has a substring of the second string\n case 'contains':\n return contains(getValue(ir[1], event), getValue(ir[2], event));\n // 'match(str, match)' => The given string matches the provided glob matcher\n case 'match':\n return match(getValue(ir[1], event), getValue(ir[2], event));\n // 'lowercase(str)' => Returns a lowercased string, null if the item is not a string\n case 'lowercase':\n var target = getValue(ir[1], event);\n if (typeof target !== 'string') {\n return null;\n }\n return target.toLowerCase();\n // 'typeof(val)' => Returns the FQL type of the value\n case 'typeof':\n // TODO: Do we need mapping to allow for universal comparisons? e.g. Object -> JSON, Array -> List, Floats?\n return typeof getValue(ir[1], event);\n // 'length(val)' => Returns the length of an array or string, NaN if neither\n case 'length':\n return length(getValue(ir[1], event));\n // If nothing hit, we or the IR messed up somewhere.\n default:\n throw new Error(\"FQL IR could not evaluate for token: \".concat(item));\n }\n}\nfunction getValue(item, event) {\n // If item is an array, leave it as-is.\n if (Array.isArray(item)) {\n return item;\n }\n // If item is an object, it has the form of `{\"value\": VAL}`\n if (typeof item === 'object') {\n return item.value;\n }\n // Otherwise, it's an event path, e.g. \"properties.email\"\n return (0, dlv_1.default)(event, item);\n}\nfunction checkInList(item, list, event) {\n return list.find(function (it) { return getValue(it, event) === item; }) !== undefined;\n}\nfunction compareNumbers(first, second, operator, event) {\n // Check if it's more IR (such as a length() function)\n if (isIR(first)) {\n first = fqlEvaluate(first, event);\n }\n if (isIR(second)) {\n second = fqlEvaluate(second, event);\n }\n if (typeof first !== 'number' || typeof second !== 'number') {\n return false;\n }\n // Reminder: NaN is not comparable to any other number (including NaN) and will always return false as desired.\n switch (operator) {\n // '<=' => The first number is less than or equal to the second.\n case '<=':\n return first <= second;\n // '>=' => The first number is greater than or equal to the second\n case '>=':\n return first >= second;\n // '<' The first number is less than the second.\n case '<':\n return first < second;\n // '>' The first number is greater than the second.\n case '>':\n return first > second;\n default:\n throw new Error(\"Invalid operator in compareNumbers: \".concat(operator));\n }\n}\nfunction compareItems(first, second, operator, event) {\n // Check if it's more IR (such as a lowercase() function)\n if (isIR(first)) {\n first = fqlEvaluate(first, event);\n }\n if (isIR(second)) {\n second = fqlEvaluate(second, event);\n }\n if (typeof first === 'object' && typeof second === 'object') {\n first = JSON.stringify(first);\n second = JSON.stringify(second);\n }\n // Objects with the exact same contents AND order ARE considered identical. (Don't compare by reference)\n // Even in Go, this MUST be the same byte order.\n // e.g. {a: 1, b:2} === {a: 1, b:2} BUT {a:1, b:2} !== {b:2, a:1}\n // Maybe later we'll use a stable stringifier, but we're matching server-side behavior for now.\n switch (operator) {\n // '=' => The two following items are exactly identical\n case '=':\n return first === second;\n // '!=' => The two following items are NOT exactly identical.\n case '!=':\n return first !== second;\n default:\n throw new Error(\"Invalid operator in compareItems: \".concat(operator));\n }\n}\nfunction contains(first, second) {\n if (typeof first !== 'string' || typeof second !== 'string') {\n return false;\n }\n return first.indexOf(second) !== -1;\n}\nfunction match(str, glob) {\n if (typeof str !== 'string' || typeof glob !== 'string') {\n return false;\n }\n return globMatches(glob, str);\n}\nfunction length(item) {\n // Match server-side behavior.\n if (item === null) {\n return 0;\n }\n // Type-check to avoid returning .length of an object\n if (!Array.isArray(item) && typeof item !== 'string') {\n return NaN;\n }\n return item.length;\n}\n// This is a heuristic technically speaking, but should be close enough. The odds of someone trying to test\n// a func with identical IR notation is pretty low.\nfunction isIR(value) {\n // TODO: This can be better checked by checking if this is a {\"value\": THIS}\n if (!Array.isArray(value)) {\n return false;\n }\n // Function checks\n if ((value[0] === 'lowercase' || value[0] === 'length' || value[0] === 'typeof') &&\n value.length === 2) {\n return true;\n }\n if ((value[0] === 'contains' || value[0] === 'match') && value.length === 3) {\n return true;\n }\n return false;\n}\n// Any reputable glob matcher is designed to work on filesystems and doesn't allow the override of the separator\n// character \"/\". This is problematic since our server-side representation e.g. evaluates \"match('ab/c', 'a*)\"\n// as TRUE, whereas any glob matcher for JS available does false. So we're rewriting it here.\n// See: https://github.com/segmentio/glob/blob/master/glob.go\nfunction globMatches(pattern, str) {\n var _a, _b;\n Pattern: while (pattern.length > 0) {\n var star = void 0;\n var chunk = void 0;\n (_a = scanChunk(pattern), star = _a.star, chunk = _a.chunk, pattern = _a.pattern);\n if (star && chunk === '') {\n // Trailing * matches rest of string\n return true;\n }\n // Look for match at current position\n var _c = matchChunk(chunk, str), t = _c.t, ok = _c.ok, err = _c.err;\n if (err) {\n return false;\n }\n // If we're the last chunk, make sure we've exhausted the str\n // otherwise we'll give a false result even if we could still match\n // using the star\n if (ok && (t.length === 0 || pattern.length > 0)) {\n str = t;\n continue;\n }\n if (star) {\n // Look for match, skipping i+1 bytes.\n for (var i = 0; i < str.length; i++) {\n ;\n (_b = matchChunk(chunk, str.slice(i + 1)), t = _b.t, ok = _b.ok, err = _b.err);\n if (ok) {\n // If we're the last chunk, make sure we exhausted the str.\n if (pattern.length === 0 && t.length > 0) {\n continue;\n }\n str = t;\n continue Pattern;\n }\n if (err) {\n return false;\n }\n }\n }\n return false;\n }\n return str.length === 0;\n}\nfunction scanChunk(pattern) {\n var result = {\n star: false,\n chunk: '',\n pattern: '',\n };\n while (pattern.length > 0 && pattern[0] === '*') {\n pattern = pattern.slice(1);\n result.star = true;\n }\n var inRange = false;\n var i;\n Scan: for (i = 0; i < pattern.length; i++) {\n switch (pattern[i]) {\n case '\\\\':\n // Error check handled in matchChunk: bad pattern.\n if (i + 1 < pattern.length) {\n i++;\n }\n break;\n case '[':\n inRange = true;\n break;\n case ']':\n inRange = false;\n break;\n case '*':\n if (!inRange) {\n break Scan;\n }\n }\n }\n result.chunk = pattern.slice(0, i);\n result.pattern = pattern.slice(i);\n return result;\n}\n// matchChunk checks whether chunk matches the beginning of s.\n// If so, it returns the remainder of s (after the match).\n// Chunk is all single-character operators: literals, char classes, and ?.\nfunction matchChunk(chunk, str) {\n var _a, _b;\n var result = {\n t: '',\n ok: false,\n err: false,\n };\n while (chunk.length > 0) {\n if (str.length === 0) {\n return result;\n }\n switch (chunk[0]) {\n case '[':\n var char = str[0];\n str = str.slice(1);\n chunk = chunk.slice(1);\n var notNegated = true;\n if (chunk.length > 0 && chunk[0] === '^') {\n notNegated = false;\n chunk = chunk.slice(1);\n }\n // Parse all ranges\n var foundMatch = false;\n var nRange = 0;\n while (true) {\n if (chunk.length > 0 && chunk[0] === ']' && nRange > 0) {\n chunk = chunk.slice(1);\n break;\n }\n var lo = '';\n var hi = '';\n var err = void 0;\n (_a = getEsc(chunk), lo = _a.char, chunk = _a.newChunk, err = _a.err);\n if (err) {\n return result;\n }\n hi = lo;\n if (chunk[0] === '-') {\n ;\n (_b = getEsc(chunk.slice(1)), hi = _b.char, chunk = _b.newChunk, err = _b.err);\n if (err) {\n return result;\n }\n }\n if (lo <= char && char <= hi) {\n foundMatch = true;\n }\n nRange++;\n }\n if (foundMatch !== notNegated) {\n return result;\n }\n break;\n case '?':\n str = str.slice(1);\n chunk = chunk.slice(1);\n break;\n case '\\\\':\n chunk = chunk.slice(1);\n if (chunk.length === 0) {\n result.err = true;\n return result;\n }\n // Fallthrough, missing break intentional.\n default:\n if (chunk[0] !== str[0]) {\n return result;\n }\n str = str.slice(1);\n chunk = chunk.slice(1);\n }\n }\n result.t = str;\n result.ok = true;\n result.err = false;\n return result;\n}\n// getEsc gets a possibly-escaped character from chunk, for a character class.\nfunction getEsc(chunk) {\n var result = {\n char: '',\n newChunk: '',\n err: false,\n };\n if (chunk.length === 0 || chunk[0] === '-' || chunk[0] === ']') {\n result.err = true;\n return result;\n }\n if (chunk[0] === '\\\\') {\n chunk = chunk.slice(1);\n if (chunk.length === 0) {\n result.err = true;\n return result;\n }\n }\n // Unlike Go, JS strings operate on characters instead of bytes.\n // This is why we aren't copying over the GetRuneFromString stuff.\n result.char = chunk[0];\n result.newChunk = chunk.slice(1);\n if (result.newChunk.length === 0) {\n result.err = true;\n }\n return result;\n}\n//# sourceMappingURL=matchers.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Store = /** @class */ (function () {\n function Store(rules) {\n this.rules = [];\n this.rules = rules || [];\n }\n Store.prototype.getRulesByDestinationName = function (destinationName) {\n var rules = [];\n for (var _i = 0, _a = this.rules; _i < _a.length; _i++) {\n var rule = _a[_i];\n // Rules with no destinationName are global (workspace || workspace::source)\n if (rule.destinationName === destinationName || rule.destinationName === undefined) {\n rules.push(rule);\n }\n }\n return rules;\n };\n return Store;\n}());\nexports.default = Store;\n//# sourceMappingURL=store.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar md5_1 = __importDefault(require(\"tiny-hashes/md5\"));\nvar dlv_1 = __importDefault(require(\"dlv\"));\nvar math_base_special_ldexp_1 = __importDefault(require(\"@stdlib/math-base-special-ldexp\"));\nvar dset_1 = require(\"dset\");\nvar unset_1 = require(\"./unset\");\nfunction transform(payload, transformers) {\n var transformedPayload = payload;\n for (var _i = 0, transformers_1 = transformers; _i < transformers_1.length; _i++) {\n var transformer = transformers_1[_i];\n switch (transformer.type) {\n case 'drop':\n return null;\n case 'drop_properties':\n dropProperties(transformedPayload, transformer.config);\n break;\n case 'allow_properties':\n allowProperties(transformedPayload, transformer.config);\n break;\n case 'sample_event':\n if (sampleEvent(transformedPayload, transformer.config)) {\n break;\n }\n return null;\n case 'map_properties':\n mapProperties(transformedPayload, transformer.config);\n break;\n case 'hash_properties':\n // Not yet supported, but don't throw an error. Just ignore.\n break;\n default:\n throw new Error(\"Transformer of type \\\"\".concat(transformer.type, \"\\\" is unsupported.\"));\n }\n }\n return transformedPayload;\n}\nexports.default = transform;\n// dropProperties removes all specified props from the object.\nfunction dropProperties(payload, config) {\n filterProperties(payload, config.drop, function (matchedObj, dropList) {\n dropList.forEach(function (k) { return delete matchedObj[k]; });\n });\n}\n// allowProperties ONLY allows the specific targets within the keys. (e.g. \"a.foo\": [\"bar\", \"baz\"]\n// on {a: {foo: {bar: 1, baz: 2}, other: 3}} will not have any drops, as it only looks inside a.foo\nfunction allowProperties(payload, config) {\n filterProperties(payload, config.allow, function (matchedObj, preserveList) {\n Object.keys(matchedObj).forEach(function (key) {\n if (!preserveList.includes(key)) {\n delete matchedObj[key];\n }\n });\n });\n}\nfunction filterProperties(payload, ruleSet, filterCb) {\n Object.entries(ruleSet).forEach(function (_a) {\n var key = _a[0], targets = _a[1];\n var filter = function (obj) {\n // Can only act on objects.\n if (typeof obj !== 'object' || obj === null) {\n return;\n }\n filterCb(obj, targets);\n };\n // If key is empty, it refers to the top-level object.\n var matchedObject = key === '' ? payload : (0, dlv_1.default)(payload, key);\n if (Array.isArray(matchedObject)) {\n matchedObject.forEach(filter);\n }\n else {\n filter(matchedObject);\n }\n });\n}\nfunction mapProperties(payload, config) {\n // Some configs might try to modify or read from a field multiple times. We will only ever read\n // values as they were before any modifications began. Thus, if you try to override e.g.\n // {a: {b: 1}} with set(a, 'b', 2) (which results in {a: {b: 2}}) and then try to copy a.b into\n // a.c, you will get {a: {b: 2, c:1}} and NOT {a: {b:2, c:2}}. This prevents map evaluation\n // order from mattering, and === what server-side does.\n // See: https://github.com/segmentio/tsub/blob/661695a63b60b90471796e667458f076af788c19/transformers/map_properties.go#L179-L200\n var initialPayload = JSON.parse(JSON.stringify(payload));\n for (var key in config.map) {\n if (!config.map.hasOwnProperty(key)) {\n continue;\n }\n var actionMap = config.map[key];\n // Can't manipulate non-objects. Check that the parent is one. Strip the last .field\n // from the string.\n var splitKey = key.split('.');\n var parent_1 = void 0;\n if (splitKey.length > 1) {\n splitKey.pop();\n parent_1 = (0, dlv_1.default)(initialPayload, splitKey.join('.'));\n }\n else {\n parent_1 = payload;\n }\n if (typeof parent_1 !== 'object') {\n continue;\n }\n // These actions are exclusive to each other.\n if (actionMap.copy) {\n var valueToCopy = (0, dlv_1.default)(initialPayload, actionMap.copy);\n if (valueToCopy !== undefined) {\n (0, dset_1.dset)(payload, key, valueToCopy);\n }\n }\n else if (actionMap.move) {\n var valueToMove = (0, dlv_1.default)(initialPayload, actionMap.move);\n if (valueToMove !== undefined) {\n (0, dset_1.dset)(payload, key, valueToMove);\n }\n (0, unset_1.unset)(payload, actionMap.move);\n }\n // Have to check only if property exists, as null, undefined, and other vals could be explicitly set.\n else if (actionMap.hasOwnProperty('set')) {\n (0, dset_1.dset)(payload, key, actionMap.set);\n }\n // to_string is not exclusive and can be paired with other actions. Final action.\n if (actionMap.to_string) {\n var valueToString = (0, dlv_1.default)(payload, key);\n // Do not string arrays and objects. Do not double-encode strings.\n if (typeof valueToString === 'string' ||\n (typeof valueToString === 'object' && valueToString !== null)) {\n continue;\n }\n // TODO: Check stringifier in Golang for parity.\n if (valueToString !== undefined) {\n (0, dset_1.dset)(payload, key, JSON.stringify(valueToString));\n }\n else {\n // TODO: Check this behavior.\n (0, dset_1.dset)(payload, key, 'undefined');\n }\n }\n }\n}\nfunction sampleEvent(payload, config) {\n if (config.sample.percent <= 0) {\n return false;\n }\n else if (config.sample.percent >= 1) {\n return true;\n }\n // If we're not filtering deterministically, just use raw percentage.\n if (!config.sample.path) {\n return samplePercent(config.sample.percent);\n }\n // Otherwise, use a deterministic hash.\n return sampleConsistentPercent(payload, config);\n}\nfunction samplePercent(percent) {\n // Math.random returns [0, 1) => 0.0<>0.9999...\n return Math.random() <= percent;\n}\n// sampleConsistentPercent converts an input string of bytes into a consistent uniform\n// continuous distribution of [0.0, 1.0]. This is based on\n// http://mumble.net/~campbell/tmp/random_real.c, but using the digest\n// result of the input value as the random information.\n// IMPORTANT - This function needs to === the Golang implementation to ensure that the two return the same vals!\n// See: https://github.com/segmentio/sampler/blob/65cb04132305a04fcd4bcaef67d57fbe40c30241/sampler.go#L13-L38\n// Since AJS supports IE9+ (typed arrays were introduced in IE10) we're doing some manual array math.\n// This could be done directly with strings, but arrays are easier to reason about/have better function support.\nfunction sampleConsistentPercent(payload, config) {\n var field = (0, dlv_1.default)(payload, config.sample.path);\n // Operate off of JSON bytes. TODO: Validate all type behavior, esp. strings.\n var digest = (0, md5_1.default)(JSON.stringify(field));\n var exponent = -64;\n // Manually maintain 64-bit int as an array.\n var significand = [];\n // Left-shift and OR for first 8 bytes of digest. (8 bytes * 8 = 64 bits)\n consumeDigest(digest.slice(0, 8), significand);\n var leadingZeros = 0;\n for (var i = 0; i < 64; i++) {\n if (significand[i] === 1) {\n break;\n }\n leadingZeros++;\n }\n if (leadingZeros !== 0) {\n // Use the last 8 bytes of the digest, same as before.\n var val = [];\n consumeDigest(digest.slice(9, 16), val);\n exponent -= leadingZeros;\n // Left-shift away leading zeros in significand.\n significand.splice(0, leadingZeros);\n // Right-shift val by 64 minus leading zeros and push into significand.\n val.splice(64 - leadingZeros);\n significand = significand.concat(val);\n }\n // Flip 64th bit\n significand[63] = significand[63] === 0 ? 1 : 0;\n // Convert our manual binary into a JS num (binary arr => binary string => psuedo-int) and run the ldexp!\n return (0, math_base_special_ldexp_1.default)(parseInt(significand.join(''), 2), exponent) < config.sample.percent;\n}\n// Array byte filler helper\nfunction consumeDigest(digest, arr) {\n for (var i = 0; i < 8; i++) {\n var remainder = digest[i];\n for (var binary = 128; binary >= 1; binary /= 2) {\n if (remainder - binary >= 0) {\n remainder -= binary;\n arr.push(1);\n }\n else {\n arr.push(0);\n }\n }\n }\n}\n//# sourceMappingURL=transformers.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unset = void 0;\nvar dlv_1 = __importDefault(require(\"dlv\"));\nfunction unset(obj, prop) {\n if ((0, dlv_1.default)(obj, prop)) {\n var segs = prop.split('.');\n var last = segs.pop();\n while (segs.length && segs[segs.length - 1].slice(-1) === '\\\\') {\n last = segs.pop().slice(0, -1) + '.' + last;\n }\n while (segs.length)\n obj = obj[(prop = segs.shift())];\n return delete obj[last];\n }\n return true;\n}\nexports.unset = unset;\n//# sourceMappingURL=unset.js.map","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Float64Array === 'function' ) ? Float64Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of double-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float64\n*\n* @example\n* var ctor = require( '@stdlib/array-float64' );\n*\n* var arr = new ctor( 10 );\n* // returns <Float64Array>\n*/\n\n// MODULES //\n\nvar hasFloat64ArraySupport = require( '@stdlib/assert-has-float64array-support' );\nvar builtin = require( './float64array.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat64ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of double-precision floating-point numbers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 16-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint16\n*\n* @example\n* var ctor = require( '@stdlib/array-uint16' );\n*\n* var arr = new ctor( 10 );\n* // returns <Uint16Array>\n*/\n\n// MODULES //\n\nvar hasUint16ArraySupport = require( '@stdlib/assert-has-uint16array-support' );\nvar builtin = require( './uint16array.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 16-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint16Array === 'function' ) ? Uint16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 32-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint32\n*\n* @example\n* var ctor = require( '@stdlib/array-uint32' );\n*\n* var arr = new ctor( 10 );\n* // returns <Uint32Array>\n*/\n\n// MODULES //\n\nvar hasUint32ArraySupport = require( '@stdlib/assert-has-uint32array-support' );\nvar builtin = require( './uint32array.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 32-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint32Array === 'function' ) ? Uint32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Typed array constructor which returns a typed array representing an array of 8-bit unsigned integers in the platform byte order.\n*\n* @module @stdlib/array-uint8\n*\n* @example\n* var ctor = require( '@stdlib/array-uint8' );\n*\n* var arr = new ctor( 10 );\n* // returns <Uint8Array>\n*/\n\n// MODULES //\n\nvar hasUint8ArraySupport = require( '@stdlib/assert-has-uint8array-support' );\nvar builtin = require( './uint8array.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// TODO: write polyfill\n\n// MAIN //\n\n/**\n* Typed array which represents an array of 8-bit unsigned integers in the platform byte order.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = polyfill;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar ctor = ( typeof Uint8Array === 'function' ) ? Uint8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = ctor;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Float64Array === 'function' ) ? Float64Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Float64Array` support.\n*\n* @module @stdlib/assert-has-float64array-support\n*\n* @example\n* var hasFloat64ArraySupport = require( '@stdlib/assert-has-float64array-support' );\n*\n* var bool = hasFloat64ArraySupport();\n* // returns <boolean>\n*/\n\n// MODULES //\n\nvar hasFloat64ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isFloat64Array = require( '@stdlib/assert-is-float64array' );\nvar GlobalFloat64Array = require( './float64array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns <boolean>\n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasFloat64ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test whether an object has a specified property.\n*\n* @module @stdlib/assert-has-own-property\n*\n* @example\n* var hasOwnProp = require( '@stdlib/assert-has-own-property' );\n*\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* bool = hasOwnProp( beep, 'bop' );\n* // returns false\n*/\n\n// MODULES //\n\nvar hasOwnProp = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// FUNCTIONS //\n\nvar has = Object.prototype.hasOwnProperty;\n\n\n// MAIN //\n\n/**\n* Tests if an object has a specified property.\n*\n* @param {*} value - value to test\n* @param {*} property - property to test\n* @returns {boolean} boolean indicating if an object has a specified property\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'boop' );\n* // returns true\n*\n* @example\n* var beep = {\n* 'boop': true\n* };\n*\n* var bool = hasOwnProp( beep, 'bap' );\n* // returns false\n*/\nfunction hasOwnProp( value, property ) {\n\tif (\n\t\tvalue === void 0 ||\n\t\tvalue === null\n\t) {\n\t\treturn false;\n\t}\n\treturn has.call( value, property );\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasOwnProp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Symbol` support.\n*\n* @module @stdlib/assert-has-symbol-support\n*\n* @example\n* var hasSymbolSupport = require( '@stdlib/assert-has-symbol-support' );\n*\n* var bool = hasSymbolSupport();\n* // returns <boolean>\n*/\n\n// MODULES //\n\nvar hasSymbolSupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns <boolean>\n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasSymbolSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `toStringTag` support.\n*\n* @module @stdlib/assert-has-tostringtag-support\n*\n* @example\n* var hasToStringTagSupport = require( '@stdlib/assert-has-tostringtag-support' );\n*\n* var bool = hasToStringTagSupport();\n* // returns <boolean>\n*/\n\n// MODULES //\n\nvar hasToStringTagSupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasSymbols = require( '@stdlib/assert-has-symbol-support' );\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns <boolean>\n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasToStringTagSupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Uint16Array` support.\n*\n* @module @stdlib/assert-has-uint16array-support\n*\n* @example\n* var hasUint16ArraySupport = require( '@stdlib/assert-has-uint16array-support' );\n*\n* var bool = hasUint16ArraySupport();\n* // returns <boolean>\n*/\n\n// MODULES //\n\nvar hasUint16ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isUint16Array = require( '@stdlib/assert-is-uint16array' );\nvar UINT16_MAX = require( '@stdlib/constants-uint16-max' );\nvar GlobalUint16Array = require( './uint16array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns <boolean>\n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasUint16ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint16Array === 'function' ) ? Uint16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Uint32Array` support.\n*\n* @module @stdlib/assert-has-uint32array-support\n*\n* @example\n* var hasUint32ArraySupport = require( '@stdlib/assert-has-uint32array-support' );\n*\n* var bool = hasUint32ArraySupport();\n* // returns <boolean>\n*/\n\n// MODULES //\n\nvar hasUint32ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isUint32Array = require( '@stdlib/assert-is-uint32array' );\nvar UINT32_MAX = require( '@stdlib/constants-uint32-max' );\nvar GlobalUint32Array = require( './uint32array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns <boolean>\n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasUint32ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint32Array === 'function' ) ? Uint32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test for native `Uint8Array` support.\n*\n* @module @stdlib/assert-has-uint8array-support\n*\n* @example\n* var hasUint8ArraySupport = require( '@stdlib/assert-has-uint8array-support' );\n*\n* var bool = hasUint8ArraySupport();\n* // returns <boolean>\n*/\n\n// MODULES //\n\nvar hasUint8ArraySupport = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isUint8Array = require( '@stdlib/assert-is-uint8array' );\nvar UINT8_MAX = require( '@stdlib/constants-uint8-max' );\nvar GlobalUint8Array = require( './uint8array.js' );\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns <boolean>\n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nmodule.exports = hasUint8ArraySupport;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar main = ( typeof Uint8Array === 'function' ) ? Uint8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Float64Array.\n*\n* @module @stdlib/assert-is-float64array\n*\n* @example\n* var isFloat64Array = require( '@stdlib/assert-is-float64array' );\n*\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* bool = isFloat64Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isFloat64Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasFloat64Array = ( typeof Float64Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float64Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float64Array\n*\n* @example\n* var bool = isFloat64Array( new Float64Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat64Array( [] );\n* // returns false\n*/\nfunction isFloat64Array( value ) {\n\treturn (\n\t\t( hasFloat64Array && value instanceof Float64Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float64Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isFloat64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint8Array = require( '@stdlib/array-uint8' );\nvar Uint16Array = require( '@stdlib/array-uint16' );\n\n\n// MAIN //\n\nvar ctors = {\n\t'uint16': Uint16Array,\n\t'uint8': Uint8Array\n};\n\n\n// EXPORTS //\n\nmodule.exports = ctors;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a boolean indicating if an environment is little endian.\n*\n* @module @stdlib/assert-is-little-endian\n*\n* @example\n* var IS_LITTLE_ENDIAN = require( '@stdlib/assert-is-little-endian' );\n*\n* var bool = IS_LITTLE_ENDIAN;\n* // returns <boolean>\n*/\n\n// MODULES //\n\nvar IS_LITTLE_ENDIAN = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = IS_LITTLE_ENDIAN;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar ctors = require( './ctors.js' );\n\n\n// VARIABLES //\n\nvar bool;\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if an environment is little endian.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment is little endian\n*\n* @example\n* var bool = isLittleEndian();\n* // returns <boolean>\n*/\nfunction isLittleEndian() {\n\tvar uint16view;\n\tvar uint8view;\n\n\tuint16view = new ctors[ 'uint16' ]( 1 );\n\n\t/*\n\t* Set the uint16 view to a value having distinguishable lower and higher order words.\n\t*\n\t* 4660 => 0x1234 => 0x12 0x34 => '00010010 00110100' => (0x12,0x34) == (18,52)\n\t*/\n\tuint16view[ 0 ] = 0x1234;\n\n\t// Create a uint8 view on top of the uint16 buffer:\n\tuint8view = new ctors[ 'uint8' ]( uint16view.buffer );\n\n\t// If little endian, the least significant byte will be first...\n\treturn ( uint8view[ 0 ] === 0x34 );\n}\n\n\n// MAIN //\n\nbool = isLittleEndian();\n\n\n// EXPORTS //\n\nmodule.exports = bool;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Uint16Array.\n*\n* @module @stdlib/assert-is-uint16array\n*\n* @example\n* var isUint16Array = require( '@stdlib/assert-is-uint16array' );\n*\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* bool = isUint16Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isUint16Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasUint16Array = ( typeof Uint16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint16Array\n*\n* @example\n* var bool = isUint16Array( new Uint16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint16Array( [] );\n* // returns false\n*/\nfunction isUint16Array( value ) {\n\treturn (\n\t\t( hasUint16Array && value instanceof Uint16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isUint16Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Uint32Array.\n*\n* @module @stdlib/assert-is-uint32array\n*\n* @example\n* var isUint32Array = require( '@stdlib/assert-is-uint32array' );\n*\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* bool = isUint32Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isUint32Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasUint32Array = ( typeof Uint32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint32Array\n*\n* @example\n* var bool = isUint32Array( new Uint32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint32Array( [] );\n* // returns false\n*/\nfunction isUint32Array( value ) {\n\treturn (\n\t\t( hasUint32Array && value instanceof Uint32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isUint32Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a value is a Uint8Array.\n*\n* @module @stdlib/assert-is-uint8array\n*\n* @example\n* var isUint8Array = require( '@stdlib/assert-is-uint8array' );\n*\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* bool = isUint8Array( [] );\n* // returns false\n*/\n\n// MODULES //\n\nvar isUint8Array = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar nativeClass = require( '@stdlib/utils-native-class' );\n\n\n// VARIABLES //\n\nvar hasUint8Array = ( typeof Uint8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8Array\n*\n* @example\n* var bool = isUint8Array( new Uint8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8Array( [] );\n* // returns false\n*/\nfunction isUint8Array( value ) {\n\treturn (\n\t\t( hasUint8Array && value instanceof Uint8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isUint8Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* The bias of a double-precision floating-point number's exponent.\n*\n* @module @stdlib/constants-float64-exponent-bias\n* @type {integer32}\n*\n* @example\n* var FLOAT64_EXPONENT_BIAS = require( '@stdlib/constants-float64-exponent-bias' );\n* // returns 1023\n*/\n\n\n// MAIN //\n\n/**\n* Bias of a double-precision floating-point number's exponent.\n*\n* ## Notes\n*\n* The bias can be computed via\n*\n* ```tex\n* \\mathrm{bias} = 2^{k-1} - 1\n* ```\n*\n* where \\\\(k\\\\) is the number of bits in the exponent; here, \\\\(k = 11\\\\).\n*\n* @constant\n* @type {integer32}\n* @default 1023\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_EXPONENT_BIAS = 1023|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_EXPONENT_BIAS;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* High word mask for the exponent of a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-high-word-exponent-mask\n* @type {uinteger32}\n*\n* @example\n* var FLOAT64_HIGH_WORD_EXPONENT_MASK = require( '@stdlib/constants-float64-high-word-exponent-mask' );\n* // returns 2146435072\n*/\n\n\n// MAIN //\n\n/**\n* High word mask for the exponent of a double-precision floating-point number.\n*\n* ## Notes\n*\n* The high word mask for the exponent of a double-precision floating-point number is an unsigned 32-bit integer with the value \\\\( 2146435072 \\\\), which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 0x7ff00000\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_HIGH_WORD_EXPONENT_MASK = 0x7ff00000;\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_HIGH_WORD_EXPONENT_MASK;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* The maximum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-max-base2-exponent-subnormal\n* @type {integer32}\n*\n* @example\n* var FLOAT64_MAX_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants-float64-max-base2-exponent-subnormal' );\n* // returns -1023\n*/\n\n\n// MAIN //\n\n/**\n* The maximum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* ```text\n* 00000000000 => 0 - BIAS = -1023\n* ```\n*\n* where `BIAS = 1023`.\n*\n* @constant\n* @type {integer32}\n* @default -1023\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MAX_BASE2_EXPONENT_SUBNORMAL = -1023|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_MAX_BASE2_EXPONENT_SUBNORMAL;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* The maximum biased base 2 exponent for a double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-max-base2-exponent\n* @type {integer32}\n*\n* @example\n* var FLOAT64_MAX_BASE2_EXPONENT = require( '@stdlib/constants-float64-max-base2-exponent' );\n* // returns 1023\n*/\n\n\n// MAIN //\n\n/**\n* The maximum biased base 2 exponent for a double-precision floating-point number.\n*\n* ```text\n* 11111111110 => 2046 - BIAS = 1023\n* ```\n*\n* where `BIAS = 1023`.\n*\n* @constant\n* @type {integer32}\n* @default 1023\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MAX_BASE2_EXPONENT = 1023|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_MAX_BASE2_EXPONENT;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* The minimum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* @module @stdlib/constants-float64-min-base2-exponent-subnormal\n* @type {integer32}\n*\n* @example\n* var FLOAT64_MIN_BASE2_EXPONENT_SUBNORMAL = require( '@stdlib/constants-float64-min-base2-exponent-subnormal' );\n* // returns -1074\n*/\n\n\n// MAIN //\n\n/**\n* The minimum biased base 2 exponent for a subnormal double-precision floating-point number.\n*\n* ```text\n* -(BIAS+(52-1)) = -(1023+51) = -1074\n* ```\n*\n* where `BIAS = 1023` and `52` is the number of digits in the significand.\n*\n* @constant\n* @type {integer32}\n* @default -1074\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MIN_BASE2_EXPONENT_SUBNORMAL = -1074|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_MIN_BASE2_EXPONENT_SUBNORMAL;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* @module @stdlib/constants-float64-ninf\n* @type {number}\n*\n* @example\n* var FLOAT64_NINF = require( '@stdlib/constants-float64-ninf' );\n* // returns -Infinity\n*/\n\n// MODULES //\n\nvar Number = require( '@stdlib/number-ctor' );\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point negative infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point negative infinity has the bit sequence\n*\n* ```binarystring\n* 1 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.NEGATIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_NINF = Number.NEGATIVE_INFINITY;\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_NINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* @module @stdlib/constants-float64-pinf\n* @type {number}\n*\n* @example\n* var FLOAT64_PINF = require( '@stdlib/constants-float64-pinf' );\n* // returns Infinity\n*/\n\n\n// MAIN //\n\n/**\n* Double-precision floating-point positive infinity.\n*\n* ## Notes\n*\n* Double-precision floating-point positive infinity has the bit sequence\n*\n* ```binarystring\n* 0 11111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default Number.POSITIVE_INFINITY\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_PINF = Number.POSITIVE_INFINITY; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_PINF;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Smallest positive double-precision floating-point normal number.\n*\n* @module @stdlib/constants-float64-smallest-normal\n* @type {number}\n*\n* @example\n* var FLOAT64_SMALLEST_NORMAL = require( '@stdlib/constants-float64-smallest-normal' );\n* // returns 2.2250738585072014e-308\n*/\n\n\n// MAIN //\n\n/**\n* The smallest positive double-precision floating-point normal number.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* \\frac{1}{2^{1023-1}}\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0 00000000001 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {number}\n* @default 2.2250738585072014e-308\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_SMALLEST_NORMAL = 2.2250738585072014e-308;\n\n\n// EXPORTS //\n\nmodule.exports = FLOAT64_SMALLEST_NORMAL;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* @module @stdlib/constants-uint16-max\n* @type {integer32}\n*\n* @example\n* var UINT16_MAX = require( '@stdlib/constants-uint16-max' );\n* // returns 65535\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{16} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 65535\n*/\nvar UINT16_MAX = 65535|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = UINT16_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* @module @stdlib/constants-uint32-max\n* @type {uinteger32}\n*\n* @example\n* var UINT32_MAX = require( '@stdlib/constants-uint32-max' );\n* // returns 4294967295\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar UINT32_MAX = 4294967295;\n\n\n// EXPORTS //\n\nmodule.exports = UINT32_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* @module @stdlib/constants-uint8-max\n* @type {integer32}\n*\n* @example\n* var UINT8_MAX = require( '@stdlib/constants-uint8-max' );\n* // returns 255\n*/\n\n\n// MAIN //\n\n/**\n* Maximum unsigned 8-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{8} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 11111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 255\n*/\nvar UINT8_MAX = 255|0; // asm type annotation\n\n\n// EXPORTS //\n\nmodule.exports = UINT8_MAX;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a double-precision floating-point numeric value is infinite.\n*\n* @module @stdlib/math-base-assert-is-infinite\n*\n* @example\n* var isInfinite = require( '@stdlib/math-base-assert-is-infinite' );\n*\n* var bool = isInfinite( Infinity );\n* // returns true\n*\n* bool = isInfinite( -Infinity );\n* // returns true\n*\n* bool = isInfinite( 5.0 );\n* // returns false\n*\n* bool = isInfinite( NaN );\n* // returns false\n*/\n\n// MODULES //\n\nvar isInfinite = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isInfinite;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar PINF = require( '@stdlib/constants-float64-pinf' );\nvar NINF = require( '@stdlib/constants-float64-ninf' );\n\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is infinite.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is infinite\n*\n* @example\n* var bool = isInfinite( Infinity );\n* // returns true\n*\n* @example\n* var bool = isInfinite( -Infinity );\n* // returns true\n*\n* @example\n* var bool = isInfinite( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isInfinite( NaN );\n* // returns false\n*/\nfunction isInfinite( x ) {\n\treturn (x === PINF || x === NINF);\n}\n\n\n// EXPORTS //\n\nmodule.exports = isInfinite;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Test if a double-precision floating-point numeric value is `NaN`.\n*\n* @module @stdlib/math-base-assert-is-nan\n*\n* @example\n* var isnan = require( '@stdlib/math-base-assert-is-nan' );\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( 7.0 );\n* // returns false\n*/\n\n// MODULES //\n\nvar isnan = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is `NaN`.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 7.0 );\n* // returns false\n*/\nfunction isnan( x ) {\n\treturn ( x !== x );\n}\n\n\n// EXPORTS //\n\nmodule.exports = isnan;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Compute an absolute value of a double-precision floating-point number.\n*\n* @module @stdlib/math-base-special-abs\n*\n* @example\n* var abs = require( '@stdlib/math-base-special-abs' );\n*\n* var v = abs( -1.0 );\n* // returns 1.0\n*\n* v = abs( 2.0 );\n* // returns 2.0\n*\n* v = abs( 0.0 );\n* // returns 0.0\n*\n* v = abs( -0.0 );\n* // returns 0.0\n*\n* v = abs( NaN );\n* // returns NaN\n*/\n\n// MODULES //\n\nvar abs = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = abs;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Computes the absolute value of a double-precision floating-point number `x`.\n*\n* @param {number} x - input value\n* @returns {number} absolute value\n*\n* @example\n* var v = abs( -1.0 );\n* // returns 1.0\n*\n* @example\n* var v = abs( 2.0 );\n* // returns 2.0\n*\n* @example\n* var v = abs( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( -0.0 );\n* // returns 0.0\n*\n* @example\n* var v = abs( NaN );\n* // returns NaN\n*/\nfunction abs( x ) {\n\treturn Math.abs( x ); // eslint-disable-line stdlib/no-builtin-math\n}\n\n\n// EXPORTS //\n\nmodule.exports = abs;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar toWords = require( '@stdlib/number-float64-base-to-words' );\nvar getHighWord = require( '@stdlib/number-float64-base-get-high-word' );\nvar fromWords = require( '@stdlib/number-float64-base-from-words' );\n\n\n// VARIABLES //\n\n// 10000000000000000000000000000000 => 2147483648 => 0x80000000\nvar SIGN_MASK = 0x80000000>>>0; // asm type annotation\n\n// 01111111111111111111111111111111 => 2147483647 => 0x7fffffff\nvar MAGNITUDE_MASK = 0x7fffffff|0; // asm type annotation\n\n// High/low words workspace:\nvar WORDS = [ 0, 0 ]; // WARNING: not thread safe\n\n\n// MAIN //\n\n/**\n* Returns a double-precision floating-point number with the magnitude of `x` and the sign of `y`.\n*\n* @param {number} x - number from which to derive a magnitude\n* @param {number} y - number from which to derive a sign\n* @returns {number} a double-precision floating-point number\n*\n* @example\n* var z = copysign( -3.14, 10.0 );\n* // returns 3.14\n*\n* @example\n* var z = copysign( 3.14, -1.0 );\n* // returns -3.14\n*\n* @example\n* var z = copysign( 1.0, -0.0 );\n* // returns -1.0\n*\n* @example\n* var z = copysign( -3.14, -0.0 );\n* // returns -3.14\n*\n* @example\n* var z = copysign( -0.0, 1.0 );\n* // returns 0.0\n*/\nfunction copysign( x, y ) {\n\tvar hx;\n\tvar hy;\n\n\t// Split `x` into higher and lower order words:\n\ttoWords( WORDS, x );\n\thx = WORDS[ 0 ];\n\n\t// Turn off the sign bit of `x`:\n\thx &= MAGNITUDE_MASK;\n\n\t// Extract the higher order word from `y`:\n\thy = getHighWord( y );\n\n\t// Leave only the sign bit of `y` turned on:\n\thy &= SIGN_MASK;\n\n\t// Copy the sign bit of `y` to `x`:\n\thx |= hy;\n\n\t// Return a new value having the same magnitude as `x`, but with the sign of `y`:\n\treturn fromWords( hx, WORDS[ 1 ] );\n}\n\n\n// EXPORTS //\n\nmodule.exports = copysign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a double-precision floating-point number with the magnitude of `x` and the sign of `y`.\n*\n* @module @stdlib/math-base-special-copysign\n*\n* @example\n* var copysign = require( '@stdlib/math-base-special-copysign' );\n*\n* var z = copysign( -3.14, 10.0 );\n* // returns 3.14\n*\n* z = copysign( 3.14, -1.0 );\n* // returns -3.14\n*\n* z = copysign( 1.0, -0.0 );\n* // returns -1.0\n*\n* z = copysign( -3.14, -0.0 );\n* // returns -3.14\n*\n* z = copysign( -0.0, 1.0 );\n* // returns 0.0\n*/\n\n// MODULES //\n\nvar copysign = require( './copysign.js' );\n\n\n// EXPORTS //\n\nmodule.exports = copysign;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Multiply a double-precision floating-point number by an integer power of two.\n*\n* @module @stdlib/math-base-special-ldexp\n*\n* @example\n* var ldexp = require( '@stdlib/math-base-special-ldexp' );\n*\n* var x = ldexp( 0.5, 3 ); // => 0.5 * 2^3 = 0.5 * 8\n* // returns 4.0\n*\n* x = ldexp( 4.0, -2 ); // => 4 * 2^(-2) = 4 * (1/4)\n* // returns 1.0\n*\n* x = ldexp( 0.0, 20 );\n* // returns 0.0\n*\n* x = ldexp( -0.0, 39 );\n* // returns -0.0\n*\n* x = ldexp( NaN, -101 );\n* // returns NaN\n*\n* x = ldexp( Infinity, 11 );\n* // returns Infinity\n*\n* x = ldexp( -Infinity, -118 );\n* // returns -Infinity\n*/\n\n// MODULES //\n\nvar ldexp = require( './ldexp.js' );\n\n\n// EXPORTS //\n\nmodule.exports = ldexp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// NOTES //\n\n/*\n* => ldexp: load exponent (see [The Open Group]{@link http://pubs.opengroup.org/onlinepubs/9699919799/functions/ldexp.html} and [cppreference]{@link http://en.cppreference.com/w/c/numeric/math/ldexp}).\n*/\n\n\n// MODULES //\n\nvar PINF = require( '@stdlib/constants-float64-pinf' );\nvar NINF = require( '@stdlib/constants-float64-ninf' );\nvar BIAS = require( '@stdlib/constants-float64-exponent-bias' );\nvar MAX_EXPONENT = require( '@stdlib/constants-float64-max-base2-exponent' );\nvar MAX_SUBNORMAL_EXPONENT = require( '@stdlib/constants-float64-max-base2-exponent-subnormal' );\nvar MIN_SUBNORMAL_EXPONENT = require( '@stdlib/constants-float64-min-base2-exponent-subnormal' );\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar isInfinite = require( '@stdlib/math-base-assert-is-infinite' );\nvar copysign = require( '@stdlib/math-base-special-copysign' );\nvar normalize = require( '@stdlib/number-float64-base-normalize' );\nvar floatExp = require( '@stdlib/number-float64-base-exponent' );\nvar toWords = require( '@stdlib/number-float64-base-to-words' );\nvar fromWords = require( '@stdlib/number-float64-base-from-words' );\n\n\n// VARIABLES //\n\n// 1/(1<<52) = 1/(2**52) = 1/4503599627370496\nvar TWO52_INV = 2.220446049250313e-16;\n\n// Exponent all 0s: 1 00000000000 11111111111111111111 => 2148532223\nvar CLEAR_EXP_MASK = 0x800fffff>>>0; // asm type annotation\n\n// Normalization workspace:\nvar FRAC = [ 0.0, 0.0 ]; // WARNING: not thread safe\n\n// High/low words workspace:\nvar WORDS = [ 0, 0 ]; // WARNING: not thread safe\n\n\n// MAIN //\n\n/**\n* Multiplies a double-precision floating-point number by an integer power of two.\n*\n* @param {number} frac - fraction\n* @param {integer} exp - exponent\n* @returns {number} double-precision floating-point number\n*\n* @example\n* var x = ldexp( 0.5, 3 ); // => 0.5 * 2^3 = 0.5 * 8\n* // returns 4.0\n*\n* @example\n* var x = ldexp( 4.0, -2 ); // => 4 * 2^(-2) = 4 * (1/4)\n* // returns 1.0\n*\n* @example\n* var x = ldexp( 0.0, 20 );\n* // returns 0.0\n*\n* @example\n* var x = ldexp( -0.0, 39 );\n* // returns -0.0\n*\n* @example\n* var x = ldexp( NaN, -101 );\n* // returns NaN\n*\n* @example\n* var x = ldexp( Infinity, 11 );\n* // returns Infinity\n*\n* @example\n* var x = ldexp( -Infinity, -118 );\n* // returns -Infinity\n*/\nfunction ldexp( frac, exp ) {\n\tvar high;\n\tvar m;\n\tif (\n\t\tfrac === 0.0 || // handles +-0\n\t\tisnan( frac ) ||\n\t\tisInfinite( frac )\n\t) {\n\t\treturn frac;\n\t}\n\t// Normalize the input fraction:\n\tnormalize( FRAC, frac );\n\tfrac = FRAC[ 0 ];\n\texp += FRAC[ 1 ];\n\n\t// Extract the exponent from `frac` and add it to `exp`:\n\texp += floatExp( frac );\n\n\t// Check for underflow/overflow...\n\tif ( exp < MIN_SUBNORMAL_EXPONENT ) {\n\t\treturn copysign( 0.0, frac );\n\t}\n\tif ( exp > MAX_EXPONENT ) {\n\t\tif ( frac < 0.0 ) {\n\t\t\treturn NINF;\n\t\t}\n\t\treturn PINF;\n\t}\n\t// Check for a subnormal and scale accordingly to retain precision...\n\tif ( exp <= MAX_SUBNORMAL_EXPONENT ) {\n\t\texp += 52;\n\t\tm = TWO52_INV;\n\t} else {\n\t\tm = 1.0;\n\t}\n\t// Split the fraction into higher and lower order words:\n\ttoWords( WORDS, frac );\n\thigh = WORDS[ 0 ];\n\n\t// Clear the exponent bits within the higher order word:\n\thigh &= CLEAR_EXP_MASK;\n\n\t// Set the exponent bits to the new exponent:\n\thigh |= ((exp+BIAS) << 20);\n\n\t// Create a new floating-point number:\n\treturn m * fromWords( high, WORDS[ 1 ] );\n}\n\n\n// EXPORTS //\n\nmodule.exports = ldexp;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Constructor which returns a `Number` object.\n*\n* @module @stdlib/number-ctor\n*\n* @example\n* var Number = require( '@stdlib/number-ctor' );\n*\n* var v = new Number( 10.0 );\n* // returns <Number>\n*/\n\n// MODULES //\n\nvar Number = require( './number.js' );\n\n\n// EXPORTS //\n\nmodule.exports = Number;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// EXPORTS //\n\nmodule.exports = Number; // eslint-disable-line stdlib/require-globals\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an integer corresponding to the unbiased exponent of a double-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-exponent\n*\n* @example\n* var exponent = require( '@stdlib/number-float64-base-exponent' );\n*\n* var exp = exponent( 3.14e-307 ); // => 2**-1019 ~ 1e-307\n* // returns -1019\n*\n* exp = exponent( -3.14 );\n* // returns 1\n*\n* exp = exponent( 0.0 );\n* // returns -1023\n*\n* exp = exponent( NaN );\n* // returns 1024\n*/\n\n// MODULES //\n\nvar exponent = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = exponent;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar getHighWord = require( '@stdlib/number-float64-base-get-high-word' );\nvar EXP_MASK = require( '@stdlib/constants-float64-high-word-exponent-mask' );\nvar BIAS = require( '@stdlib/constants-float64-exponent-bias' );\n\n\n// MAIN //\n\n/**\n* Returns an integer corresponding to the unbiased exponent of a double-precision floating-point number.\n*\n* @param {number} x - input value\n* @returns {integer32} unbiased exponent\n*\n* @example\n* var exp = exponent( 3.14e-307 ); // => 2**-1019 ~ 1e-307\n* // returns -1019\n*\n* @example\n* var exp = exponent( -3.14 );\n* // returns 1\n*\n* @example\n* var exp = exponent( 0.0 );\n* // returns -1023\n*\n* @example\n* var exp = exponent( NaN );\n* // returns 1024\n*/\nfunction exponent( x ) {\n\t// Extract from the input value a higher order word (unsigned 32-bit integer) which contains the exponent:\n\tvar high = getHighWord( x );\n\n\t// Apply a mask to isolate only the exponent bits and then shift off all bits which are part of the fraction:\n\thigh = ( high & EXP_MASK ) >>> 20;\n\n\t// Remove the bias and return:\n\treturn (high - BIAS)|0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nmodule.exports = exponent;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Create a double-precision floating-point number from a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* @module @stdlib/number-float64-base-from-words\n*\n* @example\n* var fromWords = require( '@stdlib/number-float64-base-from-words' );\n*\n* var v = fromWords( 1774486211, 2479577218 );\n* // returns 3.14e201\n*\n* v = fromWords( 3221823995, 1413754136 );\n* // returns -3.141592653589793\n*\n* v = fromWords( 0, 0 );\n* // returns 0.0\n*\n* v = fromWords( 2147483648, 0 );\n* // returns -0.0\n*\n* v = fromWords( 2146959360, 0 );\n* // returns NaN\n*\n* v = fromWords( 2146435072, 0 );\n* // returns Infinity\n*\n* v = fromWords( 4293918720, 0 );\n* // returns -Infinity\n*/\n\n// MODULES //\n\nvar fromWords = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = fromWords;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isLittleEndian = require( '@stdlib/assert-is-little-endian' );\n\n\n// MAIN //\n\nvar indices;\nvar HIGH;\nvar LOW;\n\nif ( isLittleEndian === true ) {\n\tHIGH = 1; // second index\n\tLOW = 0; // first index\n} else {\n\tHIGH = 0; // first index\n\tLOW = 1; // second index\n}\nindices = {\n\t'HIGH': HIGH,\n\t'LOW': LOW\n};\n\n\n// EXPORTS //\n\nmodule.exports = indices;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar indices = require( './indices.js' );\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\nvar HIGH = indices.HIGH;\nvar LOW = indices.LOW;\n\n\n// MAIN //\n\n/**\n* Creates a double-precision floating-point number from a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n*\n* In which Uint32 should we place the higher order bits? If little endian, the second; if big endian, the first.\n*\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @param {uinteger32} high - higher order word (unsigned 32-bit integer)\n* @param {uinteger32} low - lower order word (unsigned 32-bit integer)\n* @returns {number} floating-point number\n*\n* @example\n* var v = fromWords( 1774486211, 2479577218 );\n* // returns 3.14e201\n*\n* @example\n* var v = fromWords( 3221823995, 1413754136 );\n* // returns -3.141592653589793\n*\n* @example\n* var v = fromWords( 0, 0 );\n* // returns 0.0\n*\n* @example\n* var v = fromWords( 2147483648, 0 );\n* // returns -0.0\n*\n* @example\n* var v = fromWords( 2146959360, 0 );\n* // returns NaN\n*\n* @example\n* var v = fromWords( 2146435072, 0 );\n* // returns Infinity\n*\n* @example\n* var v = fromWords( 4293918720, 0 );\n* // returns -Infinity\n*/\nfunction fromWords( high, low ) {\n\tUINT32_VIEW[ HIGH ] = high;\n\tUINT32_VIEW[ LOW ] = low;\n\treturn FLOAT64_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = fromWords;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isLittleEndian = require( '@stdlib/assert-is-little-endian' );\n\n\n// MAIN //\n\nvar HIGH;\nif ( isLittleEndian === true ) {\n\tHIGH = 1; // second index\n} else {\n\tHIGH = 0; // first index\n}\n\n\n// EXPORTS //\n\nmodule.exports = HIGH;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return an unsigned 32-bit integer corresponding to the more significant 32 bits of a double-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-get-high-word\n*\n* @example\n* var getHighWord = require( '@stdlib/number-float64-base-get-high-word' );\n*\n* var w = getHighWord( 3.14e201 ); // => 01101001110001001000001011000011\n* // returns 1774486211\n*/\n\n// MODULES //\n\nvar getHighWord = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = getHighWord;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar HIGH = require( './high.js' );\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\n\n// MAIN //\n\n/**\n* Returns an unsigned 32-bit integer corresponding to the more significant 32 bits of a double-precision floating-point number.\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 can we find the higher order bits? If little endian, the second; if big endian, the first.\n*\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n* @param {number} x - input value\n* @returns {uinteger32} higher order word\n*\n* @example\n* var w = getHighWord( 3.14e201 ); // => 01101001110001001000001011000011\n* // returns 1774486211\n*/\nfunction getHighWord( x ) {\n\tFLOAT64_VIEW[ 0 ] = x;\n\treturn UINT32_VIEW[ HIGH ];\n}\n\n\n// EXPORTS //\n\nmodule.exports = getHighWord;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a normal number `y` and exponent `exp` satisfying \\\\(x = y \\cdot 2^\\mathrm{exp}\\\\).\n*\n* @module @stdlib/number-float64-base-normalize\n*\n* @example\n* var normalize = require( '@stdlib/number-float64-base-normalize' );\n* var pow = require( '@stdlib/math-base-special-pow' );\n*\n* var out = normalize( 3.14e-319 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var y = out[ 0 ];\n* var exp = out[ 1 ];\n*\n* var bool = ( y*pow(2.0,exp) === 3.14e-319 );\n* // returns true\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var normalize = require( '@stdlib/number-float64-base-normalize' );\n*\n* var out = new Float64Array( 2 );\n*\n* var v = normalize( out, 3.14e-319 );\n* // returns <Float64Array>[ 1.4141234400356668e-303, -52 ]\n*\n* var bool = ( v === out );\n* // returns true\n*/\n\n// MODULES //\n\nvar normalize = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = normalize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar fcn = require( './normalize.js' );\n\n\n// MAIN //\n\n/**\n* Returns a normal number `y` and exponent `exp` satisfying \\\\(x = y \\cdot 2^\\mathrm{exp}\\\\).\n*\n* @param {(Array|TypedArray|Object)} [out] - output array\n* @param {number} x - input value\n* @returns {(Array|TypedArray|Object)} output array\n*\n* @example\n* var pow = require( '@stdlib/math-base-special-pow' );\n*\n* var out = normalize( [ 0.0, 0 ], 3.14e-319 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var y = out[ 0 ];\n* var exp = out[ 1 ];\n*\n* var bool = ( y*pow(2.0,exp) === 3.14e-319 );\n* // returns true\n*\n* @example\n* var Float64Array = require( '@stdlib/array-float64' );\n* var pow = require( '@stdlib/math-base-special-pow' );\n*\n* var out = new Float64Array( 2 );\n*\n* var v = normalize( out, 3.14e-319 );\n* // returns <Float64Array>[ 1.4141234400356668e-303, -52 ]\n*\n* var bool = ( v === out );\n* // returns true\n*\n* @example\n* var out = normalize( [ 0.0, 0 ], 0.0 );\n* // returns [ 0.0, 0 ]\n*\n* @example\n* var out = normalize( [ 0.0, 0 ], Infinity );\n* // returns [ Infinity, 0 ]\n*\n* @example\n* var out = normalize( [ 0.0, 0 ], -Infinity );\n* // returns [ -Infinity, 0 ]\n*\n* @example\n* var out = normalize( [ 0.0, 0 ], NaN );\n* // returns [ NaN, 0 ]\n*/\nfunction normalize( out, x ) {\n\tif ( arguments.length === 1 ) {\n\t\treturn fcn( [ 0.0, 0 ], out );\n\t}\n\treturn fcn( out, x );\n}\n\n\n// EXPORTS //\n\nmodule.exports = normalize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar FLOAT64_SMALLEST_NORMAL = require( '@stdlib/constants-float64-smallest-normal' );\nvar isInfinite = require( '@stdlib/math-base-assert-is-infinite' );\nvar isnan = require( '@stdlib/math-base-assert-is-nan' );\nvar abs = require( '@stdlib/math-base-special-abs' );\n\n\n// VARIABLES //\n\n// (1<<52)\nvar SCALAR = 4503599627370496;\n\n\n// MAIN //\n\n/**\n* Returns a normal number `y` and exponent `exp` satisfying \\\\(x = y \\cdot 2^\\mathrm{exp}\\\\).\n*\n* @private\n* @param {(Array|TypedArray|Object)} out - output array\n* @param {number} x - input value\n* @returns {(Array|TypedArray|Object)} output array\n*\n* @example\n* var pow = require( '@stdlib/math-base-special-pow' );\n*\n* var out = normalize( [ 0.0, 0 ], 3.14e-319 );\n* // returns [ 1.4141234400356668e-303, -52 ]\n*\n* var y = out[ 0 ];\n* var exp = out[ 1 ];\n*\n* var bool = ( y*pow(2.0,exp) === 3.14e-319 );\n* // returns true\n*\n* @example\n* var out = normalize( [ 0.0, 0 ], 0.0 );\n* // returns [ 0.0, 0 ];\n*\n* @example\n* var out = normalize( [ 0.0, 0 ], Infinity );\n* // returns [ Infinity, 0 ]\n*\n* @example\n* var out = normalize( [ 0.0, 0 ], -Infinity );\n* // returns [ -Infinity, 0 ]\n*\n* @example\n* var out = normalize( [ 0.0, 0 ], NaN );\n* // returns [ NaN, 0 ]\n*/\nfunction normalize( out, x ) {\n\tif ( isnan( x ) || isInfinite( x ) ) {\n\t\tout[ 0 ] = x;\n\t\tout[ 1 ] = 0;\n\t\treturn out;\n\t}\n\tif ( x !== 0.0 && abs( x ) < FLOAT64_SMALLEST_NORMAL ) {\n\t\tout[ 0 ] = x * SCALAR;\n\t\tout[ 1 ] = -52;\n\t\treturn out;\n\t}\n\tout[ 0 ] = x;\n\tout[ 1 ] = 0;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = normalize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Split a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* @module @stdlib/number-float64-base-to-words\n*\n* @example\n* var toWords = require( '@stdlib/number-float64-base-to-words' );\n*\n* var w = toWords( 3.14e201 );\n* // returns [ 1774486211, 2479577218 ]\n*\n* @example\n* var Uint32Array = require( '@stdlib/array-uint32' );\n* var toWords = require( '@stdlib/number-float64-base-to-words' );\n*\n* var out = new Uint32Array( 2 );\n*\n* var w = toWords( out, 3.14e201 );\n* // returns <Uint32Array>[ 1774486211, 2479577218 ]\n*\n* var bool = ( w === out );\n* // returns true\n*/\n\n// MODULES //\n\nvar toWords = require( './main.js' );\n\n\n// EXPORTS //\n\nmodule.exports = toWords;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar isLittleEndian = require( '@stdlib/assert-is-little-endian' );\n\n\n// MAIN //\n\nvar indices;\nvar HIGH;\nvar LOW;\n\nif ( isLittleEndian === true ) {\n\tHIGH = 1; // second index\n\tLOW = 0; // first index\n} else {\n\tHIGH = 0; // first index\n\tLOW = 1; // second index\n}\nindices = {\n\t'HIGH': HIGH,\n\t'LOW': LOW\n};\n\n\n// EXPORTS //\n\nmodule.exports = indices;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar fcn = require( './to_words.js' );\n\n\n// MAIN //\n\n/**\n* Splits a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* @param {(Array|TypedArray|Object)} [out] - output array\n* @param {number} x - input value\n* @returns {(Array|TypedArray|Object)} output array\n*\n* @example\n* var w = toWords( 3.14e201 );\n* // returns [ 1774486211, 2479577218 ]\n*\n* @example\n* var Uint32Array = require( '@stdlib/array-uint32' );\n*\n* var out = new Uint32Array( 2 );\n*\n* var w = toWords( out, 3.14e201 );\n* // returns <Uint32Array>[ 1774486211, 2479577218 ]\n*\n* var bool = ( w === out );\n* // returns true\n*/\nfunction toWords( out, x ) {\n\tif ( arguments.length === 1 ) {\n\t\treturn fcn( [ 0, 0 ], out );\n\t}\n\treturn fcn( out, x );\n}\n\n\n// EXPORTS //\n\nmodule.exports = toWords;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar Uint32Array = require( '@stdlib/array-uint32' );\nvar Float64Array = require( '@stdlib/array-float64' );\nvar indices = require( './indices.js' );\n\n\n// VARIABLES //\n\nvar FLOAT64_VIEW = new Float64Array( 1 );\nvar UINT32_VIEW = new Uint32Array( FLOAT64_VIEW.buffer );\n\nvar HIGH = indices.HIGH;\nvar LOW = indices.LOW;\n\n\n// MAIN //\n\n/**\n* Splits a double-precision floating-point number into a higher order word (unsigned 32-bit integer) and a lower order word (unsigned 32-bit integer).\n*\n* ## Notes\n*\n* ```text\n* float64 (64 bits)\n* f := fraction (significand/mantissa) (52 bits)\n* e := exponent (11 bits)\n* s := sign bit (1 bit)\n*\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Float64 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* | Uint32 | Uint32 |\n* |-------- -------- -------- -------- -------- -------- -------- --------|\n* ```\n*\n* If little endian (more significant bits last):\n*\n* ```text\n* <-- lower higher -->\n* | f7 f6 f5 f4 f3 f2 e2 | f1 |s| e1 |\n* ```\n*\n* If big endian (more significant bits first):\n*\n* ```text\n* <-- higher lower -->\n* |s| e1 e2 | f1 f2 f3 f4 f5 f6 f7 |\n* ```\n*\n* In which Uint32 can we find the higher order bits? If little endian, the second; if big endian, the first.\n*\n*\n* ## References\n*\n* - [Open Group][1]\n*\n* [1]: http://pubs.opengroup.org/onlinepubs/9629399/chap14.htm\n*\n*\n* @private\n* @param {(Array|TypedArray|Object)} out - output array\n* @param {number} x - input value\n* @returns {(Array|TypedArray|Object)} output array\n*\n* @example\n* var Uint32Array = require( '@stdlib/array-uint32' );\n*\n* var out = new Uint32Array( 2 );\n*\n* var w = toWords( out, 3.14e201 );\n* // returns <Uint32Array>[ 1774486211, 2479577218 ]\n*\n* var bool = ( w === out );\n* // returns true\n*/\nfunction toWords( out, x ) {\n\tFLOAT64_VIEW[ 0 ] = x;\n\tout[ 0 ] = UINT32_VIEW[ HIGH ];\n\tout[ 1 ] = UINT32_VIEW[ LOW ];\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = toWords;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n/**\n* Return a string value indicating a specification defined classification of an object.\n*\n* @module @stdlib/utils-native-class\n*\n* @example\n* var nativeClass = require( '@stdlib/utils-native-class' );\n*\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* function Beep() {\n* return this;\n* }\n* str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\n\n// MODULES //\n\nvar hasToStringTag = require( '@stdlib/assert-has-tostringtag-support' );\nvar builtin = require( './native_class.js' );\nvar polyfill = require( './polyfill.js' );\n\n\n// MAIN //\n\nvar nativeClass;\nif ( hasToStringTag() ) {\n\tnativeClass = polyfill;\n} else {\n\tnativeClass = builtin;\n}\n\n\n// EXPORTS //\n\nmodule.exports = nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar toStr = require( './tostring.js' );\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification (via the internal property `[[Class]]`) of an object.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\treturn toStr.call( v );\n}\n\n\n// EXPORTS //\n\nmodule.exports = nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MODULES //\n\nvar hasOwnProp = require( '@stdlib/assert-has-own-property' );\nvar toStringTag = require( './tostringtag.js' );\nvar toStr = require( './tostring.js' );\n\n\n// MAIN //\n\n/**\n* Returns a string value indicating a specification defined classification of an object in environments supporting `Symbol.toStringTag`.\n*\n* @param {*} v - input value\n* @returns {string} string value indicating a specification defined classification of the input value\n*\n* @example\n* var str = nativeClass( 'a' );\n* // returns '[object String]'\n*\n* @example\n* var str = nativeClass( 5 );\n* // returns '[object Number]'\n*\n* @example\n* function Beep() {\n* return this;\n* }\n* var str = nativeClass( new Beep() );\n* // returns '[object Object]'\n*/\nfunction nativeClass( v ) {\n\tvar isOwn;\n\tvar tag;\n\tvar out;\n\n\tif ( v === null || v === void 0 ) {\n\t\treturn toStr.call( v );\n\t}\n\ttag = v[ toStringTag ];\n\tisOwn = hasOwnProp( v, toStringTag );\n\n\t// Attempt to override the `toStringTag` property. For built-ins having a `Symbol.toStringTag` property (e.g., `JSON`, `Math`, etc), the `Symbol.toStringTag` property is read-only (e.g., , so we need to wrap in a `try/catch`.\n\ttry {\n\t\tv[ toStringTag ] = void 0;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn toStr.call( v );\n\t}\n\tout = toStr.call( v );\n\n\tif ( isOwn ) {\n\t\tv[ toStringTag ] = tag;\n\t} else {\n\t\tdelete v[ toStringTag ];\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nmodule.exports = nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStr = Object.prototype.toString;\n\n\n// EXPORTS //\n\nmodule.exports = toStr;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2018 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nmodule.exports = toStrTag;\n","!function(t,n){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=function(t,n,e,i,o){for(n=n.split?n.split(\".\"):n,i=0;i<n.length;i++)t=t?t[n[i]]:o;return t===o?e:t}:\"function\"==typeof define&&define.amd?define(function(){return function(t,n,e,i,o){for(n=n.split?n.split(\".\"):n,i=0;i<n.length;i++)t=t?t[n[i]]:o;return t===o?e:t}}):t.dlv=function(t,n,e,i,o){for(n=n.split?n.split(\".\"):n,i=0;i<n.length;i++)t=t?t[n[i]]:o;return t===o?e:t}}(this);\n//# sourceMappingURL=dlv.umd.js.map\n","function dset(obj, keys, val) {\n\tkeys.split && (keys=keys.split('.'));\n\tvar i=0, l=keys.length, t=obj, x, k;\n\twhile (i < l) {\n\t\tk = keys[i++];\n\t\tif (k === '__proto__' || k === 'constructor' || k === 'prototype') break;\n\t\tt = t[k] = (i === l) ? val : (typeof(x=t[k])===typeof(keys)) ? x : (keys[i]*0 !== 0 || !!~(''+keys[i]).indexOf('.')) ? {} : [];\n\t}\n}\n\nexports.dset = dset;","for(var r=[],o=0;o<64;)r[o]=0|4294967296*Math.sin(++o%Math.PI);export default function(t){var e,f,n,a=[e=1732584193,f=4023233417,~e,~f],c=[],h=unescape(encodeURI(t))+\"€\",u=h.length;for(t=--u/4+2|15,c[--t]=8*u;~u;)c[u>>2]|=h.charCodeAt(u)<<8*u--;for(o=h=0;o<t;o+=16){for(u=a;h<64;u=[n=u[3],e+((n=u[0]+[e&f|~e&n,n&e|~n&f,e^f^n,f^(e|~n)][u=h>>4]+r[h]+~~c[o|15&[h,5*h+1,3*h+5,7*h][u]])<<(u=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*u+h++%4])|n>>>-u),e,f])e=0|u[1],f=u[2];for(h=4;h;)a[--h]+=u[h]}for(t=\"\";h<32;)t+=(a[h>>3]>>4*(1^h++)&15).toString(16);return t}\n//# sourceMappingURL=index.mjs.map\n"],"names":["__importDefault","this","mod","__esModule","Object","defineProperty","exports","value","Store","matches","transform","transformers_1","enumerable","get","default","matchers_1","store_1","dlv_1","fqlEvaluate","ir","event","Array","isArray","getValue","item","i","length","first","second","operator","isIR","JSON","stringify","Error","concat","compareItems","compareNumbers","list","undefined","find","it","checkInList","indexOf","contains","str","glob","pattern","_a","_b","Pattern","star","chunk","scanChunk","_c","matchChunk","t","ok","err","slice","globMatches","match","target","toLowerCase","NaN","result","inRange","Scan","char","notNegated","foundMatch","nRange","lo","hi","getEsc","newChunk","matcher","type","parse","e","fql","rules","prototype","getRulesByDestinationName","destinationName","_i","rule","push","md5_1","math_base_special_ldexp_1","dset_1","unset_1","dropProperties","payload","config","filterProperties","drop","matchedObj","dropList","forEach","k","allowProperties","allow","preserveList","keys","key","includes","ruleSet","filterCb","entries","targets","filter","obj","matchedObject","mapProperties","initialPayload","map","hasOwnProperty","actionMap","splitKey","split","parent_1","pop","join","copy","valueToCopy","dset","move","valueToMove","unset","set","to_string","valueToString","sampleEvent","sample","percent","path","field","digest","exponent","significand","consumeDigest","leadingZeros","val","splice","parseInt","sampleConsistentPercent","Math","random","arr","remainder","binary","transformers","transformedPayload","transformer","prop","segs","last","shift","ctor","Float64Array","module","hasFloat64ArraySupport","builtin","polyfill","hasUint16ArraySupport","Uint16Array","hasUint32ArraySupport","Uint32Array","hasUint8ArraySupport","Uint8Array","main","isFloat64Array","GlobalFloat64Array","bool","hasOwnProp","has","property","call","hasSymbolSupport","Symbol","hasToStringTagSupport","FLG","hasSymbols","toStringTag","isUint16Array","UINT16_MAX","GlobalUint16Array","isUint32Array","UINT32_MAX","GlobalUint32Array","isUint8Array","UINT8_MAX","GlobalUint8Array","nativeClass","hasFloat64Array","ctors","IS_LITTLE_ENDIAN","uint16view","buffer","hasUint16Array","hasUint32Array","hasUint8Array","FLOAT64_NINF","NEGATIVE_INFINITY","FLOAT64_PINF","Number","POSITIVE_INFINITY","isInfinite","PINF","NINF","x","isnan","abs","toWords","getHighWord","fromWords","WORDS","y","hx","hy","copysign","ldexp","BIAS","MAX_EXPONENT","MAX_SUBNORMAL_EXPONENT","MIN_SUBNORMAL_EXPONENT","normalize","floatExp","FRAC","frac","exp","high","m","EXP_MASK","indices","HIGH","LOW","FLOAT64_VIEW","UINT32_VIEW","low","fcn","out","arguments","FLOAT64_SMALLEST_NORMAL","hasToStringTag","toStr","v","isOwn","tag","toString","toStrTag","n","o","l","r","sin","PI","f","a","c","h","unescape","encodeURI","u","charCodeAt"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_ht_sdks_events_sdk_js_browser=self.webpackChunk_ht_sdks_events_sdk_js_browser||[]).push([[604],{669:function(e,n,t){t.r(n),t.d(n,{tsubMiddleware:function(){return s}});var r=t(2870),s=function(e){return function(n){var t=n.payload,s=n.integration,o=n.next;new r.Store(e).getRulesByDestinationName(s).forEach((function(e){for(var n=e.matchers,s=e.transformers,a=0;a<n.length;a++)if(r.matches(t.obj,n[a])&&(t.obj=r.transform(t.obj,s[a]),null===t.obj))return o(null)})),o(t)}}}}]);
2
- //# sourceMappingURL=tsub-middleware.bundle.a9604b3195f6189e429b.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tsub-middleware.bundle.a9604b3195f6189e429b.js","mappings":"sNAeaA,EACX,SAACC,GACD,gBAAC,G,IAAEC,EAAO,UAAEC,EAAW,cAAEC,EAAI,OACb,IAAI,QAAWH,GACFI,0BAA0BF,GAExCG,SAAQ,SAACC,GAGpB,IAFQ,IAAAC,EAA2BD,EAAI,SAArBE,EAAiBF,EAAI,aAE9BG,EAAI,EAAGA,EAAIF,EAASG,OAAQD,IACnC,GAAI,UAAaR,EAAQU,IAAKJ,EAASE,MACrCR,EAAQU,IAAM,YAAeV,EAAQU,IAAKH,EAAaC,IAEnC,OAAhBR,EAAQU,KACV,OAAOR,EAAK,KAIpB,IAEAA,EAAKF,EACP,CAnBA,C","sources":["webpack://@ht-sdks/events-sdk-js-browser/./src/plugins/routing-middleware/index.ts"],"sourcesContent":["import * as tsub from '@segment/tsub'\nimport { Matcher, Rule } from '@segment/tsub/dist/store'\nimport { DestinationMiddlewareFunction } from '../middleware'\n\n// TODO: update tsub definition\ntype RoutingRuleMatcher = Matcher & {\n config?: {\n expr: string\n }\n}\n\nexport type RoutingRule = Rule & {\n matchers: RoutingRuleMatcher[]\n}\n\nexport const tsubMiddleware =\n (rules: RoutingRule[]): DestinationMiddlewareFunction =>\n ({ payload, integration, next }): void => {\n const store = new tsub.Store(rules)\n const rulesToApply = store.getRulesByDestinationName(integration)\n\n rulesToApply.forEach((rule) => {\n const { matchers, transformers } = rule\n\n for (let i = 0; i < matchers.length; i++) {\n if (tsub.matches(payload.obj, matchers[i])) {\n payload.obj = tsub.transform(payload.obj, transformers[i])\n\n if (payload.obj === null) {\n return next(null)\n }\n }\n }\n })\n\n next(payload)\n }\n"],"names":["tsubMiddleware","rules","payload","integration","next","getRulesByDestinationName","forEach","rule","matchers","transformers","i","length","obj"],"sourceRoot":""}