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