-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js.map
1 lines (1 loc) · 643 KB
/
index.js.map
1
{"version":3,"file":"index.js","sources":["../node_modules/@stdlib/utils-define-property/lib/define_property.js","../node_modules/@stdlib/utils-define-property/lib/builtin.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_number.js","../node_modules/@stdlib/string-base-format-interpolate/lib/zero_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_integer.js","../node_modules/@stdlib/string-base-format-interpolate/lib/format_double.js","../node_modules/@stdlib/string-base-format-interpolate/lib/space_pad.js","../node_modules/@stdlib/string-base-format-interpolate/lib/main.js","../node_modules/@stdlib/string-base-format-interpolate/lib/is_string.js","../node_modules/@stdlib/string-base-format-tokenize/lib/main.js","../node_modules/@stdlib/string-format/lib/main.js","../node_modules/@stdlib/string-format/lib/is_string.js","../node_modules/@stdlib/utils-define-property/lib/polyfill.js","../node_modules/@stdlib/utils-define-property/lib/index.js","../node_modules/@stdlib/utils-define-property/lib/has_define_property_support.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-property/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-only-accessor/lib/main.js","../node_modules/@stdlib/utils-define-nonenumerable-read-write-accessor/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/re.js","../node_modules/@stdlib/assert-is-boolean/lib/primitive.js","../node_modules/@stdlib/assert-has-tostringtag-support/lib/main.js","../node_modules/@stdlib/assert-has-symbol-support/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostring.js","../node_modules/@stdlib/assert-has-own-property/lib/main.js","../node_modules/@stdlib/symbol-ctor/lib/main.js","../node_modules/@stdlib/utils-native-class/lib/tostringtag.js","../node_modules/@stdlib/utils-native-class/lib/index.js","../node_modules/@stdlib/utils-native-class/lib/polyfill.js","../node_modules/@stdlib/utils-native-class/lib/main.js","../node_modules/@stdlib/boolean-ctor/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/tostring.js","../node_modules/@stdlib/assert-is-boolean/lib/object.js","../node_modules/@stdlib/assert-is-boolean/lib/try2serialize.js","../node_modules/@stdlib/assert-is-boolean/lib/main.js","../node_modules/@stdlib/assert-is-boolean/lib/index.js","../node_modules/@stdlib/utils-global/lib/self.js","../node_modules/@stdlib/utils-global/lib/window.js","../node_modules/@stdlib/utils-global/lib/global.js","../node_modules/@stdlib/utils-global/lib/global_this.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/nodelist.js","../node_modules/@stdlib/utils-global/lib/main.js","../node_modules/@stdlib/utils-global/lib/codegen.js","../node_modules/@stdlib/utils-type-of/lib/fixtures/typedarray.js","../node_modules/@stdlib/regexp-function-name/lib/main.js","../node_modules/@stdlib/regexp-function-name/lib/regexp.js","../node_modules/@stdlib/regexp-function-name/lib/index.js","../node_modules/@stdlib/assert-is-array/lib/main.js","../node_modules/@stdlib/assert-is-object-like/lib/main.js","../node_modules/@stdlib/assert-is-buffer/lib/main.js","../node_modules/@stdlib/utils-constructor-name/lib/main.js","../node_modules/@stdlib/assert-is-object-like/lib/index.js","../node_modules/@stdlib/assert-tools-array-function/lib/main.js","../node_modules/@stdlib/utils-type-of/lib/index.js","../node_modules/@stdlib/utils-type-of/lib/check.js","../node_modules/@stdlib/utils-type-of/lib/polyfill.js","../node_modules/@stdlib/utils-type-of/lib/main.js","../node_modules/@stdlib/assert-is-function/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/primitive.js","../node_modules/@stdlib/number-ctor/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/tostring.js","../node_modules/@stdlib/assert-is-number/lib/object.js","../node_modules/@stdlib/assert-is-number/lib/try2serialize.js","../node_modules/@stdlib/assert-is-number/lib/main.js","../node_modules/@stdlib/assert-is-positive-number/lib/primitive.js","../node_modules/@stdlib/assert-is-positive-number/lib/object.js","../node_modules/@stdlib/assert-is-positive-number/lib/main.js","../node_modules/@stdlib/assert-is-object/lib/main.js","../node_modules/@stdlib/assert-is-number/lib/index.js","../node_modules/@stdlib/assert-is-positive-number/lib/index.js","../node_modules/@stdlib/object-ctor/lib/main.js","../node_modules/@stdlib/utils-get-prototype-of/lib/detect.js","../node_modules/@stdlib/utils-get-prototype-of/lib/native.js","../node_modules/@stdlib/utils-get-prototype-of/lib/polyfill.js","../node_modules/@stdlib/utils-get-prototype-of/lib/proto.js","../node_modules/@stdlib/utils-get-prototype-of/lib/main.js","../node_modules/@stdlib/assert-is-plain-object/lib/main.js","../node_modules/@stdlib/assert-is-uint32array/lib/main.js","../node_modules/@stdlib/utils-noop/lib/main.js","../node_modules/@stdlib/utils-constant-function/lib/main.js","../node_modules/@stdlib/error-tools-fmtprodmsg/lib/main.js","../node_modules/@stdlib/assert-has-iterator-symbol-support/lib/main.js","../node_modules/@stdlib/symbol-iterator/lib/main.js","../node_modules/@stdlib/math-base-special-floor/lib/main.js","../node_modules/@stdlib/math-base-assert-is-integer/lib/main.js","../node_modules/@stdlib/constants-array-max-typed-array-length/lib/index.js","../node_modules/@stdlib/assert-is-collection/lib/main.js","../node_modules/@stdlib/constants-float64-pinf/lib/index.js","../node_modules/@stdlib/constants-float64-ninf/lib/index.js","../node_modules/@stdlib/assert-is-integer/lib/integer.js","../node_modules/@stdlib/assert-is-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-integer/lib/object.js","../node_modules/@stdlib/assert-is-integer/lib/main.js","../node_modules/@stdlib/assert-is-positive-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-positive-integer/lib/object.js","../node_modules/@stdlib/assert-is-positive-integer/lib/main.js","../node_modules/@stdlib/assert-is-integer/lib/index.js","../node_modules/@stdlib/assert-is-positive-integer/lib/index.js","../node_modules/@stdlib/constants-float64-max-safe-integer/lib/index.js","../node_modules/@stdlib/constants-uint32-max/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/uint32array.js","../node_modules/@stdlib/array-uint32/lib/main.js","../node_modules/@stdlib/array-uint32/lib/index.js","../node_modules/@stdlib/assert-has-uint32array-support/lib/main.js","../node_modules/@stdlib/array-uint32/lib/polyfill.js","../node_modules/@stdlib/math-base-assert-is-nan/lib/main.js","../node_modules/@stdlib/math-base-special-max/lib/main.js","../node_modules/@stdlib/math-base-assert-is-positive-zero/lib/main.js","../node_modules/@stdlib/math-base-ops-umul/lib/main.js","../node_modules/@stdlib/array-base-assert-is-accessor-array/lib/main.js","../node_modules/@stdlib/array-base-getter/lib/main.js","../node_modules/@stdlib/array-base-setter/lib/main.js","../node_modules/@stdlib/array-base-accessor-getter/lib/main.js","../node_modules/@stdlib/array-base-accessor-setter/lib/main.js","../node_modules/@stdlib/array-dtype/lib/ctor2dtype.js","../node_modules/@stdlib/assert-is-float64array/lib/main.js","../node_modules/@stdlib/assert-has-float64array-support/lib/float64array.js","../node_modules/@stdlib/assert-has-float64array-support/lib/main.js","../node_modules/@stdlib/array-float64/lib/main.js","../node_modules/@stdlib/array-float64/lib/index.js","../node_modules/@stdlib/array-float64/lib/polyfill.js","../node_modules/@stdlib/assert-is-float32array/lib/main.js","../node_modules/@stdlib/assert-has-float32array-support/lib/float32array.js","../node_modules/@stdlib/array-float32/lib/main.js","../node_modules/@stdlib/array-float32/lib/index.js","../node_modules/@stdlib/assert-has-float32array-support/lib/main.js","../node_modules/@stdlib/array-float32/lib/polyfill.js","../node_modules/@stdlib/assert-is-int32array/lib/main.js","../node_modules/@stdlib/constants-int32-max/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/int32array.js","../node_modules/@stdlib/array-int32/lib/main.js","../node_modules/@stdlib/array-int32/lib/index.js","../node_modules/@stdlib/assert-has-int32array-support/lib/main.js","../node_modules/@stdlib/constants-int32-min/lib/index.js","../node_modules/@stdlib/array-int32/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint16array/lib/main.js","../node_modules/@stdlib/constants-uint16-max/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/uint16array.js","../node_modules/@stdlib/array-uint16/lib/main.js","../node_modules/@stdlib/array-uint16/lib/index.js","../node_modules/@stdlib/assert-has-uint16array-support/lib/main.js","../node_modules/@stdlib/array-uint16/lib/polyfill.js","../node_modules/@stdlib/assert-is-int16array/lib/main.js","../node_modules/@stdlib/constants-int16-max/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/int16array.js","../node_modules/@stdlib/array-int16/lib/main.js","../node_modules/@stdlib/array-int16/lib/index.js","../node_modules/@stdlib/assert-has-int16array-support/lib/main.js","../node_modules/@stdlib/constants-int16-min/lib/index.js","../node_modules/@stdlib/array-int16/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8array/lib/main.js","../node_modules/@stdlib/constants-uint8-max/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/uint8array.js","../node_modules/@stdlib/array-uint8/lib/main.js","../node_modules/@stdlib/array-uint8/lib/index.js","../node_modules/@stdlib/assert-has-uint8array-support/lib/main.js","../node_modules/@stdlib/array-uint8/lib/polyfill.js","../node_modules/@stdlib/assert-is-uint8clampedarray/lib/main.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/uint8clampedarray.js","../node_modules/@stdlib/array-uint8c/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/index.js","../node_modules/@stdlib/assert-has-uint8clampedarray-support/lib/main.js","../node_modules/@stdlib/array-uint8c/lib/polyfill.js","../node_modules/@stdlib/assert-is-int8array/lib/main.js","../node_modules/@stdlib/constants-int8-max/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/int8array.js","../node_modules/@stdlib/array-int8/lib/main.js","../node_modules/@stdlib/array-int8/lib/index.js","../node_modules/@stdlib/assert-has-int8array-support/lib/main.js","../node_modules/@stdlib/constants-int8-min/lib/index.js","../node_modules/@stdlib/array-int8/lib/polyfill.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/primitive.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/object.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/main.js","../node_modules/@stdlib/assert-is-nonnegative-integer/lib/index.js","../node_modules/@stdlib/constants-array-max-array-length/lib/index.js","../node_modules/@stdlib/assert-is-array-like-object/lib/main.js","../node_modules/@stdlib/assert-is-arraybuffer/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/primitive.js","../node_modules/@stdlib/assert-is-string/lib/valueof.js","../node_modules/@stdlib/assert-is-string/lib/object.js","../node_modules/@stdlib/assert-is-string/lib/try2valueof.js","../node_modules/@stdlib/assert-is-string/lib/main.js","../node_modules/@stdlib/complex-float64/lib/main.js","../node_modules/@stdlib/assert-is-string/lib/index.js","../node_modules/@stdlib/complex-float64/lib/tostring.js","../node_modules/@stdlib/complex-float64/lib/tojson.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/main.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/polyfill.js","../node_modules/@stdlib/number-float64-base-to-float32/lib/index.js","../node_modules/@stdlib/complex-float32/lib/main.js","../node_modules/@stdlib/assert-is-complex-like/lib/main.js","../node_modules/@stdlib/math-base-assert-is-even/lib/main.js","../node_modules/@stdlib/complex-float32/lib/tostring.js","../node_modules/@stdlib/complex-float32/lib/tojson.js","../node_modules/@stdlib/array-base-assert-is-complex64array/lib/main.js","../node_modules/@stdlib/array-base-assert-is-complex128array/lib/main.js","../node_modules/@stdlib/complex-realf/lib/main.js","../node_modules/@stdlib/complex-imagf/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex64/lib/main.js","../node_modules/@stdlib/strided-base-reinterpret-complex128/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/main.js","../node_modules/@stdlib/array-complex64/lib/from_array.js","../node_modules/@stdlib/complex-real/lib/main.js","../node_modules/@stdlib/complex-imag/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_iterator.js","../node_modules/@stdlib/array-complex64/lib/from_iterator_map.js","../node_modules/@stdlib/array-complex128/lib/main.js","../node_modules/@stdlib/array-complex128/lib/from_array.js","../node_modules/@stdlib/array-complex128/lib/from_iterator_map.js","../node_modules/@stdlib/array-dtype/lib/ctors.js","../node_modules/@stdlib/array-dtype/lib/dtypes.js","../node_modules/@stdlib/array-dtype/lib/main.js","../node_modules/@stdlib/array-base-arraylike2object/lib/main.js","../node_modules/@stdlib/blas-base-gcopy/lib/accessors.js","../node_modules/@stdlib/blas-base-gcopy/lib/main.js","../node_modules/@stdlib/assert-has-function-name-support/lib/foo.js","../node_modules/@stdlib/blas-base-gcopy/lib/index.js","../node_modules/@stdlib/blas-base-gcopy/lib/ndarray.js","../node_modules/@stdlib/utils-function-name/lib/main.js","../node_modules/@stdlib/assert-has-function-name-support/lib/main.js","../node_modules/@stdlib/assert-is-typed-array/lib/ctors.js","../node_modules/@stdlib/assert-is-typed-array/lib/main.js","../node_modules/@stdlib/assert-is-complex-typed-array/lib/ctors.js","../node_modules/@stdlib/assert-instance-of/lib/main.js","../node_modules/@stdlib/array-to-json/lib/ctors.js","../node_modules/@stdlib/array-to-json/lib/type.js","../node_modules/@stdlib/array-to-json/lib/main.js","../node_modules/@stdlib/assert-is-complex-typed-array/lib/main.js","../node_modules/@stdlib/random-base-mt19937/lib/rand_uint32.js","../node_modules/@stdlib/random-base-mt19937/lib/factory.js","../node_modules/@stdlib/assert-is-nan/lib/primitive.js","../node_modules/@stdlib/assert-is-nan/lib/object.js","../node_modules/@stdlib/assert-is-nan/lib/main.js","../node_modules/@stdlib/random-base-uniform/lib/uniform.js","../node_modules/@stdlib/random-base-uniform/lib/factory.js","../node_modules/@stdlib/random-base-uniform/lib/validate.js","../node_modules/@stdlib/random-base-mt19937/lib/index.js","../node_modules/@stdlib/random-base-mt19937/lib/main.js","../node_modules/@stdlib/assert-is-nan/lib/index.js","../node_modules/@stdlib/random-base-uniform/lib/index.js","../node_modules/@stdlib/random-base-uniform/lib/main.js","../lib/main.js","../node_modules/@stdlib/assert-is-iterator-like/lib/main.js","../lib/defaults.js","../node_modules/@stdlib/constants-float64-sqrt-three/lib/index.js"],"sourcesContent":["/**\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* https://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 Object.defineProperty === 'function' ) ? Object.defineProperty : null;\n\n\n// EXPORTS //\n\nexport default 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* https://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* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @name defineProperty\n* @type {Function}\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nvar defineProperty = Object.defineProperty;\n\n\n// EXPORTS //\n\nexport default defineProperty;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' ); // NOTE: we inline the `isNumber.isPrimitive` function from `@stdlib/assert/is-number` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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\n/**\n* Tests if a string starts with a minus sign (`-`).\n*\n* @private\n* @param {string} str - input string\n* @returns {boolean} boolean indicating if a string starts with a minus sign (`-`)\n*/\nfunction startsWithMinus( str ) {\n\treturn str[ 0 ] === '-';\n}\n\n/**\n* Returns a string of `n` zeros.\n*\n* @private\n* @param {number} n - number of zeros\n* @returns {string} string of zeros\n*/\nfunction zeros( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += '0';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with zeros to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction zeroPad( str, width, right ) {\n\tvar negative = false;\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tif ( startsWithMinus( str ) ) {\n\t\tnegative = true;\n\t\tstr = str.substr( 1 );\n\t}\n\tstr = ( right ) ?\n\t\tstr + zeros( pad ) :\n\t\tzeros( pad ) + str;\n\tif ( negative ) {\n\t\tstr = '-' + str;\n\t}\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default zeroPad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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\nimport isNumber from './is_number.js';\nimport zeroPad from './zero_pad.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as an integer.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid integer\n* @returns {string} formatted token argument\n*/\nfunction formatInteger( token ) {\n\tvar base;\n\tvar out;\n\tvar i;\n\n\tswitch ( token.specifier ) {\n\tcase 'b':\n\t\t// Case: %b (binary)\n\t\tbase = 2;\n\t\tbreak;\n\tcase 'o':\n\t\t// Case: %o (octal)\n\t\tbase = 8;\n\t\tbreak;\n\tcase 'x':\n\tcase 'X':\n\t\t// Case: %x, %X (hexadecimal)\n\t\tbase = 16;\n\t\tbreak;\n\tcase 'd':\n\tcase 'i':\n\tcase 'u':\n\tdefault:\n\t\t// Case: %d, %i, %u (decimal)\n\t\tbase = 10;\n\t\tbreak;\n\t}\n\tout = token.arg;\n\ti = parseInt( out, 10 );\n\tif ( !isFinite( i ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( out ) ) {\n\t\t\tthrow new Error( 'invalid integer. Value: ' + out );\n\t\t}\n\t\ti = 0;\n\t}\n\tif ( i < 0 && ( token.specifier === 'u' || base !== 10 ) ) {\n\t\ti = 0xffffffff + i + 1;\n\t}\n\tif ( i < 0 ) {\n\t\tout = ( -i ).toString( base );\n\t\tif ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tout = '-' + out;\n\t} else {\n\t\tout = i.toString( base );\n\t\tif ( !i && !token.precision ) {\n\t\t\tout = '';\n\t\t} else if ( token.precision ) {\n\t\t\tout = zeroPad( out, token.precision, token.padRight );\n\t\t}\n\t\tif ( token.sign ) {\n\t\t\tout = token.sign + out;\n\t\t}\n\t}\n\tif ( base === 16 ) {\n\t\tif ( token.alternate ) {\n\t\t\tout = '0x' + out;\n\t\t}\n\t\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\t\tuppercase.call( out ) :\n\t\t\tlowercase.call( out );\n\t}\n\tif ( base === 8 ) {\n\t\tif ( token.alternate && out.charAt( 0 ) !== '0' ) {\n\t\t\tout = '0' + out;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInteger;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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\nimport isNumber from './is_number.js';\n\n// NOTE: for the following, we explicitly avoid using stdlib packages in this particular package in order to avoid circular dependencies.\nvar abs = Math.abs; // eslint-disable-line stdlib/no-builtin-math\nvar lowercase = String.prototype.toLowerCase;\nvar uppercase = String.prototype.toUpperCase;\nvar replace = String.prototype.replace;\n\n\n// VARIABLES //\n\nvar RE_EXP_POS_DIGITS = /e\\+(\\d)$/;\nvar RE_EXP_NEG_DIGITS = /e-(\\d)$/;\nvar RE_ONLY_DIGITS = /^(\\d+)$/;\nvar RE_DIGITS_BEFORE_EXP = /^(\\d+)e/;\nvar RE_TRAILING_PERIOD_ZERO = /\\.0$/;\nvar RE_PERIOD_ZERO_EXP = /\\.0*e/;\nvar RE_ZERO_BEFORE_EXP = /(\\..*[^0])0*e/;\n\n\n// MAIN //\n\n/**\n* Formats a token object argument as a floating-point number.\n*\n* @private\n* @param {Object} token - token object\n* @throws {Error} must provide a valid floating-point number\n* @returns {string} formatted token argument\n*/\nfunction formatDouble( token ) {\n\tvar digits;\n\tvar out;\n\tvar f = parseFloat( token.arg );\n\tif ( !isFinite( f ) ) { // NOTE: We use the global `isFinite` function here instead of `@stdlib/math/base/assert/is-finite` in order to avoid circular dependencies.\n\t\tif ( !isNumber( token.arg ) ) {\n\t\t\tthrow new Error( 'invalid floating-point number. Value: ' + out );\n\t\t}\n\t\t// Case: NaN, Infinity, or -Infinity\n\t\tf = token.arg;\n\t}\n\tswitch ( token.specifier ) {\n\tcase 'e':\n\tcase 'E':\n\t\tout = f.toExponential( token.precision );\n\t\tbreak;\n\tcase 'f':\n\tcase 'F':\n\t\tout = f.toFixed( token.precision );\n\t\tbreak;\n\tcase 'g':\n\tcase 'G':\n\t\tif ( abs( f ) < 0.0001 ) {\n\t\t\tdigits = token.precision;\n\t\t\tif ( digits > 0 ) {\n\t\t\t\tdigits -= 1;\n\t\t\t}\n\t\t\tout = f.toExponential( digits );\n\t\t} else {\n\t\t\tout = f.toPrecision( token.precision );\n\t\t}\n\t\tif ( !token.alternate ) {\n\t\t\tout = replace.call( out, RE_ZERO_BEFORE_EXP, '$1e' );\n\t\t\tout = replace.call( out, RE_PERIOD_ZERO_EXP, 'e');\n\t\t\tout = replace.call( out, RE_TRAILING_PERIOD_ZERO, '' );\n\t\t}\n\t\tbreak;\n\tdefault:\n\t\tthrow new Error( 'invalid double notation. Value: ' + token.specifier );\n\t}\n\tout = replace.call( out, RE_EXP_POS_DIGITS, 'e+0$1' );\n\tout = replace.call( out, RE_EXP_NEG_DIGITS, 'e-0$1' );\n\tif ( token.alternate ) {\n\t\tout = replace.call( out, RE_ONLY_DIGITS, '$1.' );\n\t\tout = replace.call( out, RE_DIGITS_BEFORE_EXP, '$1.e' );\n\t}\n\tif ( f >= 0 && token.sign ) {\n\t\tout = token.sign + out;\n\t}\n\tout = ( token.specifier === uppercase.call( token.specifier ) ) ?\n\t\tuppercase.call( out ) :\n\t\tlowercase.call( out );\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatDouble;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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\n/**\n* Returns `n` spaces.\n*\n* @private\n* @param {number} n - number of spaces\n* @returns {string} string of spaces\n*/\nfunction spaces( n ) {\n\tvar out = '';\n\tvar i;\n\tfor ( i = 0; i < n; i++ ) {\n\t\tout += ' ';\n\t}\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Pads a token with spaces to the specified width.\n*\n* @private\n* @param {string} str - token argument\n* @param {number} width - token width\n* @param {boolean} [right=false] - boolean indicating whether to pad to the right\n* @returns {string} padded token argument\n*/\nfunction spacePad( str, width, right ) {\n\tvar pad = width - str.length;\n\tif ( pad < 0 ) {\n\t\treturn str;\n\t}\n\tstr = ( right ) ?\n\t\tstr + spaces( pad ) :\n\t\tspaces( pad ) + str;\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default spacePad;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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\nimport formatInteger from './format_integer.js';\nimport isString from './is_string.js';\nimport formatDouble from './format_double.js';\nimport spacePad from './space_pad.js';\nimport zeroPad from './zero_pad.js';\n\n\n// VARIABLES //\n\nvar fromCharCode = String.fromCharCode;\nvar isnan = isNaN; // NOTE: We use the global `isNaN` function here instead of `@stdlib/math/base/assert/is-nan` to avoid circular dependencies.\nvar isArray = Array.isArray; // NOTE: We use the global `Array.isArray` function here instead of `@stdlib/assert/is-array` to avoid circular dependencies.\n\n\n// FUNCTIONS //\n\n/**\n* Initializes token object with properties of supplied format identifier object or default values if not present.\n*\n* @private\n* @param {Object} token - format identifier object\n* @returns {Object} token object\n*/\nfunction initialize( token ) {\n\tvar out = {};\n\tout.specifier = token.specifier;\n\tout.precision = ( token.precision === void 0 ) ? 1 : token.precision;\n\tout.width = token.width;\n\tout.flags = token.flags || '';\n\tout.mapping = token.mapping;\n\treturn out;\n}\n\n\n// MAIN //\n\n/**\n* Generates string from a token array by interpolating values.\n*\n* @param {Array} tokens - string parts and format identifier objects\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be an array\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var tokens = [ 'beep ', { 'specifier': 's' } ];\n* var out = formatInterpolate( tokens, 'boop' );\n* // returns 'beep boop'\n*/\nfunction formatInterpolate( tokens ) {\n\tvar hasPeriod;\n\tvar flags;\n\tvar token;\n\tvar flag;\n\tvar num;\n\tvar out;\n\tvar pos;\n\tvar i;\n\tvar j;\n\n\tif ( !isArray( tokens ) ) {\n\t\tthrow new TypeError( 'invalid argument. First argument must be an array. Value: `' + tokens + '`.' );\n\t}\n\tout = '';\n\tpos = 1;\n\tfor ( i = 0; i < tokens.length; i++ ) {\n\t\ttoken = tokens[ i ];\n\t\tif ( isString( token ) ) {\n\t\t\tout += token;\n\t\t} else {\n\t\t\thasPeriod = token.precision !== void 0;\n\t\t\ttoken = initialize( token );\n\t\t\tif ( !token.specifier ) {\n\t\t\t\tthrow new TypeError( 'invalid argument. Token is missing `specifier` property. Index: `'+ i +'`. Value: `' + token + '`.' );\n\t\t\t}\n\t\t\tif ( token.mapping ) {\n\t\t\t\tpos = token.mapping;\n\t\t\t}\n\t\t\tflags = token.flags;\n\t\t\tfor ( j = 0; j < flags.length; j++ ) {\n\t\t\t\tflag = flags.charAt( j );\n\t\t\t\tswitch ( flag ) {\n\t\t\t\tcase ' ':\n\t\t\t\t\ttoken.sign = ' ';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\ttoken.sign = '+';\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '0':\n\t\t\t\t\ttoken.padZeros = flags.indexOf( '-' ) < 0; // NOTE: We use built-in `Array.prototype.indexOf` here instead of `@stdlib/assert/contains` in order to avoid circular dependencies.\n\t\t\t\t\tbreak;\n\t\t\t\tcase '#':\n\t\t\t\t\ttoken.alternate = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error( 'invalid flag: ' + flag );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( token.width === '*' ) {\n\t\t\t\ttoken.width = parseInt( arguments[ pos ], 10 );\n\t\t\t\tpos += 1;\n\t\t\t\tif ( isnan( token.width ) ) {\n\t\t\t\t\tthrow new TypeError( 'the argument for * width at position ' + pos + ' is not a number. Value: `' + token.width + '`.' );\n\t\t\t\t}\n\t\t\t\tif ( token.width < 0 ) {\n\t\t\t\t\ttoken.padRight = true;\n\t\t\t\t\ttoken.width = -token.width;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( hasPeriod ) {\n\t\t\t\tif ( token.precision === '*' ) {\n\t\t\t\t\ttoken.precision = parseInt( arguments[ pos ], 10 );\n\t\t\t\t\tpos += 1;\n\t\t\t\t\tif ( isnan( token.precision ) ) {\n\t\t\t\t\t\tthrow new TypeError( 'the argument for * precision at position ' + pos + ' is not a number. Value: `' + token.precision + '`.' );\n\t\t\t\t\t}\n\t\t\t\t\tif ( token.precision < 0 ) {\n\t\t\t\t\t\ttoken.precision = 1;\n\t\t\t\t\t\thasPeriod = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttoken.arg = arguments[ pos ];\n\t\t\tswitch ( token.specifier ) {\n\t\t\tcase 'b':\n\t\t\tcase 'o':\n\t\t\tcase 'x':\n\t\t\tcase 'X':\n\t\t\tcase 'd':\n\t\t\tcase 'i':\n\t\t\tcase 'u':\n\t\t\t\t// Case: %b (binary), %o (octal), %x, %X (hexadecimal), %d, %i (decimal), %u (unsigned decimal)\n\t\t\t\tif ( hasPeriod ) {\n\t\t\t\t\ttoken.padZeros = false;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatInteger( token );\n\t\t\t\tbreak;\n\t\t\tcase 's':\n\t\t\t\t// Case: %s (string)\n\t\t\t\ttoken.maxWidth = ( hasPeriod ) ? token.precision : -1;\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t// Case: %c (character)\n\t\t\t\tif ( !isnan( token.arg ) ) {\n\t\t\t\t\tnum = parseInt( token.arg, 10 );\n\t\t\t\t\tif ( num < 0 || num > 127 ) {\n\t\t\t\t\t\tthrow new Error( 'invalid character code. Value: ' + token.arg );\n\t\t\t\t\t}\n\t\t\t\t\ttoken.arg = ( isnan( num ) ) ?\n\t\t\t\t\t\tString( token.arg ) :\n\t\t\t\t\t\tfromCharCode( num );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'e':\n\t\t\tcase 'E':\n\t\t\tcase 'f':\n\t\t\tcase 'F':\n\t\t\tcase 'g':\n\t\t\tcase 'G':\n\t\t\t\t// Case: %e, %E (scientific notation), %f, %F (decimal floating point), %g, %G (uses the shorter of %e/E or %f/F)\n\t\t\t\tif ( !hasPeriod ) {\n\t\t\t\t\ttoken.precision = 6;\n\t\t\t\t}\n\t\t\t\ttoken.arg = formatDouble( token );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Error( 'invalid specifier: ' + token.specifier );\n\t\t\t}\n\t\t\t// Fit argument into field width...\n\t\t\tif ( token.maxWidth >= 0 && token.arg.length > token.maxWidth ) {\n\t\t\t\ttoken.arg = token.arg.substring( 0, token.maxWidth );\n\t\t\t}\n\t\t\tif ( token.padZeros ) {\n\t\t\t\ttoken.arg = zeroPad( token.arg, token.width || token.precision, token.padRight ); // eslint-disable-line max-len\n\t\t\t} else if ( token.width ) {\n\t\t\t\ttoken.arg = spacePad( token.arg, token.width, token.padRight );\n\t\t\t}\n\t\t\tout += token.arg || '';\n\t\t\tpos += 1;\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default formatInterpolate;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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// VARIABLES //\n\nvar RE = /%(?:([1-9]\\d*)\\$)?([0 +\\-#]*)(\\*|\\d+)?(?:(\\.)(\\*|\\d+)?)?[hlL]?([%A-Za-z])/g;\n\n\n// FUNCTIONS //\n\n/**\n* Parses a delimiter.\n*\n* @private\n* @param {Array} match - regular expression match\n* @returns {Object} delimiter token object\n*/\nfunction parse( match ) {\n\tvar token = {\n\t\t'mapping': ( match[ 1 ] ) ? parseInt( match[ 1 ], 10 ) : void 0,\n\t\t'flags': match[ 2 ],\n\t\t'width': match[ 3 ],\n\t\t'precision': match[ 5 ],\n\t\t'specifier': match[ 6 ]\n\t};\n\tif ( match[ 4 ] === '.' && match[ 5 ] === void 0 ) {\n\t\ttoken.precision = '1';\n\t}\n\treturn token;\n}\n\n\n// MAIN //\n\n/**\n* Tokenizes a string into an array of string parts and format identifier objects.\n*\n* @param {string} str - input string\n* @returns {Array} tokens\n*\n* @example\n* var tokens = formatTokenize( 'Hello %s!' );\n* // returns [ 'Hello ', {...}, '!' ]\n*/\nfunction formatTokenize( str ) {\n\tvar content;\n\tvar tokens;\n\tvar match;\n\tvar prev;\n\n\ttokens = [];\n\tprev = 0;\n\tmatch = RE.exec( str );\n\twhile ( match ) {\n\t\tcontent = str.slice( prev, RE.lastIndex - match[ 0 ].length );\n\t\tif ( content.length ) {\n\t\t\ttokens.push( content );\n\t\t}\n\t\ttokens.push( parse( match ) );\n\t\tprev = RE.lastIndex;\n\t\tmatch = RE.exec( str );\n\t}\n\tcontent = str.slice( prev );\n\tif ( content.length ) {\n\t\ttokens.push( content );\n\t}\n\treturn tokens;\n}\n\n\n// EXPORTS //\n\nexport default formatTokenize;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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\nimport interpolate from '@stdlib/string-base-format-interpolate';\nimport tokenize from '@stdlib/string-base-format-tokenize';\nimport isString from './is_string.js';\n\n\n// MAIN //\n\n/**\n* Inserts supplied variable values into a format string.\n*\n* @param {string} str - input string\n* @param {Array} ...args - variable values\n* @throws {TypeError} first argument must be a string\n* @throws {Error} invalid flags\n* @returns {string} formatted string\n*\n* @example\n* var str = format( 'Hello %s!', 'world' );\n* // returns 'Hello world!'\n*\n* @example\n* var str = format( 'Pi: ~%.2f', 3.141592653589793 );\n* // returns 'Pi: ~3.14'\n*/\nfunction format( str ) {\n\tvar args;\n\tvar i;\n\n\tif ( !isString( str ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', str ) );\n\t}\n\targs = [ tokenize( str ) ];\n\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn interpolate.apply( null, args );\n}\n\n\n// EXPORTS //\n\nexport default format;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' ); // NOTE: we inline the `isString.isPrimitive` function from `@stdlib/assert/is-string` in order to avoid circular dependencies.\n}\n\n\n// EXPORTS //\n\nexport default isString;\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* https://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/* eslint-disable no-underscore-dangle, no-proto */\n\n'use strict';\n\n// MODULES //\n\nimport format from '@stdlib/string-format';\n\n\n// VARIABLES //\n\nvar objectProtoype = Object.prototype;\nvar toStr = objectProtoype.toString;\nvar defineGetter = objectProtoype.__defineGetter__;\nvar defineSetter = objectProtoype.__defineSetter__;\nvar lookupGetter = objectProtoype.__lookupGetter__;\nvar lookupSetter = objectProtoype.__lookupSetter__;\n\n\n// MAIN //\n\n/**\n* Defines (or modifies) an object property.\n*\n* ## Notes\n*\n* - Property descriptors come in two flavors: **data descriptors** and **accessor descriptors**. A data descriptor is a property that has a value, which may or may not be writable. An accessor descriptor is a property described by a getter-setter function pair. A descriptor must be one of these two flavors and cannot be both.\n*\n* @param {Object} obj - object on which to define the property\n* @param {string} prop - property name\n* @param {Object} descriptor - property descriptor\n* @param {boolean} [descriptor.configurable=false] - boolean indicating if property descriptor can be changed and if the property can be deleted from the provided object\n* @param {boolean} [descriptor.enumerable=false] - boolean indicating if the property shows up when enumerating object properties\n* @param {boolean} [descriptor.writable=false] - boolean indicating if the value associated with the property can be changed with an assignment operator\n* @param {*} [descriptor.value] - property value\n* @param {(Function|void)} [descriptor.get=undefined] - function which serves as a getter for the property, or, if no getter, undefined. When the property is accessed, a getter function is called without arguments and with the `this` context set to the object through which the property is accessed (which may not be the object on which the property is defined due to inheritance). The return value will be used as the property value.\n* @param {(Function|void)} [descriptor.set=undefined] - function which serves as a setter for the property, or, if no setter, undefined. When assigning a property value, a setter function is called with one argument (the value being assigned to the property) and with the `this` context set to the object through which the property is assigned.\n* @throws {TypeError} first argument must be an object\n* @throws {TypeError} third argument must be an object\n* @throws {Error} property descriptor cannot have both a value and a setter and/or getter\n* @returns {Object} object with added property\n*\n* @example\n* var obj = {};\n*\n* defineProperty( obj, 'foo', {\n* 'value': 'bar'\n* });\n*\n* var str = obj.foo;\n* // returns 'bar'\n*/\nfunction defineProperty( obj, prop, descriptor ) {\n\tvar prototype;\n\tvar hasValue;\n\tvar hasGet;\n\tvar hasSet;\n\n\tif ( typeof obj !== 'object' || obj === null || toStr.call( obj ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an object. Value: `%s`.', obj ) );\n\t}\n\tif ( typeof descriptor !== 'object' || descriptor === null || toStr.call( descriptor ) === '[object Array]' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Property descriptor must be an object. Value: `%s`.', descriptor ) );\n\t}\n\thasValue = ( 'value' in descriptor );\n\tif ( hasValue ) {\n\t\tif (\n\t\t\tlookupGetter.call( obj, prop ) ||\n\t\t\tlookupSetter.call( obj, prop )\n\t\t) {\n\t\t\t// Override `__proto__` to avoid touching inherited accessors:\n\t\t\tprototype = obj.__proto__;\n\t\t\tobj.__proto__ = objectProtoype;\n\n\t\t\t// Delete property as existing getters/setters prevent assigning value to specified property:\n\t\t\tdelete obj[ prop ];\n\t\t\tobj[ prop ] = descriptor.value;\n\n\t\t\t// Restore original prototype:\n\t\t\tobj.__proto__ = prototype;\n\t\t} else {\n\t\t\tobj[ prop ] = descriptor.value;\n\t\t}\n\t}\n\thasGet = ( 'get' in descriptor );\n\thasSet = ( 'set' in descriptor );\n\n\tif ( hasValue && ( hasGet || hasSet ) ) {\n\t\tthrow new Error( 'invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.' );\n\t}\n\n\tif ( hasGet && defineGetter ) {\n\t\tdefineGetter.call( obj, prop, descriptor.get );\n\t}\n\tif ( hasSet && defineSetter ) {\n\t\tdefineSetter.call( obj, prop, descriptor.set );\n\t}\n\treturn obj;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\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* https://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* Define (or modify) an object property.\n*\n* @module @stdlib/utils-define-property\n*\n* @example\n* import defineProperty from '@stdlib/utils-define-property';\n*\n* var obj = {};\n* defineProperty( obj, 'foo', {\n* 'value': 'bar',\n* 'writable': false,\n* 'configurable': false,\n* 'enumerable': false\n* });\n* obj.foo = 'boop'; // => throws\n*/\n\n// MODULES //\n\nimport hasDefinePropertySupport from './has_define_property_support.js';\nimport builtin from './builtin.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar defineProperty;\nif ( hasDefinePropertySupport() ) {\n\tdefineProperty = builtin;\n} else {\n\tdefineProperty = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default defineProperty;\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* https://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\nimport defineProperty from './define_property.js';\n\n\n// MAIN //\n\n/**\n* Tests for `Object.defineProperty` support.\n*\n* @private\n* @returns {boolean} boolean indicating if an environment has `Object.defineProperty` support\n*\n* @example\n* var bool = hasDefinePropertySupport();\n* // returns <boolean>\n*/\nfunction hasDefinePropertySupport() {\n\t// Test basic support...\n\ttry {\n\t\tdefineProperty( {}, 'x', {} );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default hasDefinePropertySupport;\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* https://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\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only property.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {*} value - value to set\n*\n* @example\n* var obj = {};\n*\n* setNonEnumerableReadOnly( obj, 'foo', 'bar' );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnly( obj, prop, value ) {\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'writable': false,\n\t\t'value': value\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnly;\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* https://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\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-only accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - accessor\n*\n* @example\n* function getter() {\n* return 'bar';\n* }\n*\n* var obj = {};\n*\n* setNonEnumerableReadOnlyAccessor( obj, 'foo', getter );\n*\n* try {\n* obj.foo = 'boop';\n* } catch ( err ) {\n* console.error( err.message );\n* }\n*/\nfunction setNonEnumerableReadOnlyAccessor( obj, prop, getter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadOnlyAccessor;\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* https://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\nimport defineProperty from '@stdlib/utils-define-property';\n\n\n// MAIN //\n\n/**\n* Defines a non-enumerable read-write accessor.\n*\n* @param {Object} obj - object on which to define the property\n* @param {(string|symbol)} prop - property name\n* @param {Function} getter - get accessor\n* @param {Function} setter - set accessor\n*\n* @example\n* function getter() {\n* return name + ' foo';\n* }\n*\n* function setter( v ) {\n* name = v;\n* }\n*\n* var name = 'bar';\n* var obj = {};\n*\n* setNonEnumerableReadWriteAccessor( obj, 'foo', getter, setter );\n*\n* var v = obj.foo;\n* // returns 'bar foo'\n*\n* obj.foo = 'beep';\n*\n* v = obj.foo;\n* // returns 'beep foo'\n*/\nfunction setNonEnumerableReadWriteAccessor( obj, prop, getter, setter ) { // eslint-disable-line id-length\n\tdefineProperty( obj, prop, {\n\t\t'configurable': false,\n\t\t'enumerable': false,\n\t\t'get': getter,\n\t\t'set': setter\n\t});\n}\n\n\n// EXPORTS //\n\nexport default setNonEnumerableReadWriteAccessor;\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* https://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\nvar RE = /./;\n\n\n// EXPORTS //\n\nexport default RE;\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* https://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* Tests if a value is a boolean primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean primitive\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns false\n*/\nfunction isBoolean( value ) {\n\treturn ( typeof value === 'boolean' );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\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* https://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\nimport hasSymbols from '@stdlib/assert-has-symbol-support';\n\n\n// VARIABLES //\n\nvar FLG = hasSymbols();\n\n\n// MAIN //\n\n/**\n* Tests for native `toStringTag` support.\n*\n* @returns {boolean} boolean indicating if an environment has `toStringTag` support\n*\n* @example\n* var bool = hasToStringTagSupport();\n* // returns <boolean>\n*/\nfunction hasToStringTagSupport() {\n\treturn ( FLG && typeof Symbol.toStringTag === 'symbol' );\n}\n\n\n// EXPORTS //\n\nexport default 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* https://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*/\n\n'use strict';\n\n// MAIN //\n\n/**\n* Tests for native `Symbol` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol` support\n*\n* @example\n* var bool = hasSymbolSupport();\n* // returns <boolean>\n*/\nfunction hasSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nexport default 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* https://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\nexport default 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* https://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 Sym = ( typeof Symbol === 'function' ) ? Symbol : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Sym;\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* https://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\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\nvar toStrTag = ( typeof Symbol === 'function' ) ? Symbol.toStringTag : '';\n\n\n// EXPORTS //\n\nexport default toStrTag;\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* https://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* import nativeClass from '@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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main;\nif ( hasToStringTag() ) {\n\tmain = polyfill;\n} else {\n\tmain = builtin;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport toStringTag from './tostringtag.js';\nimport toStr from './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\nexport default 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* https://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\nimport toStr from './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\nexport default nativeClass;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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* Returns a boolean.\n*\n* @name Boolean\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {(boolean|Boolean)} boolean\n*\n* @example\n* var b = Boolean( null );\n* // returns false\n*\n* b = Boolean( [] );\n* // returns true\n*\n* b = Boolean( {} );\n* // returns true\n*\n* @example\n* var b = new Boolean( false );\n* // returns <Boolean>\n*/\nvar Bool = Boolean; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Boolean.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\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* https://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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Boolean from '@stdlib/boolean-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a boolean object\n*\n* @example\n* var bool = isBoolean( true );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Boolean ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Boolean]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\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* https://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\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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* https://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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a boolean.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a boolean\n*\n* @example\n* var bool = isBoolean( false );\n* // returns true\n*\n* @example\n* var bool = isBoolean( true );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n*\n* var bool = isBoolean( new Boolean( true ) );\n* // returns true\n*/\nfunction isBoolean( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isBoolean;\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* https://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 boolean.\n*\n* @module @stdlib/assert-is-boolean\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import isBoolean from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( false );\n* // returns true\n*\n* bool = isBoolean( new Boolean( true ) );\n* // returns false\n*\n* @example\n* import Boolean from '@stdlib/boolean-ctor';\n* import { isObject as isBoolean } from '@stdlib/assert-is-boolean';\n*\n* var bool = isBoolean( true );\n* // returns false\n*\n* bool = isBoolean( new Boolean( false ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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* https://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 obj = ( typeof self === 'object' ) ? self : null;\n\n\n// EXPORTS //\n\nexport default obj;\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* https://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 obj = ( typeof window === 'object' ) ? window : null;\n\n\n// EXPORTS //\n\nexport default obj;\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* https://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 obj = ( typeof global === 'object' ) ? global : null;\n\n\n// EXPORTS //\n\nexport default obj;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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 obj = ( typeof globalThis === 'object' ) ? globalThis : null; // eslint-disable-line no-undef\n\n\n// EXPORTS //\n\nexport default obj;\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* https://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\nimport getGlobal from '@stdlib/utils-global';\n\n\n// MAIN //\n\nvar root = getGlobal();\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\n\nexport default nodeList;\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* https://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\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport format from '@stdlib/string-format';\nimport getThis from './codegen.js';\nimport Self from './self.js';\nimport Win from './window.js';\nimport Global from './global.js';\nimport GlobalThis from './global_this.js';\n\n\n// MAIN //\n\n/**\n* Returns the global object.\n*\n* ## Notes\n*\n* - Using code generation is the **most** reliable way to resolve the global object; however, doing so is likely to violate content security policies (CSPs) in, e.g., Chrome Apps and elsewhere.\n*\n* @param {boolean} [codegen=false] - boolean indicating whether to use code generation to resolve the global object\n* @throws {TypeError} must provide a boolean\n* @throws {Error} unable to resolve global object\n* @returns {Object} global object\n*\n* @example\n* var g = getGlobal();\n* // returns {...}\n*/\nfunction getGlobal( codegen ) {\n\tif ( arguments.length ) {\n\t\tif ( !isBoolean( codegen ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a boolean. Value: `%s`.', codegen ) );\n\t\t}\n\t\tif ( codegen ) {\n\t\t\treturn getThis();\n\t\t}\n\t\t// Fall through...\n\t}\n\t// Case: 2020 revision of ECMAScript standard\n\tif ( GlobalThis ) {\n\t\treturn GlobalThis;\n\t}\n\t// Case: browsers and web workers\n\tif ( Self ) {\n\t\treturn Self;\n\t}\n\t// Case: browsers\n\tif ( Win ) {\n\t\treturn Win;\n\t}\n\t// Case: Node.js\n\tif ( Global ) {\n\t\treturn Global;\n\t}\n\t// Case: unknown\n\tthrow new Error( 'unexpected error. Unable to resolve global object.' );\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\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* https://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* Returns the global object using code generation.\n*\n* @private\n* @returns {Object} global object\n*/\nfunction getGlobal() {\n\treturn new Function( 'return this;' )(); // eslint-disable-line no-new-func, stdlib/require-globals\n}\n\n\n// EXPORTS //\n\nexport default getGlobal;\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* https://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\nvar typedarray = Int8Array; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default typedarray;\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* https://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* Returns a regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @returns {RegExp} regular expression\n*\n* @example\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\nfunction reFunctionName() {\n\treturn /^\\s*function\\s*([^(]*)/i;\n}\n\n\n// EXPORTS //\n\nexport default reFunctionName;\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* https://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\nimport reFunctionName from './main.js';\n\n\n// MAIN //\n\n/**\n* Captures everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* Regular expression: `/^\\s*function\\s*([^(]*)/i`\n*\n* - `/^\\s*`\n* - Match zero or more spaces at beginning\n*\n* - `function`\n* - Match the word `function`\n*\n* - `\\s*`\n* - Match zero or more spaces after the word `function`\n*\n* - `()`\n* - Capture\n*\n* - `[^(]*`\n* - Match anything except a left parenthesis `(` zero or more times\n*\n* - `/i`\n* - ignore case\n*\n* @constant\n* @type {RegExp}\n* @default /^\\s*function\\s*([^(]*)/i\n*/\nvar RE_FUNCTION_NAME = reFunctionName();\n\n\n// EXPORTS //\n\nexport default RE_FUNCTION_NAME;\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* https://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* Regular expression to capture everything that is not a space immediately after the `function` keyword and before the first left parenthesis.\n*\n* @module @stdlib/regexp-function-name\n*\n* @example\n* import reFunctionName from '@stdlib/regexp-function-name';\n* var RE_FUNCTION_NAME = reFunctionName();\n*\n* function fname( fcn ) {\n* return RE_FUNCTION_NAME.exec( fcn.toString() )[ 1 ];\n* }\n*\n* var fn = fname( Math.sqrt );\n* // returns 'sqrt'\n*\n* fn = fname( Int8Array );\n* // returns 'Int8Array'\n*\n* fn = fname( Object.prototype.toString );\n* // returns 'toString'\n*\n* fn = fname( function(){} );\n* // returns ''\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport REGEXP from './regexp.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'REGEXP', REGEXP );\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar f;\n\n\n// FUNCTIONS //\n\n/**\n* Tests if a value is an array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an array\n*\n* @example\n* var bool = isArray( [] );\n* // returns true\n*\n* @example\n* var bool = isArray( {} );\n* // returns false\n*/\nfunction isArray( value ) {\n\treturn ( nativeClass( value ) === '[object Array]' );\n}\n\n\n// MAIN //\n\nif ( Array.isArray ) {\n\tf = Array.isArray;\n} else {\n\tf = isArray;\n}\n\n\n// EXPORTS //\n\nexport default f;\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* https://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* Tests if a value is object-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is object-like\n*\n* @example\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( [] );\n* // returns true\n*\n* @example\n* var bool = isObjectLike( null );\n* // returns false\n*/\nfunction isObjectLike( value ) {\n\treturn (\n\t\tvalue !== null &&\n\t\ttypeof value === 'object'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObjectLike;\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* https://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\nimport isObjectLike from '@stdlib/assert-is-object-like';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Buffer instance.\n*\n* @param {*} value - value to validate\n* @returns {boolean} boolean indicating if a value is a Buffer instance\n*\n* @example\n* var v = isBuffer( new Buffer( 'beep' ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( new Buffer( [1,2,3,4] ) );\n* // returns true\n*\n* @example\n* var v = isBuffer( {} );\n* // returns false\n*\n* @example\n* var v = isBuffer( [] );\n* // returns false\n*/\nfunction isBuffer( value ) {\n\treturn (\n\t\tisObjectLike( value ) &&\n\t\t(\n\t\t\t// eslint-disable-next-line no-underscore-dangle\n\t\t\tvalue._isBuffer || // for envs missing Object.prototype.constructor (e.g., Safari 5-7)\n\t\t\t(\n\t\t\t\tvalue.constructor &&\n\n\t\t\t\t// WARNING: `typeof` is not a foolproof check, as certain envs consider RegExp and NodeList instances to be functions\n\t\t\t\ttypeof value.constructor.isBuffer === 'function' &&\n\t\t\t\tvalue.constructor.isBuffer( value )\n\t\t\t)\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isBuffer;\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* https://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\nimport nativeClass from '@stdlib/utils-native-class';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\nimport isBuffer from '@stdlib/assert-is-buffer';\n\n\n// MAIN //\n\n/**\n* Determines the name of a value's constructor.\n*\n* @param {*} v - input value\n* @returns {string} name of a value's constructor\n*\n* @example\n* var v = constructorName( 'a' );\n* // returns 'String'\n*\n* @example\n* var v = constructorName( 5 );\n* // returns 'Number'\n*\n* @example\n* var v = constructorName( null );\n* // returns 'Null'\n*\n* @example\n* var v = constructorName( undefined );\n* // returns 'Undefined'\n*\n* @example\n* var v = constructorName( function noop() {} );\n* // returns 'Function'\n*/\nfunction constructorName( v ) {\n\tvar match;\n\tvar name;\n\tvar ctor;\n\tname = nativeClass( v ).slice( 8, -1 );\n\tif ( (name === 'Object' || name === 'Error') && v.constructor ) {\n\t\tctor = v.constructor;\n\t\tif ( typeof ctor.name === 'string' ) {\n\t\t\treturn ctor.name;\n\t\t}\n\t\tmatch = RE.exec( ctor.toString() );\n\t\tif ( match ) {\n\t\t\treturn match[ 1 ];\n\t\t}\n\t}\n\tif ( isBuffer( v ) ) {\n\t\treturn 'Buffer';\n\t}\n\treturn name;\n}\n\n\n// EXPORTS //\n\nexport default constructorName;\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* https://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 object-like.\n*\n* @module @stdlib/assert-is-object-like\n*\n* @example\n* import isObjectLike from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( {} );\n* // returns true\n*\n* bool = isObjectLike( [] );\n* // returns true\n*\n* bool = isObjectLike( null );\n* // returns false\n*\n* @example\n* import { isObjectLikeArray as isObjectLike } from '@stdlib/assert-is-object-like';\n*\n* var bool = isObjectLike( [ {}, [] ] );\n* // returns true\n*\n* bool = isObjectLike( [ {}, '3.0' ] );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport arrayfun from '@stdlib/assert-tools-array-function';\nimport main from './main.js';\n\n\n// VARIABLES //\n\nvar isObjectLikeArray = arrayfun( main );\n\n\n// MAIN //\n\nsetReadOnly( main, 'isObjectLikeArray', isObjectLikeArray );\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport isArray from '@stdlib/assert-is-array';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns a function which tests if every element in an array passes a test condition.\n*\n* @param {Function} predicate - function to apply\n* @throws {TypeError} must provide a function\n* @returns {Function} an array function\n*\n* @example\n* import isOdd from '@stdlib/assert-is-odd';\n*\n* var arr1 = [ 1, 3, 5, 7 ];\n* var arr2 = [ 3, 5, 8 ];\n*\n* var validate = arrayfcn( isOdd );\n*\n* var bool = validate( arr1 );\n* // returns true\n*\n* bool = validate( arr2 );\n* // returns false\n*/\nfunction arrayfcn( predicate ) {\n\tif ( typeof predicate !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', predicate ) );\n\t}\n\treturn every;\n\n\t/**\n\t* Tests if every element in an array passes a test condition.\n\t*\n\t* @private\n\t* @param {*} value - value to test\n\t* @returns {boolean} boolean indicating whether a value is an array for which all elements pass a test condition\n\t*/\n\tfunction every( value ) {\n\t\tvar len;\n\t\tvar i;\n\t\tif ( !isArray( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tlen = value.length;\n\t\tif ( len === 0 ) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tif ( predicate( value[ i ] ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default arrayfcn;\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* https://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* Determine a value's type.\n*\n* @module @stdlib/utils-type-of\n*\n* @example\n* import typeOf from '@stdlib/utils-type-of';\n*\n* var str = typeOf( 'a' );\n* // returns 'string'\n*\n* str = typeOf( 5 );\n* // returns 'number'\n*/\n\n// MODULES //\n\nimport usePolyfill from './check.js';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar main = ( usePolyfill() ) ? polyfill : builtin;\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport RE from './fixtures/re.js';\nimport nodeList from './fixtures/nodelist.js';\nimport typedarray from './fixtures/typedarray.js';\n\n\n// MAIN //\n\n/**\n* Checks whether a polyfill is needed when using the `typeof` operator.\n*\n* @private\n* @returns {boolean} boolean indicating whether a polyfill is needed\n*/\nfunction check() {\n\tif (\n\t\t// Chrome 1-12 returns 'function' for regular expression instances (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof):\n\t\ttypeof RE === 'function' ||\n\n\t\t// Safari 8 returns 'object' for typed array and weak map constructors (underscore #1929):\n\t\ttypeof typedarray === 'object' ||\n\n\t\t// PhantomJS 1.9 returns 'function' for `NodeList` instances (underscore #2236):\n\t\ttypeof nodeList === 'function'\n\t) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default check;\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* https://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\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\treturn ctorName( v ).toLowerCase();\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\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* https://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\nimport ctorName from '@stdlib/utils-constructor-name';\n\n\n// NOTES //\n\n/*\n* Built-in `typeof` operator behavior:\n*\n* ```text\n* typeof null => 'object'\n* typeof undefined => 'undefined'\n* typeof 'a' => 'string'\n* typeof 5 => 'number'\n* typeof NaN => 'number'\n* typeof true => 'boolean'\n* typeof false => 'boolean'\n* typeof {} => 'object'\n* typeof [] => 'object'\n* typeof function foo(){} => 'function'\n* typeof function* foo(){} => 'object'\n* typeof Symbol() => 'symbol'\n* ```\n*\n*/\n\n\n// MAIN //\n\n/**\n* Determines a value's type.\n*\n* @param {*} v - input value\n* @returns {string} string indicating the value's type\n*/\nfunction typeOf( v ) {\n\tvar type;\n\n\t// Address `typeof null` => `object` (see https://wiki.ecmascript.org/doku.php?id=harmony:typeof_null):\n\tif ( v === null ) {\n\t\treturn 'null';\n\t}\n\ttype = typeof v;\n\n\t// If the `typeof` operator returned something other than `object`, we are done. Otherwise, we need to check for an internal class name or search for a constructor.\n\tif ( type === 'object' ) {\n\t\treturn ctorName( v ).toLowerCase();\n\t}\n\treturn type;\n}\n\n\n// EXPORTS //\n\nexport default typeOf;\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* https://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\nimport typeOf from '@stdlib/utils-type-of';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a function.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a function\n*\n* @example\n* function beep() {\n* return 'beep';\n* }\n*\n* var bool = isFunction( beep );\n* // returns true\n*/\nfunction isFunction( value ) {\n\t// Note: cannot use `typeof` directly, as various browser engines incorrectly return `'function'` when operating on non-function objects, such as regular expressions and NodeLists.\n\treturn ( typeOf( value ) === 'function' );\n}\n\n\n// EXPORTS //\n\nexport default isFunction;\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* https://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* Tests if a value is a number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( typeof value === 'number' );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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* https://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\nexport default 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* https://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\nimport Number from '@stdlib/number-ctor';\n\n\n// MAIN //\n\n// eslint-disable-next-line stdlib/no-redeclare\nvar toString = Number.prototype.toString; // non-generic\n\n\n// EXPORTS //\n\nexport default toString;\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* https://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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport Number from '@stdlib/number-ctor';\nimport test from './try2serialize.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\nfunction isNumber( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof Number ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object Number]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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* https://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\nimport toString from './tostring.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to serialize a value to a string.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value can be serialized\n*/\nfunction test( value ) {\n\ttry {\n\t\ttoString.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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* https://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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a number\n*\n* @example\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* @example\n* var bool = isNumber( NaN );\n* // returns true\n*\n* @example\n* var bool = isNumber( null );\n* // returns false\n*/\nfunction isNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNumber;\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* https://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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a positive value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a positive value\n*\n* @example\n* var bool = isPositiveNumber( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isPositiveNumber( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isPositiveNumber( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tvalue > 0.0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isPositiveNumber;\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* https://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\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a positive value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a positive value\n*\n* @example\n* var bool = isPositiveNumber( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isPositiveNumber( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isPositiveNumber( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tvalue.valueOf() > 0.0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isPositiveNumber;\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* https://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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a positive number.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a positive number\n*\n* @example\n* var bool = isPositiveNumber( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isPositiveNumber( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isPositiveNumber( 3.14 );\n* // returns true\n*\n* @example\n* var bool = isPositiveNumber( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isPositiveNumber( null );\n* // returns false\n*/\nfunction isPositiveNumber( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isPositiveNumber;\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* https://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\nimport isArray from '@stdlib/assert-is-array';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an object; e.g., `{}`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an object\n*\n* @example\n* var bool = isObject( {} );\n* // returns true\n*\n* @example\n* var bool = isObject( null );\n* // returns false\n*/\nfunction isObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\t!isArray( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isObject;\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* https://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 number.\n*\n* @module @stdlib/assert-is-number\n*\n* @example\n* import isNumber from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns true\n*\n* bool = isNumber( NaN );\n* // returns true\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNumber } from '@stdlib/assert-is-number';\n*\n* var bool = isNumber( 3.14 );\n* // returns false\n*\n* bool = isNumber( new Number( 3.14 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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* https://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 positive number.\n*\n* @module @stdlib/assert-is-positive-number\n*\n* @example\n* import isPositiveNumber from '@stdlib/assert-is-positive-number';\n*\n* var bool = isPositiveNumber( 5.0 );\n* // returns true\n*\n* bool = isPositiveNumber( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isPositiveNumber( 3.14 );\n* // returns true\n*\n* bool = isPositiveNumber( -5.0 );\n* // returns false\n*\n* bool = isPositiveNumber( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isPositiveNumber } from '@stdlib/assert-is-positive-number';\n*\n* var bool = isPositiveNumber( 3.0 );\n* // returns true\n*\n* bool = isPositiveNumber( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isPositiveNumber } from '@stdlib/assert-is-positive-number';\n*\n* var bool = isPositiveNumber( 3.0 );\n* // returns false\n*\n* bool = isPositiveNumber( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default main;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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* Returns an object.\n*\n* @name Object\n* @constructor\n* @type {Function}\n* @param {*} value - input value\n* @returns {Object} object\n*\n* @example\n* var o = new Object( null );\n* // returns {}\n*\n* @example\n* var o = new Object( 5.0 );\n* // returns <Number>\n*\n* @example\n* var o = new Object( 'beep' );\n* // returns <String>\n*\n* @example\n* var o1 = {};\n*\n* var o2 = new Object( o1 );\n* // returns {}\n*\n* var bool = ( o1 === o2 );\n* // returns true\n*/\nvar Obj = Object; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default Obj;\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* https://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\nimport isFunction from '@stdlib/assert-is-function';\nimport builtin from './native.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar getProto;\nif ( isFunction( Object.getPrototypeOf ) ) {\n\tgetProto = builtin;\n} else {\n\tgetProto = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default getProto;\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* https://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 getProto = Object.getPrototypeOf;\n\n\n// EXPORTS //\n\nexport default getProto;\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* https://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\nimport nativeClass from '@stdlib/utils-native-class';\nimport getProto from './proto.js';\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {(Object|null)} prototype\n*/\nfunction getPrototypeOf( obj ) {\n\tvar proto = getProto( obj );\n\tif ( proto || proto === null ) {\n\t\treturn proto;\n\t}\n\tif ( nativeClass( obj.constructor ) === '[object Function]' ) {\n\t\t// May break if the constructor has been tampered with...\n\t\treturn obj.constructor.prototype;\n\t}\n\tif ( obj instanceof Object ) {\n\t\treturn Object.prototype;\n\t}\n\t// Return `null` for objects created via `Object.create( null )`. Also return `null` for cross-realm objects on browsers that lack `__proto__` support, such as IE < 11.\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default getPrototypeOf;\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* https://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* Returns the value of the `__proto__` property.\n*\n* @private\n* @param {Object} obj - input object\n* @returns {*} value of `__proto__` property\n*/\nfunction getProto( obj ) {\n\t// eslint-disable-next-line no-proto\n\treturn obj.__proto__;\n}\n\n\n// EXPORTS //\n\nexport default getProto;\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* https://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\nimport Object from '@stdlib/object-ctor';\nimport getProto from './detect.js';\n\n\n// MAIN //\n\n/**\n* Returns the prototype of a provided object.\n*\n* @param {*} value - input value\n* @returns {(Object|null)} prototype\n*\n* @example\n* var proto = getPrototypeOf( {} );\n* // returns {}\n*/\nfunction getPrototypeOf( value ) {\n\tif (\n\t\tvalue === null ||\n\t\tvalue === void 0\n\t) {\n\t\treturn null;\n\t}\n\t// In order to ensure consistent ES5/ES6 behavior, cast input value to an object (strings, numbers, booleans); ES5 `Object.getPrototypeOf` throws when provided primitives and ES6 `Object.getPrototypeOf` casts:\n\tvalue = Object( value );\n\n\treturn getProto( value );\n}\n\n\n// EXPORTS //\n\nexport default getPrototypeOf;\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* https://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\nimport isObject from '@stdlib/assert-is-object';\nimport isFunction from '@stdlib/assert-is-function';\nimport getPrototypeOf from '@stdlib/utils-get-prototype-of';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar objectPrototype = Object.prototype;\n\n\n// FUNCTIONS //\n\n/**\n* Tests that an object only has own properties.\n*\n* @private\n* @param {Object} obj - value to test\n* @returns {boolean} boolean indicating if an object only has own properties\n*/\nfunction ownProps( obj ) {\n\tvar key;\n\n\t// NOTE: possibility of perf boost if key enumeration order is known (see https://stackoverflow.com/questions/18531624/isplainobject-thing).\n\tfor ( key in obj ) {\n\t\tif ( !hasOwnProp( obj, key ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\n\n// MAIN //\n\n/**\n* Tests if a value is a plain object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a plain object\n*\n* @example\n* var bool = isPlainObject( {} );\n* // returns true\n*\n* @example\n* var bool = isPlainObject( null );\n* // returns false\n*/\nfunction isPlainObject( value ) {\n\tvar proto;\n\n\t// Screen for obvious non-objects...\n\tif ( !isObject( value ) ) {\n\t\treturn false;\n\t}\n\t// Objects with no prototype (e.g., `Object.create( null )`) are plain...\n\tproto = getPrototypeOf( value );\n\tif ( !proto ) {\n\t\treturn true;\n\t}\n\t// Objects having a prototype are plain if and only if they are constructed with a global `Object` function and the prototype points to the prototype of a plain object...\n\treturn (\n\t\t// Cannot have own `constructor` property:\n\t\t!hasOwnProp( value, 'constructor' ) &&\n\n\t\t// Prototype `constructor` property must be a function (see also https://bugs.jquery.com/ticket/9897 and https://stackoverflow.com/questions/18531624/isplainobject-thing):\n\t\thasOwnProp( proto, 'constructor' ) &&\n\t\tisFunction( proto.constructor ) &&\n\t\tnativeClass( proto.constructor ) === '[object Function]' &&\n\n\t\t// Test for object-specific method:\n\t\thasOwnProp( proto, 'isPrototypeOf' ) &&\n\t\tisFunction( proto.isPrototypeOf ) &&\n\n\t\t(\n\t\t\t// Test if the prototype matches the global `Object` prototype (same realm):\n\t\t\tproto === objectPrototype ||\n\n\t\t\t// Test that all properties are own properties (cross-realm; *most* likely a plain object):\n\t\t\townProps( value )\n\t\t)\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isPlainObject;\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* https://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\nimport nativeClass from '@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\nexport default 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* https://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* No operation.\n*\n* @example\n* noop();\n* // ...does nothing.\n*/\nfunction noop() {\n\t// Empty function...\n}\n\n\n// EXPORTS //\n\nexport default noop;\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* https://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* Creates a function which always returns the same value.\n*\n* @param {*} [value] - value to always return\n* @returns {Function} constant function\n*\n* @example\n* var fcn = wrap( 3.14 );\n*\n* var v = fcn();\n* // returns 3.14\n*\n* v = fcn();\n* // returns 3.14\n*\n* v = fcn();\n* // returns 3.14\n*/\nfunction wrap( value ) {\n\treturn constantFunction;\n\n\t/**\n\t* Constant function.\n\t*\n\t* @private\n\t* @returns {*} constant value\n\t*/\n\tfunction constantFunction() {\n\t\treturn value;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default wrap;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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* Formats an error message for production.\n*\n* @param {string} code - error code\n* @param {*} ...args - error message arguments\n* @returns {string} formatted error message\n*\n* @example\n* var msg = fmtprodmsg( '3', 'wrong_type' );\n* // returns 'https://stdlib.io/e/3?&arg[]=wrong_type'\n*/\nfunction fmtprodmsg() {\n\tvar a = arguments;\n\tvar c = a[ 0 ];\n\tvar u = 'https://stdlib.io/e/'+c+'?';\n\tvar i;\n\tfor ( i = 1; i < a.length; i++ ) {\n\t\tu += '&arg[]=' + encodeURIComponent( a[ i ] );\n\t}\n\treturn u;\n}\n\n\n// EXPORTS //\n\nexport default fmtprodmsg;\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* https://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\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport Symbol from '@stdlib/symbol-ctor';\n\n\n// MAIN //\n\n/**\n* Tests for native `Symbol.iterator` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Symbol.iterator` support\n*\n* @example\n* var bool = hasIteratorSymbolSupport();\n* // returns <boolean>\n*/\nfunction hasIteratorSymbolSupport() {\n\treturn (\n\t\ttypeof Symbol === 'function' &&\n\t\ttypeof Symbol( 'foo' ) === 'symbol' &&\n\t\thasOwnProp( Symbol, 'iterator' ) &&\n\t\ttypeof Symbol.iterator === 'symbol'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default hasIteratorSymbolSupport;\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* https://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\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\n\n\n// MAIN //\n\n/**\n* Iterator symbol.\n*\n* @name IteratorSymbol\n* @constant\n* @type {(symbol|null)}\n*\n* @example\n* function iterator() {\n* var it;\n* var i;\n*\n* i = -1;\n*\n* it = {};\n* it.next = next;\n* it.return = done;\n*\n* if ( IteratorSymbol ) {\n* it[ IteratorSymbol ] = iterator;\n* }\n* return it;\n*\n* function next() {\n* i += 1;\n* return {\n* 'value': i,\n* 'done': false\n* };\n* }\n*\n* function done( value ) {\n* if ( arguments.length === 0 ) {\n* return {\n* 'done': true\n* };\n* }\n* return {\n* 'value': value,\n* 'done': true\n* };\n* }\n* }\n*\n* var obj = iterator();\n*/\nvar IteratorSymbol = ( hasIteratorSymbolSupport() ) ? Symbol.iterator : null;\n\n\n// EXPORTS //\n\nexport default IteratorSymbol;\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* https://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: implementation (?)\n\n/**\n* Rounds a double-precision floating-point number toward negative infinity.\n*\n* @param {number} x - input value\n* @returns {number} rounded value\n*\n* @example\n* var v = floor( -4.2 );\n* // returns -5.0\n*\n* @example\n* var v = floor( 9.99999 );\n* // returns 9.0\n*\n* @example\n* var v = floor( 0.0 );\n* // returns 0.0\n*\n* @example\n* var v = floor( NaN );\n* // returns NaN\n*/\nvar floor = Math.floor; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default floor;\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* https://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\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// MAIN //\n\n/**\n* Tests if a finite double-precision floating-point number is an integer.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an integer\n*\n* @example\n* var bool = isInteger( 1.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( 3.14 );\n* // returns false\n*/\nfunction isInteger( x ) {\n\treturn (floor(x) === x);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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* https://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 length of a typed array.\n*\n* @module @stdlib/constants-array-max-typed-array-length\n*\n* @example\n* import MAX_TYPED_ARRAY_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n* // returns 9007199254740991\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a typed array.\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n*/\nvar MAX_TYPED_ARRAY_LENGTH = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default MAX_TYPED_ARRAY_LENGTH;\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* https://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\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-typed-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a collection.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether a value is a collection\n*\n* @example\n* var bool = isCollection( [] );\n* // returns true\n*\n* @example\n* var bool = isCollection( {} );\n* // returns false\n*/\nfunction isCollection( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isCollection;\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* https://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* import FLOAT64_PINF from '@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\nexport default 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* https://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* import FLOAT64_NINF from '@stdlib/constants-float64-ninf';\n* // returns -Infinity\n*/\n\n// MODULES //\n\nimport Number from '@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\nexport default 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* https://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\nimport PINF from '@stdlib/constants-float64-pinf';\nimport NINF from '@stdlib/constants-float64-ninf';\nimport isInt from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a number primitive is an integer value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a number primitive is an integer value\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tvalue < PINF &&\n\t\tvalue > NINF &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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* https://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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having an integer value\n*\n* @example\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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* https://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\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isInt from './integer.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having an integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having an integer value\n*\n* @example\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isInteger( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisInt( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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* https://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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an integer\n*\n* @example\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isInteger( -3.14 );\n* // returns false\n*\n* @example\n* var bool = isInteger( null );\n* // returns false\n*/\nfunction isInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isInteger;\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* https://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\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a positive integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a positive integer value\n*\n* @example\n* var bool = isPositiveInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isPositiveInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isPositiveInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue > 0.0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isPositiveInteger;\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* https://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\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a positive integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a positive integer value\n*\n* @example\n* var bool = isPositiveInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isPositiveInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isPositiveInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() > 0.0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isPositiveInteger;\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* https://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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a positive integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a positive integer\n*\n* @example\n* var bool = isPositiveInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isPositiveInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isPositiveInteger( 0.0 );\n* // returns false\n*\n* @example\n* var bool = isPositiveInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isPositiveInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isPositiveInteger( null );\n* // returns false\n*/\nfunction isPositiveInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isPositiveInteger;\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* https://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 an integer.\n*\n* @module @stdlib/assert-is-integer\n*\n* @example\n* import isInteger from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 5.0 );\n* // returns true\n*\n* bool = isInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isInteger( -3.14 );\n* // returns false\n*\n* bool = isInteger( null );\n* // returns false\n*\n* @example\n* // Use interface to check for integer primitives...\n* import { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( -3.0 );\n* // returns true\n*\n* bool = isInteger( new Number( -3.0 ) );\n* // returns false\n*\n* @example\n* // Use interface to check for integer objects...\n* import { isObject as isInteger } from '@stdlib/assert-is-integer';\n*\n* var bool = isInteger( 3.0 );\n* // returns false\n*\n* bool = isInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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* https://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 positive integer.\n*\n* @module @stdlib/assert-is-positive-integer\n*\n* @example\n* import isPositiveInteger from '@stdlib/assert-is-positive-integer';\n*\n* var bool = isPositiveInteger( 5.0 );\n* // returns true\n*\n* bool = isPositiveInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isPositiveInteger( -5.0 );\n* // returns false\n*\n* bool = isPositiveInteger( 3.14 );\n* // returns false\n*\n* bool = isPositiveInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isPositiveInteger } from '@stdlib/assert-is-positive-integer';\n*\n* var bool = isPositiveInteger( 3.0 );\n* // returns true\n*\n* bool = isPositiveInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isPositiveInteger } from '@stdlib/assert-is-positive-integer';\n*\n* var bool = isPositiveInteger( 3.0 );\n* // returns false\n*\n* bool = isPositiveInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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* https://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 safe double-precision floating-point integer.\n*\n* @module @stdlib/constants-float64-max-safe-integer\n* @type {number}\n*\n* @example\n* import FLOAT64_MAX_SAFE_INTEGER from '@stdlib/constants-float64-max-safe-integer';\n* // returns 9007199254740991\n*/\n\n\n// MAIN //\n\n/**\n* Maximum safe double-precision floating-point integer.\n*\n* ## Notes\n*\n* The integer has the value\n*\n* ```tex\n* 2^{53} - 1\n* ```\n*\n* @constant\n* @type {number}\n* @default 9007199254740991\n* @see [Safe Integers]{@link https://www.2ality.com/2013/10/safe-integers.html}\n* @see [IEEE 754]{@link https://en.wikipedia.org/wiki/IEEE_754-1985}\n*/\nvar FLOAT64_MAX_SAFE_INTEGER = 9007199254740991;\n\n\n// EXPORTS //\n\nexport default FLOAT64_MAX_SAFE_INTEGER;\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* https://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* import UINT32_MAX from '@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\nexport default 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* https://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\nexport default 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* https://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\nexport default 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* https://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* import ctor from '@stdlib/array-uint32';\n*\n* var arr = new ctor( 10 );\n* // returns <Uint32Array>\n*/\n\n// MODULES //\n\nimport hasUint32ArraySupport from '@stdlib/assert-has-uint32array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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* https://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\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport GlobalUint32Array from './uint32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint32Array` support\n*\n* @example\n* var bool = hasUint32ArraySupport();\n* // returns <boolean>\n*/\nfunction hasUint32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT32_MAX+1, UINT32_MAX+2 ];\n\t\tarr = new GlobalUint32Array( arr );\n\t\tbool = (\n\t\t\tisUint32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT32_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nexport default 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* https://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\nexport default 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* https://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\nimport isPositiveZero from '@stdlib/math-base-assert-is-positive-zero';\nimport isnan from '@stdlib/math-base-assert-is-nan';\nimport PINF from '@stdlib/constants-float64-pinf';\n\n\n// MAIN //\n\n/**\n* Returns the maximum value.\n*\n* @param {number} x - first number\n* @param {number} y - second number\n* @returns {number} maximum value\n*\n* @example\n* var v = max( 3.14, 4.2 );\n* // returns 4.2\n*\n* @example\n* var v = max( 3.14, NaN );\n* // returns NaN\n*\n* @example\n* var v = max( +0.0, -0.0 );\n* // returns +0.0\n*/\nfunction max( x, y ) {\n\tif ( isnan( x ) || isnan( y ) ) {\n\t\treturn NaN;\n\t}\n\tif ( x === PINF || y === PINF ) {\n\t\treturn PINF;\n\t}\n\tif ( x === y && x === 0.0 ) {\n\t\tif ( isPositiveZero( x ) ) {\n\t\t\treturn x;\n\t\t}\n\t\treturn y;\n\t}\n\tif ( x > y ) {\n\t\treturn x;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport PINF from '@stdlib/constants-float64-pinf';\n\n\n// MAIN //\n\n/**\n* Tests if a double-precision floating-point numeric value is positive zero.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is positive zero\n*\n* @example\n* var bool = isPositiveZero( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isPositiveZero( -0.0 );\n* // returns false\n*/\nfunction isPositiveZero( x ) {\n\treturn (x === 0.0 && 1.0/x === PINF);\n}\n\n\n// EXPORTS //\n\nexport default isPositiveZero;\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* https://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// VARIABLES //\n\n// Define a mask for the least significant 16 bits (low word): 65535 => 0x0000ffff => 00000000000000001111111111111111\nvar LOW_WORD_MASK = 0x0000ffff>>>0; // asm type annotation\n\n\n// MAIN //\n\n/**\n* Performs C-like multiplication of two unsigned 32-bit integers.\n*\n* ## Method\n*\n* - To emulate C-like multiplication without the aid of 64-bit integers, we recognize that a 32-bit integer can be split into two 16-bit words\n*\n* ```tex\n* a = w_h*2^{16} + w_l\n* ```\n*\n* where \\\\( w_h \\\\) is the most significant 16 bits and \\\\( w_l \\\\) is the least significant 16 bits. For example, consider the maximum unsigned 32-bit integer \\\\( 2^{32}-1 \\\\)\n*\n* ```binarystring\n* 11111111111111111111111111111111\n* ```\n*\n* The 16-bit high word is then\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* and the 16-bit low word\n*\n* ```binarystring\n* 1111111111111111\n* ```\n*\n* If we cast the high word to 32-bit precision and multiply by \\\\( 2^{16} \\\\) (equivalent to a 16-bit left shift), then the bit sequence is\n*\n* ```binarystring\n* 11111111111111110000000000000000\n* ```\n*\n* Similarly, upon casting the low word to 32-bit precision, the bit sequence is\n*\n* ```binarystring\n* 00000000000000001111111111111111\n* ```\n*\n* From the rules of binary addition, we recognize that adding the two 32-bit values for the high and low words will return our original value \\\\( 2^{32}-1 \\\\).\n*\n* - Accordingly, the multiplication of two 32-bit integers can be expressed\n*\n* ```tex\n* \\begin{align*}\n* a \\cdot b &= ( a_h \\cdot 2^{16} + a_l) \\cdot ( b_h \\cdot 2^{16} + b_l) \\\\\n* &= a_l \\cdot b_l + a_h \\cdot b_l \\cdot 2^{16} + a_l \\cdot b_h \\cdot 2^{16} + (a_h \\cdot b_h) \\cdot 2^{32} \\\\\n* &= a_l \\cdot b_l + (a_h \\cdot b_l + a_l \\cdot b_h) \\cdot 2^{16} + (a_h \\cdot b_h) \\cdot 2^{32}\n* \\end{align*}\n* ```\n*\n* - We note that multiplying (dividing) an integer by \\\\( 2^n \\\\) is equivalent to performing a left (right) shift of \\\\( n \\\\) bits.\n*\n* - Further, as we want to return an integer of the same precision, for a 32-bit integer, the return value will be modulo \\\\( 2^{32} \\\\). Stated another way, we only care about the low word of a 64-bit result.\n*\n* - Accordingly, the last term, being evenly divisible by \\\\( 2^{32} \\\\), drops from the equation leaving the remaining two terms as the remainder.\n*\n* ```tex\n* a \\cdot b = a_l \\cdot b_l + (a_h \\cdot b_l + a_l \\cdot b_h) << 16\n* ```\n*\n* - Lastly, the second term in the above equation contributes to the middle bits and may cause the product to \"overflow\". However, we can disregard (`>>>0`) overflow bits due to modulo arithmetic, as discussed earlier with regard to the term involving the partial product of high words.\n*\n* @param {uinteger32} a - integer\n* @param {uinteger32} b - integer\n* @returns {uinteger32} product\n*\n* @example\n* var v = umul( 10>>>0, 4>>>0 );\n* // returns 40\n*/\nfunction umul( a, b ) {\n\tvar lbits;\n\tvar mbits;\n\tvar ha;\n\tvar hb;\n\tvar la;\n\tvar lb;\n\n\ta >>>= 0; // asm type annotation\n\tb >>>= 0; // asm type annotation\n\n\t// Isolate the most significant 16-bits:\n\tha = ( a>>>16 )>>>0; // asm type annotation\n\thb = ( b>>>16 )>>>0; // asm type annotation\n\n\t// Isolate the least significant 16-bits:\n\tla = ( a&LOW_WORD_MASK )>>>0; // asm type annotation\n\tlb = ( b&LOW_WORD_MASK )>>>0; // asm type annotation\n\n\t// Compute partial sums:\n\tlbits = ( la*lb )>>>0; // asm type annotation; no integer overflow possible\n\tmbits = ( ((ha*lb) + (la*hb))<<16 )>>>0; // asm type annotation; possible integer overflow\n\n\t// The final `>>>0` converts the intermediate sum to an unsigned integer (possible integer overflow during sum):\n\treturn ( lbits + mbits )>>>0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nexport default umul;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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// VARIABLES //\n\nvar TYPE = 'function';\n\n\n// MAIN //\n\n/**\n* Tests if an array-like object supports the accessor (get/set) protocol.\n*\n* @param {Object} value - value to test\n* @returns {boolean} boolean indicating whether a value is an accessor array\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isAccessorArray( new Complex128Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isAccessorArray( [] );\n* // returns false\n*/\nfunction isAccessorArray( value ) {\n\treturn ( typeof value.get === TYPE && typeof value.set === TYPE ); // eslint-disable-line valid-typeof\n}\n\n\n// EXPORTS //\n\nexport default isAccessorArray;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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// VARIABLES //\n\nvar GETTERS = {\n\t'float64': getFloat64,\n\t'float32': getFloat32,\n\t'int32': getInt32,\n\t'int16': getInt16,\n\t'int8': getInt8,\n\t'uint32': getUint32,\n\t'uint16': getUint16,\n\t'uint8': getUint8,\n\t'uint8c': getUint8c,\n\t'generic': getGeneric,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat64( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat64( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getFloat32( arr, 2 );\n* // returns 3.0\n*/\nfunction getFloat32( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt32( arr, 2 );\n* // returns 3\n*/\nfunction getInt32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt16( arr, 2 );\n* // returns 3\n*/\nfunction getInt16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getInt8( arr, 2 );\n* // returns 3\n*/\nfunction getInt8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint32( arr, 2 );\n* // returns 3\n*/\nfunction getUint32( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint16( arr, 2 );\n* // returns 3\n*/\nfunction getUint16( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8( arr, 2 );\n* // returns 3\n*/\nfunction getUint8( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( [ 1, 2, 3, 4 ] );\n*\n* var v = getUint8c( arr, 2 );\n* // returns 3\n*/\nfunction getUint8c( arr, idx ) { // eslint-disable-line stdlib/jsdoc-doctest-decimal-point\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getGeneric( arr, 2 );\n* // returns 3\n*/\nfunction getGeneric( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n/**\n* Returns an element from an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr[ idx ];\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 2 );\n* // returns 3\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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// VARIABLES //\n\nvar SETTERS = {\n\t'float64': setFloat64,\n\t'float32': setFloat32,\n\t'int32': setInt32,\n\t'int16': setInt16,\n\t'int8': setInt8,\n\t'uint32': setUint32,\n\t'uint16': setUint16,\n\t'uint8': setUint8,\n\t'uint8c': setUint8c,\n\t'generic': setGeneric,\n\t'default': setArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Sets an element in a `Float64Array`.\n*\n* @private\n* @param {Float64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( 4 );\n*\n* setFloat64( arr, 2, 3.0 );\n*\n* var v = arr[ 2 ];\n* // returns 3.0\n*/\nfunction setFloat64( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Float32Array`.\n*\n* @private\n* @param {Float32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Float32Array from '@stdlib/array-float32';\n*\n* var arr = new Float32Array( 4 );\n*\n* setFloat32( arr, 2, 3.0 );\n*\n* var v = arr[ 2 ];\n* // returns 3.0\n*/\nfunction setFloat32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int32Array`.\n*\n* @private\n* @param {Int32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Int32Array from '@stdlib/array-int32';\n*\n* var arr = new Int32Array( 4 );\n*\n* setInt32( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int16Array`.\n*\n* @private\n* @param {Int16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Int16Array from '@stdlib/array-int16';\n*\n* var arr = new Int16Array( 4 );\n*\n* setInt16( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt16( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an `Int8Array`.\n*\n* @private\n* @param {Int8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var arr = new Int8Array( 4 );\n*\n* setInt8( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setInt8( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint32Array`.\n*\n* @private\n* @param {Uint32Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint32Array from '@stdlib/array-uint32';\n*\n* var arr = new Uint32Array( 4 );\n*\n* setUint32( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint32( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint16Array`.\n*\n* @private\n* @param {Uint16Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint16Array from '@stdlib/array-uint16';\n*\n* var arr = new Uint16Array( 4 );\n*\n* setUint16( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint16( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint8Array`.\n*\n* @private\n* @param {Uint8Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint8Array from '@stdlib/array-uint8';\n*\n* var arr = new Uint8Array( 4 );\n*\n* setUint8( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint8( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a `Uint8ClampedArray`.\n*\n* @private\n* @param {Uint8ClampedArray} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {number} value - value to set\n*\n* @example\n* import Uint8ClampedArray from '@stdlib/array-uint8c';\n*\n* var arr = new Uint8ClampedArray( 4 );\n*\n* setUint8c( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setUint8c( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in a generic `Array`.\n*\n* @private\n* @param {Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* setGeneric( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setGeneric( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n/**\n* Sets an element in an indexed array-like object.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {*} value - value to set\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* setArrayLike( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setArrayLike( arr, idx, value ) {\n\tarr[ idx ] = value;\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for setting an element in an indexed array-like object.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = [ 1, 2, 3, 4 ];\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 2, 3 );\n*\n* var v = arr[ 2 ];\n* // returns 3\n*/\nfunction setter( dtype ) {\n\tvar f = SETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn SETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default setter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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// VARIABLES //\n\nvar GETTERS = {\n\t'complex128': getComplex128,\n\t'complex64': getComplex64,\n\t'default': getArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Returns an element from a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex128( arr, 1 );\n* // returns <Complex128>\n*\n* var re = real( v );\n* // returns 3.0\n*\n* var im = imag( v );\n* // returns 4.0\n*/\nfunction getComplex128( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {number} element value\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var v = getComplex64( arr, 1 );\n* // returns <Complex64>\n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getComplex64( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n/**\n* Returns an element from an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @returns {*} element value\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* var v = getArrayLike( arr, 2 );\n* // returns 3\n*/\nfunction getArrayLike( arr, idx ) {\n\treturn arr.get( idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for retrieving an element from an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var get = getter( dtype( arr ) );\n* var v = get( arr, 1 );\n* // returns <Complex64>\n*\n* var re = realf( v );\n* // returns 3.0\n*\n* var im = imagf( v );\n* // returns 4.0\n*/\nfunction getter( dtype ) {\n\tvar f = GETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn GETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default getter;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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// VARIABLES //\n\nvar SETTERS = {\n\t'complex128': setComplex128,\n\t'complex64': setComplex64,\n\t'default': setArrayLike\n};\n\n\n// FUNCTIONS //\n\n/**\n* Sets an element in a `Complex128Array`.\n*\n* @private\n* @param {Complex128Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( [ 1, 2, 3, 4 ] );\n*\n* setComplex128( arr, 1, new Complex128( 10.0, 11.0 ) );\n* var v = arr.get( 1 );\n* // returns <Complex128>\n*\n* var re = real( v );\n* // returns 10.0\n*\n* var im = imag( v );\n* // returns 11.0\n*/\nfunction setComplex128( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n/**\n* Sets an element in a `Complex64Array`.\n*\n* @private\n* @param {Complex64Array} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* setComplex64( arr, 1, new Complex64( 10.0, 11.0 ) );\n* var v = arr.get( 1 );\n* // returns <Complex64>\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\nfunction setComplex64( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n/**\n* Sets an element in an array-like object supporting the get/set protocol.\n*\n* @private\n* @param {Collection} arr - input array\n* @param {NonNegativeInteger} idx - element index\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n*\n* @example\n* var arr = [ 1, 2, 3, 4 ];\n*\n* function get( idx ) {\n* return arr[ idx ];\n* }\n*\n* function set( value, idx ) {\n* arr[ idx ] = value;\n* }\n*\n* arr.get = get;\n* arr.set = set;\n*\n* setArrayLike( arr, 2, 10 );\n*\n* var v = arr[ 2 ];\n* // returns 10\n*/\nfunction setArrayLike( arr, idx, value ) {\n\tarr.set( value, idx );\n}\n\n\n// MAIN //\n\n/**\n* Returns an accessor function for setting an element in an array-like object supporting the get/set protocol.\n*\n* @param {string} dtype - array dtype\n* @returns {Function} accessor\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import dtype from '@stdlib/array-dtype';\n*\n* var arr = new Complex64Array( [ 1, 2, 3, 4 ] );\n*\n* var set = setter( dtype( arr ) );\n* set( arr, 1, new Complex64( 10.0, 11.0 ) );\n*\n* var v = arr.get( 1 );\n* // returns <Complex64>\n*\n* var re = realf( v );\n* // returns 10.0\n*\n* var im = imagf( v );\n* // returns 11.0\n*/\nfunction setter( dtype ) {\n\tvar f = SETTERS[ dtype ];\n\tif ( typeof f === 'function' ) {\n\t\treturn f;\n\t}\n\treturn SETTERS.default;\n}\n\n\n// EXPORTS //\n\nexport default setter;\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* https://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// Mapping from array constructors to data types...\nvar ctor2dtypes = {\n\t'Float32Array': 'float32',\n\t'Float64Array': 'float64',\n\t'Array': 'generic',\n\t'Int16Array': 'int16',\n\t'Int32Array': 'int32',\n\t'Int8Array': 'int8',\n\t'Uint16Array': 'uint16',\n\t'Uint32Array': 'uint32',\n\t'Uint8Array': 'uint8',\n\t'Uint8ClampedArray': 'uint8c',\n\t'Complex64Array': 'complex64',\n\t'Complex128Array': 'complex128'\n};\n\n\n// EXPORTS //\n\nexport default ctor2dtypes;\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* https://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\nimport nativeClass from '@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\nexport default 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* https://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\nexport default 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* https://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\nimport isFloat64Array from '@stdlib/assert-is-float64array';\nimport GlobalFloat64Array from './float64array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float64Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float64Array` support\n*\n* @example\n* var bool = hasFloat64ArraySupport();\n* // returns <boolean>\n*/\nfunction hasFloat64ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat64Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat64Array( [ 1.0, 3.14, -3.14, NaN ] );\n\t\tbool = (\n\t\t\tisFloat64Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.14 &&\n\t\t\tarr[ 2 ] === -3.14 &&\n\t\t\tarr[ 3 ] !== arr[ 3 ]\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nexport default 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* https://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* import ctor from '@stdlib/array-float64';\n*\n* var arr = new ctor( 10 );\n* // returns <Float64Array>\n*/\n\n// MODULES //\n\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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* https://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\nexport default 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* https://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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasFloat32Array = ( typeof Float32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Float32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Float32Array\n*\n* @example\n* var bool = isFloat32Array( new Float32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isFloat32Array( [] );\n* // returns false\n*/\nfunction isFloat32Array( value ) {\n\treturn (\n\t\t( hasFloat32Array && value instanceof Float32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Float32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isFloat32Array;\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* https://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 Float32Array === 'function' ) ? Float32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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 Float32Array === 'function' ) ? Float32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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 single-precision floating-point numbers in the platform byte order.\n*\n* @module @stdlib/array-float32\n*\n* @example\n* import ctor from '@stdlib/array-float32';\n*\n* var arr = new ctor( 10 );\n* // returns <Float32Array>\n*/\n\n// MODULES //\n\nimport hasFloat32ArraySupport from '@stdlib/assert-has-float32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasFloat32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport isFloat32Array from '@stdlib/assert-is-float32array';\nimport PINF from '@stdlib/constants-float64-pinf';\nimport GlobalFloat32Array from './float32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Float32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Float32Array` support\n*\n* @example\n* var bool = hasFloat32ArraySupport();\n* // returns <boolean>\n*/\nfunction hasFloat32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalFloat32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalFloat32Array( [ 1.0, 3.14, -3.14, 5.0e40 ] );\n\t\tbool = (\n\t\t\tisFloat32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1.0 &&\n\t\t\tarr[ 1 ] === 3.140000104904175 &&\n\t\t\tarr[ 2 ] === -3.140000104904175 &&\n\t\t\tarr[ 3 ] === PINF\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\nexport default hasFloat32ArraySupport;\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* https://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 single-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\nexport default 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* https://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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt32Array = ( typeof Int32Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int32Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int32Array\n*\n* @example\n* var bool = isInt32Array( new Int32Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt32Array( [] );\n* // returns false\n*/\nfunction isInt32Array( value ) {\n\treturn (\n\t\t( hasInt32Array && value instanceof Int32Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int32Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt32Array;\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* https://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 signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-max\n* @type {integer32}\n*\n* @example\n* import INT32_MAX from '@stdlib/constants-int32-max';\n* // returns 2147483647\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{31} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111111111111111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 2147483647\n*/\nvar INT32_MAX = 2147483647|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_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* https://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 Int32Array === 'function' ) ? Int32Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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 Int32Array === 'function' ) ? Int32Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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 twos-complement 32-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int32\n*\n* @example\n* import ctor from '@stdlib/array-int32';\n*\n* var arr = new ctor( 10 );\n* // returns <Int32Array>\n*/\n\n// MODULES //\n\nimport hasInt32ArraySupport from '@stdlib/assert-has-int32array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt32ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport isInt32Array from '@stdlib/assert-is-int32array';\nimport INT32_MAX from '@stdlib/constants-int32-max';\nimport INT32_MIN from '@stdlib/constants-int32-min';\nimport GlobalInt32Array from './int32array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int32Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int32Array` support\n*\n* @example\n* var bool = hasInt32ArraySupport();\n* // returns <boolean>\n*/\nfunction hasInt32ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt32Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt32Array( [ 1, 3.14, -3.14, INT32_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt32Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT32_MIN // 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\nexport default hasInt32ArraySupport;\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* https://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* Minimum signed 32-bit integer.\n*\n* @module @stdlib/constants-int32-min\n* @type {integer32}\n*\n* @example\n* import INT32_MIN from '@stdlib/constants-int32-min';\n* // returns -2147483648\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 32-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{31})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000000000000000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -2147483648\n*/\nvar INT32_MIN = -2147483648|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT32_MIN;\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* https://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 twos-complement 32-bit signed 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\nexport default 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* https://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\nimport nativeClass from '@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\nexport default 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* https://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* import UINT16_MAX from '@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\nexport default 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* https://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\nexport default 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* https://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\nexport default 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* https://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* import ctor from '@stdlib/array-uint16';\n*\n* var arr = new ctor( 10 );\n* // returns <Uint16Array>\n*/\n\n// MODULES //\n\nimport hasUint16ArraySupport from '@stdlib/assert-has-uint16array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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* https://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\nimport isUint16Array from '@stdlib/assert-is-uint16array';\nimport UINT16_MAX from '@stdlib/constants-uint16-max';\nimport GlobalUint16Array from './uint16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint16Array` support\n*\n* @example\n* var bool = hasUint16ArraySupport();\n* // returns <boolean>\n*/\nfunction hasUint16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT16_MAX+1, UINT16_MAX+2 ];\n\t\tarr = new GlobalUint16Array( arr );\n\t\tbool = (\n\t\t\tisUint16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT16_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nexport default 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* https://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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt16Array = ( typeof Int16Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int16Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int16Array\n*\n* @example\n* var bool = isInt16Array( new Int16Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt16Array( [] );\n* // returns false\n*/\nfunction isInt16Array( value ) {\n\treturn (\n\t\t( hasInt16Array && value instanceof Int16Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int16Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt16Array;\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* https://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 signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-max\n* @type {integer32}\n*\n* @example\n* import INT16_MAX from '@stdlib/constants-int16-max';\n* // returns 32767\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* 2^{15} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 0111111111111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 32767\n*/\nvar INT16_MAX = 32767|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_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* https://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 Int16Array === 'function' ) ? Int16Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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 Int16Array === 'function' ) ? Int16Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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 twos-complement 16-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int16\n*\n* @example\n* import ctor from '@stdlib/array-int16';\n*\n* var arr = new ctor( 10 );\n* // returns <Int16Array>\n*/\n\n// MODULES //\n\nimport hasInt16ArraySupport from '@stdlib/assert-has-int16array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt16ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport isInt16Array from '@stdlib/assert-is-int16array';\nimport INT16_MAX from '@stdlib/constants-int16-max';\nimport INT16_MIN from '@stdlib/constants-int16-min';\nimport GlobalInt16Array from './int16array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int16Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int16Array` support\n*\n* @example\n* var bool = hasInt16ArraySupport();\n* // returns <boolean>\n*/\nfunction hasInt16ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt16Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt16Array( [ 1, 3.14, -3.14, INT16_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt16Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT16_MIN // 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\nexport default hasInt16ArraySupport;\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* https://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* Minimum signed 16-bit integer.\n*\n* @module @stdlib/constants-int16-min\n* @type {integer32}\n*\n* @example\n* import INT16_MIN from '@stdlib/constants-int16-min';\n* // returns -32768\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 16-bit integer.\n*\n* ## Notes\n*\n* The number has the value\n*\n* ```tex\n* -(2^{15})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 1000000000000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -32768\n*/\nvar INT16_MIN = -32768|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT16_MIN;\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* https://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 twos-complement 16-bit signed 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\nexport default 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* https://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\nimport nativeClass from '@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\nexport default 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* https://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* import UINT8_MAX from '@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\nexport default 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* https://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\nexport default 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* https://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\nexport default 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* https://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* import ctor from '@stdlib/array-uint8';\n*\n* var arr = new ctor( 10 );\n* // returns <Uint8Array>\n*/\n\n// MODULES //\n\nimport hasUint8ArraySupport from '@stdlib/assert-has-uint8array-support';\nimport builtin from './main.js';\nimport polyfill from './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\nexport default 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* https://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\nimport isUint8Array from '@stdlib/assert-is-uint8array';\nimport UINT8_MAX from '@stdlib/constants-uint8-max';\nimport GlobalUint8Array from './uint8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8Array` support\n*\n* @example\n* var bool = hasUint8ArraySupport();\n* // returns <boolean>\n*/\nfunction hasUint8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = [ 1, 3.14, -3.14, UINT8_MAX+1, UINT8_MAX+2 ];\n\t\tarr = new GlobalUint8Array( arr );\n\t\tbool = (\n\t\t\tisUint8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === UINT8_MAX-2 && // truncation and wrap around\n\t\t\tarr[ 3 ] === 0 && // wrap around\n\t\t\tarr[ 4 ] === 1 // wrap around\n\t\t);\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\tbool = false;\n\t}\n\treturn bool;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nexport default 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* https://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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasUint8ClampedArray = ( typeof Uint8ClampedArray === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is a Uint8ClampedArray.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a Uint8ClampedArray\n*\n* @example\n* var bool = isUint8ClampedArray( new Uint8ClampedArray( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isUint8ClampedArray( [] );\n* // returns false\n*/\nfunction isUint8ClampedArray( value ) {\n\treturn (\n\t\t( hasUint8ClampedArray && value instanceof Uint8ClampedArray ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Uint8ClampedArray]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isUint8ClampedArray;\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* https://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 Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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 Uint8ClampedArray === 'function' ) ? Uint8ClampedArray : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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 clamped to 0-255.\n*\n* @module @stdlib/array-uint8c\n*\n* @example\n* import ctor from '@stdlib/array-uint8c';\n*\n* var arr = new ctor( 10 );\n* // returns <Uint8ClampedArray>\n*/\n\n// MODULES //\n\nimport hasUint8ClampedArraySupport from '@stdlib/assert-has-uint8clampedarray-support'; // eslint-disable-line id-length\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasUint8ClampedArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport isUint8ClampedArray from '@stdlib/assert-is-uint8clampedarray';\nimport GlobalUint8ClampedArray from './uint8clampedarray.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Uint8ClampedArray` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Uint8ClampedArray` support\n*\n* @example\n* var bool = hasUint8ClampedArraySupport();\n* // returns <boolean>\n*/\nfunction hasUint8ClampedArraySupport() { // eslint-disable-line id-length\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalUint8ClampedArray !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalUint8ClampedArray( [ -1, 0, 1, 3.14, 4.99, 255, 256 ] );\n\t\tbool = (\n\t\t\tisUint8ClampedArray( arr ) &&\n\t\t\tarr[ 0 ] === 0 && // clamped\n\t\t\tarr[ 1 ] === 0 &&\n\t\t\tarr[ 2 ] === 1 &&\n\t\t\tarr[ 3 ] === 3 && // round to nearest\n\t\t\tarr[ 4 ] === 5 && // round to nearest\n\t\t\tarr[ 5 ] === 255 &&\n\t\t\tarr[ 6 ] === 255 // clamped\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\nexport default hasUint8ClampedArraySupport;\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* https://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 clamped to 0-255.\n*\n* @throws {Error} not implemented\n*/\nfunction polyfill() {\n\tthrow new Error( 'not implemented' );\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasInt8Array = ( typeof Int8Array === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an Int8Array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an Int8Array\n*\n* @example\n* var bool = isInt8Array( new Int8Array( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isInt8Array( [] );\n* // returns false\n*/\nfunction isInt8Array( value ) {\n\treturn (\n\t\t( hasInt8Array && value instanceof Int8Array ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object Int8Array]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isInt8Array;\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* https://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 signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-max\n* @type {integer32}\n*\n* @example\n* import INT8_MAX from '@stdlib/constants-int8-max';\n* // returns 127\n*/\n\n\n// MAIN //\n\n/**\n* Maximum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* 2^{7} - 1\n* ```\n*\n* which corresponds to the bit sequence\n*\n* ```binarystring\n* 01111111\n* ```\n*\n* @constant\n* @type {integer32}\n* @default 127\n*/\nvar INT8_MAX = 127|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_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* https://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 Int8Array === 'function' ) ? Int8Array : null; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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 Int8Array === 'function' ) ? Int8Array : void 0; // eslint-disable-line stdlib/require-globals\n\n\n// EXPORTS //\n\nexport default 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* https://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 twos-complement 8-bit signed integers in the platform byte order.\n*\n* @module @stdlib/array-int8\n*\n* @example\n* import ctor from '@stdlib/array-int8';\n*\n* var arr = new ctor( 10 );\n* // returns <Int8Array>\n*/\n\n// MODULES //\n\nimport hasInt8ArraySupport from '@stdlib/assert-has-int8array-support';\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar ctor;\nif ( hasInt8ArraySupport() ) {\n\tctor = builtin;\n} else {\n\tctor = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport isInt8Array from '@stdlib/assert-is-int8array';\nimport INT8_MAX from '@stdlib/constants-int8-max';\nimport INT8_MIN from '@stdlib/constants-int8-min';\nimport GlobalInt8Array from './int8array.js';\n\n\n// MAIN //\n\n/**\n* Tests for native `Int8Array` support.\n*\n* @returns {boolean} boolean indicating if an environment has `Int8Array` support\n*\n* @example\n* var bool = hasInt8ArraySupport();\n* // returns <boolean>\n*/\nfunction hasInt8ArraySupport() {\n\tvar bool;\n\tvar arr;\n\n\tif ( typeof GlobalInt8Array !== 'function' ) {\n\t\treturn false;\n\t}\n\t// Test basic support...\n\ttry {\n\t\tarr = new GlobalInt8Array( [ 1, 3.14, -3.14, INT8_MAX+1 ] );\n\t\tbool = (\n\t\t\tisInt8Array( arr ) &&\n\t\t\tarr[ 0 ] === 1 &&\n\t\t\tarr[ 1 ] === 3 && // truncation\n\t\t\tarr[ 2 ] === -3 && // truncation\n\t\t\tarr[ 3 ] === INT8_MIN // 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\nexport default hasInt8ArraySupport;\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* https://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* Minimum signed 8-bit integer.\n*\n* @module @stdlib/constants-int8-min\n* @type {integer32}\n*\n* @example\n* import INT8_MIN from '@stdlib/constants-int8-min';\n* // returns -128\n*/\n\n\n// MAIN //\n\n/**\n* Minimum signed 8-bit integer.\n*\n* ## Notes\n*\n* The number is given by\n*\n* ```tex\n* -(2^{7})\n* ```\n*\n* which corresponds to the two's complement bit sequence\n*\n* ```binarystring\n* 10000000\n* ```\n*\n* @constant\n* @type {integer32}\n* @default -128\n*/\nvar INT8_MIN = -128|0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default INT8_MIN;\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* https://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 twos-complement 8-bit signed 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\nexport default 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* https://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\nimport { isPrimitive as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number primitive having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number primitive having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\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* https://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\nimport { isObject as isInteger } from '@stdlib/assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a nonnegative integer value.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a nonnegative integer value\n*\n* @example\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn (\n\t\tisInteger( value ) &&\n\t\tvalue.valueOf() >= 0\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\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* https://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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a nonnegative integer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a nonnegative integer\n*\n* @example\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* @example\n* var bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isNonNegativeInteger( null );\n* // returns false\n*/\nfunction isNonNegativeInteger( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isNonNegativeInteger;\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* https://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 nonnegative integer.\n*\n* @module @stdlib/assert-is-nonnegative-integer\n*\n* @example\n* import isNonNegativeInteger from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 5.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 5.0 ) );\n* // returns true\n*\n* bool = isNonNegativeInteger( -5.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( 3.14 );\n* // returns false\n*\n* bool = isNonNegativeInteger( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns true\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns false\n*\n* @example\n* import { isObject as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\n*\n* var bool = isNonNegativeInteger( 3.0 );\n* // returns false\n*\n* bool = isNonNegativeInteger( new Number( 3.0 ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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* https://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 length of a generic array.\n*\n* @module @stdlib/constants-array-max-array-length\n*\n* @example\n* import MAX_ARRAY_LENGTH from '@stdlib/constants-array-max-array-length';\n* // returns 4294967295\n*/\n\n// MAIN //\n\n/**\n* Maximum length of a generic array.\n*\n* ```tex\n* 2^{32} - 1\n* ```\n*\n* @constant\n* @type {uinteger32}\n* @default 4294967295\n*/\nvar MAX_ARRAY_LENGTH = 4294967295>>>0; // asm type annotation\n\n\n// EXPORTS //\n\nexport default MAX_ARRAY_LENGTH;\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* https://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\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport MAX_LENGTH from '@stdlib/constants-array-max-array-length';\n\n\n// MAIN //\n\n/**\n* Tests if a value is an array-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is an array-like object\n*\n* @example\n* var bool = isArrayLikeObject( [] );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( { 'length':10 } );\n* // returns true\n*\n* @example\n* var bool = isArrayLikeObject( 'beep' );\n* // returns false\n*/\nfunction isArrayLikeObject( value ) {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.length === 'number' &&\n\t\tisInteger( value.length ) &&\n\t\tvalue.length >= 0 &&\n\t\tvalue.length <= MAX_LENGTH\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayLikeObject;\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* https://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\nimport nativeClass from '@stdlib/utils-native-class';\n\n\n// VARIABLES //\n\nvar hasArrayBuffer = ( typeof ArrayBuffer === 'function' ); // eslint-disable-line stdlib/require-globals\n\n\n// MAIN //\n\n/**\n* Tests if a value is an ArrayBuffer.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is an ArrayBuffer\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var bool = isArrayBuffer( new ArrayBuffer( 10 ) );\n* // returns true\n*\n* @example\n* var bool = isArrayBuffer( [] );\n* // returns false\n*/\nfunction isArrayBuffer( value ) {\n\treturn (\n\t\t( hasArrayBuffer && value instanceof ArrayBuffer ) || // eslint-disable-line stdlib/require-globals\n\t\tnativeClass( value ) === '[object ArrayBuffer]'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isArrayBuffer;\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* https://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* Tests if a value is a string primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string primitive\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns false\n*/\nfunction isString( value ) {\n\treturn ( typeof value === 'string' );\n}\n\n\n// EXPORTS //\n\nexport default isString;\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* https://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// eslint-disable-next-line stdlib/no-redeclare\nvar valueOf = String.prototype.valueOf; // non-generic\n\n\n// EXPORTS //\n\nexport default valueOf;\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* https://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\nimport hasToStringTag from '@stdlib/assert-has-tostringtag-support';\nimport nativeClass from '@stdlib/utils-native-class';\nimport test from './try2valueof.js';\n\n\n// VARIABLES //\n\nvar FLG = hasToStringTag();\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a string object\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns false\n*/\nfunction isString( value ) {\n\tif ( typeof value === 'object' ) {\n\t\tif ( value instanceof String ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( FLG ) {\n\t\t\treturn test( value );\n\t\t}\n\t\treturn ( nativeClass( value ) === '[object String]' );\n\t}\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isString;\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* https://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\nimport valueOf from './valueof.js'; // eslint-disable-line stdlib/no-redeclare\n\n\n// MAIN //\n\n/**\n* Attempts to extract a string value.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a string can be extracted\n*/\nfunction test( value ) {\n\ttry {\n\t\tvalueOf.call( value );\n\t\treturn true;\n\t} catch ( err ) { // eslint-disable-line no-unused-vars\n\t\treturn false;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default test;\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* https://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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a string.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is a string\n*\n* @example\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* @example\n* var bool = isString( 'beep' );\n* // returns true\n*/\nfunction isString( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default isString;\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* https://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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 128-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex128} 128-bit complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n* // returns <Complex128>\n*/\nfunction Complex128( real, imag ) {\n\tif ( !( this instanceof Complex128 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': real\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': imag\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex128.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex128.prototype, 'BYTES_PER_ELEMENT', 8 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex128.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 16\n*/\nsetReadOnly( Complex128.prototype, 'byteLength', 16 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex128.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex128` instance.\n*\n* @name toJSON\n* @memberof Complex128.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex128', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex128.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex128;\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* https://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 string.\n*\n* @module @stdlib/assert-is-string\n*\n* @example\n* import isString from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 5 );\n* // returns false\n*\n* @example\n* import { isObject as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( new String( 'beep' ) );\n* // returns true\n*\n* bool = isString( 'beep' );\n* // returns false\n*\n* @example\n* import { isPrimitive as isString } from '@stdlib/assert-is-string';\n*\n* var bool = isString( 'beep' );\n* // returns true\n*\n* bool = isString( new String( 'beep' ) );\n* // returns false\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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* https://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* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\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* https://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* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex128';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\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* https://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 fround = ( typeof Math.fround === 'function' ) ? Math.fround : null; // eslint-disable-line stdlib/no-builtin-math\n\n\n// EXPORTS //\n\nexport default fround;\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* https://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\nimport Float32Array from '@stdlib/array-float32';\n\n\n// VARIABLES //\n\nvar FLOAT32_VIEW = new Float32Array( 1 );\n\n\n// MAIN //\n\n/**\n* Converts a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @param {number} x - double-precision floating-point number\n* @returns {number} nearest single-precision floating-point number\n*\n* @example\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\nfunction float64ToFloat32( x ) {\n\tFLOAT32_VIEW[ 0 ] = x;\n\treturn FLOAT32_VIEW[ 0 ];\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\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* https://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* Convert a double-precision floating-point number to the nearest single-precision floating-point number.\n*\n* @module @stdlib/number-float64-base-to-float32\n*\n* @example\n* import float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\n*\n* var y = float64ToFloat32( 1.337 );\n* // returns 1.3370000123977661\n*/\n\n// MODULES //\n\nimport builtin from './main.js';\nimport polyfill from './polyfill.js';\n\n\n// MAIN //\n\nvar float64ToFloat32;\nif ( typeof builtin === 'function' ) {\n\tfloat64ToFloat32 = builtin;\n} else {\n\tfloat64ToFloat32 = polyfill;\n}\n\n\n// EXPORTS //\n\nexport default float64ToFloat32;\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* https://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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport defineProperty from '@stdlib/utils-define-property';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport float64ToFloat32 from '@stdlib/number-float64-base-to-float32';\nimport format from '@stdlib/string-format';\nimport toStr from './tostring.js';\nimport toJSON from './tojson.js';\n\n\n// MAIN //\n\n/**\n* 64-bit complex number constructor.\n*\n* @constructor\n* @param {number} real - real component\n* @param {number} imag - imaginary component\n* @throws {TypeError} must invoke using the `new` keyword\n* @throws {TypeError} real component must be a number\n* @throws {TypeError} imaginary component must be a number\n* @returns {Complex64} 64-bit complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n* // returns <Complex64>\n*/\nfunction Complex64( real, imag ) {\n\tif ( !( this instanceof Complex64 ) ) {\n\t\tthrow new TypeError( 'invalid invocation. Constructor must be called with the `new` keyword.' );\n\t}\n\tif ( !isNumber( real ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Real component must be a number. Value: `%s`.', real ) );\n\t}\n\tif ( !isNumber( imag ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Imaginary component must be a number. Value: `%s`.', imag ) );\n\t}\n\tdefineProperty( this, 're', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( real )\n\t});\n\tdefineProperty( this, 'im', {\n\t\t'configurable': false,\n\t\t'enumerable': true,\n\t\t'writable': false,\n\t\t'value': float64ToFloat32( imag )\n\t});\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var nbytes = Complex64.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Size (in bytes) of each component.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} size of each component\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.BYTES_PER_ELEMENT;\n* // returns 4\n*/\nsetReadOnly( Complex64.prototype, 'BYTES_PER_ELEMENT', 4 );\n\n/**\n* Length (in bytes) of a complex number.\n*\n* @name byteLength\n* @memberof Complex64.prototype\n* @type {integer}\n* @returns {integer} byte length\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var nbytes = z.byteLength;\n* // returns 8\n*/\nsetReadOnly( Complex64.prototype, 'byteLength', 8 );\n\n/**\n* Serializes a complex number as a string.\n*\n* @name toString\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {string} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var str = z.toString();\n* // returns '5 + 3i'\n*/\nsetReadOnly( Complex64.prototype, 'toString', toStr );\n\n/**\n* Serializes a complex number as a JSON object.\n*\n* ## Notes\n*\n* - `JSON.stringify()` implicitly calls this method when stringifying a `Complex64` instance.\n*\n* @name toJSON\n* @memberof Complex64.prototype\n* @type {Function}\n* @returns {Object} serialized complex number\n*\n* @example\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var obj = z.toJSON();\n* // returns { 'type': 'Complex64', 're': 5.0, 'im': 3.0 }\n*/\nsetReadOnly( Complex64.prototype, 'toJSON', toJSON );\n\n\n// EXPORTS //\n\nexport default Complex64;\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* https://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\nimport Complex128 from '@stdlib/complex-float64';\nimport Complex64 from '@stdlib/complex-float32';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex number-like object.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex number-like object.\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var x = new Complex128( 4.0, 2.0 );\n* var bool = isComplexLike( x );\n* // returns true\n*\n* x = new Complex64( 4.0, 2.0 );\n* bool = isComplexLike( x );\n* // returns true\n*/\nfunction isComplexLike( value ) {\n\tif ( value instanceof Complex128 || value instanceof Complex64 ) {\n\t\treturn true;\n\t}\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof value.re === 'number' &&\n\t\ttypeof value.im === 'number'\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplexLike;\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* https://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\nimport isInteger from '@stdlib/math-base-assert-is-integer';\n\n\n// MAIN //\n\n/**\n* Tests if a finite numeric value is an even number.\n*\n* @param {number} x - value to test\n* @returns {boolean} boolean indicating whether the value is an even number\n*\n* @example\n* var bool = isEven( 5.0 );\n* // returns false\n*\n* @example\n* var bool = isEven( -2.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( 0.0 );\n* // returns true\n*\n* @example\n* var bool = isEven( NaN );\n* // returns false\n*/\nfunction isEven( x ) {\n\treturn isInteger( x/2.0 );\n}\n\n\n// EXPORTS //\n\nexport default isEven;\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* https://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* Serializes a complex number as a string.\n*\n* @private\n* @returns {string} serialized complex number\n*/\nfunction toString() { // eslint-disable-line stdlib/no-redeclare\n\t/* eslint-disable no-invalid-this */\n\tvar str = '' + this.re;\n\tif ( this.im < 0 ) {\n\t\tstr += ' - ' + (-this.im);\n\t} else {\n\t\tstr += ' + ' + this.im;\n\t}\n\tstr += 'i';\n\treturn str;\n}\n\n\n// EXPORTS //\n\nexport default toString;\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* https://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* Serializes a complex number as a JSON object.\n*\n* @private\n* @returns {Object} JSON representation\n*/\nfunction toJSON() {\n\t/* eslint-disable no-invalid-this */\n\tvar out = {};\n\tout.type = 'Complex64';\n\tout.re = this.re;\n\tout.im = this.im;\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default toJSON;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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* https://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// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 8; // 4 bytes per float32 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex64Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex64Array`\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var bool = isComplex64Array( new Complex64Array( 10 ) );\n* // returns true\n*\n* bool = isComplex64Array( [] );\n* // returns false\n*/\nfunction isComplex64Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex64Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex64array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex64Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex64Array;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2024 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* https://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// VARIABLES //\n\nvar BYTES_PER_ELEMENT = 16; // 8 bytes per float64 x (1 real + 1 imag component)\n\n\n// MAIN //\n\n/**\n* Returns a boolean indicating if a value is a `Complex128Array`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `Complex128Array`\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplex128Array( new Complex128Array( 10 ) );\n* // returns true\n*\n* bool = isComplex128Array( [] );\n* // returns false\n*/\nfunction isComplex128Array( value ) {\n\t// Note: the following is not robust and that is intentional. In this case, we are seeking a lower cost way to reasonably determine whether an input value is a `Complex128Array` in order to avoid walking the prototype chain and resolving constructors, which is necessary for robust identification of cross-realm instances. For more robust validation, see `@stdlib/assert/is-complex128array`.\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\tvalue.constructor.name === 'Complex128Array' &&\n\t\tvalue.BYTES_PER_ELEMENT === BYTES_PER_ELEMENT\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isComplex128Array;\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* https://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* Returns the real component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var re = realf( z );\n* // returns 5.0\n*/\nfunction realf( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default realf;\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* https://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* Returns the imaginary component of a single-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var z = new Complex64( 5.0, 3.0 );\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nfunction imagf( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imagf;\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* https://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\nimport Float32Array from '@stdlib/array-float32';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex64Array` as a `Float32Array`.\n*\n* @param {Complex64Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float32Array} `Float32Array` view\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n*\n* var x = new Complex64Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns <Float32Array>\n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float32Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\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* https://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\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\n/**\n* Reinterprets a `Complex128Array` as a `Float64Array`.\n*\n* @param {Complex128Array} x - input array\n* @param {NonNegativeInteger} offset - starting index\n* @returns {Float64Array} `Float64Array` view\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var x = new Complex128Array( 10 );\n*\n* var out = reinterpret( x, 0 );\n* // returns <Float64Array>\n*\n* var bool = ( out.buffer === x.buffer );\n* // returns true\n*/\nfunction reinterpret( x, offset ) {\n\treturn new Float64Array( x.buffer, x.byteOffset+(x.BYTES_PER_ELEMENT*offset), 2*(x.length-offset) ); // eslint-disable-line max-len\n}\n\n\n// EXPORTS //\n\nexport default reinterpret;\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* https://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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\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* https://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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport { isPrimitive as isString } from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float32Array from '@stdlib/array-float32';\nimport Complex64 from '@stdlib/complex-float32';\nimport format from '@stdlib/string-format';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float32Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex64Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex64Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex128Array...\n\t\tvalue.name === 'Complex128Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float32Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex64} complex number\n*/\nfunction getComplex64( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex64( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 64-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or an iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `8`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `8`\n* @throws {TypeError} view length must be a positive multiple of `8`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} complex number array\n*\n* @example\n* var arr = new Complex64Array();\n* // returns <Complex64Array>\n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex64Array( 2 );\n* // returns <Complex64Array>\n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex64Array( [ 1.0, -1.0 ] );\n* // returns <Complex64Array>\n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf );\n* // returns <Complex64Array>\n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 16 );\n* var arr = new Complex64Array( buf, 8 );\n* // returns <Complex64Array>\n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex64Array( buf, 8, 2 );\n* // returns <Complex64Array>\n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex64Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex64Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex64Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex64Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex64Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex64Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float32Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float32Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float32Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float32Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float32Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) ); // FIXME: `buf` is what is returned from above, NOT the original value\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float32Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var nbytes = Complex64Array.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex64Array\n* @readonly\n* @type {string}\n* @default 'Complex64Array'\n*\n* @example\n* var str = Complex64Array.name;\n* // returns 'Complex64Array'\n*/\nsetReadOnly( Complex64Array, 'name', 'Complex64Array' );\n\n/**\n* Creates a new 64-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex64Array\n* @type {Function}\n* @param {(Collection|Iterable)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.from( [ 1.0, -1.0 ] );\n* // returns <Complex64Array>\n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ] );\n* // returns <Complex64Array>\n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function clbk( v ) {\n* return new Complex64( realf(v)*2.0, imagf(v)*2.0 );\n* }\n*\n* var arr = Complex64Array.from( [ new Complex64( 1.0, 1.0 ) ], clbk );\n* // returns <Complex64Array>\n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex64Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.', 2, len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = realf( v );\n\t\t\t\t\tbuf[ j+1 ] = imagf( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 64-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex64Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} 64-bit complex number array\n*\n* @example\n* var arr = Complex64Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns <Complex64Array>\n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex64Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.at( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 9.0\n*\n* im = imagf( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns <ArrayBuffer>\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 80\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 8\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 8\n*/\nsetReadOnly( Complex64Array.prototype, 'BYTES_PER_ELEMENT', Complex64Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} modified array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex64( 1.0, 1.0 ), 0 );\n* arr.set( new Complex64( 2.0, 2.0 ), 1 );\n* arr.set( new Complex64( 3.0, 3.0 ), 2 );\n* arr.set( new Complex64( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = [\n* new Complex64( 1.0, 1.0 ),\n* new Complex64( 2.0, 2.0 ),\n* new Complex64( 3.0, 3.0 )\n* ];\n* arr = new Complex64Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, <Complex64> ]\n*\n* v = it.next().value;\n* // returns [ 1, <Complex64> ]\n*\n* v = it.next().value;\n* // returns [ 2, <Complex64> ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex64( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.fill( new Complex64( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = realf( value );\n\tim = imagf( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns <Complex64Array>\n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 2.0\n*\n* var im = imagf( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex64Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex64Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex64|void)} array element or undefined\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex64( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex64Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex64( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex64|void)} array element\n*\n* @example\n* var arr = new Complex64Array( 10 );\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var z = arr.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex64Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex64( this._buffer, idx );\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex64( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex64( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex64( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 10 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex64( 4.0, -4.0 ), -3 );\n* // returns -1\n*/\nsetReadOnly( Complex64Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex64( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex64( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex64( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex64Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = realf( searchElement );\n\tim = imagf( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex64Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex64Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex64Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import Complex64 from '@stdlib/complex-float32';\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function scale( v, i ) {\n* return new Complex64( 2.0*realf( v ), 2.0*imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns <Complex64Array>\n*\n* var z = out.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 2\n*\n* var im = imagf( z );\n* // returns -2\n*/\nsetReadOnly( Complex64Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex64( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = realf( v );\n\t\t\toutbuf[ (2*i)+1 ] = imagf( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import caddf from '@stdlib/math-base-ops-caddf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( caddf );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 6.0\n*\n* var im = imagf( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex64( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex64( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns <Complex64Array>\n*\n* var z = out.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values, as intended.\n*\n* @name set\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 0.0\n*\n* var im = imagf( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = realf( value );\n\t\tbuf[ idx+1 ] = imagf( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float32Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float32Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ]; // TODO: handle accessor arrays\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = realf( v );\n\t\t\tbuf[ idx+1 ] = imagf( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} complex number array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns <Complex64Array>\n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns <Complex64Array>\n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* function predicate( v ) {\n* return ( realf( v ) === imagf( v ) );\n* }\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex64Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex64( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns <Complex64Array>\n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 1.0\n*\n* var im = imagf( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 5.0\n*\n* im = imagf( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns <Complex64Array>\n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 3.0\n*\n* im = imagf( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex64Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + (begin*BYTES_PER_ELEMENT);\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex64Array} reversed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns <Complex64Array>\n*\n* var z = out.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 3.0\n*\n* var im = imagf( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 2.0\n*\n* im = imagf( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns <Complex64>\n*\n* re = realf( z );\n* // returns 1.0\n*\n* im = imagf( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex64Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex64Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex64Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex64( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex64Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex64Array} new typed array\n*\n* @example\n* import realf from '@stdlib/complex-realf';\n* import imagf from '@stdlib/complex-imagf';\n* import Complex64 from '@stdlib/complex-float32';\n*\n* var arr = new Complex64Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex64( 4.0, 4.0 ) );\n* // returns <Complex64Array>\n*\n* var z = out.get( 0 );\n* // returns <Complex64>\n*\n* var re = realf( z );\n* // returns 4.0\n*\n* var im = imagf( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex64Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = realf( value );\n\tbuf[ (2*index)+1 ] = imagf( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex64Array;\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* https://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\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float32Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float32Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = realf( v );\n\t\tbuf[ j+1 ] = imagf( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\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* https://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* Returns the real component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} real component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var re = real( z );\n* // returns 5.0\n*/\nfunction real( z ) {\n\treturn z.re;\n}\n\n\n// EXPORTS //\n\nexport default real;\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* https://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* Returns the imaginary component of a double-precision complex floating-point number.\n*\n* @param {Complex} z - complex number\n* @returns {number} imaginary component\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var z = new Complex128( 5.0, 3.0 );\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nfunction imag( z ) {\n\treturn z.im;\n}\n\n\n// EXPORTS //\n\nexport default imag;\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* https://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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIterator( it ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\n\tout = [];\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\tz = v.value;\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIterator;\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* https://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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport realf from '@stdlib/complex-realf';\nimport imagf from '@stdlib/complex-imagf';\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( realf( z ), imagf( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\n","/* eslint-disable no-restricted-syntax, max-lines, no-invalid-this */\n\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* https://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\nimport { isPrimitive as isNonNegativeInteger } from '@stdlib/assert-is-nonnegative-integer';\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isArrayBuffer from '@stdlib/assert-is-arraybuffer';\nimport isObject from '@stdlib/assert-is-object';\nimport isArray from '@stdlib/assert-is-array';\nimport isString from '@stdlib/assert-is-string';\nimport isFunction from '@stdlib/assert-is-function';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport isEven from '@stdlib/math-base-assert-is-even';\nimport isInteger from '@stdlib/math-base-assert-is-integer';\nimport isComplex64Array from '@stdlib/array-base-assert-is-complex64array';\nimport isComplex128Array from '@stdlib/array-base-assert-is-complex128array';\nimport hasIteratorSymbolSupport from '@stdlib/assert-has-iterator-symbol-support';\nimport ITERATOR_SYMBOL from '@stdlib/symbol-iterator';\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex128 from '@stdlib/complex-float64';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\nimport floor from '@stdlib/math-base-special-floor';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport getter from '@stdlib/array-base-getter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport format from '@stdlib/string-format';\nimport fromIterator from './from_iterator.js';\nimport fromIteratorMap from './from_iterator_map.js';\nimport fromArray from './from_array.js';\n\n\n// VARIABLES //\n\nvar BYTES_PER_ELEMENT = Float64Array.BYTES_PER_ELEMENT * 2;\nvar HAS_ITERATOR_SYMBOL = hasIteratorSymbolSupport();\n\n\n// FUNCTIONS //\n\n/**\n* Returns a boolean indicating if a value is a complex typed array.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*/\nfunction isComplexArray( value ) {\n\treturn (\n\t\tvalue instanceof Complex128Array ||\n\t\t(\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue !== null &&\n\t\t\t(\n\t\t\t\tvalue.constructor.name === 'Complex64Array' ||\n\t\t\t\tvalue.constructor.name === 'Complex128Array'\n\t\t\t) &&\n\t\t\ttypeof value._length === 'number' && // eslint-disable-line no-underscore-dangle\n\n\t\t\t// NOTE: we don't perform a more rigorous test here for a typed array for performance reasons, as robustly checking for a typed array instance could require walking the prototype tree and performing relatively expensive constructor checks...\n\t\t\ttypeof value._buffer === 'object' // eslint-disable-line no-underscore-dangle\n\t\t)\n\t);\n}\n\n/**\n* Returns a boolean indicating if a value is a complex typed array constructor.\n*\n* @private\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array constructor\n*/\nfunction isComplexArrayConstructor( value ) {\n\treturn (\n\t\tvalue === Complex128Array ||\n\n\t\t// NOTE: weaker test in order to avoid a circular dependency with Complex64Array...\n\t\tvalue.name === 'Complex64Array'\n\t);\n}\n\n/**\n* Retrieves a complex number from a complex number array buffer.\n*\n* @private\n* @param {Float64Array} buf - array buffer\n* @param {NonNegativeInteger} idx - element index\n* @returns {Complex128} complex number\n*/\nfunction getComplex128( buf, idx ) {\n\tidx *= 2;\n\treturn new Complex128( buf[ idx ], buf[ idx+1 ] );\n}\n\n\n// MAIN //\n\n/**\n* 128-bit complex number array constructor.\n*\n* @constructor\n* @param {(NonNegativeInteger|Collection|ArrayBuffer|Iterable)} [arg] - length, typed array, array-like object, buffer, or iterable\n* @param {NonNegativeInteger} [byteOffset=0] - byte offset\n* @param {NonNegativeInteger} [length] - view length\n* @throws {RangeError} ArrayBuffer byte length must be a multiple of `16`\n* @throws {RangeError} array-like object and typed array input arguments must have a length which is a multiple of two\n* @throws {TypeError} if provided only a single argument, must provide a valid argument\n* @throws {TypeError} byte offset must be a nonnegative integer\n* @throws {RangeError} byte offset must be a multiple of `16`\n* @throws {TypeError} view length must be a positive multiple of `16`\n* @throws {RangeError} must provide sufficient memory to accommodate byte offset and view length requirements\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} complex number array\n*\n* @example\n* var arr = new Complex128Array();\n* // returns <Complex128Array>\n*\n* var len = arr.length;\n* // returns 0\n*\n* @example\n* var arr = new Complex128Array( 2 );\n* // returns <Complex128Array>\n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* var arr = new Complex128Array( [ 1.0, -1.0 ] );\n* // returns <Complex128Array>\n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf );\n* // returns <Complex128Array>\n*\n* var len = arr.length;\n* // returns 2\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 32 );\n* var arr = new Complex128Array( buf, 16 );\n* // returns <Complex128Array>\n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import ArrayBuffer from '@stdlib/array-buffer';\n*\n* var buf = new ArrayBuffer( 64 );\n* var arr = new Complex128Array( buf, 16, 2 );\n* // returns <Complex128Array>\n*\n* var len = arr.length;\n* // returns 2\n*/\nfunction Complex128Array() {\n\tvar byteOffset;\n\tvar nargs;\n\tvar buf;\n\tvar len;\n\n\tnargs = arguments.length;\n\tif ( !(this instanceof Complex128Array) ) {\n\t\tif ( nargs === 0 ) {\n\t\t\treturn new Complex128Array();\n\t\t}\n\t\tif ( nargs === 1 ) {\n\t\t\treturn new Complex128Array( arguments[0] );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\treturn new Complex128Array( arguments[0], arguments[1] );\n\t\t}\n\t\treturn new Complex128Array( arguments[0], arguments[1], arguments[2] );\n\t}\n\t// Create the underlying data buffer...\n\tif ( nargs === 0 ) {\n\t\tbuf = new Float64Array( 0 ); // backward-compatibility\n\t} else if ( nargs === 1 ) {\n\t\tif ( isNonNegativeInteger( arguments[0] ) ) {\n\t\t\tbuf = new Float64Array( arguments[0]*2 );\n\t\t} else if ( isCollection( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tlen = buf.length;\n\n\t\t\t// If provided a \"generic\" array, peak at the first value, and, if the value is a complex number, try to process as an array of complex numbers, falling back to \"normal\" typed array initialization if we fail and ensuring consistency if the first value had not been a complex number...\n\t\t\tif ( len && isArray( buf ) && isComplexLike( buf[0] ) ) {\n\t\t\t\tbuf = fromArray( new Float64Array( len*2 ), buf );\n\t\t\t\tif ( buf === null ) {\n\t\t\t\t\t// We failed and we are now forced to allocate a new array :-(\n\t\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t\t}\n\t\t\t\t\t// We failed, so fall back to directly setting values...\n\t\t\t\t\tbuf = new Float64Array( arguments[0] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isComplex64Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret64( buf, 0 );\n\t\t\t\t} else if ( isComplex128Array( buf ) ) {\n\t\t\t\t\tbuf = reinterpret128( buf, 0 );\n\t\t\t\t} else if ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tbuf = new Float64Array( buf );\n\t\t\t}\n\t\t} else if ( isArrayBuffer( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( !isInteger( buf.byteLength/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.', BYTES_PER_ELEMENT, buf.byteLength ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else if ( isObject( arguments[0] ) ) {\n\t\t\tbuf = arguments[ 0 ];\n\t\t\tif ( HAS_ITERATOR_SYMBOL === false ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tif ( !isFunction( buf[ ITERATOR_SYMBOL ] ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = buf[ ITERATOR_SYMBOL ]();\n\t\t\tif ( !isFunction( buf.next ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', buf ) );\n\t\t\t}\n\t\t\tbuf = fromIterator( buf );\n\t\t\tif ( buf instanceof Error ) {\n\t\t\t\tthrow buf;\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf );\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.', arguments[0] ) );\n\t\t}\n\t} else {\n\t\tbuf = arguments[ 0 ];\n\t\tif ( !isArrayBuffer( buf ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an ArrayBuffer. Value: `%s`.', buf ) );\n\t\t}\n\t\tbyteOffset = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( byteOffset ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.', byteOffset ) );\n\t\t}\n\t\tif ( !isInteger( byteOffset/BYTES_PER_ELEMENT ) ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Byte offset must be a multiple of %u. Value: `%u`.', BYTES_PER_ELEMENT, byteOffset ) );\n\t\t}\n\t\tif ( nargs === 2 ) {\n\t\t\tlen = buf.byteLength - byteOffset;\n\t\t\tif ( !isInteger( len/BYTES_PER_ELEMENT ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.', BYTES_PER_ELEMENT, len ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset );\n\t\t} else {\n\t\t\tlen = arguments[ 2 ];\n\t\t\tif ( !isNonNegativeInteger( len ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Length must be a nonnegative integer. Value: `%s`.', len ) );\n\t\t\t}\n\t\t\tif ( (len*BYTES_PER_ELEMENT) > (buf.byteLength-byteOffset) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.', len*BYTES_PER_ELEMENT ) );\n\t\t\t}\n\t\t\tbuf = new Float64Array( buf, byteOffset, len*2 );\n\t\t}\n\t}\n\tsetReadOnly( this, '_buffer', buf );\n\tsetReadOnly( this, '_length', buf.length/2 );\n\n\treturn this;\n}\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var nbytes = Complex128Array.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array, 'BYTES_PER_ELEMENT', BYTES_PER_ELEMENT );\n\n/**\n* Constructor name.\n*\n* @name name\n* @memberof Complex128Array\n* @readonly\n* @type {string}\n* @default 'Complex128Array'\n*\n* @example\n* var name = Complex128Array.name;\n* // returns 'Complex128Array'\n*/\nsetReadOnly( Complex128Array, 'name', 'Complex128Array' );\n\n/**\n* Creates a new 128-bit complex number array from an array-like object or an iterable.\n*\n* @name from\n* @memberof Complex128Array\n* @type {Function}\n* @param {(Collection|Object)} src - array-like object or iterable\n* @param {Function} [clbk] - callback to invoke for each source element\n* @param {*} [thisArg] - context\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an array-like object or an iterable\n* @throws {TypeError} second argument must be a function\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {TypeError} an iterator must return either a two element array containing real and imaginary components or a complex number\n* @throws {TypeError} when provided an iterator, a callback must return either a two element array containing real and imaginary components or a complex number\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.from( [ 1.0, -1.0 ] );\n* // returns <Complex128Array>\n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ] );\n* // returns <Complex128Array>\n*\n* var len = arr.length;\n* // returns 1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function clbk( v ) {\n* return new Complex128( real(v)*2.0, imag(v)*2.0 );\n* }\n*\n* var arr = Complex128Array.from( [ new Complex128( 1.0, 1.0 ) ], clbk );\n* // returns <Complex128Array>\n*\n* var len = arr.length;\n* // returns 1\n*/\nsetReadOnly( Complex128Array, 'from', function from( src ) {\n\tvar thisArg;\n\tvar nargs;\n\tvar clbk;\n\tvar out;\n\tvar buf;\n\tvar tmp;\n\tvar get;\n\tvar len;\n\tvar flg;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tnargs = arguments.length;\n\tif ( nargs > 1 ) {\n\t\tclbk = arguments[ 1 ];\n\t\tif ( !isFunction( clbk ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a function. Value: `%s`.', clbk ) );\n\t\t}\n\t\tif ( nargs > 2 ) {\n\t\t\tthisArg = arguments[ 2 ];\n\t\t}\n\t}\n\tif ( isComplexArray( src ) ) {\n\t\tlen = src.length;\n\t\tif ( clbk ) {\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, src.get( i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isCollection( src ) ) {\n\t\tif ( clbk ) {\n\t\t\t// Note: array contents affect how we iterate over a provided data source. If only complex number objects, we can extract real and imaginary components. Otherwise, for non-complex number arrays (e.g., `Float64Array`, etc), we assume a strided array where real and imaginary components are interleaved. In the former case, we expect a callback to return real and imaginary components (possibly as a complex number). In the latter case, we expect a callback to return *either* a real or imaginary component.\n\n\t\t\tlen = src.length;\n\t\t\tif ( src.get && src.set ) {\n\t\t\t\tget = accessorGetter( 'default' );\n\t\t\t} else {\n\t\t\t\tget = getter( 'default' );\n\t\t\t}\n\t\t\t// Detect whether we've been provided an array which returns complex number objects...\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( !isComplexLike( get( src, i ) ) ) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If an array does not contain only complex number objects, then we assume interleaved real and imaginary components...\n\t\t\tif ( flg ) {\n\t\t\t\tif ( !isEven( len ) ) {\n\t\t\t\t\tthrow new RangeError( format( 'invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.', len ) );\n\t\t\t\t}\n\t\t\t\tout = new this( len/2 );\n\t\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tbuf[ i ] = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\t}\n\t\t\t\treturn out;\n\t\t\t}\n\t\t\t// If an array contains only complex number objects, then we need to extract real and imaginary components...\n\t\t\tout = new this( len );\n\t\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tv = clbk.call( thisArg, get( src, i ), i );\n\t\t\t\tif ( isComplexLike( v ) ) {\n\t\t\t\t\tbuf[ j ] = real( v );\n\t\t\t\t\tbuf[ j+1 ] = imag( v );\n\t\t\t\t} else if ( isArrayLikeObject( v ) && v.length >= 2 ) {\n\t\t\t\t\tbuf[ j ] = v[ 0 ];\n\t\t\t\t\tbuf[ j+1 ] = v[ 1 ];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t\t\t}\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn out;\n\t\t}\n\t\treturn new this( src );\n\t}\n\tif ( isObject( src ) && HAS_ITERATOR_SYMBOL && isFunction( src[ ITERATOR_SYMBOL ] ) ) { // eslint-disable-line max-len\n\t\tbuf = src[ ITERATOR_SYMBOL ]();\n\t\tif ( !isFunction( buf.next ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n\t\t}\n\t\tif ( clbk ) {\n\t\t\ttmp = fromIteratorMap( buf, clbk, thisArg );\n\t\t} else {\n\t\t\ttmp = fromIterator( buf );\n\t\t}\n\t\tif ( tmp instanceof Error ) {\n\t\t\tthrow tmp;\n\t\t}\n\t\tlen = tmp.length / 2;\n\t\tout = new this( len );\n\t\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tbuf[ i ] = tmp[ i ];\n\t\t}\n\t\treturn out;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.', src ) );\n});\n\n/**\n* Creates a new 128-bit complex number array from a variable number of arguments.\n*\n* @name of\n* @memberof Complex128Array\n* @type {Function}\n* @param {...*} element - array elements\n* @throws {TypeError} `this` context must be a constructor\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} 128-bit complex number array\n*\n* @example\n* var arr = Complex128Array.of( 1.0, 1.0, 1.0, 1.0 );\n* // returns <Complex128Array>\n*\n* var len = arr.length;\n* // returns 2\n*/\nsetReadOnly( Complex128Array, 'of', function of() {\n\tvar args;\n\tvar i;\n\tif ( !isFunction( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` context must be a constructor.' );\n\t}\n\tif ( !isComplexArrayConstructor( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\targs = [];\n\tfor ( i = 0; i < arguments.length; i++ ) {\n\t\targs.push( arguments[ i ] );\n\t}\n\treturn new this( args );\n});\n\n/**\n* Returns an array element with support for both nonnegative and negative integer indices.\n*\n* @name at\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide an integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.at( 0 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 9.0, -9.0 ], 9 );\n*\n* z = arr.at( 0 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.at( -1 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 9.0\n*\n* im = imag( z );\n* // returns -9.0\n*\n* z = arr.at( 100 );\n* // returns undefined\n*\n* z = arr.at( -100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'at', function at( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide an integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx < 0 ) {\n\t\tidx += this._length;\n\t}\n\tif ( idx < 0 || idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Pointer to the underlying data buffer.\n*\n* @name buffer\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {ArrayBuffer}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var buf = arr.buffer;\n* // returns <ArrayBuffer>\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'buffer', function get() {\n\treturn this._buffer.buffer;\n});\n\n/**\n* Size (in bytes) of the array.\n*\n* @name byteLength\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteLength = arr.byteLength;\n* // returns 160\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteLength', function get() {\n\treturn this._buffer.byteLength;\n});\n\n/**\n* Offset (in bytes) of the array from the start of its underlying `ArrayBuffer`.\n*\n* @name byteOffset\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var byteOffset = arr.byteOffset;\n* // returns 0\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'byteOffset', function get() {\n\treturn this._buffer.byteOffset;\n});\n\n/**\n* Size (in bytes) of each array element.\n*\n* @name BYTES_PER_ELEMENT\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {PositiveInteger}\n* @default 16\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var nbytes = arr.BYTES_PER_ELEMENT;\n* // returns 16\n*/\nsetReadOnly( Complex128Array.prototype, 'BYTES_PER_ELEMENT', Complex128Array.BYTES_PER_ELEMENT );\n\n/**\n* Copies a sequence of elements within the array to the position starting at `target`.\n*\n* @name copyWithin\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} target - index at which to start copying elements\n* @param {integer} start - source index at which to copy elements from\n* @param {integer} [end] - source index at which to stop copying elements from\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} modified array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 4 );\n*\n* // Set the array elements:\n* arr.set( new Complex128( 1.0, 1.0 ), 0 );\n* arr.set( new Complex128( 2.0, 2.0 ), 1 );\n* arr.set( new Complex128( 3.0, 3.0 ), 2 );\n* arr.set( new Complex128( 4.0, 4.0 ), 3 );\n*\n* // Copy the first two elements to the last two elements:\n* arr.copyWithin( 2, 0, 2 );\n*\n* // Get the last array element:\n* var z = arr.get( 3 );\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'copyWithin', function copyWithin( target, start ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\t// FIXME: prefer a functional `copyWithin` implementation which addresses lack of universal browser support (e.g., IE11 and Safari) or ensure that typed arrays are polyfilled\n\tif ( arguments.length === 2 ) {\n\t\tthis._buffer.copyWithin( target*2, start*2 );\n\t} else {\n\t\tthis._buffer.copyWithin( target*2, start*2, arguments[2]*2 );\n\t}\n\treturn this;\n});\n\n/**\n* Returns an iterator for iterating over array key-value pairs.\n*\n* @name entries\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Iterator} iterator\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = [\n* new Complex128( 1.0, 1.0 ),\n* new Complex128( 2.0, 2.0 ),\n* new Complex128( 3.0, 3.0 )\n* ];\n* arr = new Complex128Array( arr );\n*\n* // Create an iterator:\n* var it = arr.entries();\n*\n* // Iterate over the key-value pairs...\n* var v = it.next().value;\n* // returns [ 0, <Complex128> ]\n*\n* v = it.next().value;\n* // returns [ 1, <Complex128> ]\n*\n* v = it.next().value;\n* // returns [ 2, <Complex128> ]\n*\n* var bool = it.next().done;\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'entries', function entries() {\n\tvar buffer;\n\tvar self;\n\tvar iter;\n\tvar len;\n\tvar FLG;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tself = this;\n\tbuffer = this._buffer;\n\tlen = this._length;\n\n\t// Initialize the iteration indices:\n\ti = -1;\n\tj = -2;\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\tif ( ITERATOR_SYMBOL ) {\n\t\tsetReadOnly( iter, ITERATOR_SYMBOL, factory );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar z;\n\t\ti += 1;\n\t\tif ( FLG || i >= len ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tj += 2;\n\t\tz = new Complex128( buffer[ j ], buffer[ j+1 ] );\n\t\treturn {\n\t\t\t'value': [ i, z ],\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn self.entries();\n\t}\n});\n\n/**\n* Tests whether all elements in an array pass a test implemented by a predicate function.\n*\n* @name every\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether all elements pass a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var bool = arr.every( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'every', function every( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( !predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n});\n\n/**\n* Returns a modified typed array filled with a fill value.\n*\n* @name fill\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} value - fill value\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @throws {TypeError} third argument must be an integer\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.fill( new Complex128( 1.0, 1.0 ), 1 );\n*\n* var z = arr.get( 1 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*\n* z = arr.get( 1 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'fill', function fill( value, start, end ) {\n\tvar buf;\n\tvar len;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Third argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t} else {\n\t\t\tend = len;\n\t\t}\n\t} else {\n\t\tstart = 0;\n\t\tend = len;\n\t}\n\tre = real( value );\n\tim = imag( value );\n\tfor ( i = start; i < end; i++ ) {\n\t\tidx = 2*i;\n\t\tbuf[ idx ] = re;\n\t\tbuf[ idx+1 ] = im;\n\t}\n\treturn this;\n});\n\n/**\n* Returns a new array containing the elements of an array which pass a test implemented by a predicate function.\n*\n* @name filter\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.filter( predicate );\n* // returns <Complex128Array>\n*\n* var len = out.length;\n* // returns 1\n*\n* var z = out.get( 0 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns 2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'filter', function filter( predicate, thisArg ) {\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tout = [];\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\tout.push( z );\n\t\t}\n\t}\n\treturn new this.constructor( out );\n});\n\n/**\n* Returns the first element in an array for which a predicate function returns a truthy value.\n*\n* @name find\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.find( predicate );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'find', function find( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the first element in an array for which a predicate function returns a truthy value.\n*\n* @name findIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var idx = arr.findIndex( predicate );\n* // returns 2\n*/\nsetReadOnly( Complex128Array.prototype, 'findIndex', function findIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLast\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {(Complex128|void)} array element or undefined\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.findLast( predicate );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'findLast', function findLast( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn z;\n\t\t}\n\t}\n});\n\n/**\n* Returns the index of the last element in an array for which a predicate function returns a truthy value.\n*\n* @name findLastIndex\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {integer} index or -1\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var idx = arr.findLastIndex( predicate );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'findLastIndex', function findLastIndex( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = this._length-1; i >= 0; i-- ) {\n\t\tz = getComplex128( buf, i );\n\t\tif ( predicate.call( thisArg, z, i, this ) ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Invokes a function once for each array element.\n*\n* @name forEach\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - function to invoke\n* @param {*} [thisArg] - function invocation context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* function log( v, i ) {\n* console.log( '%s: %s', i, v.toString() );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* arr.forEach( log );\n*/\nsetReadOnly( Complex128Array.prototype, 'forEach', function forEach( fcn, thisArg ) {\n\tvar buf;\n\tvar i;\n\tvar z;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tz = getComplex128( buf, i );\n\t\tfcn.call( thisArg, z, i, this );\n\t}\n});\n\n/**\n* Returns an array element.\n*\n* @name get\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {NonNegativeInteger} idx - element index\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} must provide a nonnegative integer\n* @returns {(Complex128|void)} array element\n*\n* @example\n* var arr = new Complex128Array( 10 );\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var z = arr.get( 0 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*\n* z = arr.get( 100 );\n* // returns undefined\n*/\nsetReadOnly( Complex128Array.prototype, 'get', function get( idx ) {\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isNonNegativeInteger( idx ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a nonnegative integer. Value: `%s`.', idx ) );\n\t}\n\tif ( idx >= this._length ) {\n\t\treturn;\n\t}\n\treturn getComplex128( this._buffer, idx );\n});\n\n/**\n* Number of array elements.\n*\n* @name length\n* @memberof Complex128Array.prototype\n* @readonly\n* @type {NonNegativeInteger}\n*\n* @example\n* var arr = new Complex128Array( 10 );\n*\n* var len = arr.length;\n* // returns 10\n*/\nsetReadOnlyAccessor( Complex128Array.prototype, 'length', function get() {\n\treturn this._length;\n});\n\n/**\n* Returns a boolean indicating whether an array includes a provided value.\n*\n* @name includes\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - search element\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {boolean} boolean indicating whether an array includes a provided value\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var bool = arr.includes( new Complex128( 3.0, -3.0 ) );\n* // returns true\n*\n* bool = arr.includes( new Complex128( 3.0, -3.0 ), 3 );\n* // returns false\n*\n* bool = arr.includes( new Complex128( 4.0, -4.0 ), -3 );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'includes', function includes( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Returns the first index at which a given element can be found.\n*\n* @name indexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex=0] - starting index (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var idx = arr.indexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 2\n*\n* idx = arr.indexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns -1\n*\n* idx = arr.indexOf( new Complex128( 4.0, -4.0 ), -3 );\n* // returns 3\n*/\nsetReadOnly( Complex128Array.prototype, 'indexOf', function indexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t\tif ( fromIndex < 0 ) {\n\t\t\t\tfromIndex = 0;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfromIndex = 0;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i < this._length; i++ ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new string by concatenating all array elements.\n*\n* @name join\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {string} [separator=','] - element separator\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a string\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.join();\n* // returns '1 + 1i,2 + 2i'\n*\n* str = arr.join( '/' );\n* // returns '1 + 1i/2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'join', function join( separator ) {\n\tvar out;\n\tvar buf;\n\tvar sep;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( arguments.length === 0 ) {\n\t\tsep = ',';\n\t} else if ( isString( separator ) ) {\n\t\tsep = separator;\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a string. Value: `%s`.', separator ) );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( sep );\n});\n\n/**\n* Returns the last index at which a given element can be found.\n*\n* @name lastIndexOf\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {ComplexLike} searchElement - element to find\n* @param {integer} [fromIndex] - index at which to start searching backward (inclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a complex number\n* @throws {TypeError} second argument must be an integer\n* @returns {integer} index or -1\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 3.0, -3.0 ], 4 );\n*\n* var idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ) );\n* // returns 4\n*\n* idx = arr.lastIndexOf( new Complex128( 3.0, -3.0 ), 3 );\n* // returns 2\n*\n* idx = arr.lastIndexOf( new Complex128( 5.0, -5.0 ), 3 );\n* // returns -1\n*\n* idx = arr.lastIndexOf( new Complex128( 2.0, -2.0 ), -3 );\n* // returns 1\n*/\nsetReadOnly( Complex128Array.prototype, 'lastIndexOf', function lastIndexOf( searchElement, fromIndex ) {\n\tvar buf;\n\tvar idx;\n\tvar re;\n\tvar im;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isComplexLike( searchElement ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a complex number. Value: `%s`.', searchElement ) );\n\t}\n\tif ( arguments.length > 1 ) {\n\t\tif ( !isInteger( fromIndex ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', fromIndex ) );\n\t\t}\n\t\tif ( fromIndex >= this._length ) {\n\t\t\tfromIndex = this._length - 1;\n\t\t} else if ( fromIndex < 0 ) {\n\t\t\tfromIndex += this._length;\n\t\t}\n\t} else {\n\t\tfromIndex = this._length - 1;\n\t}\n\tre = real( searchElement );\n\tim = imag( searchElement );\n\tbuf = this._buffer;\n\tfor ( i = fromIndex; i >= 0; i-- ) {\n\t\tidx = 2 * i;\n\t\tif ( re === buf[ idx ] && im === buf[ idx+1 ] ) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n});\n\n/**\n* Returns a new array with each element being the result of a provided callback function.\n*\n* @name map\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} fcn - callback function\n* @param {*} [thisArg] - callback function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import Complex128 from '@stdlib/complex-float64';\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function scale( v, i ) {\n* return new Complex128( 2.0*real( v ), 2.0*imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var out = arr.map( scale );\n* // returns <Complex128Array>\n*\n* var z = out.get( 0 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 2.0\n*\n* var im = imag( z );\n* // returns -2.0\n*/\nsetReadOnly( Complex128Array.prototype, 'map', function map( fcn, thisArg ) {\n\tvar outbuf;\n\tvar buf;\n\tvar out;\n\tvar i;\n\tvar v;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( fcn ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', fcn ) );\n\t}\n\tbuf = this._buffer;\n\tout = new this.constructor( this._length );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tv = fcn.call( thisArg, getComplex128( buf, i ), i, this );\n\t\tif ( isComplexLike( v ) ) {\n\t\t\toutbuf[ 2*i ] = real( v );\n\t\t\toutbuf[ (2*i)+1 ] = imag( v );\n\t\t} else if ( isArrayLikeObject( v ) && v.length === 2 ) {\n\t\t\toutbuf[ 2*i ] = v[ 0 ];\n\t\t\toutbuf[ (2*i)+1 ] = v[ 1 ];\n\t\t} else {\n\t\t\tthrow new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', v ) );\n\t\t}\n\t}\n\treturn out;\n});\n\n/**\n* Applies a provided callback function to each element of the array, in order, passing in the return value from the calculation on the preceding element and returning the accumulated result upon completion.\n*\n* @name reduce\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} reducer - callback function\n* @param {*} [initialValue] - initial value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @throws {Error} if not provided an initial value, the array must have at least one element\n* @returns {*} accumulated result\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import cadd from '@stdlib/math-base-ops-cadd';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var z = arr.reduce( cadd );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 6.0\n*\n* var im = imag( z );\n* // returns 6.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reduce', function reduce( reducer, initialValue ) {\n\tvar buf;\n\tvar acc;\n\tvar len;\n\tvar v;\n\tvar i;\n\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( reducer ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', reducer ) );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length > 1 ) {\n\t\tacc = initialValue;\n\t\ti = 0;\n\t} else {\n\t\tif ( len === 0 ) {\n\t\t\tthrow new Error( 'invalid operation. If not provided an initial value, an array must contain at least one element.' );\n\t\t}\n\t\tacc = getComplex128( buf, 0 );\n\t\ti = 1;\n\t}\n\tfor ( ; i < len; i++ ) {\n\t\tv = getComplex128( buf, i );\n\t\tacc = reducer( acc, v, i, this );\n\t}\n\treturn acc;\n});\n\n/**\n* Reverses an array in-place.\n*\n* @name reverse\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.reverse();\n* // returns <Complex128Array>\n*\n* var z = out.get( 0 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'reverse', function reverse() {\n\tvar buf;\n\tvar tmp;\n\tvar len;\n\tvar N;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tbuf = this._buffer;\n\tN = floor( len / 2 );\n\tfor ( i = 0; i < N; i++ ) {\n\t\tj = len - i - 1;\n\t\ttmp = buf[ (2*i) ];\n\t\tbuf[ (2*i) ] = buf[ (2*j) ];\n\t\tbuf[ (2*j) ] = tmp;\n\t\ttmp = buf[ (2*i)+1 ];\n\t\tbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t\tbuf[ (2*j)+1 ] = tmp;\n\t}\n\treturn this;\n});\n\n/**\n* Sets an array element.\n*\n* ## Notes\n*\n* - When provided a typed array, real or complex, we must check whether the source array shares the same buffer as the target array and whether the underlying memory overlaps. In particular, we are concerned with the following scenario:\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* In the above, as we copy values from `src`, we will overwrite values in the `src` view, resulting in duplicated values copied into the end of `buf`, which is not intended. Hence, to avoid overwriting source values, we must **copy** source values to a temporary array.\n*\n* In the other overlapping scenario,\n*\n* ```text\n* buf: ---------------------\n* src: ---------------------\n* ```\n*\n* by the time we begin copying into the overlapping region, we are copying from the end of `src`, a non-overlapping region, which means we don't run the risk of copying copied values, rather than the original `src` values as intended.\n*\n* @name set\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {(Collection|Complex|ComplexArray)} value - value(s)\n* @param {NonNegativeInteger} [i=0] - element index at which to start writing values\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be either a complex number, an array-like object, or a complex number array\n* @throws {TypeError} index argument must be a nonnegative integer\n* @throws {RangeError} array-like objects must have a length which is a multiple of two\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {RangeError} target array lacks sufficient storage to accommodate source values\n* @returns {void}\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 10 );\n*\n* var z = arr.get( 0 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 0.0\n*\n* var im = imag( z );\n* // returns 0.0\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n*\n* z = arr.get( 0 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns -1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'set', function set( value ) {\n\t/* eslint-disable no-underscore-dangle */\n\tvar sbuf;\n\tvar idx;\n\tvar buf;\n\tvar tmp;\n\tvar flg;\n\tvar N;\n\tvar v;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tif ( arguments.length > 1 ) {\n\t\tidx = arguments[ 1 ];\n\t\tif ( !isNonNegativeInteger( idx ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Index argument must be a nonnegative integer. Value: `%s`.', idx ) );\n\t\t}\n\t} else {\n\t\tidx = 0;\n\t}\n\tif ( isComplexLike( value ) ) {\n\t\tif ( idx >= this._length ) {\n\t\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%u`.', idx ) );\n\t\t}\n\t\tidx *= 2;\n\t\tbuf[ idx ] = real( value );\n\t\tbuf[ idx+1 ] = imag( value );\n\t\treturn;\n\t}\n\tif ( isComplexArray( value ) ) {\n\t\tN = value._length;\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tsbuf = value._buffer;\n\n\t\t// Check for overlapping memory...\n\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\tif (\n\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t(\n\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t)\n\t\t) {\n\t\t\t// We need to copy source values...\n\t\t\ttmp = new Float64Array( sbuf.length );\n\t\t\tfor ( i = 0; i < sbuf.length; i++ ) {\n\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t}\n\t\t\tsbuf = tmp;\n\t\t}\n\t\tidx *= 2;\n\t\tj = 0;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\tidx += 2; // stride\n\t\t\tj += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tif ( isCollection( value ) ) {\n\t\t// Detect whether we've been provided an array of complex numbers...\n\t\tN = value.length;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tif ( !isComplexLike( value[ i ] ) ) {\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If an array does not contain only complex numbers, then we assume interleaved real and imaginary components...\n\t\tif ( flg ) {\n\t\t\tif ( !isEven( N ) ) {\n\t\t\t\tthrow new RangeError( format( 'invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.', N ) );\n\t\t\t}\n\t\t\tif ( idx+(N/2) > this._length ) {\n\t\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t\t}\n\t\t\tsbuf = value;\n\n\t\t\t// Check for overlapping memory...\n\t\t\tj = buf.byteOffset + (idx*BYTES_PER_ELEMENT);\n\t\t\tif (\n\t\t\t\tsbuf.buffer === buf.buffer &&\n\t\t\t\t(\n\t\t\t\t\tsbuf.byteOffset < j &&\n\t\t\t\t\tsbuf.byteOffset+sbuf.byteLength > j\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// We need to copy source values...\n\t\t\t\ttmp = new Float64Array( N );\n\t\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\t\ttmp[ i ] = sbuf[ i ];\n\t\t\t\t}\n\t\t\t\tsbuf = tmp;\n\t\t\t}\n\t\t\tidx *= 2;\n\t\t\tN /= 2;\n\t\t\tj = 0;\n\t\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\t\tbuf[ idx ] = sbuf[ j ];\n\t\t\t\tbuf[ idx+1 ] = sbuf[ j+1 ];\n\t\t\t\tidx += 2; // stride\n\t\t\t\tj += 2; // stride\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// If an array contains only complex numbers, then we need to extract real and imaginary components...\n\t\tif ( idx+N > this._length ) {\n\t\t\tthrow new RangeError( 'invalid arguments. Target array lacks sufficient storage to accommodate source values.' );\n\t\t}\n\t\tidx *= 2;\n\t\tfor ( i = 0; i < N; i++ ) {\n\t\t\tv = value[ i ];\n\t\t\tbuf[ idx ] = real( v );\n\t\t\tbuf[ idx+1 ] = imag( v );\n\t\t\tidx += 2; // stride\n\t\t}\n\t\treturn;\n\t}\n\tthrow new TypeError( format( 'invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.', value ) );\n\n\t/* eslint-enable no-underscore-dangle */\n});\n\n/**\n* Copies a portion of a typed array to a new typed array.\n*\n* @name slice\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [start=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex128Array} complex number array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var out = arr.slice();\n* // returns <Complex128Array>\n*\n* var len = out.length;\n* // returns 5\n*\n* var z = out.get( 0 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = out.get( len-1 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* out = arr.slice( 1, -2 );\n* // returns <Complex128Array>\n*\n* len = out.length;\n* // returns 2\n*\n* z = out.get( 0 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = out.get( len-1 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'slice', function slice( start, end ) {\n\tvar outlen;\n\tvar outbuf;\n\tvar out;\n\tvar idx;\n\tvar buf;\n\tvar len;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tstart = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( start ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', start ) );\n\t\t}\n\t\tif ( start < 0 ) {\n\t\t\tstart += len;\n\t\t\tif ( start < 0 ) {\n\t\t\t\tstart = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( start < end ) {\n\t\toutlen = end - start;\n\t} else {\n\t\toutlen = 0;\n\t}\n\tout = new this.constructor( outlen );\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < outlen; i++ ) {\n\t\tidx = 2*(i+start);\n\t\toutbuf[ 2*i ] = buf[ idx ];\n\t\toutbuf[ (2*i)+1 ] = buf[ idx+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Tests whether at least one element in an array passes a test implemented by a predicate function.\n*\n* @name some\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {Function} predicate - test function\n* @param {*} [thisArg] - predicate function execution context\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be a function\n* @returns {boolean} boolean indicating whether at least one element passes a test\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* function predicate( v ) {\n* return ( real( v ) === imag( v ) );\n* }\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n*\n* var bool = arr.some( predicate );\n* // returns true\n*/\nsetReadOnly( Complex128Array.prototype, 'some', function some( predicate, thisArg ) {\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isFunction( predicate ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be a function. Value: `%s`.', predicate ) );\n\t}\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tif ( predicate.call( thisArg, getComplex128( buf, i ), i, this ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n});\n\n/**\n* Creates a new typed array view over the same underlying `ArrayBuffer` and with the same underlying data type as the host array.\n*\n* @name subarray\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} [begin=0] - starting index (inclusive)\n* @param {integer} [end] - ending index (exclusive)\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {TypeError} second argument must be an integer\n* @returns {Complex64Array} subarray\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 5 );\n*\n* arr.set( [ 1.0, -1.0 ], 0 );\n* arr.set( [ 2.0, -2.0 ], 1 );\n* arr.set( [ 3.0, -3.0 ], 2 );\n* arr.set( [ 4.0, -4.0 ], 3 );\n* arr.set( [ 5.0, -5.0 ], 4 );\n*\n* var subarr = arr.subarray();\n* // returns <Complex128Array>\n*\n* var len = subarr.length;\n* // returns 5\n*\n* var z = subarr.get( 0 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 1.0\n*\n* var im = imag( z );\n* // returns -1.0\n*\n* z = subarr.get( len-1 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 5.0\n*\n* im = imag( z );\n* // returns -5.0\n*\n* subarr = arr.subarray( 1, -2 );\n* // returns <Complex128Array>\n*\n* len = subarr.length;\n* // returns 2\n*\n* z = subarr.get( 0 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns -2.0\n*\n* z = subarr.get( len-1 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 3.0\n*\n* im = imag( z );\n* // returns -3.0\n*/\nsetReadOnly( Complex128Array.prototype, 'subarray', function subarray( begin, end ) {\n\tvar offset;\n\tvar buf;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tbuf = this._buffer;\n\tlen = this._length;\n\tif ( arguments.length === 0 ) {\n\t\tbegin = 0;\n\t\tend = len;\n\t} else {\n\t\tif ( !isInteger( begin ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', begin ) );\n\t\t}\n\t\tif ( begin < 0 ) {\n\t\t\tbegin += len;\n\t\t\tif ( begin < 0 ) {\n\t\t\t\tbegin = 0;\n\t\t\t}\n\t\t}\n\t\tif ( arguments.length === 1 ) {\n\t\t\tend = len;\n\t\t} else {\n\t\t\tif ( !isInteger( end ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Second argument must be an integer. Value: `%s`.', end ) );\n\t\t\t}\n\t\t\tif ( end < 0 ) {\n\t\t\t\tend += len;\n\t\t\t\tif ( end < 0 ) {\n\t\t\t\t\tend = 0;\n\t\t\t\t}\n\t\t\t} else if ( end > len ) {\n\t\t\t\tend = len;\n\t\t\t}\n\t\t}\n\t}\n\tif ( begin >= len ) {\n\t\tlen = 0;\n\t\toffset = buf.byteLength;\n\t} else if ( begin >= end ) {\n\t\tlen = 0;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t} else {\n\t\tlen = end - begin;\n\t\toffset = buf.byteOffset + ( begin*BYTES_PER_ELEMENT );\n\t}\n\treturn new this.constructor( buf.buffer, offset, ( len < 0 ) ? 0 : len );\n});\n\n/**\n* Returns a new typed array containing the elements in reversed order.\n*\n* @name toReversed\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {Complex128Array} reversed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.toReversed();\n* // returns <Complex128Array>\n*\n* var z = out.get( 0 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 3.0\n*\n* var im = imag( z );\n* // returns 3.0\n*\n* z = out.get( 1 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 2.0\n*\n* im = imag( z );\n* // returns 2.0\n*\n* z = out.get( 2 );\n* // returns <Complex128>\n*\n* re = real( z );\n* // returns 1.0\n*\n* im = imag( z );\n* // returns 1.0\n*/\nsetReadOnly( Complex128Array.prototype, 'toReversed', function toReversed() {\n\tvar outbuf;\n\tvar out;\n\tvar len;\n\tvar buf;\n\tvar i;\n\tvar j;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tlen = this._length;\n\tout = new this.constructor( len );\n\tbuf = this._buffer;\n\toutbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tfor ( i = 0; i < len; i++ ) {\n\t\tj = len - i - 1;\n\t\toutbuf[ (2*i) ] = buf[ (2*j) ];\n\t\toutbuf[ (2*i)+1 ] = buf[ (2*j)+1 ];\n\t}\n\treturn out;\n});\n\n/**\n* Serializes an array as a string.\n*\n* @name toString\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @throws {TypeError} `this` must be a complex number array\n* @returns {string} string representation\n*\n* @example\n* var arr = new Complex128Array( 2 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n*\n* var str = arr.toString();\n* // returns '1 + 1i,2 + 2i'\n*/\nsetReadOnly( Complex128Array.prototype, 'toString', function toString() {\n\tvar out;\n\tvar buf;\n\tvar i;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tout = [];\n\tbuf = this._buffer;\n\tfor ( i = 0; i < this._length; i++ ) {\n\t\tout.push( getComplex128( buf, i ).toString() );\n\t}\n\treturn out.join( ',' );\n});\n\n/**\n* Returns a new typed array with the element at a provided index replaced with a provided value.\n*\n* @name with\n* @memberof Complex128Array.prototype\n* @type {Function}\n* @param {integer} index - element index\n* @param {ComplexLike} value - new value\n* @throws {TypeError} `this` must be a complex number array\n* @throws {TypeError} first argument must be an integer\n* @throws {RangeError} index argument is out-of-bounds\n* @throws {TypeError} second argument must be a complex number\n* @returns {Complex128Array} new typed array\n*\n* @example\n* import real from '@stdlib/complex-real';\n* import imag from '@stdlib/complex-imag';\n* import Complex128 from '@stdlib/complex-float64';\n*\n* var arr = new Complex128Array( 3 );\n*\n* arr.set( [ 1.0, 1.0 ], 0 );\n* arr.set( [ 2.0, 2.0 ], 1 );\n* arr.set( [ 3.0, 3.0 ], 2 );\n*\n* var out = arr.with( 0, new Complex128( 4.0, 4.0 ) );\n* // returns <Complex128Array>\n*\n* var z = out.get( 0 );\n* // returns <Complex128>\n*\n* var re = real( z );\n* // returns 4.0\n*\n* var im = imag( z );\n* // returns 4.0\n*/\nsetReadOnly( Complex128Array.prototype, 'with', function copyWith( index, value ) {\n\tvar buf;\n\tvar out;\n\tvar len;\n\tif ( !isComplexArray( this ) ) {\n\t\tthrow new TypeError( 'invalid invocation. `this` is not a complex number array.' );\n\t}\n\tif ( !isInteger( index ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. First argument must be an integer. Value: `%s`.', index ) );\n\t}\n\tlen = this._length;\n\tif ( index < 0 ) {\n\t\tindex += len;\n\t}\n\tif ( index < 0 || index >= len ) {\n\t\tthrow new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%s`.', index ) );\n\t}\n\tif ( !isComplexLike( value ) ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be a complex number. Value: `%s`.', value ) );\n\t}\n\tout = new this.constructor( this._buffer );\n\tbuf = out._buffer; // eslint-disable-line no-underscore-dangle\n\tbuf[ 2*index ] = real( value );\n\tbuf[ (2*index)+1 ] = imag( value );\n\treturn out;\n});\n\n\n// EXPORTS //\n\nexport default Complex128Array;\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* https://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\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns a strided array of real and imaginary components.\n*\n* @private\n* @param {Float64Array} buf - output array\n* @param {Array} arr - array containing complex numbers\n* @returns {(Float64Array|null)} output array or null\n*/\nfunction fromArray( buf, arr ) {\n\tvar len;\n\tvar v;\n\tvar i;\n\tvar j;\n\n\tlen = arr.length;\n\tj = 0;\n\tfor ( i = 0; i < len; i++ ) {\n\t\tv = arr[ i ];\n\t\tif ( !isComplexLike( v ) ) {\n\t\t\treturn null;\n\t\t}\n\t\tbuf[ j ] = real( v );\n\t\tbuf[ j+1 ] = imag( v );\n\t\tj += 2; // stride\n\t}\n\treturn buf;\n}\n\n\n// EXPORTS //\n\nexport default fromArray;\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* https://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\nimport isArrayLikeObject from '@stdlib/assert-is-array-like-object';\nimport isComplexLike from '@stdlib/assert-is-complex-like';\nimport format from '@stdlib/string-format';\nimport real from '@stdlib/complex-real';\nimport imag from '@stdlib/complex-imag';\n\n\n// MAIN //\n\n/**\n* Returns an array of iterated values.\n*\n* @private\n* @param {Object} it - iterator\n* @param {Function} clbk - callback to invoke for each iterated value\n* @param {*} thisArg - invocation context\n* @returns {(Array|TypeError)} array or an error\n*/\nfunction fromIteratorMap( it, clbk, thisArg ) {\n\tvar out;\n\tvar v;\n\tvar z;\n\tvar i;\n\n\tout = [];\n\ti = -1;\n\twhile ( true ) {\n\t\tv = it.next();\n\t\tif ( v.done ) {\n\t\t\tbreak;\n\t\t}\n\t\ti += 1;\n\t\tz = clbk.call( thisArg, v.value, i );\n\t\tif ( isArrayLikeObject( z ) && z.length >= 2 ) {\n\t\t\tout.push( z[ 0 ], z[ 1 ] );\n\t\t} else if ( isComplexLike( z ) ) {\n\t\t\tout.push( real( z ), imag( z ) );\n\t\t} else {\n\t\t\treturn new TypeError( format( 'invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.', z ) );\n\t\t}\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default fromIteratorMap;\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* https://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\nimport Float64Array from '@stdlib/array-float64';\nimport Float32Array from '@stdlib/array-float32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int8Array from '@stdlib/array-int8';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\n// Note: order should match `dtypes` order\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray,\n\tComplex64Array,\n\tComplex128Array\n];\n\n\n// EXPORTS //\n\nexport default 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* https://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// Note: order should match `ctors` order\nvar DTYPES = [\n\t'float64',\n\t'float32',\n\t'int32',\n\t'uint32',\n\t'int16',\n\t'uint16',\n\t'int8',\n\t'uint8',\n\t'uint8c',\n\t'complex64',\n\t'complex128'\n];\n\n\n// EXPORTS //\n\nexport default DTYPES;\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* https://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\nimport isBuffer from '@stdlib/assert-is-buffer';\nimport isArray from '@stdlib/assert-is-array';\nimport constructorName from '@stdlib/utils-constructor-name';\nimport ctor2dtype from './ctor2dtype.js';\nimport CTORS from './ctors.js';\nimport DTYPES from './dtypes.js';\n\n\n// VARIABLES //\n\nvar NTYPES = DTYPES.length;\n\n\n// MAIN //\n\n/**\n* Returns the data type of an array.\n*\n* @param {*} value - input value\n* @returns {(string|null)} data type\n*\n* @example\n* var dt = dtype( [ 1, 2, 3 ] );\n* // returns 'generic'\n*\n* var dt = dtype( 'beep' );\n* // returns null\n*/\nfunction dtype( value ) {\n\tvar i;\n\tif ( isArray( value ) ) {\n\t\treturn 'generic';\n\t}\n\tif ( isBuffer( value ) ) {\n\t\treturn null;\n\t}\n\tfor ( i = 0; i < NTYPES; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn DTYPES[ i ];\n\t\t}\n\t}\n\t// If the above failed, fall back to a more robust (and significantly slower) means for resolving underlying data types:\n\treturn ctor2dtype[ constructorName( value ) ] || null;\n}\n\n\n// EXPORTS //\n\nexport default dtype;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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\nimport isAccessorArray from '@stdlib/array-base-assert-is-accessor-array';\nimport getter from '@stdlib/array-base-getter';\nimport setter from '@stdlib/array-base-setter';\nimport accessorGetter from '@stdlib/array-base-accessor-getter';\nimport accessorSetter from '@stdlib/array-base-accessor-setter';\nimport dtype from '@stdlib/array-dtype';\n\n\n// MAIN //\n\n/**\n* Converts an array-like to an object likely to have the same \"shape\".\n*\n* ## Notes\n*\n* - This function is intended as a potential performance optimization. In V8, for example, even if two objects share common properties, if those properties were added in different orders or if one object has additional properties not shared by the other object, then those objects will have different \"hidden\" classes. If a function is provided many objects having different \"shapes\", some JavaScript VMs (e.g., V8) will consider the function \"megamorphic\" and fail to perform various runtime optimizations. Accordingly, the intent of this function is to standardize the \"shape\" of the object holding array meta data to ensure that internal functions operating on arrays are provided consistent argument \"shapes\".\n*\n* - The returned object has the following properties:\n*\n* - **data**: reference to the input array.\n* - **dtype**: array data type.\n* - **accessorProtocol**: `boolean` indicating whether the input array uses accessors for getting and setting elements.\n* - **accessors**: a two-element array whose first element is an accessor for retrieving an array element and whose second element is an accessor for setting an array element.\n*\n* @param {Collection} x - array-like object\n* @returns {Object} object containing array meta data\n*\n* @example\n* var obj = arraylike2object( [ 1, 2, 3, 4 ] );\n* // returns {...}\n*/\nfunction arraylike2object( x ) {\n\tvar dt = dtype( x );\n\tif ( isAccessorArray( x ) ) {\n\t\treturn {\n\t\t\t'data': x,\n\t\t\t'dtype': dt,\n\t\t\t'accessorProtocol': true,\n\t\t\t'accessors': [\n\t\t\t\taccessorGetter( dt ),\n\t\t\t\taccessorSetter( dt )\n\t\t\t]\n\t\t};\n\t}\n\treturn {\n\t\t'data': x,\n\t\t'dtype': dt,\n\t\t'accessorProtocol': false,\n\t\t'accessors': [\n\t\t\tgetter( dt ),\n\t\t\tsetter( dt )\n\t\t]\n\t};\n}\n\n\n// EXPORTS //\n\nexport default arraylike2object;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2022 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* https://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* Copies values from `x` into `y`.\n*\n* @private\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Object} x - input array object\n* @param {Collection} x.data - input array data\n* @param {Array<Function>} x.accessors - array element accessors\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Object} y - output array object\n* @param {Collection} y.data - output array data\n* @param {Array<Function>} y.accessors - array element accessors\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Object} output array object\n*\n* @example\n* import Complex64Array from '@stdlib/array-complex64';\n* import Complex64 from '@stdlib/complex-float32';\n* import reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\n*\n* function setter( data, idx, value ) {\n* data.set( value, idx );\n* }\n*\n* function getter( data, idx ) {\n* return data.get( idx );\n* }\n*\n* var x = {\n* 'data': new Complex64Array( [ 1.0, 2.0, 3.0, 4.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* var y = {\n* 'data': new Complex64Array( [ 5.0, 6.0, 7.0, 8.0 ] ),\n* 'accessors': [ getter, setter ]\n* };\n*\n* gcopy( x.data.length, x, 1, 0, y, 1, 0 );\n*\n* var view = reinterpret64( y.data, 0 );\n* // view => <Float32Array>[ 1.0, 2.0, 3.0, 4.0 ]\n*/\nfunction gcopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar xbuf;\n\tvar ybuf;\n\tvar set;\n\tvar get;\n\tvar ix;\n\tvar iy;\n\tvar i;\n\n\t// Cache references to array data:\n\txbuf = x.data;\n\tybuf = y.data;\n\n\t// Cache a reference to the element accessors:\n\tget = x.accessors[ 0 ];\n\tset = y.accessors[ 1 ];\n\n\tix = offsetX;\n\tiy = offsetY;\n\tfor ( i = 0; i < N; i++ ) {\n\t\tset( ybuf, iy, get( xbuf, ix ) );\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn x;\n}\n\n\n// EXPORTS //\n\nexport default gcopy;\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* https://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\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport accessors from './accessors.js';\n\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {Collection} y - output array\n* @param {integer} strideY - `y` stride length\n* @returns {Collection} output array\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gcopy( N, x, strideX, y, strideY ) {\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\tif ( strideX < 0 ) {\n\t\t\tix = (1-N) * strideX;\n\t\t} else {\n\t\t\tix = 0;\n\t\t}\n\t\tif ( strideY < 0 ) {\n\t\t\tiy = (1-N) * strideY;\n\t\t} else {\n\t\t\tiy = 0;\n\t\t}\n\t\taccessors( N, ox, strideX, ix, oy, strideY, iy );\n\t\treturn oy.data;\n\t}\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ i ] = x[ i ];\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ i ] = x[ i ];\n\t\t\ty[ i+1 ] = x[ i+1 ];\n\t\t\ty[ i+2 ] = x[ i+2 ];\n\t\t\ty[ i+3 ] = x[ i+3 ];\n\t\t\ty[ i+4 ] = x[ i+4 ];\n\t\t\ty[ i+5 ] = x[ i+5 ];\n\t\t\ty[ i+6 ] = x[ i+6 ];\n\t\t\ty[ i+7 ] = x[ i+7 ];\n\t\t}\n\t\treturn y;\n\t}\n\tif ( strideX < 0 ) {\n\t\tix = (1-N) * strideX;\n\t} else {\n\t\tix = 0;\n\t}\n\tif ( strideY < 0 ) {\n\t\tiy = (1-N) * strideY;\n\t} else {\n\t\tiy = 0;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nexport default gcopy;\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* https://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* Dummy function.\n*\n* @private\n*/\nfunction foo() {\n\t// No-op...\n}\n\n\n// EXPORTS //\n\nexport default foo;\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* https://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* BLAS level 1 routine to copy values from `x` into `y`.\n*\n* @module @stdlib/blas-base-gcopy\n*\n* @example\n* import gcopy from '@stdlib/blas-base-gcopy';\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, y, 1 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*\n* @example\n* import gcopy from '@stdlib/blas-base-gcopy';\n*\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy.ndarray( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport ndarray from './ndarray.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'ndarray', ndarray );\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport arraylike2object from '@stdlib/array-base-arraylike2object';\nimport accessors from './accessors.js';\n\n\n// VARIABLES //\n\nvar M = 8;\n\n\n// MAIN //\n\n/**\n* Copies values from `x` into `y`.\n*\n* @param {PositiveInteger} N - number of indexed elements\n* @param {Collection} x - input array\n* @param {integer} strideX - `x` stride length\n* @param {NonNegativeInteger} offsetX - starting `x` index\n* @param {Collection} y - output array\n* @param {integer} strideY - `y` stride length\n* @param {NonNegativeInteger} offsetY - starting `y` index\n* @returns {Collection} output array\n*\n* @example\n* var x = [ 1.0, 2.0, 3.0, 4.0, 5.0 ];\n* var y = [ 6.0, 7.0, 8.0, 9.0, 10.0 ];\n*\n* gcopy( x.length, x, 1, 0, y, 1, 0 );\n* // y => [ 1.0, 2.0, 3.0, 4.0, 5.0 ]\n*/\nfunction gcopy( N, x, strideX, offsetX, y, strideY, offsetY ) {\n\tvar ix;\n\tvar iy;\n\tvar ox;\n\tvar oy;\n\tvar m;\n\tvar i;\n\n\tif ( N <= 0 ) {\n\t\treturn y;\n\t}\n\tox = arraylike2object( x );\n\toy = arraylike2object( y );\n\tif ( ox.accessorProtocol || oy.accessorProtocol ) {\n\t\taccessors( N, ox, strideX, offsetX, oy, strideY, offsetY );\n\t\treturn oy.data;\n\t}\n\tix = offsetX;\n\tiy = offsetY;\n\n\t// Use unrolled loops if both strides are equal to `1`...\n\tif ( strideX === 1 && strideY === 1 ) {\n\t\tm = N % M;\n\n\t\t// If we have a remainder, run a clean-up loop...\n\t\tif ( m > 0 ) {\n\t\t\tfor ( i = 0; i < m; i++ ) {\n\t\t\t\ty[ iy ] = x[ ix ];\n\t\t\t\tix += strideX;\n\t\t\t\tiy += strideY;\n\t\t\t}\n\t\t}\n\t\tif ( N < M ) {\n\t\t\treturn y;\n\t\t}\n\t\tfor ( i = m; i < N; i += M ) {\n\t\t\ty[ iy ] = x[ ix ];\n\t\t\ty[ iy+1 ] = x[ ix+1 ];\n\t\t\ty[ iy+2 ] = x[ ix+2 ];\n\t\t\ty[ iy+3 ] = x[ ix+3 ];\n\t\t\ty[ iy+4 ] = x[ ix+4 ];\n\t\t\ty[ iy+5 ] = x[ ix+5 ];\n\t\t\ty[ iy+6 ] = x[ ix+6 ];\n\t\t\ty[ iy+7 ] = x[ ix+7 ];\n\t\t\tix += M;\n\t\t\tiy += M;\n\t\t}\n\t\treturn y;\n\t}\n\tfor ( i = 0; i < N; i++ ) {\n\t\ty[ iy ] = x[ ix ];\n\t\tix += strideX;\n\t\tiy += strideY;\n\t}\n\treturn y;\n}\n\n\n// EXPORTS //\n\nexport default gcopy;\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* https://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\nimport isFunction from '@stdlib/assert-is-function';\nimport hasFunctionNameSupport from '@stdlib/assert-has-function-name-support';\nimport format from '@stdlib/string-format';\nimport { REGEXP as RE } from '@stdlib/regexp-function-name';\n\n\n// VARIABLES //\n\nvar isFunctionNameSupported = hasFunctionNameSupport();\n\n\n// MAIN //\n\n/**\n* Returns the name of a function.\n*\n* @param {Function} fcn - input function\n* @throws {TypeError} must provide a function\n* @returns {string} function name\n*\n* @example\n* var v = functionName( Math.sqrt );\n* // returns 'sqrt'\n*\n* @example\n* var v = functionName( function foo(){} );\n* // returns 'foo'\n*\n* @example\n* var v = functionName( function(){} );\n* // returns '' || 'anonymous'\n*\n* @example\n* var v = functionName( String );\n* // returns 'String'\n*/\nfunction functionName( fcn ) {\n\t// TODO: add support for generator functions?\n\tif ( isFunction( fcn ) === false ) {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a function. Value: `%s`.', fcn ) );\n\t}\n\tif ( isFunctionNameSupported ) {\n\t\treturn fcn.name;\n\t}\n\treturn RE.exec( fcn.toString() )[ 1 ];\n}\n\n\n// EXPORTS //\n\nexport default functionName;\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* https://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\nimport foo from './foo.js';\n\n\n// MAIN //\n\n/**\n* Tests for native function `name` support.\n*\n* @returns {boolean} boolean indicating if an environment has function `name` support\n*\n* @example\n* var bool = hasFunctionNameSupport();\n* // returns <boolean>\n*/\nfunction hasFunctionNameSupport() {\n\treturn ( foo.name === 'foo' );\n}\n\n\n// EXPORTS //\n\nexport default hasFunctionNameSupport;\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* https://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\nimport Int8Array from '@stdlib/array-int8';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Float32Array from '@stdlib/array-float32';\nimport Float64Array from '@stdlib/array-float64';\n\n\n// MAIN //\n\nvar CTORS = [\n\tFloat64Array,\n\tFloat32Array,\n\tInt32Array,\n\tUint32Array,\n\tInt16Array,\n\tUint16Array,\n\tInt8Array,\n\tUint8Array,\n\tUint8ClampedArray\n];\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport ctorName from '@stdlib/utils-constructor-name';\nimport fcnName from '@stdlib/utils-function-name';\nimport getPrototypeOf from '@stdlib/utils-get-prototype-of';\nimport hasFloat64ArraySupport from '@stdlib/assert-has-float64array-support';\nimport Float64Array from '@stdlib/array-float64';\nimport CTORS from './ctors.js';\nimport NAMES from './names.json';\n\n\n// VARIABLES //\n\n// Abstract `TypedArray` class:\nvar TypedArray = ( hasFloat64ArraySupport() ) ? getPrototypeOf( Float64Array ) : Dummy; // eslint-disable-line max-len\n\n// Ensure abstract typed array class has expected name:\nTypedArray = ( fcnName( TypedArray ) === 'TypedArray' ) ? TypedArray : Dummy;\n\n\n// FUNCTIONS //\n\n/**\n* Dummy constructor.\n*\n* @private\n*/\nfunction Dummy() {} // eslint-disable-line no-empty-function\n\n\n// MAIN //\n\n/**\n* Tests if a value is a typed array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a typed array\n*\n* @example\n* import Int8Array from '@stdlib/array-int8';\n*\n* var bool = isTypedArray( new Int8Array( 10 ) );\n* // returns true\n*/\nfunction isTypedArray( value ) {\n\tvar v;\n\tvar i;\n\n\tif ( typeof value !== 'object' || value === null ) {\n\t\treturn false;\n\t}\n\t// Check for the abstract class...\n\tif ( value instanceof TypedArray ) {\n\t\treturn true;\n\t}\n\t// Check for typed array objects from the same realm (same Node.js `vm` or same `Window` object)...\n\tfor ( i = 0; i < CTORS.length; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\t// Walk the prototype tree until we find an object having a desired class...\n\twhile ( value ) {\n\t\tv = ctorName( value );\n\t\tfor ( i = 0; i < NAMES.length; i++ ) {\n\t\t\tif ( NAMES[ i ] === v ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tvalue = getPrototypeOf( value );\n\t}\n\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isTypedArray;\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* https://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\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\nvar CTORS = [\n\tComplex128Array,\n\tComplex64Array\n];\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport format from '@stdlib/string-format';\n\n\n// MAIN //\n\n/**\n* Tests whether a value has in its prototype chain a specified constructor as a prototype property.\n*\n* @param {*} value - value to test\n* @param {Function} constructor - constructor to test against\n* @throws {TypeError} constructor must be callable\n* @returns {boolean} boolean indicating whether a value is an instance of a provided constructor\n*\n* @example\n* var bool = instanceOf( [], Array );\n* // returns true\n*\n* @example\n* var bool = instanceOf( {}, Object ); // exception\n* // returns true\n*\n* @example\n* var bool = instanceOf( 'beep', String );\n* // returns false\n*\n* @example\n* var bool = instanceOf( null, Object );\n* // returns false\n*\n* @example\n* var bool = instanceOf( 5, Object );\n* // returns false\n*/\nfunction instanceOf( value, constructor ) {\n\t// TODO: replace with `isCallable` check\n\tif ( typeof constructor !== 'function' ) {\n\t\tthrow new TypeError( format( 'invalid argument. Second argument must be callable. Value: `%s`.', constructor ) );\n\t}\n\treturn ( value instanceof constructor );\n}\n\n\n// EXPORTS //\n\nexport default instanceOf;\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* https://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\nimport Int8Array from '@stdlib/array-int8';\nimport Uint8Array from '@stdlib/array-uint8';\nimport Uint8ClampedArray from '@stdlib/array-uint8c';\nimport Int16Array from '@stdlib/array-int16';\nimport Uint16Array from '@stdlib/array-uint16';\nimport Int32Array from '@stdlib/array-int32';\nimport Uint32Array from '@stdlib/array-uint32';\nimport Float32Array from '@stdlib/array-float32';\nimport Float64Array from '@stdlib/array-float64';\nimport Complex64Array from '@stdlib/array-complex64';\nimport Complex128Array from '@stdlib/array-complex128';\n\n\n// MAIN //\n\nvar CTORS = [\n\t[ Float64Array, 'Float64Array' ],\n\t[ Float32Array, 'Float32Array' ],\n\t[ Int32Array, 'Int32Array' ],\n\t[ Uint32Array, 'Uint32Array' ],\n\t[ Int16Array, 'Int16Array' ],\n\t[ Uint16Array, 'Uint16Array' ],\n\t[ Int8Array, 'Int8Array' ],\n\t[ Uint8Array, 'Uint8Array' ],\n\t[ Uint8ClampedArray, 'Uint8ClampedArray' ],\n\t[ Complex64Array, 'Complex64Array' ],\n\t[ Complex128Array, 'Complex128Array' ]\n];\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport instanceOf from '@stdlib/assert-instance-of';\nimport ctorName from '@stdlib/utils-constructor-name';\nimport getPrototypeOf from '@stdlib/utils-get-prototype-of';\nimport CTORS from './ctors.js';\n\n\n// MAIN //\n\n/**\n* Returns the typed array type.\n*\n* @private\n* @param {TypedArray} arr - typed array\n* @returns {(string|void)} typed array type\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( 5 );\n* var str = typeName( arr );\n* // returns 'Float64Array'\n*/\nfunction typeName( arr ) {\n\tvar v;\n\tvar i;\n\n\t// Check for typed array objects from the same realm (same Node.js `vm` or same `Window` object)...\n\tfor ( i = 0; i < CTORS.length; i++ ) {\n\t\tif ( instanceOf( arr, CTORS[ i ][ 0 ] ) ) {\n\t\t\treturn CTORS[ i ][ 1 ];\n\t\t}\n\t}\n\t// Walk the prototype tree until we find an object having a desired native class...\n\twhile ( arr ) {\n\t\tv = ctorName( arr );\n\t\tfor ( i = 0; i < CTORS.length; i++ ) {\n\t\t\tif ( v === CTORS[ i ][ 1 ] ) {\n\t\t\t\treturn CTORS[ i ][ 1 ];\n\t\t\t}\n\t\t}\n\t\tarr = getPrototypeOf( arr );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default typeName;\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* https://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\nimport isTypedArray from '@stdlib/assert-is-typed-array';\nimport isComplexTypedArray from '@stdlib/assert-is-complex-typed-array';\nimport reinterpret64 from '@stdlib/strided-base-reinterpret-complex64';\nimport reinterpret128 from '@stdlib/strided-base-reinterpret-complex128';\nimport format from '@stdlib/string-format';\nimport typeName from './type.js';\n\n\n// MAIN //\n\n/**\n* Returns a JSON representation of a typed array.\n*\n* ## Notes\n*\n* - We build a JSON object representing a typed array similar to how Node.js `Buffer` objects are represented. See [Buffer][1].\n*\n* [1]: https://nodejs.org/api/buffer.html#buffer_buf_tojson\n*\n* @param {TypedArray} arr - typed array to serialize\n* @throws {TypeError} first argument must be a typed array\n* @returns {Object} JSON representation\n*\n* @example\n* import Float64Array from '@stdlib/array-float64';\n*\n* var arr = new Float64Array( [ 5.0, 3.0 ] );\n* var json = typedarray2json( arr );\n* // returns { 'type': 'Float64Array', 'data': [ 5.0, 3.0 ] }\n*/\nfunction typedarray2json( arr ) {\n\tvar data;\n\tvar out;\n\tvar i;\n\n\tif ( isTypedArray( arr ) ) {\n\t\tdata = arr;\n\t} else if ( isComplexTypedArray( arr ) ) {\n\t\tif ( arr.BYTES_PER_ELEMENT === 8 ) {\n\t\t\tdata = reinterpret64( arr, 0 );\n\t\t} else { // arr.BYTES_PER_ELEMENT === 16\n\t\t\tdata = reinterpret128( arr, 0 );\n\t\t}\n\t} else {\n\t\tthrow new TypeError( format( 'invalid argument. Must provide a typed array. Value: `%s`.', arr ) );\n\t}\n\tout = {\n\t\t'type': typeName( arr ),\n\t\t'data': []\n\t};\n\tfor ( i = 0; i < data.length; i++ ) {\n\t\tout.data.push( data[ i ] );\n\t}\n\treturn out;\n}\n\n\n// EXPORTS //\n\nexport default typedarray2json;\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* https://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\nimport ctorName from '@stdlib/utils-constructor-name';\nimport getPrototypeOf from '@stdlib/utils-get-prototype-of';\nimport CTORS from './ctors.js';\nimport NAMES from './names.json';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a complex typed array.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a complex typed array\n*\n* @example\n* import Complex128Array from '@stdlib/array-complex128';\n*\n* var bool = isComplexTypedArray( new Complex128Array( 10 ) );\n* // returns true\n*/\nfunction isComplexTypedArray( value ) {\n\tvar v;\n\tvar i;\n\n\tif ( typeof value !== 'object' || value === null ) {\n\t\treturn false;\n\t}\n\t// Check for complex typed array objects from the same realm (same Node.js `vm` or same `Window` object)...\n\tfor ( i = 0; i < CTORS.length; i++ ) {\n\t\tif ( value instanceof CTORS[ i ] ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\t// Walk the prototype tree until we find an object having a desired class...\n\twhile ( value ) {\n\t\tv = ctorName( value );\n\t\tfor ( i = 0; i < NAMES.length; i++ ) {\n\t\t\tif ( NAMES[ i ] === v ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tvalue = getPrototypeOf( value );\n\t}\n\n\treturn false;\n}\n\n\n// EXPORTS //\n\nexport default isComplexTypedArray;\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* https://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\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport floor from '@stdlib/math-base-special-floor';\n\n\n// VARIABLES //\n\nvar MAX = UINT32_MAX - 1;\n\n\n// MAIN //\n\n/**\n* Returns a pseudorandom integer on the interval \\\\( [1, 2^{32}-1) \\\\).\n*\n* @private\n* @returns {PositiveInteger} pseudorandom integer\n*\n* @example\n* var v = randuint32();\n* // returns <number>\n*/\nfunction randuint32() {\n\tvar v = floor( 1.0 + (MAX*Math.random()) ); // eslint-disable-line stdlib/no-builtin-math\n\treturn v >>> 0; // asm type annotation\n}\n\n\n// EXPORTS //\n\nexport default randuint32;\n","/* eslint-disable max-lines, max-len */\n\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* https://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* ## Notice\n*\n* The original C code and copyright notice are from the [source implementation][mt19937]. The implementation has been modified for JavaScript.\n*\n* ```text\n* Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,\n* All rights reserved.\n*\n* Redistribution and use in source and binary forms, with or without\n* modification, are permitted provided that the following conditions\n* are met:\n*\n* 1. Redistributions of source code must retain the above copyright\n* notice, this list of conditions and the following disclaimer.\n*\n* 2. Redistributions in binary form must reproduce the above copyright\n* notice, this list of conditions and the following disclaimer in the\n* documentation and/or other materials provided with the distribution.\n*\n* 3. The names of its contributors may not be used to endorse or promote\n* products derived from this software without specific prior written\n* permission.\n*\n* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n* \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n* ```\n*\n* [mt19937]: https://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/CODES/mt19937ar.c\n*/\n\n'use strict';\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport setReadWriteAccessor from '@stdlib/utils-define-nonenumerable-read-write-accessor';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport isObject from '@stdlib/assert-is-plain-object';\nimport isCollection from '@stdlib/assert-is-collection';\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport { isPrimitive as isPositiveInteger } from '@stdlib/assert-is-positive-integer';\nimport FLOAT64_MAX_SAFE_INTEGER from '@stdlib/constants-float64-max-safe-integer';\nimport UINT32_MAX from '@stdlib/constants-uint32-max';\nimport Uint32Array from '@stdlib/array-uint32';\nimport max from '@stdlib/math-base-special-max';\nimport umul from '@stdlib/math-base-ops-umul';\nimport gcopy from '@stdlib/blas-base-gcopy';\nimport typedarray2json from '@stdlib/array-to-json';\nimport format from '@stdlib/string-format';\nimport randuint32 from './rand_uint32.js';\n\n\n// VARIABLES //\n\n// Define the size of the state array (see refs):\nvar N = 624;\n\n// Define a (magic) constant used for indexing into the state array:\nvar M = 397;\n\n// Define the maximum seed: 11111111111111111111111111111111\nvar MAX_SEED = UINT32_MAX >>> 0; // asm type annotation\n\n// For seed arrays, define an initial state (magic) constant: 19650218 => 00000001001010111101011010101010\nvar SEED_ARRAY_INIT_STATE = 19650218 >>> 0; // asm type annotation\n\n// Define a mask for the most significant `w-r` bits, where `w` is the word size (32 bits) and `r` is the separation point of one word (see refs): 2147483648 => 0x80000000 => 10000000000000000000000000000000\nvar UPPER_MASK = 0x80000000 >>> 0; // asm type annotation\n\n// Define a mask for the least significant `r` bits (see refs): 2147483647 => 0x7fffffff => 01111111111111111111111111111111\nvar LOWER_MASK = 0x7fffffff >>> 0; // asm type annotation\n\n// Define a multiplier (see Knuth TAOCP Vol2. 3rd Ed. P.106): 1812433253 => 01101100000001111000100101100101\nvar KNUTH_MULTIPLIER = 1812433253 >>> 0; // asm type annotation\n\n// Define a (magic) multiplier: 1664525 => 00000000000110010110011000001101\nvar MAGIC_MULTIPLIER_1 = 1664525 >>> 0; // asm type annotation\n\n// Define a (magic) multiplier: 1566083941 => 01011101010110001000101101100101\nvar MAGIC_MULTIPLIER_2 = 1566083941 >>> 0; // asm type annotation\n\n// Define a tempering coefficient: 2636928640 => 0x9d2c5680 => 10011101001011000101011010000000\nvar TEMPERING_COEFFICIENT_1 = 0x9d2c5680 >>> 0; // asm type annotation\n\n// Define a tempering coefficient: 4022730752 => 0xefc60000 => 11101111110001100000000000000000\nvar TEMPERING_COEFFICIENT_2 = 0xefc60000 >>> 0; // asm type annotation\n\n// Define a constant vector `a` (see refs): 2567483615 => 0x9908b0df => 10011001000010001011000011011111\nvar MATRIX_A = 0x9908b0df >>> 0; // asm type annotation\n\n// MAG01[x] = x * MATRIX_A; for x = {0,1}\nvar MAG01 = [ 0x0 >>> 0, MATRIX_A >>> 0 ]; // asm type annotation\n\n// Define a normalization constant when generating double-precision floating-point numbers: 2^53 => 9007199254740992\nvar FLOAT64_NORMALIZATION_CONSTANT = 1.0 / ( FLOAT64_MAX_SAFE_INTEGER+1.0 ); // eslint-disable-line id-length\n\n// 2^26: 67108864\nvar TWO_26 = 67108864 >>> 0; // asm type annotation\n\n// 2^32: 2147483648 => 0x80000000 => 10000000000000000000000000000000\nvar TWO_32 = 0x80000000 >>> 0; // asm type annotation\n\n// 1 (as a 32-bit unsigned integer): 1 => 0x1 => 00000000000000000000000000000001\nvar ONE = 0x1 >>> 0; // asm type annotation\n\n// Define the maximum normalized pseudorandom double-precision floating-point number: ( (((2^32-1)>>>5)*2^26)+( (2^32-1)>>>6) ) / 2^53\nvar MAX_NORMALIZED = FLOAT64_MAX_SAFE_INTEGER * FLOAT64_NORMALIZATION_CONSTANT;\n\n// Define the state array schema version:\nvar STATE_ARRAY_VERSION = 1; // NOTE: anytime the state array schema changes, this value should be incremented!!!\n\n// Define the number of sections in the state array:\nvar NUM_STATE_SECTIONS = 3; // state, other, seed\n\n// Define the index offset of the \"state\" section in the state array:\nvar STATE_SECTION_OFFSET = 2; // | version | num_sections | state_length | ...state | other_length | state_index | seed_length | ...seed |\n\n// Define the index offset of the \"other\" section in the state array:\nvar OTHER_SECTION_OFFSET = N + 3; // | version | num_sections | state_length | ...state | other_length | state_index | seed_length | ...seed |\n\n// Define the index offset of the seed section in the state array:\nvar SEED_SECTION_OFFSET = N + 5; // | version | num_sections | state_length | ...state | other_length | state_index | seed_length | ...seed |\n\n// Define the length of the \"fixed\" length portion of the state array:\nvar STATE_FIXED_LENGTH = N + 6; // 1 (version) + 1 (num_sections) + 1 (state_length) + N (state) + 1 (other_length) + 1 (state_index) + 1 (seed_length)\n\n\n// FUNCTIONS //\n\n/**\n* Verifies state array integrity.\n*\n* @private\n* @param {Uint32Array} state - state array\n* @param {boolean} FLG - flag indicating whether the state array was provided as an option (true) or an argument (false)\n* @returns {(Error|null)} an error or `null`\n*/\nfunction verifyState( state, FLG ) {\n\tvar s1;\n\tif ( FLG ) {\n\t\ts1 = 'option';\n\t} else {\n\t\ts1 = 'argument';\n\t}\n\t// The state array must have a minimum length...\n\tif ( state.length < STATE_FIXED_LENGTH+1 ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array has insufficient length.', s1 ) );\n\t}\n\t// The first element of the state array must equal the supported state array schema version...\n\tif ( state[ 0 ] !== STATE_ARRAY_VERSION ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array has an incompatible schema version. Expected: `%s`. Actual: `%s.`', s1, STATE_ARRAY_VERSION, state[ 0 ] ) );\n\t}\n\t// The second element of the state array must contain the number of sections...\n\tif ( state[ 1 ] !== NUM_STATE_SECTIONS ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array has an incompatible number of sections. Expected: `%s`. Actual: `%s`.', s1, NUM_STATE_SECTIONS, state[ 1 ] ) );\n\t}\n\t// The length of the \"state\" section must equal `N`...\n\tif ( state[ STATE_SECTION_OFFSET ] !== N ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array has an incompatible state length. Expected: `%u`. Actual: `%u`.', s1, N, state[ STATE_SECTION_OFFSET ] ) );\n\t}\n\t// The length of the \"other\" section must equal `1`...\n\tif ( state[ OTHER_SECTION_OFFSET ] !== 1 ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array has an incompatible section length. Expected: `%u`. Actual: `%u`.', s1, 1, state[ OTHER_SECTION_OFFSET ] ) );\n\t}\n\t// The length of the \"seed\" section much match the empirical length...\n\tif ( state[ SEED_SECTION_OFFSET ] !== state.length-STATE_FIXED_LENGTH ) {\n\t\treturn new RangeError( format( 'invalid %s. `state` array length is incompatible with seed section length. Expected: `%u`. Actual: `%u`.', s1, state.length-STATE_FIXED_LENGTH, state[ SEED_SECTION_OFFSET ] ) );\n\t}\n\treturn null;\n}\n\n/**\n* Returns an initial PRNG state.\n*\n* @private\n* @param {Uint32Array} state - state array\n* @param {PositiveInteger} N - state size\n* @param {uinteger32} s - seed\n* @returns {Uint32Array} state array\n*/\nfunction createState( state, N, s ) {\n\tvar i;\n\n\t// Set the first element of the state array to the provided seed:\n\tstate[ 0 ] = s >>> 0; // equivalent to `s & 0xffffffffUL` in original C implementation\n\n\t// Initialize the remaining state array elements:\n\tfor ( i = 1; i < N; i++ ) {\n\t\t/*\n\t\t* In the original C implementation (see `init_genrand()`),\n\t\t*\n\t\t* ```c\n\t\t* mt[i] = (KNUTH_MULTIPLIER * (mt[i-1] ^ (mt[i-1] >> 30)) + i)\n\t\t* ```\n\t\t*\n\t\t* In order to replicate this in JavaScript, we must emulate C-like multiplication of unsigned 32-bit integers.\n\t\t*/\n\t\ts = state[ i-1 ]>>>0; // asm type annotation\n\t\ts = ( s^(s>>>30) )>>>0; // asm type annotation\n\t\tstate[ i ] = ( umul( s, KNUTH_MULTIPLIER ) + i )>>>0; // asm type annotation\n\t}\n\treturn state;\n}\n\n/**\n* Initializes a PRNG state array according to a seed array.\n*\n* @private\n* @param {Uint32Array} state - state array\n* @param {NonNegativeInteger} N - state array length\n* @param {Collection} seed - seed array\n* @param {NonNegativeInteger} M - seed array length\n* @returns {Uint32Array} state array\n*/\nfunction initState( state, N, seed, M ) {\n\tvar s;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\ti = 1;\n\tj = 0;\n\tfor ( k = max( N, M ); k > 0; k-- ) {\n\t\t/*\n\t\t* In the original C implementation (see `init_by_array()`),\n\t\t*\n\t\t* ```c\n\t\t* mt[i] = (mt[i]^((mt[i-1]^(mt[i-1]>>30))*1664525UL)) + seed[j] + j;\n\t\t* ```\n\t\t*\n\t\t* In order to replicate this in JavaScript, we must emulate C-like multiplication of unsigned 32-bit integers.\n\t\t*/\n\t\ts = state[ i-1 ]>>>0; // asm type annotation\n\t\ts = ( s^(s>>>30) )>>>0; // asm type annotation\n\t\ts = ( umul( s, MAGIC_MULTIPLIER_1 ) )>>>0; // asm type annotation\n\t\tstate[ i ] = ( ((state[i]>>>0)^s) + seed[j] + j )>>>0; /* non-linear */ // asm type annotation\n\n\t\ti += 1;\n\t\tj += 1;\n\t\tif ( i >= N ) {\n\t\t\tstate[ 0 ] = state[ N-1 ];\n\t\t\ti = 1;\n\t\t}\n\t\tif ( j >= M ) {\n\t\t\tj = 0;\n\t\t}\n\t}\n\tfor ( k = N-1; k > 0; k-- ) {\n\t\t/*\n\t\t* In the original C implementation (see `init_by_array()`),\n\t\t*\n\t\t* ```c\n\t\t* mt[i] = (mt[i]^((mt[i-1]^(mt[i-1]>>30))*1566083941UL)) - i;\n\t\t* ```\n\t\t*\n\t\t* In order to replicate this in JavaScript, we must emulate C-like multiplication of unsigned 32-bit integers.\n\t\t*/\n\t\ts = state[ i-1 ]>>>0; // asm type annotation\n\t\ts = ( s^(s>>>30) )>>>0; // asm type annotation\n\t\ts = ( umul( s, MAGIC_MULTIPLIER_2 ) )>>>0; // asm type annotation\n\t\tstate[ i ] = ( ((state[i]>>>0)^s) - i )>>>0; /* non-linear */ // asm type annotation\n\n\t\ti += 1;\n\t\tif ( i >= N ) {\n\t\t\tstate[ 0 ] = state[ N-1 ];\n\t\t\ti = 1;\n\t\t}\n\t}\n\t// Ensure a non-zero initial state array:\n\tstate[ 0 ] = TWO_32; // MSB (most significant bit) is 1\n\n\treturn state;\n}\n\n/**\n* Updates a PRNG's internal state by generating the next `N` words.\n*\n* @private\n* @param {Uint32Array} state - state array\n* @returns {Uint32Array} state array\n*/\nfunction twist( state ) {\n\tvar w;\n\tvar i;\n\tvar j;\n\tvar k;\n\n\tk = N - M;\n\tfor ( i = 0; i < k; i++ ) {\n\t\tw = ( state[i]&UPPER_MASK ) | ( state[i+1]&LOWER_MASK );\n\t\tstate[ i ] = state[ i+M ] ^ ( w>>>1 ) ^ MAG01[ w&ONE ];\n\t}\n\tj = N - 1;\n\tfor ( ; i < j; i++ ) {\n\t\tw = ( state[i]&UPPER_MASK ) | ( state[i+1]&LOWER_MASK );\n\t\tstate[ i ] = state[ i-k ] ^ ( w>>>1 ) ^ MAG01[ w&ONE ];\n\t}\n\tw = ( state[j]&UPPER_MASK ) | ( state[0]&LOWER_MASK );\n\tstate[ j ] = state[ M-1 ] ^ ( w>>>1 ) ^ MAG01[ w&ONE ];\n\treturn state;\n}\n\n\n// MAIN //\n\n/**\n* Returns a 32-bit Mersenne Twister pseudorandom number generator.\n*\n* ## Notes\n*\n* - In contrast to the original C implementation, array seeds of length `1` are considered integer seeds. This ensures that the seed `[ 1234 ]` generates the same output as the seed `1234`. In the original C implementation, the two seeds would yield different output, which is **not** obvious from a user perspective.\n*\n* @param {Options} [options] - options\n* @param {PRNGSeedMT19937} [options.seed] - pseudorandom number generator seed\n* @param {PRNGStateMT19937} [options.state] - pseudorandom number generator state\n* @param {boolean} [options.copy=true] - boolean indicating whether to copy a provided pseudorandom number generator state\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} a seed must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integers less than or equal to the maximum unsigned 32-bit integer\n* @throws {RangeError} a numeric seed must be a positive integer less than or equal to the maximum unsigned 32-bit integer\n* @throws {TypeError} state must be a `Uint32Array`\n* @throws {Error} must provide a valid state\n* @throws {TypeError} `copy` option must be a boolean\n* @returns {PRNG} Mersenne Twister PRNG\n*\n* @example\n* var mt19937 = factory();\n*\n* var v = mt19937();\n* // returns <number>\n*\n* @example\n* // Return a seeded Mersenne Twister PRNG:\n* var mt19937 = factory({\n* 'seed': 1234\n* });\n*\n* var v = mt19937();\n* // returns 822569775\n*/\nfunction factory( options ) {\n\tvar STATE;\n\tvar state;\n\tvar opts;\n\tvar seed;\n\tvar slen;\n\tvar err;\n\n\topts = {};\n\tif ( arguments.length ) {\n\t\tif ( !isObject( options ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'copy' ) ) {\n\t\t\topts.copy = options.copy;\n\t\t\tif ( !isBoolean( options.copy ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'copy', options.copy ) );\n\t\t\t}\n\t\t}\n\t\tif ( hasOwnProp( options, 'state' ) ) {\n\t\t\tstate = options.state;\n\t\t\topts.state = true;\n\t\t\tif ( !isUint32Array( state ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a Uint32Array. Option: `%s`.', 'state', state ) );\n\t\t\t}\n\t\t\terr = verifyState( state, true );\n\t\t\tif ( err ) {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\tif ( opts.copy === false ) {\n\t\t\t\tSTATE = state;\n\t\t\t} else {\n\t\t\t\tSTATE = new Uint32Array( state.length );\n\t\t\t\tgcopy( state.length, state, 1, STATE, 1 );\n\t\t\t}\n\t\t\t// Create a state \"view\":\n\t\t\tstate = new Uint32Array( STATE.buffer, STATE.byteOffset+((STATE_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), N );\n\n\t\t\t// Create a seed \"view\":\n\t\t\tseed = new Uint32Array( STATE.buffer, STATE.byteOffset+((SEED_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), state[ SEED_SECTION_OFFSET ] );\n\t\t}\n\t\t// If provided a PRNG state, we ignore the `seed` option...\n\t\tif ( seed === void 0 ) {\n\t\t\tif ( hasOwnProp( options, 'seed' ) ) {\n\t\t\t\tseed = options.seed;\n\t\t\t\topts.seed = true;\n\t\t\t\tif ( isPositiveInteger( seed ) ) {\n\t\t\t\t\tif ( seed > MAX_SEED ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid option. `%s` option must be a positive integer less than or equal to the maximum unsigned 32-bit integer. Option: `%u`.', 'seed', seed ) );\n\t\t\t\t\t}\n\t\t\t\t\tseed >>>= 0; // asm type annotation\n\t\t\t\t} else if ( isCollection( seed ) === false || seed.length < 1 ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.', 'seed', seed ) );\n\t\t\t\t} else if ( seed.length === 1 ) {\n\t\t\t\t\tseed = seed[ 0 ];\n\t\t\t\t\tif ( !isPositiveInteger( seed ) ) {\n\t\t\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.', 'seed', seed ) );\n\t\t\t\t\t}\n\t\t\t\t\tif ( seed > MAX_SEED ) {\n\t\t\t\t\t\tthrow new RangeError( format( 'invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%u`.', 'seed', seed ) );\n\t\t\t\t\t}\n\t\t\t\t\tseed >>>= 0; // asm type annotation\n\t\t\t\t} else {\n\t\t\t\t\tslen = seed.length;\n\t\t\t\t\tSTATE = new Uint32Array( STATE_FIXED_LENGTH+slen );\n\n\t\t\t\t\t// Initialize sections:\n\t\t\t\t\tSTATE[ 0 ] = STATE_ARRAY_VERSION;\n\t\t\t\t\tSTATE[ 1 ] = NUM_STATE_SECTIONS;\n\t\t\t\t\tSTATE[ STATE_SECTION_OFFSET ] = N;\n\t\t\t\t\tSTATE[ OTHER_SECTION_OFFSET ] = 1;\n\t\t\t\t\tSTATE[ OTHER_SECTION_OFFSET+1 ] = N; // state index\n\t\t\t\t\tSTATE[ SEED_SECTION_OFFSET ] = slen;\n\n\t\t\t\t\t// Copy the provided seed array to prevent external mutation, as mutation would lead to an inability to reproduce PRNG values according to the PRNG's stated seed:\n\t\t\t\t\tgcopy.ndarray( slen, seed, 1, 0, STATE, 1, SEED_SECTION_OFFSET+1 );\n\n\t\t\t\t\t// Create a state \"view\":\n\t\t\t\t\tstate = new Uint32Array( STATE.buffer, STATE.byteOffset+((STATE_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), N );\n\n\t\t\t\t\t// Create a seed \"view\":\n\t\t\t\t\tseed = new Uint32Array( STATE.buffer, STATE.byteOffset+((SEED_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), slen );\n\n\t\t\t\t\t// Initialize the internal PRNG state:\n\t\t\t\t\tstate = createState( state, N, SEED_ARRAY_INIT_STATE );\n\t\t\t\t\tstate = initState( state, N, seed, slen );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tseed = randuint32() >>> 0; // asm type annotation\n\t\t\t}\n\t\t}\n\t} else {\n\t\tseed = randuint32() >>> 0; // asm type annotation\n\t}\n\tif ( state === void 0 ) {\n\t\tSTATE = new Uint32Array( STATE_FIXED_LENGTH+1 );\n\n\t\t// Initialize sections:\n\t\tSTATE[ 0 ] = STATE_ARRAY_VERSION;\n\t\tSTATE[ 1 ] = NUM_STATE_SECTIONS;\n\t\tSTATE[ STATE_SECTION_OFFSET ] = N;\n\t\tSTATE[ OTHER_SECTION_OFFSET ] = 1;\n\t\tSTATE[ OTHER_SECTION_OFFSET+1 ] = N; // state index\n\t\tSTATE[ SEED_SECTION_OFFSET ] = 1;\n\t\tSTATE[ SEED_SECTION_OFFSET+1 ] = seed;\n\n\t\t// Create a state \"view\":\n\t\tstate = new Uint32Array( STATE.buffer, STATE.byteOffset+((STATE_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), N );\n\n\t\t// Create a seed \"view\":\n\t\tseed = new Uint32Array( STATE.buffer, STATE.byteOffset+((SEED_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), 1 );\n\n\t\t// Initialize the internal PRNG state:\n\t\tstate = createState( state, N, seed );\n\t}\n\t// Note: property order matters in order to maintain consistency of PRNG \"shape\" (hidden classes).\n\tsetReadOnly( mt19937, 'NAME', 'mt19937' );\n\tsetReadOnlyAccessor( mt19937, 'seed', getSeed );\n\tsetReadOnlyAccessor( mt19937, 'seedLength', getSeedLength );\n\tsetReadWriteAccessor( mt19937, 'state', getState, setState );\n\tsetReadOnlyAccessor( mt19937, 'stateLength', getStateLength );\n\tsetReadOnlyAccessor( mt19937, 'byteLength', getStateSize );\n\tsetReadOnly( mt19937, 'toJSON', toJSON );\n\tsetReadOnly( mt19937, 'MIN', 0 );\n\tsetReadOnly( mt19937, 'MAX', UINT32_MAX );\n\tsetReadOnly( mt19937, 'normalized', normalized );\n\n\tsetReadOnly( normalized, 'NAME', mt19937.NAME );\n\tsetReadOnlyAccessor( normalized, 'seed', getSeed );\n\tsetReadOnlyAccessor( normalized, 'seedLength', getSeedLength );\n\tsetReadWriteAccessor( normalized, 'state', getState, setState );\n\tsetReadOnlyAccessor( normalized, 'stateLength', getStateLength );\n\tsetReadOnlyAccessor( normalized, 'byteLength', getStateSize );\n\tsetReadOnly( normalized, 'toJSON', toJSON );\n\tsetReadOnly( normalized, 'MIN', 0.0 );\n\tsetReadOnly( normalized, 'MAX', MAX_NORMALIZED );\n\n\treturn mt19937;\n\n\t/**\n\t* Returns the PRNG seed.\n\t*\n\t* @private\n\t* @returns {PRNGSeedMT19937} seed\n\t*/\n\tfunction getSeed() {\n\t\tvar len = STATE[ SEED_SECTION_OFFSET ];\n\t\treturn gcopy( len, seed, 1, new Uint32Array( len ), 1 );\n\t}\n\n\t/**\n\t* Returns the PRNG seed length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} seed length\n\t*/\n\tfunction getSeedLength() {\n\t\treturn STATE[ SEED_SECTION_OFFSET ];\n\t}\n\n\t/**\n\t* Returns the PRNG state length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state length\n\t*/\n\tfunction getStateLength() {\n\t\treturn STATE.length;\n\t}\n\n\t/**\n\t* Returns the PRNG state size (in bytes).\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state size (in bytes)\n\t*/\n\tfunction getStateSize() {\n\t\treturn STATE.byteLength;\n\t}\n\n\t/**\n\t* Returns the current PRNG state.\n\t*\n\t* ## Notes\n\t*\n\t* - The PRNG state array is comprised of a preamble followed by `3` sections:\n\t*\n\t* 0. preamble (version + number of sections)\n\t* 1. internal PRNG state\n\t* 2. auxiliary state information\n\t* 3. PRNG seed\n\t*\n\t* - The first element of the PRNG state array preamble is the state array schema version.\n\t*\n\t* - The second element of the PRNG state array preamble is the number of state array sections (i.e., `3`).\n\t*\n\t* - The first element of each section following the preamble specifies the section length. The remaining section elements comprise the section contents.\n\t*\n\t* @private\n\t* @returns {PRNGStateMT19937} current state\n\t*/\n\tfunction getState() {\n\t\tvar len = STATE.length;\n\t\treturn gcopy( len, STATE, 1, new Uint32Array( len ), 1 );\n\t}\n\n\t/**\n\t* Sets the PRNG state.\n\t*\n\t* ## Notes\n\t*\n\t* - If PRNG state is \"shared\" (meaning a state array was provided during PRNG creation and **not** copied) and one sets the generator state to a state array having a different length, the PRNG does **not** update the existing shared state and, instead, points to the newly provided state array. In order to synchronize PRNG output according to the new shared state array, the state array for **each** relevant PRNG must be **explicitly** set.\n\t* - If PRNG state is \"shared\" and one sets the generator state to a state array of the same length, the PRNG state is updated (along with the state of all other PRNGs sharing the PRNG's state array).\n\t*\n\t* @private\n\t* @param {PRNGStateMT19937} s - generator state\n\t* @throws {TypeError} must provide a `Uint32Array`\n\t* @throws {Error} must provide a valid state\n\t*/\n\tfunction setState( s ) {\n\t\tvar err;\n\t\tif ( !isUint32Array( s ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Must provide a Uint32Array. Value: `%s`.', s ) );\n\t\t}\n\t\terr = verifyState( s, false );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t\tif ( opts.copy === false ) {\n\t\t\tif ( opts.state && s.length === STATE.length ) {\n\t\t\t\tgcopy( s.length, s, 1, STATE, 1 ); // update current shared state\n\t\t\t} else {\n\t\t\t\tSTATE = s; // point to new shared state\n\t\t\t\topts.state = true; // setting this flag allows updating a shared state even if a state array was not provided at PRNG creation\n\t\t\t}\n\t\t} else {\n\t\t\t// Check if we can reuse allocated memory...\n\t\t\tif ( s.length !== STATE.length ) {\n\t\t\t\tSTATE = new Uint32Array( s.length ); // reallocate\n\t\t\t}\n\t\t\tgcopy( s.length, s, 1, STATE, 1 );\n\t\t}\n\t\t// Create a new state \"view\":\n\t\tstate = new Uint32Array( STATE.buffer, STATE.byteOffset+((STATE_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), N );\n\n\t\t// Create a new seed \"view\":\n\t\tseed = new Uint32Array( STATE.buffer, STATE.byteOffset+((SEED_SECTION_OFFSET+1)*STATE.BYTES_PER_ELEMENT), STATE[ SEED_SECTION_OFFSET ] );\n\t}\n\n\t/**\n\t* Serializes the pseudorandom number generator as a JSON object.\n\t*\n\t* ## Notes\n\t*\n\t* - `JSON.stringify()` implicitly calls this method when stringifying a PRNG.\n\t*\n\t* @private\n\t* @returns {Object} JSON representation\n\t*/\n\tfunction toJSON() {\n\t\tvar out = {};\n\t\tout.type = 'PRNG';\n\t\tout.name = mt19937.NAME;\n\t\tout.state = typedarray2json( STATE );\n\t\tout.params = [];\n\t\treturn out;\n\t}\n\n\t/**\n\t* Generates a pseudorandom integer on the interval \\\\( [0, 2^{32}) \\\\).\n\t*\n\t* @private\n\t* @returns {uinteger32} pseudorandom integer\n\t*\n\t* @example\n\t* var r = mt19937();\n\t* // returns <number>\n\t*/\n\tfunction mt19937() {\n\t\tvar r;\n\t\tvar i;\n\n\t\t// Retrieve the current state index:\n\t\ti = STATE[ OTHER_SECTION_OFFSET+1 ];\n\n\t\t// Determine whether we need to update the PRNG state:\n\t\tif ( i >= N ) {\n\t\t\tstate = twist( state );\n\t\t\ti = 0;\n\t\t}\n\t\t// Get the next word of \"raw\"/untempered state:\n\t\tr = state[ i ];\n\n\t\t// Update the state index:\n\t\tSTATE[ OTHER_SECTION_OFFSET+1 ] = i + 1;\n\n\t\t// Tempering transform to compensate for the reduced dimensionality of equidistribution:\n\t\tr ^= r >>> 11;\n\t\tr ^= ( r << 7 ) & TEMPERING_COEFFICIENT_1;\n\t\tr ^= ( r << 15 ) & TEMPERING_COEFFICIENT_2;\n\t\tr ^= r >>> 18;\n\n\t\treturn r >>> 0;\n\t}\n\n\t/**\n\t* Generates a pseudorandom number on the interval \\\\( [0, 1) \\\\).\n\t*\n\t* ## Notes\n\t*\n\t* - The original C implementation credits Isaku Wada for this algorithm (2002/01/09).\n\t*\n\t* @private\n\t* @returns {number} pseudorandom number\n\t*\n\t* @example\n\t* var r = normalized();\n\t* // returns <number>\n\t*/\n\tfunction normalized() {\n\t\tvar x = mt19937() >>> 5;\n\t\tvar y = mt19937() >>> 6;\n\t\treturn ( (x*TWO_26)+y ) * FLOAT64_NORMALIZATION_CONSTANT;\n\t}\n}\n\n\n// EXPORTS //\n\nexport default factory;\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* https://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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport isNan from '@stdlib/math-base-assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a `NaN` number primitive.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a `NaN` number primitive\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport { isObject as isNumber } from '@stdlib/assert-is-number';\nimport isNan from '@stdlib/math-base-assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Tests if a value is a number object having a value of `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating if a value is a number object having a value of `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns false\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*/\nfunction isnan( value ) {\n\treturn (\n\t\tisNumber( value ) &&\n\t\tisNan( value.valueOf() )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\n/**\n* Tests if a value is `NaN`.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is `NaN`\n*\n* @example\n* var bool = isnan( NaN );\n* // returns true\n*\n* @example\n* var bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* @example\n* var bool = isnan( 3.14 );\n* // returns false\n*\n* @example\n* var bool = isnan( null );\n* // returns false\n*/\nfunction isnan( value ) {\n\treturn ( isPrimitive( value ) || isObject( value ) );\n}\n\n\n// EXPORTS //\n\nexport default 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* https://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* Returns a uniformly distributed pseudorandom number with minimum support `a` and maximum support `b`.\n*\n* @private\n* @param {PRNG} rand - pseudorandom number generator\n* @param {number} a - minimum support (inclusive)\n* @param {number} b - maximum support (exclusive)\n* @returns {number} pseudorandom number\n*/\nfunction uniform( rand, a, b ) {\n\tvar r = rand();\n\treturn ( b*r ) + ( (1.0-r)*a ); // equivalent to (b-a)*r + a\n}\n\n\n// EXPORTS //\n\nexport default uniform;\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* https://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\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport setReadWriteAccessor from '@stdlib/utils-define-nonenumerable-read-write-accessor';\nimport isObject from '@stdlib/assert-is-plain-object';\nimport isFunction from '@stdlib/assert-is-function';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport constantFunction from '@stdlib/utils-constant-function';\nimport noop from '@stdlib/utils-noop';\nimport { factory as randu } from '@stdlib/random-base-mt19937';\nimport isnan from '@stdlib/math-base-assert-is-nan';\nimport typedarray2json from '@stdlib/array-to-json';\nimport format from '@stdlib/string-format';\nimport validate from './validate.js';\nimport uniform0 from './uniform.js';\n\n\n// MAIN //\n\n/**\n* Returns a pseudorandom number generator for generating uniformly distributed random numbers.\n*\n* @param {number} [a] - minimum support (inclusive)\n* @param {number} [b] - maximum support (exclusive)\n* @param {Options} [options] - function options\n* @param {PRNG} [options.prng] - pseudorandom number generator which generates uniformly distributed pseudorandom numbers\n* @param {PRNGSeedMT19937} [options.seed] - pseudorandom number generator seed\n* @param {PRNGStateMT19937} [options.state] - pseudorandom number generator state\n* @param {boolean} [options.copy=true] - boolean indicating whether to copy a provided pseudorandom number generator state\n* @throws {TypeError} `a` must be a number\n* @throws {TypeError} `b` must be a number\n* @throws {RangeError} `a` must be less than `b`\n* @throws {TypeError} options argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} must provide a valid state\n* @returns {PRNG} pseudorandom number generator\n*\n* @example\n* var uniform = factory( 0.0, 1.0 );\n*\n* var v = uniform();\n* // returns <number>\n*\n* @example\n* var uniform = factory( -3.0, -1.0, {\n* 'seed': 297\n* });\n* var v = uniform();\n* // returns <number>\n*/\nfunction factory() {\n\tvar opts;\n\tvar rand;\n\tvar prng;\n\tvar err;\n\tvar a;\n\tvar b;\n\n\tif ( arguments.length === 0 ) {\n\t\trand = randu();\n\t} else if ( arguments.length === 1 ) {\n\t\topts = arguments[ 0 ];\n\t\tif ( !isObject( opts ) ) {\n\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', opts ) );\n\t\t}\n\t\tif ( hasOwnProp( opts, 'prng' ) ) {\n\t\t\tif ( !isFunction( opts.prng ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.', 'prng', opts.prng ) );\n\t\t\t}\n\t\t\trand = opts.prng;\n\t\t} else {\n\t\t\trand = randu( opts );\n\t\t}\n\t} else {\n\t\ta = arguments[ 0 ];\n\t\tb = arguments[ 1 ];\n\t\terr = validate( a, b );\n\t\tif ( err ) {\n\t\t\tthrow err;\n\t\t}\n\t\tif ( arguments.length > 2 ) {\n\t\t\topts = arguments[ 2 ];\n\t\t\tif ( !isObject( opts ) ) {\n\t\t\t\tthrow new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', opts ) );\n\t\t\t}\n\t\t\tif ( hasOwnProp( opts, 'prng' ) ) {\n\t\t\t\tif ( !isFunction( opts.prng ) ) {\n\t\t\t\t\tthrow new TypeError( format( 'invalid option. `%s` option must be a pseudorandom number generator function. Option: `%s`.', 'prng', opts.prng ) );\n\t\t\t\t}\n\t\t\t\trand = opts.prng;\n\t\t\t} else {\n\t\t\t\trand = randu( opts );\n\t\t\t}\n\t\t} else {\n\t\t\trand = randu();\n\t\t}\n\t}\n\tif ( a === void 0 ) {\n\t\tprng = uniform2;\n\t} else {\n\t\tprng = uniform1;\n\t}\n\tsetReadOnly( prng, 'NAME', 'uniform' );\n\n\t// If we are provided an \"external\" PRNG, we don't support getting or setting PRNG state, as we'd need to check for compatible state value types, etc, entailing considerable complexity.\n\tif ( opts && opts.prng ) {\n\t\tsetReadOnly( prng, 'seed', null );\n\t\tsetReadOnly( prng, 'seedLength', null );\n\t\tsetReadWriteAccessor( prng, 'state', constantFunction( null ), noop );\n\t\tsetReadOnly( prng, 'stateLength', null );\n\t\tsetReadOnly( prng, 'byteLength', null );\n\t\tsetReadOnly( prng, 'toJSON', constantFunction( null ) );\n\t\tsetReadOnly( prng, 'PRNG', rand );\n\t} else {\n\t\tsetReadOnlyAccessor( prng, 'seed', getSeed );\n\t\tsetReadOnlyAccessor( prng, 'seedLength', getSeedLength );\n\t\tsetReadWriteAccessor( prng, 'state', getState, setState );\n\t\tsetReadOnlyAccessor( prng, 'stateLength', getStateLength );\n\t\tsetReadOnlyAccessor( prng, 'byteLength', getStateSize );\n\t\tsetReadOnly( prng, 'toJSON', toJSON );\n\t\tsetReadOnly( prng, 'PRNG', rand );\n\t\trand = rand.normalized;\n\t}\n\treturn prng;\n\n\t/**\n\t* Returns the PRNG seed.\n\t*\n\t* @private\n\t* @returns {PRNGSeedMT19937} seed\n\t*/\n\tfunction getSeed() {\n\t\treturn rand.seed;\n\t}\n\n\t/**\n\t* Returns the PRNG seed length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} seed length\n\t*/\n\tfunction getSeedLength() {\n\t\treturn rand.seedLength;\n\t}\n\n\t/**\n\t* Returns the PRNG state length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state length\n\t*/\n\tfunction getStateLength() {\n\t\treturn rand.stateLength;\n\t}\n\n\t/**\n\t* Returns the PRNG state size (in bytes).\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state size (in bytes)\n\t*/\n\tfunction getStateSize() {\n\t\treturn rand.byteLength;\n\t}\n\n\t/**\n\t* Returns the current pseudorandom number generator state.\n\t*\n\t* @private\n\t* @returns {PRNGStateMT19937} current state\n\t*/\n\tfunction getState() {\n\t\treturn rand.state;\n\t}\n\n\t/**\n\t* Sets the pseudorandom number generator state.\n\t*\n\t* @private\n\t* @param {PRNGStateMT19937} s - generator state\n\t* @throws {Error} must provide a valid state\n\t*/\n\tfunction setState( s ) {\n\t\trand.state = s;\n\t}\n\n\t/**\n\t* Serializes the pseudorandom number generator as a JSON object.\n\t*\n\t* ## Notes\n\t*\n\t* - `JSON.stringify()` implicitly calls this method when stringifying a PRNG.\n\t*\n\t* @private\n\t* @returns {Object} JSON representation\n\t*/\n\tfunction toJSON() {\n\t\tvar out = {};\n\t\tout.type = 'PRNG';\n\t\tout.name = prng.NAME;\n\t\tout.state = typedarray2json( rand.state );\n\t\tif ( a === void 0 ) {\n\t\t\tout.params = [];\n\t\t} else {\n\t\t\tout.params = [ a, b ];\n\t\t}\n\t\treturn out;\n\t}\n\n\t/**\n\t* Returns a uniformly distributed pseudorandom number with minimum support `a` and maximum support `b`.\n\t*\n\t* @private\n\t* @returns {number} pseudorandom number\n\t*\n\t* @example\n\t* var v = uniform1();\n\t* // returns <number>\n\t*/\n\tfunction uniform1() {\n\t\treturn uniform0( rand, a, b );\n\t}\n\n\t/**\n\t* Returns a uniformly distributed pseudorandom number with minimum support `a` and maximum support `b`.\n\t*\n\t* @private\n\t* @param {number} a - minimum support (inclusive)\n\t* @param {number} b - maximum support (exclusive)\n\t* @returns {number} pseudorandom number\n\t*\n\t* @example\n\t* var v = uniform2( 0.0, 1.0 );\n\t* // returns <number>\n\t*\n\t* @example\n\t* var v = uniform2( 1.0, 0.0 );\n\t* // returns NaN\n\t*/\n\tfunction uniform2( a, b ) {\n\t\tif (\n\t\t\tisnan( a ) ||\n\t\t\tisnan( b ) ||\n\t\t\ta >= b\n\t\t) {\n\t\t\treturn NaN;\n\t\t}\n\t\treturn uniform0( rand, a, b );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default factory;\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* https://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\nimport { isPrimitive as isNumber } from '@stdlib/assert-is-number';\nimport format from '@stdlib/string-format';\nimport isnan from '@stdlib/assert-is-nan';\n\n\n// MAIN //\n\n/**\n* Validates values provided for minimum and maximum support.\n*\n* @private\n* @param {number} a - minimum support\n* @param {number} b - maximum support\n* @returns {(Error|null)} error or null\n*\n* @example\n* var err = validate( 1.0, 2.0 );\n* if ( err ) {\n* throw err;\n* }\n*/\nfunction validate( a, b ) {\n\tif ( !isNumber( a ) || isnan( a ) ) {\n\t\treturn new TypeError( format( 'invalid argument. First argument must be a number and not NaN. Value: `%s`.', a ) );\n\t}\n\tif ( !isNumber( b ) || isnan( b ) ) {\n\t\treturn new TypeError( format( 'invalid argument. Second argument must be a number and not NaN. Value: `%s`.', b ) );\n\t}\n\tif ( a >= b ) {\n\t\treturn new RangeError( format( 'invalid argument. Minimum support must be less than maximum support. Value: `[%f, %f]`.', a, b ) );\n\t}\n\treturn null;\n}\n\n\n// EXPORTS //\n\nexport default validate;\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* https://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* A 32-bit Mersenne Twister pseudorandom number generator.\n*\n* @module @stdlib/random-base-mt19937\n*\n* @example\n* import mt19937 from '@stdlib/random-base-mt19937';\n*\n* var v = mt19937();\n* // returns <number>\n*\n* @example\n* import { factory as factory } from '@stdlib/random-base-mt19937';\n*\n* var mt19937 = factory({\n* 'seed': 1234\n* });\n*\n* var v = mt19937();\n* // returns 822569775\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport factory from './factory.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport factory from './factory.js';\nimport randuint32 from './rand_uint32.js';\n\n\n// MAIN //\n\n/**\n* Generates a pseudorandom integer on the interval \\\\( [0, 2^{32}) \\\\).\n*\n* ## Method\n*\n* - When generating normalized double-precision floating-point numbers, we first generate two pseudorandom integers \\\\( x \\\\) and \\\\( y \\\\) on the interval \\\\( [0, 2^{32}) \\\\) for a combined \\\\( 64 \\\\) random bits.\n*\n* - We would like \\\\( 53 \\\\) random bits to generate a 53-bit precision integer and, thus, want to discard \\\\( 11 \\\\) of the generated bits.\n*\n* - We do so by discarding \\\\( 5 \\\\) bits from \\\\( x \\\\) and \\\\( 6 \\\\) bits from \\\\( y \\\\).\n*\n* - Accordingly, \\\\( x \\\\) contains \\\\( 27 \\\\) random bits, which are subsequently shifted left \\\\( 26 \\\\) bits (multiplied by \\\\( 2^{26} \\\\), and \\\\( y \\\\) contains \\\\( 26 \\\\) random bits to fill in the lower \\\\( 26 \\\\) bits. When summed, they combine to comprise \\\\( 53 \\\\) random bits of a double-precision floating-point integer.\n*\n* - As an example, suppose, for the sake of argument, the 32-bit PRNG generates the maximum unsigned 32-bit integer \\\\( 2^{32}-1 \\\\) twice in a row. Then,\n*\n* ```javascript\n* x = 4294967295 >>> 5; // 00000111111111111111111111111111\n* y = 4294967295 >>> 6; // 00000011111111111111111111111111\n* ```\n*\n* Multiplying \\\\( x \\\\) by \\\\( 2^{26} \\\\) returns \\\\( 9007199187632128 \\\\), which, in binary, is\n*\n* ```binarystring\n* 0 10000110011 11111111111111111111 11111100000000000000000000000000\n* ```\n*\n* Adding \\\\( y \\\\) yields \\\\( 9007199254740991 \\\\) (the maximum \"safe\" double-precision floating-point integer value), which, in binary, is\n*\n* ```binarystring\n* 0 10000110011 11111111111111111111 11111111111111111111111111111111\n* ```\n*\n* - Similarly, suppose the 32-bit PRNG generates the following values\n*\n* ```javascript\n* x = 1 >>> 5; // 0 => 00000000000000000000000000000000\n* y = 64 >>> 6; // 1 => 00000000000000000000000000000001\n* ```\n*\n* Multiplying \\\\( x \\\\) by \\\\( 2^{26} \\\\) returns \\\\( 0 \\\\), which, in binary, is\n*\n* ```binarystring\n* 0 00000000000 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* Adding \\\\( y \\\\) yields \\\\( 1 \\\\), which, in binary, is\n*\n* ```binarystring\n* 0 01111111111 00000000000000000000 00000000000000000000000000000000\n* ```\n*\n* - As different combinations of \\\\( x \\\\) and \\\\( y \\\\) are generated, different combinations of double-precision floating-point exponent and significand bits will be toggled, thus generating pseudorandom double-precision floating-point numbers.\n*\n* ## References\n*\n* - Matsumoto, Makoto, and Takuji Nishimura. 1998. \"Mersenne Twister: A 623-dimensionally Equidistributed Uniform Pseudo-random Number Generator.\" _ACM Transactions on Modeling and Computer Simulation_ 8 (1). New York, NY, USA: ACM: 3–30. doi:[10.1145/272991.272995][@matsumoto:1998a].\n* - Harase, Shin. 2017. \"Conversion of Mersenne Twister to double-precision floating-point numbers.\" _ArXiv_ abs/1708.06018 (September). <https://arxiv.org/abs/1708.06018>.\n*\n* [@matsumoto:1998a]: https://doi.org/10.1145/272991.272995\n*\n* @function mt19937\n* @type {PRNG}\n* @returns {PositiveInteger} pseudorandom integer\n*\n* @example\n* var v = mt19937();\n* // returns <number>\n*/\nvar mt19937 = factory({\n\t'seed': randuint32()\n});\n\n\n// EXPORTS //\n\nexport default mt19937;\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* https://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 `NaN`.\n*\n* @module @stdlib/assert-is-nan\n*\n* @example\n* import isnan from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( null );\n* // returns false\n*\n* @example\n* import { isPrimitive as isnan } from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns true\n*\n* bool = isnan( 3.14 );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns false\n*\n* @example\n* import { isObject as isnan } from '@stdlib/assert-is-nan';\n*\n* var bool = isnan( NaN );\n* // returns false\n*\n* bool = isnan( new Number( NaN ) );\n* // returns true\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport isPrimitive from './primitive.js';\nimport isObject from './object.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'isPrimitive', isPrimitive );\nsetReadOnly( main, 'isObject', isObject );\n\n\n// EXPORTS //\n\nexport default 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* https://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* Uniform distribution pseudorandom numbers.\n*\n* @module @stdlib/random-base-uniform\n*\n* @example\n* import uniform from '@stdlib/random-base-uniform';\n*\n* var v = uniform( 0.0, 1.0 );\n* // returns <number>\n*\n* @example\n* import { factory as factory } from '@stdlib/random-base-uniform';\n* var uniform = factory( -5.0, 5.0, {\n* 'seed': 297\n* });\n*\n* var v = uniform();\n* // returns <number>\n*\n* @example\n* import { factory as factory } from '@stdlib/random-base-uniform';\n* var uniform = factory({\n* 'seed': 297\n* });\n*\n* var v = uniform( -5.0, 5.0 );\n* // returns <number>\n*/\n\n// MODULES //\n\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport main from './main.js';\nimport factory from './factory.js';\n\n\n// MAIN //\n\nsetReadOnly( main, 'factory', factory );\n\n\n// EXPORTS //\n\nexport default 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* https://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\nimport factory from './factory.js';\n\n\n// MAIN //\n\n/**\n* Returns a uniformly distributed pseudorandom number with minimum support `a` and maximum support `b`.\n*\n* @name uniform\n* @type {PRNG}\n* @param {number} a - minimum support (inclusive)\n* @param {number} b - maximum support (exclusive)\n* @returns {number} pseudorandom number\n*\n* @example\n* var v = uniform( 0.0, 1.0 );\n* // returns <number>\n*/\nvar uniform = factory();\n\n\n// EXPORTS //\n\nexport default uniform;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2019 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* https://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\nimport setReadOnly from '@stdlib/utils-define-nonenumerable-read-only-property';\nimport setReadOnlyAccessor from '@stdlib/utils-define-nonenumerable-read-only-accessor';\nimport setReadWriteAccessor from '@stdlib/utils-define-nonenumerable-read-write-accessor';\nimport isIteratorLike from '@stdlib/assert-is-iterator-like';\nimport { isPrimitive as isPositiveNumber } from '@stdlib/assert-is-positive-number';\nimport isPlainObject from '@stdlib/assert-is-plain-object';\nimport isFunction from '@stdlib/assert-is-function';\nimport { isPrimitive as isBoolean } from '@stdlib/assert-is-boolean';\nimport isUint32Array from '@stdlib/assert-is-uint32array';\nimport hasOwnProp from '@stdlib/assert-has-own-property';\nimport noop from '@stdlib/utils-noop';\nimport constantFunction from '@stdlib/utils-constant-function';\nimport format from '@stdlib/error-tools-fmtprodmsg';\nimport iteratorSymbol from '@stdlib/symbol-iterator';\nimport { factory as randu } from '@stdlib/random-base-uniform';\nimport SQRT_THREE from '@stdlib/constants-float64-sqrt-three';\nimport defaults from './defaults.js';\n\n\n// MAIN //\n\n/**\n* Returns an iterator which introduces additive white uniform noise with standard deviation `sigma`.\n*\n* ## Method\n*\n* - The variance of a uniform distribution is given by\n*\n* ```tex\n* \\operatorname{Var} = \\frac{(b-a)^2}{12}\n* ```\n*\n* where \\\\( a \\\\) is the minimum support and \\\\( b \\\\) is the maximum support.\n*\n* - Accordingly, to generate uniform noise having zero mean and a desired standard deviation, we let \\\\( a = -b \\\\) and solve for \\\\( b \\\\).\n*\n* ```tex\n* \\begin{align*}\n* \\sigma &= \\frac{b-a}{\\sqrt{12}} \\\\\n* \\sigma \\sqrt{12} &= b - a \\\\\n* 2 \\sigma \\sqrt{3} &= b - (-b) \\\\\n* 2 \\sigma \\sqrt{3} &= 2b \\\\\n* b &= \\sigma \\sqrt{3}\n* \\end{align*}\n* ```\n*\n* where \\\\( \\sigma \\\\) is the standard deviation.\n*\n* - Thus, to generate uniform noise having zero mean and a desired standard deviation, we sample from \\\\( \\operatorname{unif}(-sigma\\sqrt{3}, sigma\\sqrt{3}) \\\\).\n*\n* @param {Iterator} iterator - input iterator\n* @param {PositiveNumber} sigma - standard deviation of the noise\n* @param {Options} [options] - function options\n* @param {PRNG} [options.prng] - pseudorandom number generator which generates uniformly distributed pseudorandom numbers on the interval `[0,1)`\n* @param {PRNGSeedMT19937} [options.seed] - pseudorandom number generator seed\n* @param {PRNGStateMT19937} [options.state] - pseudorandom number generator state\n* @param {boolean} [options.copy=true] - boolean indicating whether to copy a provided pseudorandom number generator state\n* @throws {TypeError} first argument must be an iterator\n* @throws {TypeError} second argument must be a positive number\n* @throws {TypeError} third argument must be an object\n* @throws {TypeError} must provide valid options\n* @throws {Error} must provide a valid state\n* @returns {Iterator} iterator\n*\n* @example\n* import iterSineWave from '@stdlib/simulate-iter-sine-wave';\n*\n* var sine = iterSineWave({\n* 'iter': 100\n* });\n*\n* var it = iterawun( sine, 0.5 );\n*\n* var v = it.next().value;\n* // returns <number>\n*\n* v = it.next().value;\n* // returns <number>\n*\n* v = it.next().value;\n* // returns <number>\n*\n* // ...\n*/\nfunction iterawun( iterator, sigma, options ) {\n\tvar runif;\n\tvar opts;\n\tvar iter;\n\tvar FLG;\n\tvar a;\n\tif ( !isIteratorLike( iterator ) ) {\n\t\tthrow new TypeError( format( '0t93v', iterator ) );\n\t}\n\tif ( !isPositiveNumber( sigma ) ) {\n\t\tthrow new TypeError( format( '0t972', sigma ) );\n\t}\n\topts = defaults();\n\tif ( arguments.length > 2 ) {\n\t\tif ( !isPlainObject( options ) ) {\n\t\t\tthrow new TypeError( format( '0t98J', options ) );\n\t\t}\n\t\tif ( hasOwnProp( options, 'copy' ) ) {\n\t\t\topts.copy = options.copy;\n\t\t\tif ( !isBoolean( options.copy ) ) {\n\t\t\t\tthrow new TypeError( format( '0t92o', 'copy', options.copy ) );\n\t\t\t}\n\t\t}\n\t\tif ( hasOwnProp( options, 'prng' ) ) {\n\t\t\tif ( !isFunction( options.prng ) ) {\n\t\t\t\tthrow new TypeError( format( '0t96u', 'prng', options.prng ) );\n\t\t\t}\n\t\t\topts.prng = options.prng;\n\t\t}\n\t\t// If provided a PRNG, ignore the `state` option, as we don't support getting or setting PRNG state.\n\t\telse if ( hasOwnProp( options, 'state' ) ) {\n\t\t\topts.state = options.state;\n\t\t\tif ( !isUint32Array( options.state ) ) {\n\t\t\t\tthrow new TypeError( format( '0t96z', 'state', options.state ) );\n\t\t\t}\n\t\t}\n\t\t// If provided a PRNG, ignore the `seed` option, as a `seed`, by itself, is insufficient to guarantee reproducibility. If provided a state, ignore the `seed` option, as a PRNG state should contain seed information.\n\t\telse if ( hasOwnProp( options, 'seed' ) ) {\n\t\t\topts.seed = options.seed;\n\t\t\tif ( options.seed === void 0 ) {\n\t\t\t\tthrow new TypeError( format( '0t974', 'seed', options.seed ) );\n\t\t\t}\n\t\t}\n\t}\n\ta = sigma * SQRT_THREE;\n\trunif = randu( -a, a, opts );\n\n\t// Create an iterator protocol-compliant object:\n\titer = {};\n\tsetReadOnly( iter, 'next', next );\n\tsetReadOnly( iter, 'return', end );\n\n\t// If an environment supports `Symbol.iterator` and the provided iterator is iterable, make the iterator iterable:\n\tif ( iteratorSymbol && isFunction( iterator[ iteratorSymbol ] ) ) {\n\t\tsetReadOnly( iter, iteratorSymbol, factory );\n\t}\n\t// If we are provided an \"external\" PRNG, we don't support getting or setting PRNG state, as we'd need to check for compatible state value types, etc, entailing considerable complexity.\n\tif ( options && options.prng ) {\n\t\tsetReadOnly( iter, 'seed', null );\n\t\tsetReadOnly( iter, 'seedLength', null );\n\t\tsetReadWriteAccessor( iter, 'state', constantFunction( null ), noop );\n\t\tsetReadOnly( iter, 'stateLength', null );\n\t\tsetReadOnly( iter, 'byteLength', null );\n\t\tsetReadOnly( iter, 'PRNG', options.prng );\n\t} else {\n\t\tsetReadOnlyAccessor( iter, 'seed', getSeed );\n\t\tsetReadOnlyAccessor( iter, 'seedLength', getSeedLength );\n\t\tsetReadWriteAccessor( iter, 'state', getState, setState );\n\t\tsetReadOnlyAccessor( iter, 'stateLength', getStateLength );\n\t\tsetReadOnlyAccessor( iter, 'byteLength', getStateSize );\n\t\tsetReadOnly( iter, 'PRNG', runif.PRNG );\n\t}\n\treturn iter;\n\n\t/**\n\t* Returns the PRNG seed.\n\t*\n\t* @private\n\t* @returns {PRNGSeedMT19937} seed\n\t*/\n\tfunction getSeed() {\n\t\treturn runif.seed;\n\t}\n\n\t/**\n\t* Returns the PRNG seed length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} seed length\n\t*/\n\tfunction getSeedLength() {\n\t\treturn runif.seedLength;\n\t}\n\n\t/**\n\t* Returns the PRNG state length.\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state length\n\t*/\n\tfunction getStateLength() {\n\t\treturn runif.stateLength;\n\t}\n\n\t/**\n\t* Returns the PRNG state size (in bytes).\n\t*\n\t* @private\n\t* @returns {PositiveInteger} state size (in bytes)\n\t*/\n\tfunction getStateSize() {\n\t\treturn runif.byteLength;\n\t}\n\n\t/**\n\t* Returns the current PRNG state.\n\t*\n\t* @private\n\t* @returns {PRNGStateMT19937} current state\n\t*/\n\tfunction getState() {\n\t\treturn runif.state;\n\t}\n\n\t/**\n\t* Sets the PRNG state.\n\t*\n\t* @private\n\t* @param {PRNGStateMT19937} s - generator state\n\t* @throws {Error} must provide a valid state\n\t*/\n\tfunction setState( s ) {\n\t\trunif.state = s;\n\t}\n\n\t/**\n\t* Returns an iterator protocol-compliant object containing the next iterated value.\n\t*\n\t* @private\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction next() {\n\t\tvar v;\n\t\tif ( FLG ) {\n\t\t\treturn {\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\tv = iterator.next();\n\t\tif ( v.done ) {\n\t\t\tFLG = true;\n\t\t\treturn v;\n\t\t}\n\t\tif ( typeof v.value === 'number' ) {\n\t\t\tv = v.value + runif();\n\t\t} else {\n\t\t\tv = NaN;\n\t\t}\n\t\treturn {\n\t\t\t'value': v,\n\t\t\t'done': false\n\t\t};\n\t}\n\n\t/**\n\t* Finishes an iterator.\n\t*\n\t* @private\n\t* @param {*} [value] - value to return\n\t* @returns {Object} iterator protocol-compliant object\n\t*/\n\tfunction end( value ) {\n\t\tFLG = true;\n\t\tif ( arguments.length ) {\n\t\t\treturn {\n\t\t\t\t'value': value,\n\t\t\t\t'done': true\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\t'done': true\n\t\t};\n\t}\n\n\t/**\n\t* Returns a new iterator.\n\t*\n\t* @private\n\t* @returns {Iterator} iterator\n\t*/\n\tfunction factory() {\n\t\treturn iterawun( iterator[ iteratorSymbol ](), sigma, opts );\n\t}\n}\n\n\n// EXPORTS //\n\nexport default iterawun;\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* https://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\nimport isFunction from '@stdlib/assert-is-function';\n\n\n// MAIN //\n\n/**\n* Tests if a value is iterator-like.\n*\n* @param {*} value - value to test\n* @returns {boolean} boolean indicating whether value is iterator-like\n*\n* @example\n* var it = {\n* 'next': function noop() {}\n* };\n* var bool = isIteratorLike( it );\n* // returns true\n*\n* @example\n* var bool = isIteratorLike( {} );\n* // returns false\n*\n* @example\n* var bool = isIteratorLike( null );\n* // returns false\n*/\nfunction isIteratorLike( value ) {\n\tvar t = typeof value;\n\treturn (\n\t\tvalue !== null &&\n\t\t( t === 'object' || t === 'function' ) &&\n\t\tisFunction( value.next )\n\t);\n}\n\n\n// EXPORTS //\n\nexport default isIteratorLike;\n","/**\n* @license Apache-2.0\n*\n* Copyright (c) 2023 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* https://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* Returns default options.\n*\n* @private\n* @returns {Object} default options\n*/\nfunction defaults() {\n\treturn {\n\t\t'copy': true\n\t};\n}\n\n\n// EXPORTS //\n\nexport default defaults;\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* https://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* Square root of `3`.\n*\n* @module @stdlib/constants-float64-sqrt-three\n* @type {number}\n*\n* @example\n* import SQRT3 from '@stdlib/constants-float64-sqrt-three';\n* // returns 1.7320508075688772\n*/\n\n\n// MAIN //\n\n/**\n* Square root of `3`.\n*\n* ```tex\n* \\sqrt{3}\n* ```\n*\n* @constant\n* @type {number}\n* @default 1.7320508075688772\n*/\nvar SQRT3 = 1.732050807568877293527446341505872366942805253810380628055e+00;\n\n\n// EXPORTS //\n\nexport default SQRT3;\n"],"names":["main","Object","defineProperty","isNumber","value","zeros","n","i","out","zeroPad","str","width","right","negative","pad","length","startsWithMinus","substr","lowercase","String","prototype","toLowerCase","uppercase","toUpperCase","formatInteger","token","base","specifier","arg","parseInt","isFinite","Error","toString","precision","padRight","sign","alternate","call","charAt","abs","Math","replace","RE_EXP_POS_DIGITS","RE_EXP_NEG_DIGITS","RE_ONLY_DIGITS","RE_DIGITS_BEFORE_EXP","RE_TRAILING_PERIOD_ZERO","RE_PERIOD_ZERO_EXP","RE_ZERO_BEFORE_EXP","formatDouble","digits","f","parseFloat","toExponential","toFixed","toPrecision","spaces","fromCharCode","isnan","isNaN","isArray","Array","initialize","flags","mapping","formatInterpolate","tokens","hasPeriod","flag","num","pos","j","TypeError","padZeros","indexOf","arguments","maxWidth","substring","RE","parse","match","formatTokenize","content","prev","exec","slice","lastIndex","push","format","args","tokenize","interpolate","apply","objectProtoype","toStr","defineGetter","__defineGetter__","defineSetter","__defineSetter__","lookupGetter","__lookupGetter__","lookupSetter","__lookupSetter__","err","hasDefinePropertySupport","builtin","obj","prop","descriptor","hasValue","hasGet","hasSet","__proto__","get","set","defineProperty$1","setNonEnumerableReadOnly","configurable","enumerable","writable","setNonEnumerableReadOnlyAccessor","getter","setNonEnumerableReadWriteAccessor","setter","isBoolean","FLG","Symbol","hasToStringTagSupport","toStringTag","has","hasOwnProperty","hasOwnProp","property","Sym","toStrTag","nativeClass","hasToStringTag","v","isOwn","tag","Bool","Boolean","test","isPrimitive","isObject","setReadOnly","self","window","global","globalThis","root","codegen","Function","GlobalThis","Self","Win","Global","getGlobal","nodeList","document","childNodes","typedarray","Int8Array","reFunctionName","RE_FUNCTION_NAME","REGEXP","main$b","isObjectLike","isBuffer","_isBuffer","constructor","constructorName","name","ctor","predicate","len","arrayfun","ctorName","type","isFunction","typeOf","main$9","Number","isPositiveNumber","valueOf","getProto","Obj","getPrototypeOf","proto","getProto$1","objectPrototype","isPlainObject","isPrototypeOf","key","ownProps","hasUint32Array","Uint32Array","isUint32Array","noop","wrap","fmtprodmsg","a","u","encodeURIComponent","hasIteratorSymbolSupport","iterator","IteratorSymbol","floor","isInteger","x","MAX_TYPED_ARRAY_LENGTH","isCollection","MAX_LENGTH","FLOAT64_PINF","POSITIVE_INFINITY","FLOAT64_NINF","NEGATIVE_INFINITY","PINF","NINF","isInt","isPositiveInteger","FLOAT64_MAX_SAFE_INTEGER","UINT32_MAX","Uint32Array$1","bool","arr","GlobalUint32Array","hasUint32ArraySupport","max","y","NaN","isPositiveZero","LOW_WORD_MASK","umul","b","la","lb","TYPE","GETTERS","float64","idx","float32","int32","int16","int8","uint32","uint16","uint8","uint8c","generic","default","dtype","SETTERS","complex128","complex64","ctor2dtypes","Float32Array","Float64Array","Int16Array","Int32Array","Uint16Array","Uint8Array","Uint8ClampedArray","Complex64Array","Complex128Array","hasFloat64Array","hasFloat64ArraySupport","GlobalFloat64Array","Float64Array$1","hasFloat32Array","Float32Array$1","GlobalFloat32Array","hasFloat32ArraySupport","hasInt32Array","Int32Array$1","GlobalInt32Array","INT32_MAX","hasInt32ArraySupport","hasUint16Array","Uint16Array$1","GlobalUint16Array","UINT16_MAX","hasUint16ArraySupport","hasInt16Array","Int16Array$1","GlobalInt16Array","INT16_MAX","hasInt16ArraySupport","hasUint8Array","Uint8Array$1","GlobalUint8Array","UINT8_MAX","hasUint8ArraySupport","hasUint8ClampedArray","Uint8ClampedArray$1","GlobalUint8ClampedArray","hasUint8ClampedArraySupport","hasInt8Array","Int8Array$1","GlobalInt8Array","INT8_MAX","hasInt8ArraySupport","isNonNegativeInteger","MAX_ARRAY_LENGTH","isArrayLikeObject","hasArrayBuffer","ArrayBuffer","isArrayBuffer","isString","Complex128","real","imag","this","re","im","fround","FLOAT32_VIEW","float64ToFloat32$1","Complex64","float64ToFloat32","isComplexLike","isEven","BYTES_PER_ELEMENT","isComplex64Array","isComplex128Array","realf","z","imagf","reinterpret","offset","buffer","byteOffset","fromIterator","it","next","done","HAS_ITERATOR_SYMBOL","isComplexArray","_length","_buffer","isComplexArrayConstructor","getComplex64","buf","nargs","fromArray","RangeError","reinterpret64","reinterpret128","byteLength","ITERATOR_SYMBOL","src","thisArg","clbk","tmp","flg","accessorGetter","fromIteratorMap","target","start","copyWithin","iter","entries","end","fcn","searchElement","fromIndex","separator","sep","join","outbuf","reducer","initialValue","acc","N","sbuf","outlen","begin","index","getComplex128","CTORS","DTYPES","NTYPES","arraylike2object","dt","ctor2dtype","data","accessorProtocol","accessors","accessorSetter","gcopy","strideX","offsetX","strideY","offsetY","xbuf","ybuf","ix","iy","M","ox","oy","m","foo","isFunctionNameSupported","TypedArray","Dummy","fcnName","instanceOf","typeName","typedarray2json","NAMES","isTypedArray","isComplexTypedArray","MAX","randuint32","random","MAX_SEED","SEED_ARRAY_INIT_STATE","UPPER_MASK","LOWER_MASK","KNUTH_MULTIPLIER","MAGIC_MULTIPLIER_1","MAGIC_MULTIPLIER_2","TEMPERING_COEFFICIENT_1","TEMPERING_COEFFICIENT_2","MAG01","MATRIX_A","FLOAT64_NORMALIZATION_CONSTANT","TWO_26","TWO_32","ONE","MAX_NORMALIZED","STATE_ARRAY_VERSION","NUM_STATE_SECTIONS","STATE_SECTION_OFFSET","OTHER_SECTION_OFFSET","SEED_SECTION_OFFSET","STATE_FIXED_LENGTH","verifyState","state","s1","createState","s","factory","options","STATE","opts","seed","slen","copy","ndarray","k","initState","mt19937","setReadOnlyAccessor","getSeed","getSeedLength","setReadWriteAccessor","getState","setState","getStateLength","getStateSize","toJSON","normalized","NAME","params","r","w","twist","isNan","uniform","rand","prng","randu","validate","uniform0","constantFunction","seedLength","stateLength","iterawun","sigma","runif","t","iteratorSymbol","PRNG"],"mappings":";yOAsBA,IAAIA,EAA0C,mBAA1BC,OAAOC,eAAkCD,OAAOC,eAAiB,KCiCrF,IAAIA,EAAiBD,OAAOC,eCjB5B,SAASC,EAAUC,GAClB,MAA0B,iBAAVA,CACjB,CCAA,SAASC,EAAOC,GACf,IACIC,EADAC,EAAM,GAEV,IAAMD,EAAI,EAAGA,EAAID,EAAGC,IACnBC,GAAO,IAER,OAAOA,CACR,CAcA,SAASC,EAASC,E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AM,eAgC5B,WACC,OAAOyH,EAAMH,WACb,IAjCAxB,EAAqB9F,EAAM,cAyC5B,WACC,OAAOyH,EAAMrI,UACb,IA1CA3M,EAAauN,EAAM,OAAQyH,EAAMG,OAE3B5H,CAyHR","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,243,245]}