-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
3 lines (3 loc) · 78.1 KB
/
Copy pathindex.js
File metadata and controls
3 lines (3 loc) · 78.1 KB
1
2
3
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
!function(r,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(r="undefined"!=typeof globalThis?globalThis:r||self).isSameFloat64Array=t()}(this,(function(){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function t(){return r&&"symbol"==typeof Symbol.toStringTag}var e=Object.prototype.toString;var n=Object.prototype.hasOwnProperty;function i(r,t){return null!=r&&n.call(r,t)}var o="function"==typeof Symbol?Symbol:void 0,a="function"==typeof o?o.toStringTag:"";var u=t()?function(r){var t,n,o;if(null==r)return e.call(r);n=r[a],t=i(r,a);try{r[a]=void 0}catch(t){return e.call(r)}return o=e.call(r),t?r[a]=n:delete r[a],o}:function(r){return e.call(r)},f="function"==typeof Float64Array;function s(r){return f&&r instanceof Float64Array||"[object Float64Array]"===u(r)}var l=16;function h(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===l}var c=8;function p(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===c}var y=1;function g(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===y}var m="function";var w={float64:function(r,t){return r[t]},float32:function(r,t){return r[t]},int32:function(r,t){return r[t]},int16:function(r,t){return r[t]},int8:function(r,t){return r[t]},uint32:function(r,t){return r[t]},uint16:function(r,t){return r[t]},uint8:function(r,t){return r[t]},uint8c:function(r,t){return r[t]},generic:function(r,t){return r[t]},default:function(r,t){return r[t]}};function v(r){var t=w[r];return"function"==typeof t?t:w.default}var b={float64:function(r,t,e){r[t]=e},float32:function(r,t,e){r[t]=e},int32:function(r,t,e){r[t]=e},int16:function(r,t,e){r[t]=e},int8:function(r,t,e){r[t]=e},uint32:function(r,t,e){r[t]=e},uint16:function(r,t,e){r[t]=e},uint8:function(r,t,e){r[t]=e},uint8c:function(r,t,e){r[t]=e},generic:function(r,t,e){r[t]=e},default:function(r,t,e){r[t]=e}};function d(r){var t=b[r];return"function"==typeof t?t:b.default}var E={complex128:function(r,t){return r.get(t)},complex64:function(r,t){return r.get(t)},default:function(r,t){return r.get(t)}};function _(r){var t=E[r];return"function"==typeof t?t:E.default}var T={complex128:function(r,t,e){r.set(e,t)},complex64:function(r,t,e){r.set(e,t)},default:function(r,t,e){r.set(e,t)}};function x(r){var t=T[r];return"function"==typeof t?t:T.default}var V="function"==typeof Object.defineProperty?Object.defineProperty:null;var A=Object.defineProperty;function F(r){return"number"==typeof r}function j(r){var t,e="";for(t=0;t<r;t++)e+="0";return e}function S(r,t,e){var n=!1,i=t-r.length;return i<0||(function(r){return"-"===r[0]}(r)&&(n=!0,r=r.substr(1)),r=e?r+j(i):j(i)+r,n&&(r="-"+r)),r}var L=String.prototype.toLowerCase,k=String.prototype.toUpperCase;function I(r){var t,e,n;switch(r.specifier){case"b":t=2;break;case"o":t=8;break;case"x":case"X":t=16;break;default:t=10}if(e=r.arg,n=parseInt(e,10),!isFinite(n)){if(!F(e))throw new Error("invalid integer. Value: "+e);n=0}return n<0&&("u"===r.specifier||10!==t)&&(n=4294967295+n+1),n<0?(e=(-n).toString(t),r.precision&&(e=S(e,r.precision,r.padRight)),e="-"+e):(e=n.toString(t),n||r.precision?r.precision&&(e=S(e,r.precision,r.padRight)):e="",r.sign&&(e=r.sign+e)),16===t&&(r.alternate&&(e="0x"+e),e=r.specifier===k.call(r.specifier)?k.call(e):L.call(e)),8===t&&r.alternate&&"0"!==e.charAt(0)&&(e="0"+e),e}var R=Math.abs,B=String.prototype.toLowerCase,O=String.prototype.toUpperCase,M=String.prototype.replace,C=/e\+(\d)$/,P=/e-(\d)$/,N=/^(\d+)$/,U=/^(\d+)e/,Y=/\.0$/,W=/\.0*e/,$=/(\..*[^0])0*e/;function G(r,t){var e,n;switch(t.specifier){case"e":case"E":n=r.toExponential(t.precision);break;case"f":case"F":n=r.toFixed(t.precision);break;case"g":case"G":R(r)<1e-4?((e=t.precision)>0&&(e-=1),n=r.toExponential(e)):n=r.toPrecision(t.precision),t.alternate||(n=M.call(n,$,"$1e"),n=M.call(n,W,"e"),n=M.call(n,Y,""));break;default:throw new Error("invalid double notation. Value: "+t.specifier)}return n=M.call(n,C,"e+0$1"),n=M.call(n,P,"e-0$1"),t.alternate&&(n=M.call(n,N,"$1."),n=M.call(n,U,"$1.e")),r>=0&&t.sign&&(n=t.sign+n),n=t.specifier===O.call(t.specifier)?O.call(n):B.call(n)}function Z(r){var t,e="";for(t=0;t<r;t++)e+=" ";return e}var X=String.fromCharCode,J=Array.isArray;function z(r){return r!=r}function q(r){var t={};return t.specifier=r.specifier,t.precision=void 0===r.precision?1:r.precision,t.width=r.width,t.flags=r.flags||"",t.mapping=r.mapping,t}function D(r){var t,e,n,i,o,a,u,f,s,l,h,c,p,y;if(!J(r))throw new TypeError("invalid argument. First argument must be an array. Value: `"+r+"`.");for(a="",u=1,s=0;s<r.length;s++)if(n=r[s],"string"==typeof n)a+=n;else{if(t=void 0!==n.precision,!(n=q(n)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+s+"`. Value: `"+n+"`.");for(n.mapping&&(u=n.mapping),e=n.flags,l=0;l<e.length;l++)switch(i=e.charAt(l)){case" ":n.sign=" ";break;case"+":n.sign="+";break;case"-":n.padRight=!0,n.padZeros=!1;break;case"0":n.padZeros=e.indexOf("-")<0;break;case"#":n.alternate=!0;break;default:throw new Error("invalid flag: "+i)}if("*"===n.width){if(n.width=parseInt(arguments[u],10),u+=1,z(n.width))throw new TypeError("the argument for * width at position "+u+" is not a number. Value: `"+n.width+"`.");n.width<0&&(n.padRight=!0,n.width=-n.width)}if(t&&"*"===n.precision){if(n.precision=parseInt(arguments[u],10),u+=1,z(n.precision))throw new TypeError("the argument for * precision at position "+u+" is not a number. Value: `"+n.precision+"`.");n.precision<0&&(n.precision=1,t=!1)}switch(n.arg=arguments[u],n.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":t&&(n.padZeros=!1),n.arg=I(n);break;case"s":n.maxWidth=t?n.precision:-1,n.arg=String(n.arg);break;case"c":if(!z(n.arg)){if((o=parseInt(n.arg,10))<0||o>127)throw new Error("invalid character code. Value: "+n.arg);n.arg=z(o)?String(n.arg):X(o)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(t||(n.precision=6),f=parseFloat(n.arg),!isFinite(f)){if(!F(n.arg))throw new Error("invalid floating-point number. Value: "+a);f=n.arg,n.padZeros=!1}n.arg=G(f,n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=S(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(h=n.arg,c=n.width,p=n.padRight,y=void 0,(y=c-h.length)<0?h:h=p?h+Z(y):Z(y)+h)),a+=n.arg||"",u+=1}return a}var H=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function K(r){var t={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(t.precision="1"),t}function Q(r){var t,e,n,i;for(e=[],i=0,n=H.exec(r);n;)(t=r.slice(i,H.lastIndex-n[0].length)).length&&e.push(t),"%"===n[6]?e.push("%"):e.push(K(n)),i=H.lastIndex,n=H.exec(r);return(t=r.slice(i)).length&&e.push(t),e}function rr(r){var t,e;if("string"!=typeof r)throw new TypeError(rr("invalid argument. First argument must be a string. Value: `%s`.",r));for(t=[Q(r)],e=1;e<arguments.length;e++)t.push(arguments[e]);return D.apply(null,t)}var tr,er=Object.prototype,nr=er.toString,ir=er.__defineGetter__,or=er.__defineSetter__,ar=er.__lookupGetter__,ur=er.__lookupSetter__;tr=function(){try{return V({},"x",{}),!0}catch(r){return!1}}()?A:function(r,t,e){var n,i,o,a;if("object"!=typeof r||null===r||"[object Array]"===nr.call(r))throw new TypeError(rr("invalid argument. First argument must be an object. Value: `%s`.",r));if("object"!=typeof e||null===e||"[object Array]"===nr.call(e))throw new TypeError(rr("invalid argument. Property descriptor must be an object. Value: `%s`.",e));if((i="value"in e)&&(ar.call(r,t)||ur.call(r,t)?(n=r.__proto__,r.__proto__=er,delete r[t],r[t]=e.value,r.__proto__=n):r[t]=e.value),o="get"in e,a="set"in e,i&&(o||a))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return o&&ir&&ir.call(r,t,e.get),a&&or&&or.call(r,t,e.set),r};var fr=tr;function sr(r,t,e){fr(r,t,{configurable:!1,enumerable:!1,writable:!1,value:e})}var lr=Array.isArray?Array.isArray:function(r){return"[object Array]"===u(r)};function hr(r){if("function"!=typeof r)throw new TypeError(rr("invalid argument. Must provide a function. Value: `%s`.",r));return function(t){var e,n;if(!lr(t))return!1;if(0===(e=t.length))return!1;for(n=0;n<e;n++)if(!1===r(t[n]))return!1;return!0}}function cr(r){return null!==r&&"object"==typeof r}function pr(r){return cr(r)&&(r._isBuffer||r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r))}function yr(){return/^\s*function\s*([^(]*)/i}sr(cr,"isObjectLikeArray",hr(cr));var gr=/^\s*function\s*([^(]*)/i;function mr(r){var t,e,n;if(("Object"===(e=u(r).slice(8,-1))||"Error"===e)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(t=gr.exec(n.toString()))return t[1]}return pr(r)?"Buffer":e}sr(yr,"REGEXP",gr);var wr={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128",BooleanArray:"bool"},vr="function"==typeof Float64Array?Float64Array:null;var br="function"==typeof Float64Array?Float64Array:void 0;var dr=function(){var r,t;if("function"!=typeof vr)return!1;try{r=s(t=new vr([1,3.14,-3.14,NaN]))&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){r=!1}return r}()?br:function(){throw new Error("not implemented")},Er="function"==typeof Float32Array;var _r=Number.POSITIVE_INFINITY,Tr="function"==typeof Float32Array?Float32Array:null;var xr="function"==typeof Float32Array?Float32Array:void 0;var Vr=function(){var r,t,e;if("function"!=typeof Tr)return!1;try{t=new Tr([1,3.14,-3.14,5e40]),e=t,r=(Er&&e instanceof Float32Array||"[object Float32Array]"===u(e))&&1===t[0]&&3.140000104904175===t[1]&&-3.140000104904175===t[2]&&t[3]===_r}catch(t){r=!1}return r}()?xr:function(){throw new Error("not implemented")},Ar="function"==typeof Uint32Array;var Fr="function"==typeof Uint32Array?Uint32Array:null;var jr="function"==typeof Uint32Array?Uint32Array:void 0;var Sr=function(){var r,t,e;if("function"!=typeof Fr)return!1;try{t=new Fr(t=[1,3.14,-3.14,4294967296,4294967297]),e=t,r=(Ar&&e instanceof Uint32Array||"[object Uint32Array]"===u(e))&&1===t[0]&&3===t[1]&&4294967293===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?jr:function(){throw new Error("not implemented")},Lr="function"==typeof Int32Array;var kr="function"==typeof Int32Array?Int32Array:null;var Ir="function"==typeof Int32Array?Int32Array:void 0;var Rr=function(){var r,t,e;if("function"!=typeof kr)return!1;try{t=new kr([1,3.14,-3.14,2147483648]),e=t,r=(Lr&&e instanceof Int32Array||"[object Int32Array]"===u(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-2147483648===t[3]}catch(t){r=!1}return r}()?Ir:function(){throw new Error("not implemented")},Br="function"==typeof Uint16Array;var Or="function"==typeof Uint16Array?Uint16Array:null;var Mr="function"==typeof Uint16Array?Uint16Array:void 0;var Cr=function(){var r,t,e;if("function"!=typeof Or)return!1;try{t=new Or(t=[1,3.14,-3.14,65536,65537]),e=t,r=(Br&&e instanceof Uint16Array||"[object Uint16Array]"===u(e))&&1===t[0]&&3===t[1]&&65533===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?Mr:function(){throw new Error("not implemented")},Pr="function"==typeof Int16Array;var Nr="function"==typeof Int16Array?Int16Array:null;var Ur="function"==typeof Int16Array?Int16Array:void 0;var Yr=function(){var r,t,e;if("function"!=typeof Nr)return!1;try{t=new Nr([1,3.14,-3.14,32768]),e=t,r=(Pr&&e instanceof Int16Array||"[object Int16Array]"===u(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-32768===t[3]}catch(t){r=!1}return r}()?Ur:function(){throw new Error("not implemented")},Wr="function"==typeof Uint8Array;var $r="function"==typeof Uint8Array?Uint8Array:null;var Gr="function"==typeof Uint8Array?Uint8Array:void 0;var Zr=function(){var r,t,e;if("function"!=typeof $r)return!1;try{t=new $r(t=[1,3.14,-3.14,256,257]),e=t,r=(Wr&&e instanceof Uint8Array||"[object Uint8Array]"===u(e))&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},Xr="function"==typeof Uint8ClampedArray;var Jr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var zr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var qr=function(){var r,t,e;if("function"!=typeof Jr)return!1;try{t=new Jr([-1,0,1,3.14,4.99,255,256]),e=t,r=(Xr&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===u(e))&&0===t[0]&&0===t[1]&&1===t[2]&&3===t[3]&&5===t[4]&&255===t[5]&&255===t[6]}catch(t){r=!1}return r}()?zr:function(){throw new Error("not implemented")},Dr="function"==typeof Int8Array;var Hr="function"==typeof Int8Array?Int8Array:null;var Kr="function"==typeof Int8Array?Int8Array:void 0;var Qr=function(){var r,t,e;if("function"!=typeof Hr)return!1;try{t=new Hr([1,3.14,-3.14,128]),e=t,r=(Dr&&e instanceof Int8Array||"[object Int8Array]"===u(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-128===t[3]}catch(t){r=!1}return r}()?Kr:function(){throw new Error("not implemented")};function rt(r){return"number"==typeof r}var tt=Number,et=tt.prototype.toString;var nt=t();function it(r){return"object"==typeof r&&(r instanceof tt||(nt?function(r){try{return et.call(r),!0}catch(r){return!1}}(r):"[object Number]"===u(r)))}function ot(r){return rt(r)||it(r)}sr(ot,"isPrimitive",rt),sr(ot,"isObject",it);var at=tt.NEGATIVE_INFINITY,ut=Math.floor;function ft(r){return ut(r)===r}function st(r){return r<_r&&r>at&&ft(r)}function lt(r){return rt(r)&&st(r)}function ht(r){return it(r)&&st(r.valueOf())}function ct(r){return lt(r)||ht(r)}function pt(r){return lt(r)&&r>=0}function yt(r){return ht(r)&&r.valueOf()>=0}function gt(r){return pt(r)||yt(r)}sr(ct,"isPrimitive",lt),sr(ct,"isObject",ht),sr(gt,"isPrimitive",pt),sr(gt,"isObject",yt);var mt=4294967295;function wt(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&ft(r.length)&&r.length>=0&&r.length<=mt}var vt=9007199254740991;function bt(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&ft(r.length)&&r.length>=0&&r.length<=vt}var dt="function"==typeof ArrayBuffer;function Et(r){return dt&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===u(r)}function _t(r){return"object"==typeof r&&null!==r&&!lr(r)}function Tt(r){return"string"==typeof r}var xt=String.prototype.valueOf;var Vt=t();function At(r){return"object"==typeof r&&(r instanceof String||(Vt?function(r){try{return xt.call(r),!0}catch(r){return!1}}(r):"[object String]"===u(r)))}function Ft(r){return Tt(r)||At(r)}sr(Ft,"isPrimitive",Tt),sr(Ft,"isObject",At);var jt=hr(Ft.isPrimitive),St=hr(Ft.isObject),Lt=hr(Ft);sr(Lt,"primitives",jt),sr(Lt,"objects",St);var kt=/./;function It(r){return"boolean"==typeof r}var Rt=Boolean,Bt=Boolean.prototype.toString;var Ot=t();function Mt(r){return"object"==typeof r&&(r instanceof Rt||(Ot?function(r){try{return Bt.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===u(r)))}function Ct(r){return It(r)||Mt(r)}sr(Ct,"isPrimitive",It),sr(Ct,"isObject",Mt);var Pt="object"==typeof self?self:null,Nt="object"==typeof window?window:null,Ut="object"==typeof global?global:null,Yt="object"==typeof globalThis?globalThis:null;var Wt=function(r){if(arguments.length){if(!It(r))throw new TypeError(rr("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(Yt)return Yt;if(Pt)return Pt;if(Nt)return Nt;if(Ut)return Ut;throw new Error("unexpected error. Unable to resolve global object.")}(),$t=Wt.document&&Wt.document.childNodes,Gt=Int8Array;var Zt="function"==typeof kt||"object"==typeof Gt||"function"==typeof $t?function(r){return mr(r).toLowerCase()}:function(r){var t;return null===r?"null":"object"===(t=typeof r)?mr(r).toLowerCase():t};function Xt(r){return"function"===Zt(r)}function Jt(r,t,e){fr(r,t,{configurable:!1,enumerable:!0,writable:!1,value:e})}function zt(r,t){if(!(this instanceof zt))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!rt(r))throw new TypeError(rr("invalid argument. Real component must be a number. Value: `%s`.",r));if(!rt(t))throw new TypeError(rr("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return Jt(this,"re",r),Jt(this,"im",t),this}sr(zt,"name","Complex128"),sr(zt,"BYTES_PER_ELEMENT",8),sr(zt.prototype,"BYTES_PER_ELEMENT",8),sr(zt.prototype,"byteLength",16),sr(zt.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),sr(zt.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var qt="function"==typeof Math.fround?Math.fround:null,Dt=new Vr(1);var Ht="function"==typeof qt?qt:function(r){return Dt[0]=r,Dt[0]};function Kt(r,t){if(!(this instanceof Kt))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!rt(r))throw new TypeError(rr("invalid argument. Real component must be a number. Value: `%s`.",r));if(!rt(t))throw new TypeError(rr("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return Jt(this,"re",Ht(r)),Jt(this,"im",Ht(t)),this}function Qt(r){return r instanceof zt||r instanceof Kt||"object"==typeof r&&null!==r&&"number"==typeof r.re&&"number"==typeof r.im}function re(r){return ft(r/2)}function te(){return"function"==typeof o&&"symbol"==typeof o("foo")&&i(o,"iterator")&&"symbol"==typeof o.iterator}sr(Kt,"name","Complex64"),sr(Kt,"BYTES_PER_ELEMENT",4),sr(Kt.prototype,"BYTES_PER_ELEMENT",4),sr(Kt.prototype,"byteLength",8),sr(Kt.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),sr(Kt.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var ee=te()?Symbol.iterator:null;function ne(r,t,e){fr(r,t,{configurable:!1,enumerable:!1,get:e})}function ie(r){return r.re}function oe(r){return r.im}function ae(r,t){return new Vr(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function ue(r,t){return new dr(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function fe(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(wt(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!Qt(n))return new TypeError(rr("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(ie(n),oe(n))}return t}var se=2*Vr.BYTES_PER_ELEMENT,le=te();function he(r){return r instanceof ye||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function ce(r){return r===ye||"Complex128Array"===r.name}function pe(r,t){return new Kt(r[t*=2],r[t+1])}function ye(){var r,t,e,n;if(t=arguments.length,!(this instanceof ye))return 0===t?new ye:1===t?new ye(arguments[0]):2===t?new ye(arguments[0],arguments[1]):new ye(arguments[0],arguments[1],arguments[2]);if(0===t)e=new Vr(0);else if(1===t)if(pt(arguments[0]))e=new Vr(2*arguments[0]);else if(bt(arguments[0]))if((n=(e=arguments[0]).length)&&lr(e)&&Qt(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!Qt(n=t[i]))return null;r[o]=ie(n),r[o+1]=oe(n),o+=2}return r}(new Vr(2*n),e),null===e){if(!re(n))throw new RangeError(rr("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Vr(arguments[0])}}else{if(p(e))e=ae(e,0);else if(h(e))e=ue(e,0);else if(!re(n))throw new RangeError(rr("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Vr(e)}else if(Et(arguments[0])){if(!ft((e=arguments[0]).byteLength/se))throw new RangeError(rr("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",se,e.byteLength));e=new Vr(e)}else{if(!_t(arguments[0]))throw new TypeError(rr("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===le)throw new TypeError(rr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!Xt(e[ee]))throw new TypeError(rr("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!Xt((e=e[ee]()).next))throw new TypeError(rr("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=fe(e))instanceof Error)throw e;e=new Vr(e)}else{if(!Et(e=arguments[0]))throw new TypeError(rr("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!pt(r=arguments[1]))throw new TypeError(rr("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!ft(r/se))throw new RangeError(rr("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",se,r));if(2===t){if(!ft((n=e.byteLength-r)/se))throw new RangeError(rr("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",se,n));e=new Vr(e,r)}else{if(!pt(n=arguments[2]))throw new TypeError(rr("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*se>e.byteLength-r)throw new RangeError(rr("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*se));e=new Vr(e,r,2*n)}}return sr(this,"_buffer",e),sr(this,"_length",e.length/2),this}function ge(r){return r.re}function me(r){return r.im}function we(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(wt(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!Qt(n))return new TypeError(rr("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(ge(n),me(n))}return t}sr(ye,"BYTES_PER_ELEMENT",se),sr(ye,"name","Complex64Array"),sr(ye,"from",(function(r){var t,e,n,i,o,a,u,f,s,l,h,c;if(!Xt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ce(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!Xt(n=arguments[1]))throw new TypeError(rr("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(he(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(Qt(l=n.call(t,r.get(h),h)))o[c]=ie(l),o[c+1]=oe(l);else{if(!(wt(l)&&l.length>=2))throw new TypeError(rr("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(r)}if(bt(r)){if(n){for(f=r.length,u=r.get&&r.set?_("default"):v("default"),h=0;h<f;h++)if(!Qt(u(r,h))){s=!0;break}if(s){if(!re(f))throw new RangeError(rr("invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.",2,f));for(o=(i=new this(f/2))._buffer,h=0;h<f;h++)o[h]=n.call(t,u(r,h),h);return i}for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(Qt(l=n.call(t,u(r,h),h)))o[c]=ie(l),o[c+1]=oe(l);else{if(!(wt(l)&&l.length>=2))throw new TypeError(rr("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(r)}if(_t(r)&&le&&Xt(r[ee])){if(!Xt((o=r[ee]()).next))throw new TypeError(rr("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,wt(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Qt(o))return new TypeError(rr("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(ie(o),oe(o))}return n}(o,n,t):fe(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h<f;h++)o[h]=a[h];return i}throw new TypeError(rr("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),sr(ye,"of",(function(){var r,t;if(!Xt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ce(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),sr(ye.prototype,"at",(function(r){if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ft(r))throw new TypeError(rr("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return pe(this._buffer,r)})),ne(ye.prototype,"buffer",(function(){return this._buffer.buffer})),ne(ye.prototype,"byteLength",(function(){return this._buffer.byteLength})),ne(ye.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),sr(ye.prototype,"BYTES_PER_ELEMENT",ye.BYTES_PER_ELEMENT),sr(ye.prototype,"copyWithin",(function(r,t){if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),sr(ye.prototype,"entries",(function(){var r,t,e,n,i,o;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,n=this._buffer,e=this._length,o=-1,sr(t={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,pe(n,o)],done:!1}})),sr(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ee&&sr(t,ee,(function(){return r.entries()})),t})),sr(ye.prototype,"every",(function(r,t){var e,n;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,pe(e,n),n,this))return!1;return!0})),sr(ye.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Qt(r))throw new TypeError(rr("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!ft(e))throw new TypeError(rr("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(a=ie(r),u=oe(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),sr(ye.prototype,"filter",(function(r,t){var e,n,i,o;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=pe(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),sr(ye.prototype,"find",(function(r,t){var e,n,i;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=pe(e,n),r.call(t,i,n,this))return i})),sr(ye.prototype,"findIndex",(function(r,t){var e,n,i;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=pe(e,n),r.call(t,i,n,this))return n;return-1})),sr(ye.prototype,"findLast",(function(r,t){var e,n,i;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=pe(e,n),r.call(t,i,n,this))return i})),sr(ye.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=pe(e,n),r.call(t,i,n,this))return n;return-1})),sr(ye.prototype,"forEach",(function(r,t){var e,n,i;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=pe(e,n),r.call(t,i,n,this)})),sr(ye.prototype,"get",(function(r){if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!pt(r))throw new TypeError(rr("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return pe(this._buffer,r)})),sr(ye.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Qt(r))throw new TypeError(rr("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=ie(r),o=oe(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),sr(ye.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Qt(r))throw new TypeError(rr("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=ie(r),o=oe(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),sr(ye.prototype,"join",(function(r){var t,e,n,i;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Tt(r))throw new TypeError(rr("invalid argument. First argument must be a string. Value: `%s`.",r));n=r}for(t=[],e=this._buffer,i=0;i<this._length;i++)t.push(pe(e,i).toString());return t.join(n)})),sr(ye.prototype,"keys",(function(){var r,t,e,n,i;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._length,i=-1,sr(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),sr(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ee&&sr(t,ee,(function(){return r.keys()})),t})),sr(ye.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Qt(r))throw new TypeError(rr("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(i=ie(r),o=oe(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),ne(ye.prototype,"length",(function(){return this._length})),sr(ye.prototype,"map",(function(r,t){var e,n,i,o,a;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(Qt(a=r.call(t,pe(n,o),o,this)))e[2*o]=ie(a),e[2*o+1]=oe(a);else{if(!wt(a)||2!==a.length)throw new TypeError(rr("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));e[2*o]=a[0],e[2*o+1]=a[1]}return i})),sr(ye.prototype,"reduce",(function(r,t){var e,n,i,o;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=pe(e,0),o=1}for(;o<i;o++)n=r(n,pe(e,o),o,this);return n})),sr(ye.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=i-1;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=pe(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,pe(e,o),o,this);return n})),sr(ye.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=ut(e/2),i=0;i<n;i++)o=e-i-1,t=r[2*i],r[2*i]=r[2*o],r[2*o]=t,t=r[2*i+1],r[2*i+1]=r[2*o+1],r[2*o+1]=t;return this})),sr(ye.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,s;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!pt(e=arguments[1]))throw new TypeError(rr("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Qt(r)){if(e>=this._length)throw new RangeError(rr("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=ie(r),void(n[e+1]=oe(r))}if(he(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,s=n.byteOffset+e*se,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new Vr(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,s=0,f=0;f<a;f++)n[e]=t[s],n[e+1]=t[s+1],e+=2,s+=2}else{if(!bt(r))throw new TypeError(rr("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",r));for(a=r.length,f=0;f<a;f++)if(!Qt(r[f])){o=!0;break}if(o){if(!re(a))throw new RangeError(rr("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(e+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,s=n.byteOffset+e*se,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new Vr(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,s=0,f=0;f<a;f++)n[e]=t[s],n[e+1]=t[s+1],e+=2,s+=2;return}if(e+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,f=0;f<a;f++)u=r[f],n[e]=ie(u),n[e+1]=oe(u),e+=2}})),sr(ye.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)r=0,t=u;else{if(!ft(r))throw new TypeError(rr("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=u)<0&&(r=0),1===arguments.length)t=u;else{if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=u)<0&&(t=0):t>u&&(t=u)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)o=2*(f+r),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),sr(ye.prototype,"some",(function(r,t){var e,n;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,pe(e,n),n,this))return!0;return!1})),sr(ye.prototype,"sort",(function(r){var t,e,n,i,o;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(pe(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=ie(t[i]),e[o+1]=oe(t[i]);return this})),sr(ye.prototype,"subarray",(function(r,t){var e,n,i;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!ft(r))throw new TypeError(rr("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*se):(i=t-r,e=n.byteOffset+r*se),new this.constructor(n.buffer,e,i<0?0:i)})),sr(ye.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Tt(r)&&!jt(r))throw new TypeError(rr("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!_t(t))throw new TypeError(rr("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(pe(o,a).toLocaleString(n,e));return i.join(",")})),sr(ye.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)o=e-i-1,r[2*i]=n[2*o],r[2*i+1]=n[2*o+1];return t})),sr(ye.prototype,"toSorted",(function(r){var t,e,n,i;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(pe(e,i));return t.sort(r),new ye(t)})),sr(ye.prototype,"toString",(function(){var r,t,e;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)r.push(pe(t,e).toString());return r.join(",")})),sr(ye.prototype,"values",(function(){var r,t,e,n,i,o;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,i=this._buffer,e=this._length,o=-1,sr(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:pe(i,o),done:!1}})),sr(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ee&&sr(r,ee,(function(){return t.values()})),r})),sr(ye.prototype,"with",(function(r,t){var e,n,i;if(!he(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ft(r))throw new TypeError(rr("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(rr("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Qt(t))throw new TypeError(rr("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=ie(t),e[2*r+1]=oe(t),n}));var ve=2*dr.BYTES_PER_ELEMENT,be=te();function de(r){return r instanceof Te||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ee(r){return r===Te||"Complex64Array"===r.name}function _e(r,t){return new zt(r[t*=2],r[t+1])}function Te(){var r,t,e,n;if(t=arguments.length,!(this instanceof Te))return 0===t?new Te:1===t?new Te(arguments[0]):2===t?new Te(arguments[0],arguments[1]):new Te(arguments[0],arguments[1],arguments[2]);if(0===t)e=new dr(0);else if(1===t)if(pt(arguments[0]))e=new dr(2*arguments[0]);else if(bt(arguments[0]))if((n=(e=arguments[0]).length)&&lr(e)&&Qt(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!Qt(n=t[i]))return null;r[o]=ge(n),r[o+1]=me(n),o+=2}return r}(new dr(2*n),e),null===e){if(!re(n))throw new RangeError(rr("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new dr(arguments[0])}}else{if(p(e))e=ae(e,0);else if(h(e))e=ue(e,0);else if(!re(n))throw new RangeError(rr("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new dr(e)}else if(Et(arguments[0])){if(!ft((e=arguments[0]).byteLength/ve))throw new RangeError(rr("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",ve,e.byteLength));e=new dr(e)}else{if(!_t(arguments[0]))throw new TypeError(rr("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===be)throw new TypeError(rr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!Xt(e[ee]))throw new TypeError(rr("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!Xt((e=e[ee]()).next))throw new TypeError(rr("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=we(e))instanceof Error)throw e;e=new dr(e)}else{if(!Et(e=arguments[0]))throw new TypeError(rr("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!pt(r=arguments[1]))throw new TypeError(rr("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!ft(r/ve))throw new RangeError(rr("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",ve,r));if(2===t){if(!ft((n=e.byteLength-r)/ve))throw new RangeError(rr("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",ve,n));e=new dr(e,r)}else{if(!pt(n=arguments[2]))throw new TypeError(rr("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*ve>e.byteLength-r)throw new RangeError(rr("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*ve));e=new dr(e,r,2*n)}}return sr(this,"_buffer",e),sr(this,"_length",e.length/2),this}function xe(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(Rt(e.value));return t}sr(Te,"BYTES_PER_ELEMENT",ve),sr(Te,"name","Complex128Array"),sr(Te,"from",(function(r){var t,e,n,i,o,a,u,f,s,l,h,c;if(!Xt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ee(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!Xt(n=arguments[1]))throw new TypeError(rr("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(de(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(Qt(l=n.call(t,r.get(h),h)))o[c]=ge(l),o[c+1]=me(l);else{if(!(wt(l)&&l.length>=2))throw new TypeError(rr("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(r)}if(bt(r)){if(n){for(f=r.length,u=r.get&&r.set?_("default"):v("default"),h=0;h<f;h++)if(!Qt(u(r,h))){s=!0;break}if(s){if(!re(f))throw new RangeError(rr("invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.",f));for(o=(i=new this(f/2))._buffer,h=0;h<f;h++)o[h]=n.call(t,u(r,h),h);return i}for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(Qt(l=n.call(t,u(r,h),h)))o[c]=ge(l),o[c+1]=me(l);else{if(!(wt(l)&&l.length>=2))throw new TypeError(rr("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(r)}if(_t(r)&&be&&Xt(r[ee])){if(!Xt((o=r[ee]()).next))throw new TypeError(rr("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,wt(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Qt(o))return new TypeError(rr("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(ge(o),me(o))}return n}(o,n,t):we(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h<f;h++)o[h]=a[h];return i}throw new TypeError(rr("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),sr(Te,"of",(function(){var r,t;if(!Xt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ee(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),sr(Te.prototype,"at",(function(r){if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ft(r))throw new TypeError(rr("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return _e(this._buffer,r)})),ne(Te.prototype,"buffer",(function(){return this._buffer.buffer})),ne(Te.prototype,"byteLength",(function(){return this._buffer.byteLength})),ne(Te.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),sr(Te.prototype,"BYTES_PER_ELEMENT",Te.BYTES_PER_ELEMENT),sr(Te.prototype,"copyWithin",(function(r,t){if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),sr(Te.prototype,"entries",(function(){var r,t,e,n,i,o,a;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,o=-1,a=-2,sr(e={},"next",(function(){var t;if(o+=1,i||o>=n)return{done:!0};return t=new zt(r[a+=2],r[a+1]),{value:[o,t],done:!1}})),sr(e,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ee&&sr(e,ee,(function(){return t.entries()})),e})),sr(Te.prototype,"every",(function(r,t){var e,n;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,_e(e,n),n,this))return!1;return!0})),sr(Te.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Qt(r))throw new TypeError(rr("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!ft(e))throw new TypeError(rr("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(a=ge(r),u=me(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),sr(Te.prototype,"filter",(function(r,t){var e,n,i,o;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=_e(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),sr(Te.prototype,"find",(function(r,t){var e,n,i;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=_e(e,n),r.call(t,i,n,this))return i})),sr(Te.prototype,"findIndex",(function(r,t){var e,n,i;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=_e(e,n),r.call(t,i,n,this))return n;return-1})),sr(Te.prototype,"findLast",(function(r,t){var e,n,i;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=_e(e,n),r.call(t,i,n,this))return i})),sr(Te.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=_e(e,n),r.call(t,i,n,this))return n;return-1})),sr(Te.prototype,"forEach",(function(r,t){var e,n,i;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=_e(e,n),r.call(t,i,n,this)})),sr(Te.prototype,"get",(function(r){if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!pt(r))throw new TypeError(rr("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return _e(this._buffer,r)})),ne(Te.prototype,"length",(function(){return this._length})),sr(Te.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Qt(r))throw new TypeError(rr("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=ge(r),o=me(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),sr(Te.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Qt(r))throw new TypeError(rr("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=ge(r),o=me(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),sr(Te.prototype,"join",(function(r){var t,e,n,i;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Ft(r))throw new TypeError(rr("invalid argument. First argument must be a string. Value: `%s`.",r));n=r}for(t=[],e=this._buffer,i=0;i<this._length;i++)t.push(_e(e,i).toString());return t.join(n)})),sr(Te.prototype,"keys",(function(){var r,t,e,n,i;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._length,i=-1,sr(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),sr(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ee&&sr(t,ee,(function(){return r.keys()})),t})),sr(Te.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Qt(r))throw new TypeError(rr("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(i=ge(r),o=me(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),sr(Te.prototype,"map",(function(r,t){var e,n,i,o,a;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(Qt(a=r.call(t,_e(n,o),o,this)))e[2*o]=ge(a),e[2*o+1]=me(a);else{if(!wt(a)||2!==a.length)throw new TypeError(rr("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));e[2*o]=a[0],e[2*o+1]=a[1]}return i})),sr(Te.prototype,"reduce",(function(r,t){var e,n,i,o;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=_e(e,0),o=1}for(;o<i;o++)n=r(n,_e(e,o),o,this);return n})),sr(Te.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=i-1;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=_e(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,_e(e,o),o,this);return n})),sr(Te.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=ut(e/2),i=0;i<n;i++)o=e-i-1,t=r[2*i],r[2*i]=r[2*o],r[2*o]=t,t=r[2*i+1],r[2*i+1]=r[2*o+1],r[2*o+1]=t;return this})),sr(Te.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,s;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!pt(e=arguments[1]))throw new TypeError(rr("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Qt(r)){if(e>=this._length)throw new RangeError(rr("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=ge(r),void(n[e+1]=me(r))}if(de(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,s=n.byteOffset+e*ve,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new dr(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,s=0,f=0;f<a;f++)n[e]=t[s],n[e+1]=t[s+1],e+=2,s+=2}else{if(!bt(r))throw new TypeError(rr("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",r));for(a=r.length,f=0;f<a;f++)if(!Qt(r[f])){o=!0;break}if(o){if(!re(a))throw new RangeError(rr("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(e+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,s=n.byteOffset+e*ve,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new dr(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,s=0,f=0;f<a;f++)n[e]=t[s],n[e+1]=t[s+1],e+=2,s+=2;return}if(e+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,f=0;f<a;f++)u=r[f],n[e]=ge(u),n[e+1]=me(u),e+=2}})),sr(Te.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)r=0,t=u;else{if(!ft(r))throw new TypeError(rr("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=u)<0&&(r=0),1===arguments.length)t=u;else{if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=u)<0&&(t=0):t>u&&(t=u)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)o=2*(f+r),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),sr(Te.prototype,"some",(function(r,t){var e,n;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,_e(e,n),n,this))return!0;return!1})),sr(Te.prototype,"sort",(function(r){var t,e,n,i,o;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(_e(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=ge(t[i]),e[o+1]=me(t[i]);return this})),sr(Te.prototype,"subarray",(function(r,t){var e,n,i;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!ft(r))throw new TypeError(rr("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!ft(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*ve):(i=t-r,e=n.byteOffset+r*ve),new this.constructor(n.buffer,e,i<0?0:i)})),sr(Te.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Ft(r)&&!jt(r))throw new TypeError(rr("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!_t(t))throw new TypeError(rr("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(_e(o,a).toLocaleString(n,e));return i.join(",")})),sr(Te.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)o=e-i-1,r[2*i]=n[2*o],r[2*i+1]=n[2*o+1];return t})),sr(Te.prototype,"toSorted",(function(r){var t,e,n,i;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(_e(e,i));return t.sort(r),new Te(t)})),sr(Te.prototype,"toString",(function(){var r,t,e;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)r.push(_e(t,e).toString());return r.join(",")})),sr(Te.prototype,"values",(function(){var r,t,e,n,i,o;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,i=this._buffer,e=this._length,o=-1,sr(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:_e(i,o),done:!1}})),sr(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ee&&sr(r,ee,(function(){return t.values()})),r})),sr(Te.prototype,"with",(function(r,t){var e,n,i;if(!de(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ft(r))throw new TypeError(rr("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(rr("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Qt(t))throw new TypeError(rr("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=ge(t),e[2*r+1]=me(t),n}));var Ve=Zr.BYTES_PER_ELEMENT,Ae=te();function Fe(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===Ve}function je(r){return r===Se}function Se(){var r,t,e,n,i;if(t=arguments.length,!(this instanceof Se))return 0===t?new Se:1===t?new Se(arguments[0]):2===t?new Se(arguments[0],arguments[1]):new Se(arguments[0],arguments[1],arguments[2]);if(0===t)e=new Zr(0);else if(1===t)if(pt(i=arguments[0]))e=new Zr(i);else if(bt(i))e=function(r,t){var e,n;for(e=t.length,n=0;n<e;n++)r[n]=Rt(t[n]);return r}(new Zr(i.length),i);else if(Et(i))e=new Zr(i);else{if(!_t(i))throw new TypeError(rr("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===Ae)throw new TypeError(rr("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!Xt(i[ee]))throw new TypeError(rr("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!Xt((e=i[ee]()).next))throw new TypeError(rr("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));e=new Zr(xe(e))}else{if(!Et(e=arguments[0]))throw new TypeError(rr("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!pt(r=arguments[1]))throw new TypeError(rr("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===t)e=new Zr(e,r);else{if(!pt(n=arguments[2]))throw new TypeError(rr("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Ve>e.byteLength-r)throw new RangeError(rr("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Ve));e=new Zr(e,r,n)}}return sr(this,"_buffer",e),sr(this,"_length",e.length),this}sr(Se,"BYTES_PER_ELEMENT",Ve),sr(Se,"name","BooleanArray"),sr(Se,"from",(function(r){var t,e,n,i,o,a,u,f,s;if(!Xt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!Xt(n=arguments[1]))throw new TypeError(rr("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(bt(r)){if(n){for(f=r.length,u=r.get&&r.set?_("default"):v("default"),o=(i=new this(f))._buffer,s=0;s<f;s++)o[s]=Rt(n.call(t,u(r,s),s));return i}return new this(r)}if(_t(r)&&Ae&&Xt(r[ee])){if(!Xt((o=r[ee]()).next))throw new TypeError(rr("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));for(a=n?function(r,t,e){var n,i,o;for(n=[],o=-1;!(i=r.next()).done;)o+=1,n.push(Rt(t.call(e,i.value,o)));return n}(o,n,t):xe(o),o=(i=new this(f=a.length))._buffer,s=0;s<f;s++)o[s]=a[s];return i}throw new TypeError(rr("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),sr(Se,"of",(function(){var r,t;if(!Xt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!je(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),sr(Se.prototype,"at",(function(r){var t,e;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!lt(r))throw new TypeError(rr("invalid argument. Must provide an integer. Value: `%s`.",r));if(e=this._length,t=this._buffer,r<0&&(r+=e),!(r<0||r>=e))return Rt(t[r])})),ne(Se.prototype,"buffer",(function(){return this._buffer.buffer})),ne(Se.prototype,"byteLength",(function(){return this._buffer.byteLength})),ne(Se.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),sr(Se.prototype,"BYTES_PER_ELEMENT",Se.BYTES_PER_ELEMENT),sr(Se.prototype,"copyWithin",(function(r,t){if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return 2===arguments.length?this._buffer.copyWithin(r,t):this._buffer.copyWithin(r,t,arguments[2]),this})),sr(Se.prototype,"entries",(function(){var r,t,e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,n=this._buffer,e=this._length,o=-1,sr(t={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,Rt(n[o])],done:!1}})),sr(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ee&&sr(t,ee,(function(){return r.entries()})),t})),sr(Se.prototype,"every",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,Rt(e[n]),n,this))return!1;return!0})),sr(Se.prototype,"fill",(function(r,t,e){var n,i,o,a;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!It(r))throw new TypeError(rr("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!lt(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!lt(e))throw new TypeError(rr("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(o=r?1:0,a=t;a<e;a++)n[a]=o;return this})),sr(Se.prototype,"filter",(function(r,t){var e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Rt(e[i]),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),sr(Se.prototype,"find",(function(r,t){var e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=Rt(e[i]),r.call(t,n,i,this))return n})),sr(Se.prototype,"findIndex",(function(r,t){var e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=Rt(e[i]),r.call(t,n,i,this))return i;return-1})),sr(Se.prototype,"findLast",(function(r,t){var e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Rt(e[i]),r.call(t,n,i,this))return n})),sr(Se.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Rt(e[i]),r.call(t,n,i,this))return i;return-1})),sr(Se.prototype,"forEach",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)r.call(t,Rt(e[n]),n,this)})),sr(Se.prototype,"get",(function(r){if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!pt(r))throw new TypeError(rr("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Rt(this._buffer[r])})),sr(Se.prototype,"includes",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!It(r))throw new TypeError(rr("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!lt(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(e=this._buffer,n=t;n<this._length;n++)if(r===Rt(e[n]))return!0;return!1})),sr(Se.prototype,"indexOf",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!It(r))throw new TypeError(rr("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!lt(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(e=this._buffer,n=t;n<this._length;n++)if(r===Rt(e[n]))return n;return-1})),sr(Se.prototype,"join",(function(r){var t,e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!Tt(r))throw new TypeError(rr("invalid argument. First argument must be a string. Value: `%s`.",r))}else r=",";for(t=this._buffer,e=[],n=0;n<this._length;n++)t[n]?e.push("true"):e.push("false");return e.join(r)})),sr(Se.prototype,"keys",(function(){var r,t,e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,e=this._length,i=-1,sr(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),sr(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ee&&sr(t,ee,(function(){return r.keys()})),t})),sr(Se.prototype,"lastIndexOf",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!It(r))throw new TypeError(rr("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!lt(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(e=this._buffer,n=t;n>=0;n--)if(r===Rt(e[n]))return n;return-1})),ne(Se.prototype,"length",(function(){return this._length})),sr(Se.prototype,"map",(function(r,t){var e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",r);for(i=this._buffer,e=(n=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)e[o]=Rt(r.call(t,Rt(i[o]),o,this));return n})),sr(Se.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,n=this._length,arguments.length>1)i=t,o=0;else{if(0===n)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=Rt(e[0]),o=1}for(;o<n;o++)i=r(i,Rt(e[o]),o,this);return i})),sr(Se.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,n=this._length,arguments.length>1)i=t,o=n-1;else{if(0===n)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=Rt(e[n-1]),o=n-2}for(;o>=0;o--)i=r(i,Rt(e[o]),o,this);return i})),sr(Se.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._buffer,e=this._length,n=ut(e/2),i=0;i<n;i++)o=e-i-1,t=r[i],r[i]=r[o],r[o]=t;return this})),sr(Se.prototype,"set",(function(r){var t,e,n,i,o,a,u;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!pt(e=arguments[1]))throw new TypeError(rr("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(bt(r)){if(e+(o=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=Fe(r)?r._buffer:r,u=n.byteOffset+e*Ve,t.buffer===n.buffer&&t.byteOffset<u&&t.byteOffset+t.byteLength>u){for(i=new Zr(t.length),a=0;a<t.length;a++)i[a]=t[a];t=i}for(a=0;a<o;e++,a++)n[e]=t[a]?1:0}else{if(e>=this._length)throw new RangeError(rr("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=r?1:0}})),sr(Se.prototype,"slice",(function(r,t){var e,n,i,o,a,u;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(o=this._buffer,a=this._length,0===arguments.length)r=0,t=a;else{if(!lt(r))throw new TypeError(rr("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=a)<0&&(r=0),1===arguments.length)t=a;else{if(!lt(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=a)<0&&(t=0):t>a&&(t=a)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,u=0;u<e;u++)n[u]=o[u+r];return i})),sr(Se.prototype,"some",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,Rt(e[n]),n,this))return!0;return!1})),sr(Se.prototype,"sort",(function(r){var t;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(t=this._buffer,0===arguments.length)return t.sort(),this;if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Rt(t),Rt(e))})),this})),sr(Se.prototype,"subarray",(function(r,t){var e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!lt(r))throw new TypeError(rr("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!lt(t))throw new TypeError(rr("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*Ve):(i=t-r,e=n.byteOffset+r*Ve),new this.constructor(n.buffer,e,i<0?0:i)})),sr(Se.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!Tt(r)&&!jt(r))throw new TypeError(rr("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!_t(t))throw new TypeError(rr("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Rt(o[a]).toLocaleString(n,e));return i.join(",")})),sr(Se.prototype,"toReversed",(function(){var r,t,e,n,i;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)r[i]=n[e-i-1];return t})),sr(Se.prototype,"toSorted",(function(r){var t,e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(n=this._length,e=new this.constructor(n),i=this._buffer,t=e._buffer,o=0;o<n;o++)t[o]=i[o];if(0===arguments.length)return t.sort(),e;if(!Xt(r))throw new TypeError(rr("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Rt(t),Rt(e))})),e})),sr(Se.prototype,"toString",(function(){var r,t,e;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)t[e]?r.push("true"):r.push("false");return r.join(",")})),sr(Se.prototype,"values",(function(){var r,t,e,n,i,o;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,i=this._buffer,e=this._length,o=-1,sr(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:Rt(i[o]),done:!1}})),sr(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ee&&sr(r,ee,(function(){return t.values()})),r})),sr(Se.prototype,"with",(function(r,t){var e,n;if(!Fe(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!lt(r))throw new TypeError(rr("invalid argument. First argument must be an integer. Value: `%s`.",r));if(n=this._length,r<0&&(r+=n),r<0||r>=n)throw new RangeError(rr("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!It(t))throw new TypeError(rr("invalid argument. Second argument must be a boolean. Value: `%s`.",t));return(e=new this.constructor(this._buffer))._buffer[r]=t?1:0,e}));var Le=[dr,Vr,Rr,Sr,Yr,Cr,Qr,Zr,qr,ye,Te,Se],ke=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],Ie=ke.length;function Re(r){var t,e=function(r){var t;if(lr(r))return"generic";if(pr(r))return null;for(t=0;t<Ie;t++)if(r instanceof Le[t])return ke[t];return wr[mr(r)]||null}(r);return typeof(t=r).get===m&&typeof t.set===m?{data:r,dtype:e,accessorProtocol:!0,accessors:[_(e),x(e)]}:{data:r,dtype:e,accessorProtocol:!1,accessors:[v(e),d(e)]}}function Be(r,t){return new Zr(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,r.length-t)}function Oe(r,t){return r===t?0!==r||1/r==1/t:r!=r&&t!=t}function Me(r){var t=new dr(2);return t[0]=r.re,t[1]=r.im,t}function Ce(r,t){return r===t?0!==r||1/r==1/t:r!=r&&t!=t||!(!Qt(r)||!Qt(t))&&(e=t,n=Me(r),i=Me(e),Oe(n[0],i[0])&&Oe(n[1],i[1]));var e,n,i}function Pe(r,t){var e;for(e=0;e<r.length;e++)if(!Ce(r[e],t[e]))return!1;return!0}function Ne(r,t){var e,n,i,o,a;for(e=r.data,n=t.data,i=r.accessors[0],o=t.accessors[0],a=0;a<e.length;a++)if(!Ce(i(e,a),o(n,a)))return!1;return!0}return function(r,t){return s(r)&&s(t)&&function(r,t){var e,n,i,o,a;return r.length===t.length&&(n=Re(r),i=Re(t),n.accessorProtocol||i.accessorProtocol?(e=2,g(r)?g(t)?Pe(Be(r,0),Be(t,0)):Ne(n,i):(h(r)?(o=ue(r,0),e-=1):p(r)&&(o=ae(r,0),e-=1),h(t)?(a=ue(t,0),e-=1):p(t)&&(a=ae(t,0),e-=1),0===e?Pe(o,a):Ne(n,i))):Pe(r,t))}(r,t)}}));
//# sourceMappingURL=index.js.map