-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmod.js
More file actions
4 lines (4 loc) · 90.8 KB
/
Copy pathmod.js
File metadata and controls
4 lines (4 loc) · 90.8 KB
1
2
3
4
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
/// <reference types="./mod.d.ts" />
function r(r){var t,e,n;for(e=r.length,t=[],n=0;n<e;n++)t.push(r[n]);return t}function t(t,e){var n=t.shape;return e?r(n):n}var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var n=Object.defineProperty;function i(r){return"number"==typeof r}function o(r){var t,e="";for(t=0;t<r;t++)e+="0";return e}function a(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+o(i):o(i)+r,n&&(r="-"+r)),r}var u=String.prototype.toLowerCase,f=String.prototype.toUpperCase;function s(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(!i(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=a(e,r.precision,r.padRight)),e="-"+e):(e=n.toString(t),n||r.precision?r.precision&&(e=a(e,r.precision,r.padRight)):e="",r.sign&&(e=r.sign+e)),16===t&&(r.alternate&&(e="0x"+e),e=r.specifier===f.call(r.specifier)?f.call(e):u.call(e)),8===t&&r.alternate&&"0"!==e.charAt(0)&&(e="0"+e),e}var l=Math.abs,h=String.prototype.toLowerCase,c=String.prototype.toUpperCase,p=String.prototype.replace,g=/e\+(\d)$/,y=/e-(\d)$/,m=/^(\d+)$/,v=/^(\d+)e/,w=/\.0$/,b=/\.0*e/,d=/(\..*[^0])0*e/;function E(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":l(r)<1e-4?((e=t.precision)>0&&(e-=1),n=r.toExponential(e)):n=r.toPrecision(t.precision),t.alternate||(n=p.call(n,d,"$1e"),n=p.call(n,b,"e"),n=p.call(n,w,""));break;default:throw new Error("invalid double notation. Value: "+t.specifier)}return n=p.call(n,g,"e+0$1"),n=p.call(n,y,"e-0$1"),t.alternate&&(n=p.call(n,m,"$1."),n=p.call(n,v,"$1.e")),r>=0&&t.sign&&(n=t.sign+n),n=t.specifier===c.call(t.specifier)?c.call(n):h.call(n)}function _(r){var t,e="";for(t=0;t<r;t++)e+=" ";return e}var T=String.fromCharCode,x=Array.isArray;function V(r){return r!=r}function j(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 A(r){var t,e,n,o,u,f,l,h,c,p,g,y,m,v;if(!x(r))throw new TypeError("invalid argument. First argument must be an array. Value: `"+r+"`.");for(f="",l=1,c=0;c<r.length;c++)if(n=r[c],"string"==typeof n)f+=n;else{if(t=void 0!==n.precision,!(n=j(n)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+c+"`. Value: `"+n+"`.");for(n.mapping&&(l=n.mapping),e=n.flags,p=0;p<e.length;p++)switch(o=e.charAt(p)){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: "+o)}if("*"===n.width){if(n.width=parseInt(arguments[l],10),l+=1,V(n.width))throw new TypeError("the argument for * width at position "+l+" 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[l],10),l+=1,V(n.precision))throw new TypeError("the argument for * precision at position "+l+" is not a number. Value: `"+n.precision+"`.");n.precision<0&&(n.precision=1,t=!1)}switch(n.arg=arguments[l],n.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":t&&(n.padZeros=!1),n.arg=s(n);break;case"s":n.maxWidth=t?n.precision:-1,n.arg=String(n.arg);break;case"c":if(!V(n.arg)){if((u=parseInt(n.arg,10))<0||u>127)throw new Error("invalid character code. Value: "+n.arg);n.arg=V(u)?String(n.arg):T(u)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(t||(n.precision=6),h=parseFloat(n.arg),!isFinite(h)){if(!i(n.arg))throw new Error("invalid floating-point number. Value: "+f);h=n.arg,n.padZeros=!1}n.arg=E(h,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=a(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(g=n.arg,y=n.width,m=n.padRight,v=void 0,(v=y-g.length)<0?g:g=m?g+_(v):_(v)+g)),f+=n.arg||"",l+=1}return f}var S=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function F(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 O(r){var t,e,n,i;for(e=[],i=0,n=S.exec(r);n;)(t=r.slice(i,S.lastIndex-n[0].length)).length&&e.push(t),"%"===n[6]?e.push("%"):e.push(F(n)),i=S.lastIndex,n=S.exec(r);return(t=r.slice(i)).length&&e.push(t),e}function L(r){var t,e;if("string"!=typeof r)throw new TypeError(L("invalid argument. First argument must be a string. Value: `%s`.",r));for(t=[O(r)],e=1;e<arguments.length;e++)t.push(arguments[e]);return A.apply(null,t)}var k,I=Object.prototype,R=I.toString,B=I.__defineGetter__,M=I.__defineSetter__,C=I.__lookupGetter__,P=I.__lookupSetter__;k=function(){try{return e({},"x",{}),!0}catch(r){return!1}}()?n:function(r,t,e){var n,i,o,a;if("object"!=typeof r||null===r||"[object Array]"===R.call(r))throw new TypeError(L("invalid argument. First argument must be an object. Value: `%s`.",r));if("object"!=typeof e||null===e||"[object Array]"===R.call(e))throw new TypeError(L("invalid argument. Property descriptor must be an object. Value: `%s`.",e));if((i="value"in e)&&(C.call(r,t)||P.call(r,t)?(n=r.__proto__,r.__proto__=I,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&&B&&B.call(r,t,e.get),a&&M&&M.call(r,t,e.set),r};var N=k;function U(r,t,e){N(r,t,{configurable:!1,enumerable:!1,writable:!1,value:e})}function Y(r){return"string"==typeof r}var W="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function Z(){return W&&"symbol"==typeof Symbol.toStringTag}var $=Object.prototype.toString;var q=Object.prototype.hasOwnProperty;function z(r,t){return null!=r&&q.call(r,t)}var G="function"==typeof Symbol?Symbol:void 0,K="function"==typeof G?G.toStringTag:"";var X=Z()?function(r){var t,e,n;if(null==r)return $.call(r);e=r[K],t=z(r,K);try{r[K]=void 0}catch(t){return $.call(r)}return n=$.call(r),t?r[K]=e:delete r[K],n}:function(r){return $.call(r)},D=String.prototype.valueOf;var J=Z();function H(r){return"object"==typeof r&&(r instanceof String||(J?function(r){try{return D.call(r),!0}catch(r){return!1}}(r):"[object String]"===X(r)))}function Q(r){return Y(r)||H(r)}function rr(r){return"column-major"===r}function tr(r,t){return rr(t)?function(r){var t,e,n;for(t=[],e=1,n=0;n<r.length;n++)t.push(e),e*=r[n];return t}(r):function(r){var t,e,n,i;for(t=r.length,e=[],i=0;i<t;i++)e.push(0);for(n=1,i=t-1;i>=0;i--)e[i]=n,n*=r[i];return e}(r)}U(Q,"isPrimitive",Y),U(Q,"isObject",H),U(tr,"assign",(function(r,t,e){return rr(t)?function(r,t){var e,n;for(e=1,n=0;n<r.length;n++)t[n]=e,e*=r[n];return t}(r,e):function(r,t){var e,n;for(e=1,n=r.length-1;n>=0;n--)t[n]=e,e*=r[n];return t}(r,e)}));var er="row-major";function nr(t,e){var n,i,o;return"object"!=typeof(o=t.strides)||null===o?0===(i=t.shape).length?[0]:(Y(n=t.order)||(n=er),tr(i,n)):e?r(o):o}function ir(r){return"number"==typeof r}var or=Number,ar=or.prototype.toString;var ur=Z();function fr(r){return"object"==typeof r&&(r instanceof or||(ur?function(r){try{return ar.call(r),!0}catch(r){return!1}}(r):"[object Number]"===X(r)))}function sr(r){return ir(r)||fr(r)}function lr(r){var t,e,n;return ir(n=r.offset)?n:0===(e=r.shape).length||"object"!=typeof(t=r.strides)||null===t?0:function(r,t){var e,n,i;for(n=r.length,e=0,i=0;i<n;i++)t[i]<0&&(e-=t[i]*(r[i]-1));return e}(e,t)}function hr(r){return r.data}U(sr,"isPrimitive",ir),U(sr,"isObject",fr);var cr="function";function pr(r){return typeof r.get===cr&&typeof r.set===cr}var gr={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 yr(r){var t=gr[r];return"function"==typeof t?t:gr.default}var mr={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 vr(r){var t=mr[r];return"function"==typeof t?t:mr.default}var wr=Array.isArray?Array.isArray:function(r){return"[object Array]"===X(r)};function br(r){if("function"!=typeof r)throw new TypeError(L("invalid argument. Must provide a function. Value: `%s`.",r));return function(t){var e,n;if(!wr(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 dr(r){return null!==r&&"object"==typeof r}function Er(r){return dr(r)&&(r._isBuffer||r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r))}function _r(){return/^\s*function\s*([^(]*)/i}U(dr,"isObjectLikeArray",br(dr));var Tr=/^\s*function\s*([^(]*)/i;function xr(r){var t,e,n;if(("Object"===(e=X(r).slice(8,-1))||"Error"===e)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(t=Tr.exec(n.toString()))return t[1]}return Er(r)?"Buffer":e}U(_r,"REGEXP",Tr);var Vr={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"},jr="function"==typeof Float64Array;var Ar="function"==typeof Float64Array?Float64Array:null;var Sr,Fr="function"==typeof Float64Array?Float64Array:void 0;Sr=function(){var r,t,e;if("function"!=typeof Ar)return!1;try{t=new Ar([1,3.14,-3.14,NaN]),e=t,r=(jr&&e instanceof Float64Array||"[object Float64Array]"===X(e))&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){r=!1}return r}()?Fr:function(){throw new Error("not implemented")};var Or=Sr,Lr="function"==typeof Float32Array;var kr=Number.POSITIVE_INFINITY,Ir="function"==typeof Float32Array?Float32Array:null;var Rr,Br="function"==typeof Float32Array?Float32Array:void 0;Rr=function(){var r,t,e;if("function"!=typeof Ir)return!1;try{t=new Ir([1,3.14,-3.14,5e40]),e=t,r=(Lr&&e instanceof Float32Array||"[object Float32Array]"===X(e))&&1===t[0]&&3.140000104904175===t[1]&&-3.140000104904175===t[2]&&t[3]===kr}catch(t){r=!1}return r}()?Br:function(){throw new Error("not implemented")};var Mr=Rr,Cr="function"==typeof Uint32Array;var Pr=4294967295,Nr="function"==typeof Uint32Array?Uint32Array:null;var Ur,Yr="function"==typeof Uint32Array?Uint32Array:void 0;Ur=function(){var r,t,e;if("function"!=typeof Nr)return!1;try{t=new Nr(t=[1,3.14,-3.14,4294967296,4294967297]),e=t,r=(Cr&&e instanceof Uint32Array||"[object Uint32Array]"===X(e))&&1===t[0]&&3===t[1]&&4294967293===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?Yr:function(){throw new Error("not implemented")};var Wr=Ur,Zr="function"==typeof Int32Array;var $r="function"==typeof Int32Array?Int32Array:null;var qr,zr="function"==typeof Int32Array?Int32Array:void 0;qr=function(){var r,t,e;if("function"!=typeof $r)return!1;try{t=new $r([1,3.14,-3.14,2147483648]),e=t,r=(Zr&&e instanceof Int32Array||"[object Int32Array]"===X(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-2147483648===t[3]}catch(t){r=!1}return r}()?zr:function(){throw new Error("not implemented")};var Gr=qr,Kr="function"==typeof Uint16Array;var Xr="function"==typeof Uint16Array?Uint16Array:null;var Dr,Jr="function"==typeof Uint16Array?Uint16Array:void 0;Dr=function(){var r,t,e;if("function"!=typeof Xr)return!1;try{t=new Xr(t=[1,3.14,-3.14,65536,65537]),e=t,r=(Kr&&e instanceof Uint16Array||"[object Uint16Array]"===X(e))&&1===t[0]&&3===t[1]&&65533===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?Jr:function(){throw new Error("not implemented")};var Hr=Dr,Qr="function"==typeof Int16Array;var rt="function"==typeof Int16Array?Int16Array:null;var tt,et="function"==typeof Int16Array?Int16Array:void 0;tt=function(){var r,t,e;if("function"!=typeof rt)return!1;try{t=new rt([1,3.14,-3.14,32768]),e=t,r=(Qr&&e instanceof Int16Array||"[object Int16Array]"===X(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-32768===t[3]}catch(t){r=!1}return r}()?et:function(){throw new Error("not implemented")};var nt=tt,it="function"==typeof Uint8Array;var ot="function"==typeof Uint8Array?Uint8Array:null;var at,ut="function"==typeof Uint8Array?Uint8Array:void 0;at=function(){var r,t,e;if("function"!=typeof ot)return!1;try{t=new ot(t=[1,3.14,-3.14,256,257]),e=t,r=(it&&e instanceof Uint8Array||"[object Uint8Array]"===X(e))&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?ut:function(){throw new Error("not implemented")};var ft=at,st="function"==typeof Uint8ClampedArray;var lt="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var ht,ct="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;ht=function(){var r,t,e;if("function"!=typeof lt)return!1;try{t=new lt([-1,0,1,3.14,4.99,255,256]),e=t,r=(st&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===X(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}()?ct:function(){throw new Error("not implemented")};var pt=ht,gt="function"==typeof Int8Array;var yt="function"==typeof Int8Array?Int8Array:null;var mt,vt="function"==typeof Int8Array?Int8Array:void 0;mt=function(){var r,t,e;if("function"!=typeof yt)return!1;try{t=new yt([1,3.14,-3.14,128]),e=t,r=(gt&&e instanceof Int8Array||"[object Int8Array]"===X(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-128===t[3]}catch(t){r=!1}return r}()?vt:function(){throw new Error("not implemented")};var wt=mt,bt=or.NEGATIVE_INFINITY,dt=Math.floor;function Et(r){return dt(r)===r}function _t(r){return r<kr&&r>bt&&Et(r)}function Tt(r){return ir(r)&&_t(r)}function xt(r){return fr(r)&&_t(r.valueOf())}function Vt(r){return Tt(r)||xt(r)}function jt(r){return Tt(r)&&r>=0}function At(r){return xt(r)&&r.valueOf()>=0}function St(r){return jt(r)||At(r)}U(Vt,"isPrimitive",Tt),U(Vt,"isObject",xt),U(St,"isPrimitive",jt),U(St,"isObject",At);var Ft=4294967295;function Ot(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Et(r.length)&&r.length>=0&&r.length<=Ft}var Lt=9007199254740991;function kt(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Et(r.length)&&r.length>=0&&r.length<=Lt}var It="function"==typeof ArrayBuffer;function Rt(r){return It&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===X(r)}function Bt(r){return"object"==typeof r&&null!==r&&!wr(r)}var Mt=br(Q.isPrimitive),Ct=br(Q.isObject),Pt=br(Q);U(Pt,"primitives",Mt),U(Pt,"objects",Ct);var Nt=/./;function Ut(r){return"boolean"==typeof r}var Yt=Boolean,Wt=Boolean.prototype.toString;var Zt=Z();function $t(r){return"object"==typeof r&&(r instanceof Yt||(Zt?function(r){try{return Wt.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===X(r)))}function qt(r){return Ut(r)||$t(r)}U(qt,"isPrimitive",Ut),U(qt,"isObject",$t);var zt="object"==typeof self?self:null,Gt="object"==typeof window?window:null,Kt="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},Xt="object"==typeof Kt?Kt:null,Dt="object"==typeof globalThis?globalThis:null;var Jt=function(r){if(arguments.length){if(!Ut(r))throw new TypeError(L("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(Dt)return Dt;if(zt)return zt;if(Gt)return Gt;if(Xt)return Xt;throw new Error("unexpected error. Unable to resolve global object.")}(),Ht=Jt.document&&Jt.document.childNodes,Qt=Int8Array;var re="function"==typeof Nt||"object"==typeof Qt||"function"==typeof Ht?function(r){return xr(r).toLowerCase()}:function(r){var t;return null===r?"null":"object"===(t=typeof r)?xr(r).toLowerCase():t};function te(r){return"function"===re(r)}function ee(r,t,e){N(r,t,{configurable:!1,enumerable:!0,writable:!1,value:e})}function ne(r,t){if(!(this instanceof ne))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!ir(r))throw new TypeError(L("invalid argument. Real component must be a number. Value: `%s`.",r));if(!ir(t))throw new TypeError(L("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return ee(this,"re",r),ee(this,"im",t),this}U(ne,"name","Complex128"),U(ne,"BYTES_PER_ELEMENT",8),U(ne.prototype,"BYTES_PER_ELEMENT",8),U(ne.prototype,"byteLength",16),U(ne.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),U(ne.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var ie="function"==typeof Math.fround?Math.fround:null,oe=new Mr(1);var ae="function"==typeof ie?ie:function(r){return oe[0]=r,oe[0]};function ue(r,t){if(!(this instanceof ue))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!ir(r))throw new TypeError(L("invalid argument. Real component must be a number. Value: `%s`.",r));if(!ir(t))throw new TypeError(L("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return ee(this,"re",ae(r)),ee(this,"im",ae(t)),this}function fe(r){return r instanceof ne||r instanceof ue||"object"==typeof r&&null!==r&&"number"==typeof r.re&&"number"==typeof r.im}function se(r){return Et(r/2)}U(ue,"name","Complex64"),U(ue,"BYTES_PER_ELEMENT",4),U(ue.prototype,"BYTES_PER_ELEMENT",4),U(ue.prototype,"byteLength",8),U(ue.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),U(ue.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var le=8;function he(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===le}var ce=16;function pe(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===ce}function ge(){return"function"==typeof G&&"symbol"==typeof G("foo")&&z(G,"iterator")&&"symbol"==typeof G.iterator}var ye=ge()?Symbol.iterator:null;function me(r,t,e){N(r,t,{configurable:!1,enumerable:!1,get:e})}function ve(r){return r.re}function we(r){return r.im}function be(r,t){return new Mr(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function de(r,t){return new Or(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function Ee(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(Ot(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!fe(n))return new TypeError(L("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(ve(n),we(n))}return t}var _e=2*Mr.BYTES_PER_ELEMENT,Te=ge();function xe(r){return r instanceof Ae||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ve(r){return r===Ae||"Complex128Array"===r.name}function je(r,t){return new ue(r[t*=2],r[t+1])}function Ae(){var r,t,e,n;if(t=arguments.length,!(this instanceof Ae))return 0===t?new Ae:1===t?new Ae(arguments[0]):2===t?new Ae(arguments[0],arguments[1]):new Ae(arguments[0],arguments[1],arguments[2]);if(0===t)e=new Mr(0);else if(1===t)if(jt(arguments[0]))e=new Mr(2*arguments[0]);else if(kt(arguments[0]))if((n=(e=arguments[0]).length)&&wr(e)&&fe(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!fe(n=t[i]))return null;r[o]=ve(n),r[o+1]=we(n),o+=2}return r}(new Mr(2*n),e),null===e){if(!se(n))throw new RangeError(L("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Mr(arguments[0])}}else{if(he(e))e=be(e,0);else if(pe(e))e=de(e,0);else if(!se(n))throw new RangeError(L("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Mr(e)}else if(Rt(arguments[0])){if(!Et((e=arguments[0]).byteLength/_e))throw new RangeError(L("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",_e,e.byteLength));e=new Mr(e)}else{if(!Bt(arguments[0]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===Te)throw new TypeError(L("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!te(e[ye]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!te((e=e[ye]()).next))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Ee(e))instanceof Error)throw e;e=new Mr(e)}else{if(!Rt(e=arguments[0]))throw new TypeError(L("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!jt(r=arguments[1]))throw new TypeError(L("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!Et(r/_e))throw new RangeError(L("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",_e,r));if(2===t){if(!Et((n=e.byteLength-r)/_e))throw new RangeError(L("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",_e,n));e=new Mr(e,r)}else{if(!jt(n=arguments[2]))throw new TypeError(L("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*_e>e.byteLength-r)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*_e));e=new Mr(e,r,2*n)}}return U(this,"_buffer",e),U(this,"_length",e.length/2),this}function Se(r){return r.re}function Fe(r){return r.im}function Oe(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(Ot(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!fe(n))return new TypeError(L("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(Se(n),Fe(n))}return t}U(Ae,"BYTES_PER_ELEMENT",_e),U(Ae,"name","Complex64Array"),U(Ae,"from",(function(r){var t,e,n,i,o,a,u,f,s,l,h,c;if(!te(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ve(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!te(n=arguments[1]))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(xe(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(fe(l=n.call(t,r.get(h),h)))o[c]=ve(l),o[c+1]=we(l);else{if(!(Ot(l)&&l.length>=2))throw new TypeError(L("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(kt(r)){if(n){for(f=r.length,u=r.get&&r.set?yr("default"):vr("default"),h=0;h<f;h++)if(!fe(u(r,h))){s=!0;break}if(s){if(!se(f))throw new RangeError(L("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(fe(l=n.call(t,u(r,h),h)))o[c]=ve(l),o[c+1]=we(l);else{if(!(Ot(l)&&l.length>=2))throw new TypeError(L("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)&&Te&&te(r[ye])){if(!te((o=r[ye]()).next))throw new TypeError(L("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,Ot(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!fe(o))return new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(ve(o),we(o))}return n}(o,n,t):Ee(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(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),U(Ae,"of",(function(){var r,t;if(!te(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ve(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)})),U(Ae.prototype,"at",(function(r){if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(L("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return je(this._buffer,r)})),me(Ae.prototype,"buffer",(function(){return this._buffer.buffer})),me(Ae.prototype,"byteLength",(function(){return this._buffer.byteLength})),me(Ae.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(Ae.prototype,"BYTES_PER_ELEMENT",Ae.BYTES_PER_ELEMENT),U(Ae.prototype,"copyWithin",(function(r,t){if(!xe(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})),U(Ae.prototype,"entries",(function(){var r,t,e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,n=this._buffer,e=this._length,o=-1,U(t={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,je(n,o)],done:!1}})),U(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ye&&U(t,ye,(function(){return r.entries()})),t})),U(Ae.prototype,"every",(function(r,t){var e,n;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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,je(e,n),n,this))return!1;return!0})),U(Ae.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!fe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Et(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Et(e))throw new TypeError(L("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=ve(r),u=we(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),U(Ae.prototype,"filter",(function(r,t){var e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=je(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),U(Ae.prototype,"find",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=je(e,n),r.call(t,i,n,this))return i})),U(Ae.prototype,"findIndex",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=je(e,n),r.call(t,i,n,this))return n;return-1})),U(Ae.prototype,"findLast",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=je(e,n),r.call(t,i,n,this))return i})),U(Ae.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=je(e,n),r.call(t,i,n,this))return n;return-1})),U(Ae.prototype,"forEach",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=je(e,n),r.call(t,i,n,this)})),U(Ae.prototype,"get",(function(r){if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!jt(r))throw new TypeError(L("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return je(this._buffer,r)})),U(Ae.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!fe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=ve(r),o=we(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),U(Ae.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!fe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=ve(r),o=we(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),U(Ae.prototype,"join",(function(r){var t,e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Y(r))throw new TypeError(L("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(je(e,i).toString());return t.join(n)})),U(Ae.prototype,"keys",(function(){var r,t,e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._length,i=-1,U(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),U(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ye&&U(t,ye,(function(){return r.keys()})),t})),U(Ae.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!fe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(L("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=ve(r),o=we(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),me(Ae.prototype,"length",(function(){return this._length})),U(Ae.prototype,"map",(function(r,t){var e,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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(fe(a=r.call(t,je(n,o),o,this)))e[2*o]=ve(a),e[2*o+1]=we(a);else{if(!Ot(a)||2!==a.length)throw new TypeError(L("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})),U(Ae.prototype,"reduce",(function(r,t){var e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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=je(e,0),o=1}for(;o<i;o++)n=r(n,je(e,o),o,this);return n})),U(Ae.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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=je(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,je(e,o),o,this);return n})),U(Ae.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=dt(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})),U(Ae.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,s;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!jt(e=arguments[1]))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(fe(r)){if(e>=this._length)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=ve(r),void(n[e+1]=we(r))}if(xe(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*_e,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new Mr(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(!kt(r))throw new TypeError(L("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(!fe(r[f])){o=!0;break}if(o){if(!se(a))throw new RangeError(L("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*_e,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new Mr(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]=ve(u),n[e+1]=we(u),e+=2}})),U(Ae.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!xe(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(!Et(r))throw new TypeError(L("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(!Et(t))throw new TypeError(L("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})),U(Ae.prototype,"some",(function(r,t){var e,n;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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,je(e,n),n,this))return!0;return!1})),U(Ae.prototype,"sort",(function(r){var t,e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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(je(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=ve(t[i]),e[o+1]=we(t[i]);return this})),U(Ae.prototype,"subarray",(function(r,t){var e,n,i;if(!xe(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(!Et(r))throw new TypeError(L("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(!Et(t))throw new TypeError(L("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*_e):(i=t-r,e=n.byteOffset+r*_e),new this.constructor(n.buffer,e,i<0?0:i)})),U(Ae.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Y(r)&&!Mt(r))throw new TypeError(L("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(!Bt(t))throw new TypeError(L("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(je(o,a).toLocaleString(n,e));return i.join(",")})),U(Ae.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!xe(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})),U(Ae.prototype,"toSorted",(function(r){var t,e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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(je(e,i));return t.sort(r),new Ae(t)})),U(Ae.prototype,"toString",(function(){var r,t,e;if(!xe(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(je(t,e).toString());return r.join(",")})),U(Ae.prototype,"values",(function(){var r,t,e,n,i,o;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,i=this._buffer,e=this._length,o=-1,U(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:je(i,o),done:!1}})),U(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ye&&U(r,ye,(function(){return t.values()})),r})),U(Ae.prototype,"with",(function(r,t){var e,n,i;if(!xe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(L("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(L("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!fe(t))throw new TypeError(L("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=ve(t),e[2*r+1]=we(t),n}));var Le=2*Or.BYTES_PER_ELEMENT,ke=ge();function Ie(r){return r instanceof Me||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Re(r){return r===Me||"Complex64Array"===r.name}function Be(r,t){return new ne(r[t*=2],r[t+1])}function Me(){var r,t,e,n;if(t=arguments.length,!(this instanceof Me))return 0===t?new Me:1===t?new Me(arguments[0]):2===t?new Me(arguments[0],arguments[1]):new Me(arguments[0],arguments[1],arguments[2]);if(0===t)e=new Or(0);else if(1===t)if(jt(arguments[0]))e=new Or(2*arguments[0]);else if(kt(arguments[0]))if((n=(e=arguments[0]).length)&&wr(e)&&fe(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!fe(n=t[i]))return null;r[o]=Se(n),r[o+1]=Fe(n),o+=2}return r}(new Or(2*n),e),null===e){if(!se(n))throw new RangeError(L("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Or(arguments[0])}}else{if(he(e))e=be(e,0);else if(pe(e))e=de(e,0);else if(!se(n))throw new RangeError(L("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Or(e)}else if(Rt(arguments[0])){if(!Et((e=arguments[0]).byteLength/Le))throw new RangeError(L("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Le,e.byteLength));e=new Or(e)}else{if(!Bt(arguments[0]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===ke)throw new TypeError(L("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!te(e[ye]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!te((e=e[ye]()).next))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Oe(e))instanceof Error)throw e;e=new Or(e)}else{if(!Rt(e=arguments[0]))throw new TypeError(L("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!jt(r=arguments[1]))throw new TypeError(L("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!Et(r/Le))throw new RangeError(L("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Le,r));if(2===t){if(!Et((n=e.byteLength-r)/Le))throw new RangeError(L("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Le,n));e=new Or(e,r)}else{if(!jt(n=arguments[2]))throw new TypeError(L("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Le>e.byteLength-r)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Le));e=new Or(e,r,2*n)}}return U(this,"_buffer",e),U(this,"_length",e.length/2),this}function Ce(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(Yt(e.value));return t}U(Me,"BYTES_PER_ELEMENT",Le),U(Me,"name","Complex128Array"),U(Me,"from",(function(r){var t,e,n,i,o,a,u,f,s,l,h,c;if(!te(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Re(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!te(n=arguments[1]))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Ie(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(fe(l=n.call(t,r.get(h),h)))o[c]=Se(l),o[c+1]=Fe(l);else{if(!(Ot(l)&&l.length>=2))throw new TypeError(L("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(kt(r)){if(n){for(f=r.length,u=r.get&&r.set?yr("default"):vr("default"),h=0;h<f;h++)if(!fe(u(r,h))){s=!0;break}if(s){if(!se(f))throw new RangeError(L("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(fe(l=n.call(t,u(r,h),h)))o[c]=Se(l),o[c+1]=Fe(l);else{if(!(Ot(l)&&l.length>=2))throw new TypeError(L("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)&&ke&&te(r[ye])){if(!te((o=r[ye]()).next))throw new TypeError(L("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,Ot(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!fe(o))return new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Se(o),Fe(o))}return n}(o,n,t):Oe(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(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),U(Me,"of",(function(){var r,t;if(!te(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Re(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)})),U(Me.prototype,"at",(function(r){if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(L("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return Be(this._buffer,r)})),me(Me.prototype,"buffer",(function(){return this._buffer.buffer})),me(Me.prototype,"byteLength",(function(){return this._buffer.byteLength})),me(Me.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(Me.prototype,"BYTES_PER_ELEMENT",Me.BYTES_PER_ELEMENT),U(Me.prototype,"copyWithin",(function(r,t){if(!Ie(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})),U(Me.prototype,"entries",(function(){var r,t,e,n,i,o,a;if(!Ie(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,U(e={},"next",(function(){var t;if(o+=1,i||o>=n)return{done:!0};return t=new ne(r[a+=2],r[a+1]),{value:[o,t],done:!1}})),U(e,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ye&&U(e,ye,(function(){return t.entries()})),e})),U(Me.prototype,"every",(function(r,t){var e,n;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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,Be(e,n),n,this))return!1;return!0})),U(Me.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!fe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Et(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Et(e))throw new TypeError(L("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=Se(r),u=Fe(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),U(Me.prototype,"filter",(function(r,t){var e,n,i,o;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Be(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),U(Me.prototype,"find",(function(r,t){var e,n,i;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Be(e,n),r.call(t,i,n,this))return i})),U(Me.prototype,"findIndex",(function(r,t){var e,n,i;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Be(e,n),r.call(t,i,n,this))return n;return-1})),U(Me.prototype,"findLast",(function(r,t){var e,n,i;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Be(e,n),r.call(t,i,n,this))return i})),U(Me.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Be(e,n),r.call(t,i,n,this))return n;return-1})),U(Me.prototype,"forEach",(function(r,t){var e,n,i;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=Be(e,n),r.call(t,i,n,this)})),U(Me.prototype,"get",(function(r){if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!jt(r))throw new TypeError(L("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Be(this._buffer,r)})),me(Me.prototype,"length",(function(){return this._length})),U(Me.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!fe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Se(r),o=Fe(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),U(Me.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!fe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Se(r),o=Fe(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),U(Me.prototype,"join",(function(r){var t,e,n,i;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Q(r))throw new TypeError(L("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(Be(e,i).toString());return t.join(n)})),U(Me.prototype,"keys",(function(){var r,t,e,n,i;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._length,i=-1,U(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),U(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ye&&U(t,ye,(function(){return r.keys()})),t})),U(Me.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!fe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(L("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=Se(r),o=Fe(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),U(Me.prototype,"map",(function(r,t){var e,n,i,o,a;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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(fe(a=r.call(t,Be(n,o),o,this)))e[2*o]=Se(a),e[2*o+1]=Fe(a);else{if(!Ot(a)||2!==a.length)throw new TypeError(L("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})),U(Me.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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=Be(e,0),o=1}for(;o<i;o++)n=r(n,Be(e,o),o,this);return n})),U(Me.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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=Be(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,Be(e,o),o,this);return n})),U(Me.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=dt(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})),U(Me.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,s;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!jt(e=arguments[1]))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(fe(r)){if(e>=this._length)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=Se(r),void(n[e+1]=Fe(r))}if(Ie(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*Le,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new Or(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(!kt(r))throw new TypeError(L("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(!fe(r[f])){o=!0;break}if(o){if(!se(a))throw new RangeError(L("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*Le,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new Or(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]=Se(u),n[e+1]=Fe(u),e+=2}})),U(Me.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!Ie(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(!Et(r))throw new TypeError(L("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(!Et(t))throw new TypeError(L("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})),U(Me.prototype,"some",(function(r,t){var e,n;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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,Be(e,n),n,this))return!0;return!1})),U(Me.prototype,"sort",(function(r){var t,e,n,i,o;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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(Be(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=Se(t[i]),e[o+1]=Fe(t[i]);return this})),U(Me.prototype,"subarray",(function(r,t){var e,n,i;if(!Ie(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(!Et(r))throw new TypeError(L("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(!Et(t))throw new TypeError(L("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*Le):(i=t-r,e=n.byteOffset+r*Le),new this.constructor(n.buffer,e,i<0?0:i)})),U(Me.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Q(r)&&!Mt(r))throw new TypeError(L("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(!Bt(t))throw new TypeError(L("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(Be(o,a).toLocaleString(n,e));return i.join(",")})),U(Me.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!Ie(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})),U(Me.prototype,"toSorted",(function(r){var t,e,n,i;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!te(r))throw new TypeError(L("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(Be(e,i));return t.sort(r),new Me(t)})),U(Me.prototype,"toString",(function(){var r,t,e;if(!Ie(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(Be(t,e).toString());return r.join(",")})),U(Me.prototype,"values",(function(){var r,t,e,n,i,o;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,i=this._buffer,e=this._length,o=-1,U(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:Be(i,o),done:!1}})),U(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ye&&U(r,ye,(function(){return t.values()})),r})),U(Me.prototype,"with",(function(r,t){var e,n,i;if(!Ie(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(L("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(L("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!fe(t))throw new TypeError(L("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=Se(t),e[2*r+1]=Fe(t),n}));var Pe=ft.BYTES_PER_ELEMENT,Ne=ge();function Ue(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===Pe}function Ye(r){return r===We}function We(){var r,t,e,n,i;if(t=arguments.length,!(this instanceof We))return 0===t?new We:1===t?new We(arguments[0]):2===t?new We(arguments[0],arguments[1]):new We(arguments[0],arguments[1],arguments[2]);if(0===t)e=new ft(0);else if(1===t)if(jt(i=arguments[0]))e=new ft(i);else if(kt(i))e=function(r,t){var e,n;for(e=t.length,n=0;n<e;n++)r[n]=Yt(t[n]);return r}(new ft(i.length),i);else if(Rt(i))e=new ft(i);else{if(!Bt(i))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===Ne)throw new TypeError(L("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!te(i[ye]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!te((e=i[ye]()).next))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));e=new ft(Ce(e))}else{if(!Rt(e=arguments[0]))throw new TypeError(L("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!jt(r=arguments[1]))throw new TypeError(L("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===t)e=new ft(e,r);else{if(!jt(n=arguments[2]))throw new TypeError(L("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Pe>e.byteLength-r)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Pe));e=new ft(e,r,n)}}return U(this,"_buffer",e),U(this,"_length",e.length),this}U(We,"BYTES_PER_ELEMENT",Pe),U(We,"name","BooleanArray"),U(We,"from",(function(r){var t,e,n,i,o,a,u,f,s;if(!te(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ye(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!te(n=arguments[1]))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(kt(r)){if(n){for(f=r.length,u=r.get&&r.set?yr("default"):vr("default"),o=(i=new this(f))._buffer,s=0;s<f;s++)o[s]=Yt(n.call(t,u(r,s),s));return i}return new this(r)}if(Bt(r)&&Ne&&te(r[ye])){if(!te((o=r[ye]()).next))throw new TypeError(L("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(Yt(t.call(e,i.value,o)));return n}(o,n,t):Ce(o),o=(i=new this(f=a.length))._buffer,s=0;s<f;s++)o[s]=a[s];return i}throw new TypeError(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),U(We,"of",(function(){var r,t;if(!te(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ye(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)})),U(We.prototype,"at",(function(r){var t,e;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Tt(r))throw new TypeError(L("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 Yt(t[r])})),me(We.prototype,"buffer",(function(){return this._buffer.buffer})),me(We.prototype,"byteLength",(function(){return this._buffer.byteLength})),me(We.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),U(We.prototype,"BYTES_PER_ELEMENT",We.BYTES_PER_ELEMENT),U(We.prototype,"copyWithin",(function(r,t){if(!Ue(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})),U(We.prototype,"entries",(function(){var r,t,e,n,i,o;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,n=this._buffer,e=this._length,o=-1,U(t={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,Yt(n[o])],done:!1}})),U(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ye&&U(t,ye,(function(){return r.entries()})),t})),U(We.prototype,"every",(function(r,t){var e,n;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(r))throw new TypeError(L("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,Yt(e[n]),n,this))return!1;return!0})),U(We.prototype,"fill",(function(r,t,e){var n,i,o,a;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(r))throw new TypeError(L("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Tt(t))throw new TypeError(L("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(L("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})),U(We.prototype,"filter",(function(r,t){var e,n,i,o;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Yt(e[i]),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),U(We.prototype,"find",(function(r,t){var e,n,i;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=Yt(e[i]),r.call(t,n,i,this))return n})),U(We.prototype,"findIndex",(function(r,t){var e,n,i;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=Yt(e[i]),r.call(t,n,i,this))return i;return-1})),U(We.prototype,"findLast",(function(r,t){var e,n,i;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Yt(e[i]),r.call(t,n,i,this))return n})),U(We.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Yt(e[i]),r.call(t,n,i,this))return i;return-1})),U(We.prototype,"forEach",(function(r,t){var e,n;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)r.call(t,Yt(e[n]),n,this)})),U(We.prototype,"get",(function(r){if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!jt(r))throw new TypeError(L("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Yt(this._buffer[r])})),U(We.prototype,"includes",(function(r,t){var e,n;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(r))throw new TypeError(L("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Tt(t))throw new TypeError(L("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===Yt(e[n]))return!0;return!1})),U(We.prototype,"indexOf",(function(r,t){var e,n;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(r))throw new TypeError(L("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Tt(t))throw new TypeError(L("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===Yt(e[n]))return n;return-1})),U(We.prototype,"join",(function(r){var t,e,n;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!Y(r))throw new TypeError(L("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)})),U(We.prototype,"keys",(function(){var r,t,e,n,i;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,e=this._length,i=-1,U(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),U(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ye&&U(t,ye,(function(){return r.keys()})),t})),U(We.prototype,"lastIndexOf",(function(r,t){var e,n;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(r))throw new TypeError(L("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Tt(t))throw new TypeError(L("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===Yt(e[n]))return n;return-1})),me(We.prototype,"length",(function(){return this._length})),U(We.prototype,"map",(function(r,t){var e,n,i,o;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(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]=Yt(r.call(t,Yt(i[o]),o,this));return n})),U(We.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(r))throw new TypeError(L("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=Yt(e[0]),o=1}for(;o<n;o++)i=r(i,Yt(e[o]),o,this);return i})),U(We.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(r))throw new TypeError(L("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=Yt(e[n-1]),o=n-2}for(;o>=0;o--)i=r(i,Yt(e[o]),o,this);return i})),U(We.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._buffer,e=this._length,n=dt(e/2),i=0;i<n;i++)o=e-i-1,t=r[i],r[i]=r[o],r[o]=t;return this})),U(We.prototype,"set",(function(r){var t,e,n,i,o,a,u;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!jt(e=arguments[1]))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(kt(r)){if(e+(o=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=Ue(r)?r._buffer:r,u=n.byteOffset+e*Pe,t.buffer===n.buffer&&t.byteOffset<u&&t.byteOffset+t.byteLength>u){for(i=new ft(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(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=r?1:0}})),U(We.prototype,"slice",(function(r,t){var e,n,i,o,a,u;if(!Ue(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(!Tt(r))throw new TypeError(L("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(!Tt(t))throw new TypeError(L("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})),U(We.prototype,"some",(function(r,t){var e,n;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!te(r))throw new TypeError(L("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,Yt(e[n]),n,this))return!0;return!1})),U(We.prototype,"sort",(function(r){var t;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(t=this._buffer,0===arguments.length)return t.sort(),this;if(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Yt(t),Yt(e))})),this})),U(We.prototype,"subarray",(function(r,t){var e,n,i;if(!Ue(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(!Tt(r))throw new TypeError(L("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(L("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*Pe):(i=t-r,e=n.byteOffset+r*Pe),new this.constructor(n.buffer,e,i<0?0:i)})),U(We.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!Y(r)&&!Mt(r))throw new TypeError(L("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(!Bt(t))throw new TypeError(L("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(Yt(o[a]).toLocaleString(n,e));return i.join(",")})),U(We.prototype,"toReversed",(function(){var r,t,e,n,i;if(!Ue(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})),U(We.prototype,"toSorted",(function(r){var t,e,n,i,o;if(!Ue(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(!te(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Yt(t),Yt(e))})),e})),U(We.prototype,"toString",(function(){var r,t,e;if(!Ue(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(",")})),U(We.prototype,"values",(function(){var r,t,e,n,i,o;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,i=this._buffer,e=this._length,o=-1,U(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:Yt(i[o]),done:!1}})),U(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),ye&&U(r,ye,(function(){return t.values()})),r})),U(We.prototype,"with",(function(r,t){var e,n;if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Tt(r))throw new TypeError(L("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(L("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Ut(t))throw new TypeError(L("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 Ze=[Or,Mr,Gr,Wr,nt,Hr,wt,ft,pt,Ae,Me,We],$e=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],qe=$e.length;function ze(r){var t;if(wr(r))return"generic";if(Er(r))return null;for(t=0;t<qe;t++)if(r instanceof Ze[t])return $e[t];return Vr[xr(r)]||null}function Ge(r){var t=hr(r),e=function(r){var t=ze(r);return pr(r)?yr(t):vr(t)}(t);return e(t,lr(r))}function Ke(r){return Object.keys(Object(r))}var Xe=void 0!==Object.keys;function De(r){return"[object Arguments]"===X(r)}var Je=function(){return De(arguments)}();function He(r){return r!=r}function Qe(r){return ir(r)&&He(r)}function rn(r){return fr(r)&&He(r.valueOf())}function tn(r){return Qe(r)||rn(r)}U(tn,"isPrimitive",Qe),U(tn,"isObject",rn);var en=Object.prototype.propertyIsEnumerable;var nn=!en.call("beep","0");function on(r,t){var e;return null!=r&&(!(e=en.call(r,t))&&nn&&Q(r)?!Qe(t=+t)&&Tt(t)&&t>=0&&t<r.length:e)}var an=Je?De:function(r){return null!==r&&"object"==typeof r&&!wr(r)&&"number"==typeof r.length&&Et(r.length)&&r.length>=0&&r.length<=Pr&&z(r,"callee")&&!on(r,"callee")},un=Array.prototype.slice;var fn=on((function(){}),"prototype"),sn=!on({toString:null},"toString");function ln(r,t,e){var n,i;if(!kt(r)&&!Y(r))throw new TypeError(L("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(0===(n=r.length))return-1;if(3===arguments.length){if(!Tt(e))throw new TypeError(L("invalid argument. Third argument must be an integer. Value: `%s`.",e));if(e>=0){if(e>=n)return-1;i=e}else(i=n+e)<0&&(i=0)}else i=0;if(tn(t)){for(;i<n;i++)if(tn(r[i]))return i}else for(;i<n;i++)if(r[i]===t)return i;return-1}function hn(r){return r.constructor&&r.constructor.prototype===r}var cn=["console","external","frame","frameElement","frames","innerHeight","innerWidth","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","scrollLeft","scrollTop","scrollX","scrollY","self","webkitIndexedDB","webkitStorageInfo","window"],pn="undefined"==typeof window?void 0:window;var gn=function(){var r;if("undefined"===re(pn))return!1;for(r in pn)try{-1===ln(cn,r)&&z(pn,r)&&null!==pn[r]&&"object"===re(pn[r])&&hn(pn[r])}catch(r){return!0}return!1}(),yn="undefined"!=typeof window;var mn=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var vn,wn=Xe?function(){return 2!==(Ke(arguments)||"").length}(1,2)?function(r){return an(r)?Ke(un.call(r)):Ke(r)}:Ke:function(r){var t,e,n,i,o,a,u;if(i=[],an(r)){for(u=0;u<r.length;u++)i.push(u.toString());return i}if("string"==typeof r){if(r.length>0&&!z(r,"0"))for(u=0;u<r.length;u++)i.push(u.toString())}else{if(!1==(n="function"==typeof r)&&!dr(r))return i;e=fn&&n}for(o in r)e&&"prototype"===o||!z(r,o)||i.push(String(o));if(sn)for(t=function(r){if(!1===yn&&!gn)return hn(r);try{return hn(r)}catch(r){return!1}}(r),u=0;u<mn.length;u++)a=mn[u],t&&"constructor"===a||!z(r,a)||i.push(String(a));return i},bn=Object,dn=Object.getPrototypeOf;vn=te(Object.getPrototypeOf)?dn:function(r){var t=function(r){return r.__proto__}(r);return t||null===t?t:"[object Function]"===X(r.constructor)?r.constructor.prototype:r instanceof bn?bn.prototype:null};var En=vn;function _n(r){return null==r?null:(r=bn(r),En(r))}var Tn=Object.prototype;function xn(r){var t;return!!Bt(r)&&(!(t=_n(r))||!z(r,"constructor")&&z(t,"constructor")&&te(t.constructor)&&"[object Function]"===X(t.constructor)&&z(t,"isPrototypeOf")&&te(t.isPrototypeOf)&&(t===Tn||function(r){var t;for(t in r)if(!z(r,t))return!1;return!0}(r)))}function Vn(r,t){var e,n,i,o,a,u,f,s=!0;if(!dr(r))throw new TypeError(L("invalid argument. First argument must be an object (except null). Value: `%s`.",r));if(arguments.length>1){if(!xn(t))throw new TypeError(L("invalid argument. Options argument must be an object. Value: `%s`.",t));if(z(t,"duplicates")&&!Ut(s=t.duplicates))throw new TypeError(L("invalid option. `%s` option must be a boolean. Option: `%s`.","duplicates",s))}if(n=(e=wn(r)).length,a={},s)for(f=0;f<n;f++)z(a,o=r[i=e[f]])?(u=a[o],wr(u)?a[o].push(i):a[o]=[u,i]):a[o]=i;else for(f=0;f<n;f++)a[r[i=e[f]]]=i;return a}var jn=["no-transpose","transpose","conjugate-transpose"];function An(){return jn.slice()}function Sn(){return{"no-transpose":111,transpose:112,"conjugate-transpose":113}}U(An,"enum",Sn);var Fn=Vn({"no-transpose":111,transpose:112,"conjugate-transpose":113},{duplicates:!1});var On={"no-transpose":111,transpose:112,"conjugate-transpose":113};function Ln(r){var t=typeof r;return"number"===t?function(r){var t=Fn[r];return"string"==typeof t?t:null}(r)?r:null:"string"===t?function(r){var t=On[r];return"number"==typeof t?t:null}(r):null}function kn(r){if(r.__esModule)return r;var t=r.default;if("function"==typeof t){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach((function(t){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})})),e}function In(r,t){for(var e=0,n=r.length-1;n>=0;n--){var i=r[n];"."===i?r.splice(n,1):".."===i?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e--;e)r.unshift("..");return r}var Rn=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Bn=function(r){return Rn.exec(r).slice(1)};function Mn(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:"/";if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");n&&(r=n+"/"+r,t="/"===n.charAt(0))}return(t?"/":"")+(r=In(qn(r.split("/"),(function(r){return!!r})),!t).join("/"))||"."}function Cn(r){var t=Pn(r),e="/"===zn(r,-1);return(r=In(qn(r.split("/"),(function(r){return!!r})),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r}function Pn(r){return"/"===r.charAt(0)}function Nn(){return Cn(qn(Array.prototype.slice.call(arguments,0),(function(r,t){if("string"!=typeof r)throw new TypeError("Arguments to path.join must be strings");return r})).join("/"))}function Un(r,t){function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=Mn(r).substr(1),t=Mn(t).substr(1);for(var n=e(r.split("/")),i=e(t.split("/")),o=Math.min(n.length,i.length),a=o,u=0;u<o;u++)if(n[u]!==i[u]){a=u;break}var f=[];for(u=a;u<n.length;u++)f.push("..");return(f=f.concat(i.slice(a))).join("/")}function Yn(r){var t=Bn(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."}function Wn(r,t){var e=Bn(r)[2];return t&&e.substr(-1*t.length)===t&&(e=e.substr(0,e.length-t.length)),e}function Zn(r){return Bn(r)[3]}var $n={extname:Zn,basename:Wn,dirname:Yn,sep:"/",delimiter:":",relative:Un,join:Nn,isAbsolute:Pn,normalize:Cn,resolve:Mn};function qn(r,t){if(r.filter)return r.filter(t);for(var e=[],n=0;n<r.length;n++)t(r[n],n,r)&&e.push(r[n]);return e}var zn="b"==="ab".substr(-1)?function(r,t,e){return r.substr(t,e)}:function(r,t,e){return t<0&&(t=r.length+t),r.substr(t,e)},Gn=kn(Object.freeze({__proto__:null,basename:Wn,default:$n,delimiter:":",dirname:Yn,extname:Zn,isAbsolute:Pn,join:Nn,normalize:Cn,relative:Un,resolve:Mn,sep:"/"}));function Kn(r){if("object"!=typeof r||null===r)return!1;if(r instanceof Error)return!0;for(;r;){if("[object Error]"===X(r))return!0;r=_n(r)}return!1}function Xn(r){try{return function(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(r)}catch(r){return Kn(r)?r:"object"==typeof r?new Error(JSON.stringify(r)):new Error(r.toString())}}function Dn(r,t){return r>t?r:t}function Jn(r){var t,e,n;if(!kt(r))throw new TypeError(L("invalid argument. Must provide an array-like object. Value: `%s`.",r));return n=ze(r),pr(r)&&(t=yr(n)),e=r.length,void 0===t?function(t){var n;for(n=0;n<e;n++)if(r[n]===t)return!0;return!1}:function(n){var i;for(i=0;i<e;i++)if(t(r,i)===n)return!0;return!1}}U((function(r,t){var e,n,i,o;for(i=ze(r),n=pr(r)?yr(i):vr(i),e=r.length,o=0;o<e;o++)if(n(r,o)===t)return!0;return!1}),"factory",Jn);var Hn=["row-major","column-major"];function Qn(){return Hn.slice()}U(Qn,"enum",(function(){return{"row-major":101,"column-major":102}}));var ri=Jn(Qn()),ti=Jn(An());function ei(r){return Math.abs(r)}function ni(r){var t,e,n,i;if(0===(t=r.length))return!1;for(e=ei(r[0]),i=1;i<t;i++){if((n=ei(r[i]))>e)return!1;e=n}return!0}function ii(r,t){return t>0?0:(1-r)*t}function oi(r,t,e,n,i,o,a){var u,f,s,l;if(u=0,r<=0)return u;for(f=n,s=a,l=0;l<r;l++)u=ae(u+ae(t[f]*i[s])),f+=e,s+=o;return u}function ai(r,t,e,n,i){return r<=0?0:oi(r,t,e,ii(r,e),n,i,ii(r,i))}U(ai,"ndarray",oi);var ui,fi=Xn((0,Gn.join)("/home/runner/work/blas-base-ndarray-sgemm/blas-base-ndarray-sgemm/node_modules/@stdlib/blas-base-sdot/lib","./native.js"));ui=Kn(fi)?ai:fi;const{ndarray:si}=ui;function li(r){return Tt(r)&&r>0}function hi(r){return xt(r)&&r.valueOf()>0}function ci(r){return li(r)||hi(r)}U(ci,"isPrimitive",li),U(ci,"isObject",hi);var pi=Vn({bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256},{duplicates:!1});var gi={binary:1,bool:1,complex64:8,complex128:16,float16:2,bfloat16:2,float32:4,float64:8,float128:16,generic:null,int8:1,int16:2,int32:4,int64:8,int128:16,int256:32,uint8:1,uint8c:1,uint16:2,uint32:4,uint64:8,uint128:16,uint256:32};function yi(r){var t;return Y(r)?gi[r]||null:ir(r)?gi[function(r){var t=pi[r];return Y(t)?t:null}(r)]||null:r&&li(t=r.byteLength)?t:null}var mi={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};var vi=function(r){var t,e,n,i;if((e=r.length)<=0)return mi.BLOCK_SIZE_IN_ELEMENTS;if(null===(t=yi(r[0])))return mi.BLOCK_SIZE_IN_ELEMENTS;for(i=1;i<e;i++){if(null===(n=yi(r[i])))return mi.BLOCK_SIZE_IN_ELEMENTS;n>t&&(t=n)}return(n=mi.BLOCK_SIZE_IN_BYTES/t|0)>0?n:1}(["float32","float32"]);function wi(r){return"no-transpose"!==r}function bi(r,t,e,n,i,o,a,u,f,s,l,h,c,p,g,y){var m,v,w,b,d,E,_,T,x,V,j;for(E=r,m=a,v=s,w=g,b=p-(d=t)*g,j=y,T=0;T<E;T++){for(x=u+T*o,_=0;_<d;_++)V=h+_*l,c[j]+=ae(n*si(e,i,m,x,f,v,V)),j+=w;j+=b}return c}function di(r,t,e,n,i,o,a,u,f,s,l,h,c,p,g,y,m,v,w){var b,d,E,_,T,x;if(0===e||0===n||1===g&&(0===o||0===i))return y;if(0===g?y=function(r,t,e,n,i,o){var a,u,f,s,l,h,c;for(ni([n,i])?(s=r,a=i,u=n-(f=t)*i):(s=t,a=n,u=i-(f=r)*n),c=o,h=0;h<s;h++){for(l=0;l<f;l++)e[c]=0,c+=a;c+=u}return e}(e,n,y,m,v,w):1!==g&&(y=function(r,t,e,n,i,o,a){var u,f,s,l,h,c,p;for(ni([i,o])?(l=r,u=o,f=i-(s=t)*o):(l=t,u=i,f=o-(s=r)*i),p=a,c=0;c<l;c++){for(h=0;h<s;h++)n[p]*=e,p+=u;p+=f}return n}(e,n,g,y,m,v,w)),0===o)return y;if(b=ni([u,f]),d=ni([h,c]),b){if(!wi(r)){if(!d&&!wi(t))return bi(e,n,i,o,a,u,f,s,l,h,c,p,y,m,v,w);if(d&&wi(t))return bi(e,n,i,o,a,u,f,s,l,c,h,p,y,m,v,w)}}else if(wi(r)){if(d&&wi(t))return bi(e,n,i,o,a,f,u,s,l,c,h,p,y,m,v,w);if(!d&&!wi(t))return bi(e,n,i,o,a,f,u,s,l,h,c,p,y,m,v,w)}return wi(r)?(E=f,_=u):(E=u,_=f),wi(t)?(T=c,x=h):(T=h,x=c),function(r,t,e,n,i,o,a,u,f,s,l,h,c,p,g,y){var m,v,w,b,d,E,_,T,x,V,j,A,S,F,O,L,k,I,R,B,M,C;for(x=t,m=a,v=s,w=g,L=r;L>0;)for(L<vi?(j=L,L=0):(j=vi,L-=vi),d=u+L*o,T=y+L*p,O=x;O>0;)for(O<vi?(V=O,O=0):(V=vi,O-=vi),E=h+O*l,_=T+O*g,b=p-V*g,C=e;C>0;)for(C<vi?(A=C,C=0):(A=vi,C-=vi),B=d+C*a,M=E+C*s,R=_,F=0;F<j;F++){for(k=B+F*o,S=0;S<V;S++)I=M+S*l,c[R]+=ae(n*si(A,i,m,k,f,v,I)),R+=w;R+=b}return c}(e,n,i,o,a,E,_,s,l,T,x,p,y,m,v,w)}function Ei(r,t,e,n,i,o,a,u,f,s,l,h,c,p){var g,y,m,v,w,b,d,E,_,T,x;if(!ri(r))throw new TypeError(L("invalid argument. First argument must be a valid order. Value: `%s`.",r));if(!ti(t))throw new TypeError(L("invalid argument. Second argument must be a valid transpose operation. Value: `%s`.",t));if(!ti(e))throw new TypeError(L("invalid argument. Third argument must be a valid transpose operation. Value: `%s`.",e));if(n<0)throw new RangeError(L("invalid argument. Fourth argument must be a nonnegative integer. Value: `%d`.",n));if(i<0)throw new RangeError(L("invalid argument. Fifth argument must be a nonnegative integer. Value: `%d`.",i));if(o<0)throw new RangeError(L("invalid argument. Sixth argument must be a nonnegative integer. Value: `%d`.",o));if(v="row-major"===r,w=rr(r),y=v&&"no-transpose"===e||w&&"transpose"===e?i:o,f<Dn(1,g=v&&"no-transpose"===t||w&&"transpose"===t?o:n))throw new RangeError(L("invalid argument. Ninth argument must be greater than or equal to max(1,%d). Value: `%d`.",g,f));if(l<Dn(1,y))throw new RangeError(L("invalid argument. Eleventh argument must be greater than or equal to max(1,%d). Value: `%d`.",y,l));if(p<Dn(1,m=v?i:n))throw new RangeError(L("invalid argument. Fourteenth argument must be greater than or equal to max(1,%d). Value: `%d`.",m,p));return w?(b=1,d=f,E=1,_=l,T=1,x=p):(b=f,d=1,E=l,_=1,T=p,x=1),di(t,e,n,i,o,a,u,b,d,0,s,E,_,0,h,c,T,x,0)}U(Ei,"ndarray",(function(r,t,e,n,i,o,a,u,f,s,l,h,c,p,g,y,m,v,w){if(!ti(r))throw new TypeError(L("invalid argument. First argument must be a valid transpose operation. Value: `%s`.",r));if(!ti(t))throw new TypeError(L("invalid argument. Second argument must be a valid transpose operation. Value: `%s`.",t));if(e<0)throw new RangeError(L("invalid argument. Third argument must be a nonnegative integer. Value: `%d`.",e));if(n<0)throw new RangeError(L("invalid argument. Fourth argument must be a nonnegative integer. Value: `%d`.",n));if(i<0)throw new RangeError(L("invalid argument. Fifth argument must be a nonnegative integer. Value: `%d`.",i));if(0===m)throw new RangeError(L("invalid argument. Seventeenth argument must be non-zero. Value: `%d`.",m));if(0===v)throw new RangeError(L("invalid argument. Eighteenth argument must be non-zero. Value: `%d`.",v));return di(r,t,e,n,i,o,a,u,f,s,l,h,c,p,g,y,m,v,w)}));var _i,Ti=Xn((0,Gn.join)("/home/runner/work/blas-base-ndarray-sgemm/blas-base-ndarray-sgemm/node_modules/@stdlib/blas-base-sgemm/lib","./native.js"));_i=Kn(Ti)?Ei:Ti;const{ndarray:xi}=_i;var Vi=Ln("no-transpose");function ji(r){var e,n,i,o,a,u,f,s,l,h,c,p,g,y,m;return h=r[0],c=r[1],p=r[2],e=Ge(r[3]),n=Ge(r[4]),i=Ge(r[5]),o=Ge(r[6]),a=t(h,!1),u=t(p,!1),f=nr(h,!1),s=nr(c,!1),l=nr(p,!1),g=u[0],y=u[1],m=Ln(e)===Vi?a[1]:a[0],xi(e,n,g,y,m,i,hr(h),f[0],f[1],lr(h),hr(c),s[0],s[1],lr(c),o,hr(p),l[0],l[1],lr(p)),p}export{ji as default};
//# sourceMappingURL=mod.js.map