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AAE,GAAGL,EAAEK,EAAE,GAAG,IAAIH,EAAE,EAAEA,GAAG9T,IAAI8T,IAAIG,EAAEH,EAAE,CAAC,IAAI1K,EAAE,GAAG0K,EAAE,IAAI1K,IAAIpJ,EAAE8T,GAAG,IAAI,GAAG,EAAEA,KAAK,IAAIX,SAAS,IAAI,OAAO/J,CAAC","sources":["webpack://aurora-new-frontend/./node_modules/@segment/analytics-next/dist/pkg/lib/is-plan-event-enabled.js","webpack://aurora-new-frontend/./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/loader.js","webpack://aurora-new-frontend/./node_modules/@segment/analytics-next/dist/pkg/plugins/ajs-destination/index.js","webpack://aurora-new-frontend/./node_modules/@segment/analytics-next/dist/pkg/plugins/routing-middleware/index.js","webpack://aurora-new-frontend/./node_modules/@segment/analytics-next/dist/pkg/plugins/middleware/index.js","webpack://aurora-new-frontend/./node_modules/@segment/tsub/dist/index.js","webpack://aurora-new-frontend/./node_modules/@segment/tsub/dist/matchers.js","webpack://aurora-new-frontend/./node_modules/@segment/tsub/dist/store.js","webpack://aurora-new-frontend/./node_modules/@segment/tsub/dist/transformers.js","webpack://aurora-new-frontend/./node_modules/@segment/tsub/dist/unset.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-float64/lib/float64array.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-float64/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-float64/lib/polyfill.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-uint16/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-uint16/lib/polyfill.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-uint16/lib/uint16array.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-uint32/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-uint32/lib/polyfill.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-uint32/lib/uint32array.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-uint8/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-uint8/lib/polyfill.js","webpack://aurora-new-frontend/./node_modules/@stdlib/array-uint8/lib/uint8array.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-float64array-support/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-float64array-support/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-own-property/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-own-property/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-symbol-support/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-symbol-support/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-tostringtag-support/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-uint16array-support/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-uint32array-support/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-uint8array-support/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-float64array/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-float64array/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-little-endian/lib/ctors.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-little-endian/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-little-endian/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-uint16array/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-uint16array/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-uint32array/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-uint32array/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-uint8array/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/assert-is-uint8array/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-float64-exponent-bias/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-float64-high-word-exponent-mask/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-float64-max-base2-exponent-subnormal/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-float64-max-base2-exponent/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-float64-min-base2-exponent-subnormal/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-float64-ninf/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-float64-pinf/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-float64-smallest-normal/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-uint16-max/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-uint32-max/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/constants-uint8-max/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/math-base-assert-is-infinite/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/math-base-assert-is-infinite/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/math-base-assert-is-nan/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/math-base-assert-is-nan/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/math-base-special-abs/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/math-base-special-abs/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/math-base-special-copysign/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/math-base-special-copysign/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/math-base-special-ldexp/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/math-base-special-ldexp/lib/ldexp.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-ctor/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-ctor/lib/number.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-exponent/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-exponent/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-from-words/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-from-words/lib/indices.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-from-words/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-get-high-word/lib/high.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-get-high-word/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-get-high-word/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-normalize/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-normalize/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-normalize/lib/normalize.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-to-words/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-to-words/lib/indices.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-to-words/lib/main.js","webpack://aurora-new-frontend/./node_modules/@stdlib/number-float64-base-to-words/lib/to_words.js","webpack://aurora-new-frontend/./node_modules/@stdlib/utils-native-class/lib/index.js","webpack://aurora-new-frontend/./node_modules/@stdlib/utils-native-class/lib/native_class.js","webpack://aurora-new-frontend/./node_modules/@stdlib/utils-native-class/lib/polyfill.js","webpack://aurora-new-frontend/./node_modules/@stdlib/utils-native-class/lib/tostring.js","webpack://aurora-new-frontend/./node_modules/@stdlib/utils-native-class/lib/tostringtag.js","webpack://aurora-new-frontend/./node_modules/dlv/dist/dlv.umd.js","webpack://aurora-new-frontend/./node_modules/dset/dist/index.js","webpack://aurora-new-frontend/./node_modules/tiny-hashes/md5/index.mjs"],"sourcesContent":["/**\n * Determines whether a track event is allowed to be sent based on the\n * user's tracking plan.\n * If the user does not have a tracking plan or the event is allowed based\n * on the tracking plan configuration, returns true.\n */\nexport function isPlanEventEnabled(plan, planEvent) {\n var _a, _b;\n // Always prioritize the event's `enabled` status\n if (typeof (planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) === 'boolean') {\n return planEvent.enabled;\n }\n // Assume absence of a tracking plan means events are enabled\n return (_b = (_a = plan === null || plan === void 0 ? void 0 : plan.__default) === null || _a === void 0 ? void 0 : _a.enabled) !== null && _b !== void 0 ? _b : true;\n}\n//# sourceMappingURL=is-plan-event-enabled.js.map","import { __awaiter, __generator, __spreadArray } from \"tslib\";\nimport { getNextIntegrationsURL } from '../../lib/parse-cdn';\nimport { loadScript, unloadScript } from '../../lib/load-script';\nfunction normalizeName(name) {\n return name.toLowerCase().replace('.', '').replace(/\\s+/g, '-');\n}\nfunction obfuscatePathName(pathName, obfuscate) {\n if (obfuscate === void 0) { obfuscate = false; }\n return obfuscate ? btoa(pathName).replace(/=/g, '') : undefined;\n}\nfunction recordLoadMetrics(fullPath, ctx, name) {\n var _a, _b;\n try {\n var metric = ((_b = (_a = window === null || window === void 0 ? void 0 : window.performance) === null || _a === void 0 ? void 0 : _a.getEntriesByName(fullPath, 'resource')) !== null && _b !== void 0 ? _b : [])[0];\n // we assume everything that took under 100ms is cached\n metric &&\n ctx.stats.gauge('legacy_destination_time', Math.round(metric.duration), __spreadArray([\n name\n ], (metric.duration < 100 ? ['cached'] : []), true));\n }\n catch (_) {\n // not available\n }\n}\nexport function loadIntegration(ctx, analyticsInstance, name, version, settings, obfuscate) {\n return __awaiter(this, void 0, void 0, function () {\n var pathName, obfuscatedPathName, path, fullPath, err_1, deps, integrationBuilder, analyticsStub, integration;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n pathName = normalizeName(name);\n obfuscatedPathName = obfuscatePathName(pathName, obfuscate);\n path = getNextIntegrationsURL();\n fullPath = \"\".concat(path, \"/integrations/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \"/\").concat(version, \"/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \".dynamic.js.gz\");\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, loadScript(fullPath)];\n case 2:\n _a.sent();\n recordLoadMetrics(fullPath, ctx, name);\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n ctx.stats.gauge('legacy_destination_time', -1, [\"plugin:\".concat(name), \"failed\"]);\n throw err_1;\n case 4:\n deps = window[\"\".concat(pathName, \"Deps\")];\n return [4 /*yield*/, Promise.all(deps.map(function (dep) { return loadScript(path + dep + '.gz'); }))\n // @ts-ignore\n ];\n case 5:\n _a.sent();\n // @ts-ignore\n window[\"\".concat(pathName, \"Loader\")]();\n integrationBuilder = window[\"\".concat(pathName, \"Integration\")];\n // GA and Appcues use a different interface to instantiating integrations\n if (integrationBuilder.Integration) {\n analyticsStub = {\n user: function () { return analyticsInstance.user(); },\n addIntegration: function () { },\n };\n integrationBuilder(analyticsStub);\n integrationBuilder = integrationBuilder.Integration;\n }\n integration = new integrationBuilder(settings);\n integration.analytics = analyticsInstance;\n return [2 /*return*/, integration];\n }\n });\n });\n}\nexport function unloadIntegration(name, version, obfuscate) {\n return __awaiter(this, void 0, void 0, function () {\n var path, pathName, obfuscatedPathName, fullPath;\n return __generator(this, function (_a) {\n path = getNextIntegrationsURL();\n pathName = normalizeName(name);\n obfuscatedPathName = obfuscatePathName(name, obfuscate);\n fullPath = \"\".concat(path, \"/integrations/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \"/\").concat(version, \"/\").concat(obfuscatedPathName !== null && obfuscatedPathName !== void 0 ? obfuscatedPathName : pathName, \".dynamic.js.gz\");\n return [2 /*return*/, unloadScript(fullPath)];\n });\n });\n}\nexport function resolveVersion(settings) {\n var _a, _b, _c, _d;\n return ((_d = (_b = (_a = settings.versionSettings) === null || _a === void 0 ? void 0 : _a.override) !== null && _b !== void 0 ? _b : (_c = settings.versionSettings) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : 'latest');\n}\n//# sourceMappingURL=loader.js.map","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { Alias, Group, Identify, Page, Track } from '@segment/facade';\nimport { isOffline, isOnline } from '../../core/connection';\nimport { Context, ContextCancelation } from '../../core/context';\nimport { isServer } from '../../core/environment';\nimport { attempt } from '../../core/queue/delivery';\nimport { asPromise } from '../../lib/as-promise';\nimport { isPlanEventEnabled } from '../../lib/is-plan-event-enabled';\nimport { mergedOptions } from '../../lib/merged-options';\nimport { pWhile } from '../../lib/p-while';\nimport { PriorityQueue } from '../../lib/priority-queue';\nimport { PersistedPriorityQueue } from '../../lib/priority-queue/persisted';\nimport { applyDestinationMiddleware, } from '../middleware';\nimport { tsubMiddleware } from '../routing-middleware';\nimport { loadIntegration, resolveVersion, unloadIntegration } from './loader';\nvar klona = function (evt) {\n return JSON.parse(JSON.stringify(evt));\n};\nfunction flushQueue(xt, queue) {\n return __awaiter(this, void 0, void 0, function () {\n var failedQueue;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n failedQueue = [];\n if (isOffline()) {\n return [2 /*return*/, queue];\n }\n return [4 /*yield*/, pWhile(function () { return queue.length > 0 && isOnline(); }, function () { return __awaiter(_this, void 0, void 0, function () {\n var ctx, result, success;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n ctx = queue.pop();\n if (!ctx) {\n return [2 /*return*/];\n }\n return [4 /*yield*/, attempt(ctx, xt)];\n case 1:\n result = _a.sent();\n success = result instanceof Context;\n if (!success) {\n failedQueue.push(ctx);\n }\n return [2 /*return*/];\n }\n });\n }); })\n // re-add failed tasks\n ];\n case 1:\n _a.sent();\n // re-add failed tasks\n failedQueue.map(function (failed) { return queue.pushWithBackoff(failed); });\n return [2 /*return*/, queue];\n }\n });\n });\n}\nvar LegacyDestination = /** @class */ (function () {\n function LegacyDestination(name, version, settings, options) {\n if (settings === void 0) { settings = {}; }\n this.options = {};\n this.type = 'destination';\n this.middleware = [];\n this._ready = false;\n this._initialized = false;\n this.flushing = false;\n this.name = name;\n this.version = version;\n this.settings = __assign({}, settings);\n // AJS-Renderer sets an extraneous `type` setting that clobbers\n // existing type defaults. We need to remove it if it's present\n if (this.settings['type'] && this.settings['type'] === 'browser') {\n delete this.settings['type'];\n }\n this.options = options;\n this.buffer = options.disableClientPersistence\n ? new PriorityQueue(4, [])\n : new PersistedPriorityQueue(4, \"dest-\".concat(name));\n this.scheduleFlush();\n }\n LegacyDestination.prototype.isLoaded = function () {\n return this._ready;\n };\n LegacyDestination.prototype.ready = function () {\n var _a;\n return (_a = this.onReady) !== null && _a !== void 0 ? _a : Promise.resolve();\n };\n LegacyDestination.prototype.load = function (ctx, analyticsInstance) {\n return __awaiter(this, void 0, void 0, function () {\n var _a;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (this._ready || this.onReady !== undefined) {\n return [2 /*return*/];\n }\n _a = this;\n return [4 /*yield*/, loadIntegration(ctx, analyticsInstance, this.name, this.version, this.settings, this.options.obfuscate)];\n case 1:\n _a.integration = _b.sent();\n this.onReady = new Promise(function (resolve) {\n var onReadyFn = function () {\n _this._ready = true;\n resolve(true);\n };\n _this.integration.once('ready', onReadyFn);\n });\n this.onInitialize = new Promise(function (resolve) {\n var onInit = function () {\n _this._initialized = true;\n resolve(true);\n };\n _this.integration.on('initialize', onInit);\n });\n try {\n ctx.stats.increment('analytics_js.integration.invoke', 1, [\n \"method:initialize\",\n \"integration_name:\".concat(this.name),\n ]);\n this.integration.initialize();\n }\n catch (error) {\n ctx.stats.increment('analytics_js.integration.invoke.error', 1, [\n \"method:initialize\",\n \"integration_name:\".concat(this.name),\n ]);\n throw error;\n }\n return [2 /*return*/];\n }\n });\n });\n };\n LegacyDestination.prototype.unload = function (_ctx, _analyticsInstance) {\n return unloadIntegration(this.name, this.version, this.options.obfuscate);\n };\n LegacyDestination.prototype.addMiddleware = function () {\n var _a;\n var fn = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fn[_i] = arguments[_i];\n }\n this.middleware = (_a = this.middleware).concat.apply(_a, fn);\n };\n LegacyDestination.prototype.shouldBuffer = function (ctx) {\n return (\n // page events can't be buffered because of destinations that automatically add page views\n ctx.event.type !== 'page' &&\n (isOffline() || this._ready === false || this._initialized === false));\n };\n LegacyDestination.prototype.send = function (ctx, clz, eventType) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function () {\n var plan, ev, planEvent, afterMiddleware, event, err_1;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n if (this.shouldBuffer(ctx)) {\n this.buffer.push(ctx);\n this.scheduleFlush();\n return [2 /*return*/, ctx];\n }\n plan = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.plan) === null || _b === void 0 ? void 0 : _b.track;\n ev = ctx.event.event;\n if (plan && ev && this.name !== 'Segment.io') {\n planEvent = plan[ev];\n if (!isPlanEventEnabled(plan, planEvent)) {\n ctx.updateEvent('integrations', __assign(__assign({}, ctx.event.integrations), { All: false, 'Segment.io': true }));\n ctx.cancel(new ContextCancelation({\n retry: false,\n reason: \"Event \".concat(ev, \" disabled for integration \").concat(this.name, \" in tracking plan\"),\n type: 'Dropped by plan',\n }));\n return [2 /*return*/, ctx];\n }\n else {\n ctx.updateEvent('integrations', __assign(__assign({}, ctx.event.integrations), planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations));\n }\n if ((planEvent === null || planEvent === void 0 ? void 0 : planEvent.enabled) && (planEvent === null || planEvent === void 0 ? void 0 : planEvent.integrations[this.name]) === false) {\n ctx.cancel(new ContextCancelation({\n retry: false,\n reason: \"Event \".concat(ev, \" disabled for integration \").concat(this.name, \" in tracking plan\"),\n type: 'Dropped by plan',\n }));\n return [2 /*return*/, ctx];\n }\n }\n return [4 /*yield*/, applyDestinationMiddleware(this.name, klona(ctx.event), this.middleware)];\n case 1:\n afterMiddleware = _c.sent();\n if (afterMiddleware === null) {\n return [2 /*return*/, ctx];\n }\n event = new clz(afterMiddleware, {});\n ctx.stats.increment('analytics_js.integration.invoke', 1, [\n \"method:\".concat(eventType),\n \"integration_name:\".concat(this.name),\n ]);\n _c.label = 2;\n case 2:\n _c.trys.push([2, 5, , 6]);\n if (!this.integration) return [3 /*break*/, 4];\n return [4 /*yield*/, asPromise(this.integration.invoke.call(this.integration, eventType, event))];\n case 3:\n _c.sent();\n _c.label = 4;\n case 4: return [3 /*break*/, 6];\n case 5:\n err_1 = _c.sent();\n ctx.stats.increment('analytics_js.integration.invoke.error', 1, [\n \"method:\".concat(eventType),\n \"integration_name:\".concat(this.name),\n ]);\n throw err_1;\n case 6: return [2 /*return*/, ctx];\n }\n });\n });\n };\n LegacyDestination.prototype.track = function (ctx) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.send(ctx, Track, 'track')];\n });\n });\n };\n LegacyDestination.prototype.page = function (ctx) {\n var _a;\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_b) {\n if (((_a = this.integration) === null || _a === void 0 ? void 0 : _a._assumesPageview) && !this._initialized) {\n this.integration.initialize();\n }\n return [2 /*return*/, this.onInitialize.then(function () {\n return _this.send(ctx, Page, 'page');\n })];\n });\n });\n };\n LegacyDestination.prototype.identify = function (ctx) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.send(ctx, Identify, 'identify')];\n });\n });\n };\n LegacyDestination.prototype.alias = function (ctx) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.send(ctx, Alias, 'alias')];\n });\n });\n };\n LegacyDestination.prototype.group = function (ctx) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n return [2 /*return*/, this.send(ctx, Group, 'group')];\n });\n });\n };\n LegacyDestination.prototype.scheduleFlush = function () {\n var _this = this;\n if (this.flushing) {\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n setTimeout(function () { return __awaiter(_this, void 0, void 0, function () {\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n this.flushing = true;\n _a = this;\n return [4 /*yield*/, flushQueue(this, this.buffer)];\n case 1:\n _a.buffer = _b.sent();\n this.flushing = false;\n if (this.buffer.todo > 0) {\n this.scheduleFlush();\n }\n return [2 /*return*/];\n }\n });\n }); }, Math.random() * 5000);\n };\n return LegacyDestination;\n}());\nexport { LegacyDestination };\nexport function ajsDestinations(settings, globalIntegrations, options) {\n var _a, _b;\n if (globalIntegrations === void 0) { globalIntegrations = {}; }\n if (options === void 0) { options = {}; }\n if (isServer()) {\n return [];\n }\n if (settings.plan) {\n options = options !== null && options !== void 0 ? options : {};\n options.plan = settings.plan;\n }\n var routingRules = (_b = (_a = settings.middlewareSettings) === null || _a === void 0 ? void 0 : _a.routingRules) !== null && _b !== void 0 ? _b : [];\n var routingMiddleware = tsubMiddleware(routingRules);\n // merged remote CDN settings with user provided options\n var integrationOptions = mergedOptions(settings, options !== null && options !== void 0 ? options : {});\n return Object.entries(settings.integrations)\n .map(function (_a) {\n var _b;\n var name = _a[0], integrationSettings = _a[1];\n if (name.startsWith('Segment')) {\n return;\n }\n var allDisableAndNotDefined = globalIntegrations.All === false &&\n globalIntegrations[name] === undefined;\n if (globalIntegrations[name] === false || allDisableAndNotDefined) {\n return;\n }\n var type = integrationSettings.type, bundlingStatus = integrationSettings.bundlingStatus, versionSettings = integrationSettings.versionSettings;\n // We use `!== 'unbundled'` (versus `=== 'bundled'`) to be inclusive of\n // destinations without a defined value for `bundlingStatus`\n var deviceMode = bundlingStatus !== 'unbundled' &&\n (type === 'browser' ||\n ((_b = versionSettings === null || versionSettings === void 0 ? void 0 : versionSettings.componentTypes) === null || _b === void 0 ? void 0 : _b.includes('browser')));\n // checking for iterable is a quick fix we need in place to prevent\n // errors showing Iterable as a failed destiantion. Ideally, we should\n // fix the Iterable metadata instead, but that's a longer process.\n if ((!deviceMode && name !== 'Segment.io') || name === 'Iterable') {\n return;\n }\n var version = resolveVersion(integrationSettings);\n var destination = new LegacyDestination(name, version, integrationOptions[name], options);\n var routing = routingRules.filter(function (rule) { return rule.destinationName === name; });\n if (routing.length > 0) {\n destination.addMiddleware(routingMiddleware);\n }\n return destination;\n })\n .filter(function (xt) { return xt !== undefined; });\n}\n//# sourceMappingURL=index.js.map","import * as tsub from '@segment/tsub';\nexport var tsubMiddleware = function (rules) {\n return function (_a) {\n var payload = _a.payload, integration = _a.integration, next = _a.next;\n var store = new tsub.Store(rules);\n var rulesToApply = store.getRulesByDestinationName(integration);\n rulesToApply.forEach(function (rule) {\n var matchers = rule.matchers, transformers = rule.transformers;\n for (var i = 0; i < matchers.length; i++) {\n if (tsub.matches(payload.obj, matchers[i])) {\n payload.obj = tsub.transform(payload.obj, transformers[i]);\n if (payload.obj === null) {\n return next(null);\n }\n }\n }\n });\n next(payload);\n };\n};\n//# sourceMappingURL=index.js.map","import { __assign, __awaiter, __generator } from \"tslib\";\nimport { ContextCancelation } from '../../core/context';\nimport { asPromise } from '../../lib/as-promise';\nimport { toFacade } from '../../lib/to-facade';\nexport function applyDestinationMiddleware(destination, evt, middleware) {\n return __awaiter(this, void 0, void 0, function () {\n function applyMiddleware(event, fn) {\n return __awaiter(this, void 0, void 0, function () {\n var nextCalled, returnedEvent;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n nextCalled = false;\n returnedEvent = null;\n return [4 /*yield*/, asPromise(fn({\n payload: toFacade(event, {\n clone: true,\n traverse: false,\n }),\n integration: destination,\n next: function (evt) {\n nextCalled = true;\n if (evt === null) {\n returnedEvent = null;\n }\n if (evt) {\n returnedEvent = evt.obj;\n }\n },\n }))];\n case 1:\n _b.sent();\n if (!nextCalled && returnedEvent !== null) {\n returnedEvent = returnedEvent;\n returnedEvent.integrations = __assign(__assign({}, event.integrations), (_a = {}, _a[destination] = false, _a));\n }\n return [2 /*return*/, returnedEvent];\n }\n });\n });\n }\n var _i, middleware_1, md, result;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _i = 0, middleware_1 = middleware;\n _a.label = 1;\n case 1:\n if (!(_i < middleware_1.length)) return [3 /*break*/, 4];\n md = middleware_1[_i];\n return [4 /*yield*/, applyMiddleware(evt, md)];\n case 2:\n result = _a.sent();\n if (result === null) {\n return [2 /*return*/, null];\n }\n evt = result;\n _a.label = 3;\n case 3:\n _i++;\n return [3 /*break*/, 1];\n case 4: return [2 /*return*/, evt];\n }\n });\n });\n}\nexport function sourceMiddlewarePlugin(fn, integrations) {\n function apply(ctx) {\n return __awaiter(this, void 0, void 0, function () {\n var nextCalled;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n nextCalled = false;\n return [4 /*yield*/, asPromise(fn({\n payload: toFacade(ctx.event, {\n clone: true,\n traverse: false,\n }),\n integrations: integrations !== null && integrations !== void 0 ? integrations : {},\n next: function (evt) {\n nextCalled = true;\n if (evt) {\n ctx.event = evt.obj;\n }\n },\n }))];\n case 1:\n _a.sent();\n if (!nextCalled) {\n throw new ContextCancelation({\n retry: false,\n type: 'middleware_cancellation',\n reason: 'Middleware `next` function skipped',\n });\n }\n return [2 /*return*/, ctx];\n }\n });\n });\n }\n return {\n name: \"Source Middleware \".concat(fn.name),\n type: 'before',\n version: '0.1.0',\n isLoaded: function () { return true; },\n load: function (ctx) { return Promise.resolve(ctx); },\n track: apply,\n page: apply,\n identify: apply,\n alias: apply,\n group: apply,\n };\n}\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 });\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 /*** 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 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 for (var key in config.drop) {\n if (!config.drop.hasOwnProperty(key)) {\n continue;\n }\n // If key is empty, it refers to the top-level object.\n var field = key === '' ? payload : (0, dlv_1.default)(payload, key);\n // Can only drop props off of arrays and objects.\n if (typeof field !== 'object' || field === null) {\n continue;\n }\n for (var _i = 0, _a = config.drop[key]; _i < _a.length; _i++) {\n var target = _a[_i];\n delete field[target];\n }\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 for (var key in config.allow) {\n if (!config.allow.hasOwnProperty(key)) {\n continue;\n }\n // If key is empty, it refers to the top-level object.\n var field = key === '' ? payload : (0, dlv_1.default)(payload, key);\n // Can only drop props off of arrays and objects.\n if (typeof field !== 'object' || field === null) {\n continue;\n }\n // Execution order fortunately doesn't really matter (e.g. if someone filtered off of foo.bar, then foo.bar.baz)\n // except for micro-optimization.\n for (var k in field) {\n if (!field.hasOwnProperty(k)) {\n continue;\n }\n if (config.allow[key].indexOf(k) === -1) {\n delete field[k];\n }\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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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 \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/**\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 main = require( './main.js' );\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// 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 ];\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* 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 \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 [ 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 [ 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 [ 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 [ 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 [ 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>2]|=h.charCodeAt(u)<<8*u--;for(o=h=0;o>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":["isPlanEventEnabled","plan","planEvent","_a","_b","enabled","__default","normalizeName","name","toLowerCase","replace","obfuscatePathName","pathName","obfuscate","btoa","undefined","loadIntegration","ctx","analyticsInstance","version","settings","this","obfuscatedPathName","path","fullPath","err_1","deps","integrationBuilder","integration","label","concat","trys","push","sent","metric","window","performance","getEntriesByName","stats","gauge","Math","round","duration","_","recordLoadMetrics","Promise","all","map","dep","Integration","user","addIntegration","analytics","flushQueue","xt","queue","failedQueue","_this","length","result","pop","a","failed","pushWithBackoff","LegacyDestination","options","type","middleware","_ready","_initialized","flushing","buffer","disableClientPersistence","scheduleFlush","prototype","isLoaded","ready","onReady","resolve","load","once","onInitialize","on","increment","initialize","error","unload","_ctx","_analyticsInstance","unloadIntegration","addMiddleware","fn","_i","arguments","apply","shouldBuffer","event","send","clz","eventType","ev","afterMiddleware","_c","track","updateEvent","integrations","All","cancel","retry","reason","applyDestinationMiddleware","evt","JSON","parse","stringify","invoke","call","Track","page","_assumesPageview","then","Page","identify","Identify","alias","Alias","group","Group","setTimeout","todo","random","ajsDestinations","globalIntegrations","rules","routingRules","middlewareSettings","routingMiddleware","payload","next","getRulesByDestinationName","forEach","rule","matchers","transformers","i","obj","integrationOptions","Object","entries","integrationSettings","startsWith","allDisableAndNotDefined","bundlingStatus","versionSettings","componentTypes","includes","_d","override","resolveVersion","destination","filter","destinationName","applyMiddleware","nextCalled","returnedEvent","clone","traverse","middleware_1","md","sourceMiddlewarePlugin","__importDefault","mod","__esModule","defineProperty","exports","value","Store","matches","transform","transformers_1","enumerable","get","default","matchers_1","store_1","dlv_1","fqlEvaluate","ir","Array","isArray","getValue","item","first","second","operator","isIR","Error","compareItems","compareNumbers","indexOf","contains","str","glob","pattern","Pattern","star","chunk","scanChunk","matchChunk","t","ok","err","slice","globMatches","match","target","NaN","inRange","Scan","char","notNegated","foundMatch","nRange","lo","hi","getEsc","newChunk","matcher","e","fql","md5_1","math_base_special_ldexp_1","dset_1","unset_1","dropProperties","config","key","drop","hasOwnProperty","field","allowProperties","allow","k","mapProperties","initialPayload","actionMap","splitKey","split","parent_1","join","copy","valueToCopy","dset","move","valueToMove","unset","set","to_string","valueToString","sampleEvent","sample","percent","digest","exponent","significand","consumeDigest","leadingZeros","val","splice","parseInt","sampleConsistentPercent","arr","remainder","binary","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","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","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","ldexp","BIAS","MAX_EXPONENT","MAX_SUBNORMAL_EXPONENT","MIN_SUBNORMAL_EXPONENT","copysign","normalize","floatExp","FRAC","frac","exp","high","m","EXP_MASK","indices","HIGH","LOW","FLOAT64_VIEW","UINT32_VIEW","low","fcn","out","FLOAT64_SMALLEST_NORMAL","hasToStringTag","toStr","v","isOwn","tag","toString","toStrTag","n","o","keys","l","r","sin","PI","f","c","h","unescape","encodeURI","u","charCodeAt"],"sourceRoot":""}