-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
3 lines (3 loc) · 87 KB
/
index.js
File metadata and controls
3 lines (3 loc) · 87 KB
1
2
3
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(e="undefined"!=typeof globalThis?globalThis:e||self).acronym=r()}(this,(function(){"use strict";var e="function"==typeof Object.defineProperty?Object.defineProperty:null;var r=Object.defineProperty;function t(e){return"number"==typeof e}function n(e){var r,t="";for(r=0;r<e;r++)t+="0";return t}function i(e,r,t){var i=!1,o=r-e.length;return o<0||(function(e){return"-"===e[0]}(e)&&(i=!0,e=e.substr(1)),e=t?e+n(o):n(o)+e,i&&(e="-"+e)),e}var o=String.prototype.toLowerCase,a=String.prototype.toUpperCase;function u(e){var r,n,u;switch(e.specifier){case"b":r=2;break;case"o":r=8;break;case"x":case"X":r=16;break;default:r=10}if(n=e.arg,u=parseInt(n,10),!isFinite(u)){if(!t(n))throw new Error("invalid integer. Value: "+n);u=0}return u<0&&("u"===e.specifier||10!==r)&&(u=4294967295+u+1),u<0?(n=(-u).toString(r),e.precision&&(n=i(n,e.precision,e.padRight)),n="-"+n):(n=u.toString(r),u||e.precision?e.precision&&(n=i(n,e.precision,e.padRight)):n="",e.sign&&(n=e.sign+n)),16===r&&(e.alternate&&(n="0x"+n),n=e.specifier===a.call(e.specifier)?a.call(n):o.call(n)),8===r&&e.alternate&&"0"!==n.charAt(0)&&(n="0"+n),n}var s=Math.abs,l=String.prototype.toLowerCase,f=String.prototype.toUpperCase,h=String.prototype.replace,c=/e\+(\d)$/,p=/e-(\d)$/,y=/^(\d+)$/,g=/^(\d+)e/,m=/\.0$/,v=/\.0*e/,w=/(\..*[^0])0*e/;function d(e,r){var t,n;switch(r.specifier){case"e":case"E":n=e.toExponential(r.precision);break;case"f":case"F":n=e.toFixed(r.precision);break;case"g":case"G":s(e)<1e-4?((t=r.precision)>0&&(t-=1),n=e.toExponential(t)):n=e.toPrecision(r.precision),r.alternate||(n=h.call(n,w,"$1e"),n=h.call(n,v,"e"),n=h.call(n,m,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),r.alternate&&(n=h.call(n,y,"$1."),n=h.call(n,g,"$1.e")),e>=0&&r.sign&&(n=r.sign+n),n=r.specifier===f.call(r.specifier)?f.call(n):l.call(n)}function b(e){var r,t="";for(r=0;r<e;r++)t+=" ";return t}var E=String.fromCharCode,T=Array.isArray;function _(e){return e!=e}function x(e){var r={};return r.specifier=e.specifier,r.precision=void 0===e.precision?1:e.precision,r.width=e.width,r.flags=e.flags||"",r.mapping=e.mapping,r}function V(e){var r,n,o,a,s,l,f,h,c,p,y,g,m,v;if(!T(e))throw new TypeError("invalid argument. First argument must be an array. Value: `"+e+"`.");for(l="",f=1,c=0;c<e.length;c++)if(o=e[c],"string"==typeof o)l+=o;else{if(r=void 0!==o.precision,!(o=x(o)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+c+"`. Value: `"+o+"`.");for(o.mapping&&(f=o.mapping),n=o.flags,p=0;p<n.length;p++)switch(a=n.charAt(p)){case" ":o.sign=" ";break;case"+":o.sign="+";break;case"-":o.padRight=!0,o.padZeros=!1;break;case"0":o.padZeros=n.indexOf("-")<0;break;case"#":o.alternate=!0;break;default:throw new Error("invalid flag: "+a)}if("*"===o.width){if(o.width=parseInt(arguments[f],10),f+=1,_(o.width))throw new TypeError("the argument for * width at position "+f+" is not a number. Value: `"+o.width+"`.");o.width<0&&(o.padRight=!0,o.width=-o.width)}if(r&&"*"===o.precision){if(o.precision=parseInt(arguments[f],10),f+=1,_(o.precision))throw new TypeError("the argument for * precision at position "+f+" is not a number. Value: `"+o.precision+"`.");o.precision<0&&(o.precision=1,r=!1)}switch(o.arg=arguments[f],o.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":r&&(o.padZeros=!1),o.arg=u(o);break;case"s":o.maxWidth=r?o.precision:-1,o.arg=String(o.arg);break;case"c":if(!_(o.arg)){if((s=parseInt(o.arg,10))<0||s>127)throw new Error("invalid character code. Value: "+o.arg);o.arg=_(s)?String(o.arg):E(s)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(r||(o.precision=6),h=parseFloat(o.arg),!isFinite(h)){if(!t(o.arg))throw new Error("invalid floating-point number. Value: "+l);h=o.arg,o.padZeros=!1}o.arg=d(h,o);break;default:throw new Error("invalid specifier: "+o.specifier)}o.maxWidth>=0&&o.arg.length>o.maxWidth&&(o.arg=o.arg.substring(0,o.maxWidth)),o.padZeros?o.arg=i(o.arg,o.width||o.precision,o.padRight):o.width&&(o.arg=(y=o.arg,g=o.width,m=o.padRight,v=void 0,(v=g-y.length)<0?y:y=m?y+b(v):b(v)+y)),l+=o.arg||"",f+=1}return l}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function S(e){var r={mapping:e[1]?parseInt(e[1],10):void 0,flags:e[2],width:e[3],precision:e[5],specifier:e[6]};return"."===e[4]&&void 0===e[5]&&(r.precision="1"),r}function F(e){var r,t,n,i;for(t=[],i=0,n=A.exec(e);n;)(r=e.slice(i,A.lastIndex-n[0].length)).length&&t.push(r),"%"===n[6]?t.push("%"):t.push(S(n)),i=A.lastIndex,n=A.exec(e);return(r=e.slice(i)).length&&t.push(r),t}function j(e){var r,t;if("string"!=typeof e)throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",e));for(r=[F(e)],t=1;t<arguments.length;t++)r.push(arguments[t]);return V.apply(null,r)}var I,O=Object.prototype,k=O.toString,M=O.__defineGetter__,L=O.__defineSetter__,R=O.__lookupGetter__,C=O.__lookupSetter__;I=function(){try{return e({},"x",{}),!0}catch(e){return!1}}()?r:function(e,r,t){var n,i,o,a;if("object"!=typeof e||null===e||"[object Array]"===k.call(e))throw new TypeError(j("invalid argument. First argument must be an object. Value: `%s`.",e));if("object"!=typeof t||null===t||"[object Array]"===k.call(t))throw new TypeError(j("invalid argument. Property descriptor must be an object. Value: `%s`.",t));if((i="value"in t)&&(R.call(e,r)||C.call(e,r)?(n=e.__proto__,e.__proto__=O,delete e[r],e[r]=t.value,e.__proto__=n):e[r]=t.value),o="get"in t,a="set"in t,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&&M&&M.call(e,r,t.get),a&&L&&L.call(e,r,t.set),e};var B=I;function N(e,r,t){B(e,r,{configurable:!1,enumerable:!1,writable:!1,value:t})}function P(e){return"string"==typeof e}var Y="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function U(){return Y&&"symbol"==typeof Symbol.toStringTag}var D=Object.prototype.toString;var W=Object.prototype.hasOwnProperty;function J(e,r){return null!=e&&W.call(e,r)}var G="function"==typeof Symbol?Symbol:void 0,$="function"==typeof G?G.toStringTag:"";var K=U()?function(e){var r,t,n;if(null==e)return D.call(e);t=e[$],r=J(e,$);try{e[$]=void 0}catch(r){return D.call(e)}return n=D.call(e),r?e[$]=t:delete e[$],n}:function(e){return D.call(e)},Z=String.prototype.valueOf;var z=U();function H(e){return"object"==typeof e&&(e instanceof String||(z?function(e){try{return Z.call(e),!0}catch(e){return!1}}(e):"[object String]"===K(e)))}function X(e){return P(e)||H(e)}N(X,"isPrimitive",P),N(X,"isObject",H);var q=/[-\/\\^$*+?.()|[\]{}]/g;var Q=/./;function ee(e){return"boolean"==typeof e}var re=Boolean,te=Boolean.prototype.toString;var ne=U();function ie(e){return"object"==typeof e&&(e instanceof re||(ne?function(e){try{return te.call(e),!0}catch(e){return!1}}(e):"[object Boolean]"===K(e)))}function oe(e){return ee(e)||ie(e)}N(oe,"isPrimitive",ee),N(oe,"isObject",ie);var ae="object"==typeof self?self:null,ue="object"==typeof window?window:null,se="object"==typeof global?global:null,le="object"==typeof globalThis?globalThis:null;var fe=function(e){if(arguments.length){if(!ee(e))throw new TypeError(j("invalid argument. Must provide a boolean. Value: `%s`.",e));if(e)return new Function("return this;")()}if(le)return le;if(ae)return ae;if(ue)return ue;if(se)return se;throw new Error("unexpected error. Unable to resolve global object.")}(),he=fe.document&&fe.document.childNodes,ce=Int8Array;function pe(){return/^\s*function\s*([^(]*)/i}var ye=/^\s*function\s*([^(]*)/i;N(pe,"REGEXP",ye);var ge=Array.isArray?Array.isArray:function(e){return"[object Array]"===K(e)};function me(e){if("function"!=typeof e)throw new TypeError(j("invalid argument. Must provide a function. Value: `%s`.",e));return function(r){var t,n;if(!ge(r))return!1;if(0===(t=r.length))return!1;for(n=0;n<t;n++)if(!1===e(r[n]))return!1;return!0}}function ve(e){return null!==e&&"object"==typeof e}function we(e){return ve(e)&&(e._isBuffer||e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))}function de(e){var r,t,n;if(("Object"===(t=K(e).slice(8,-1))||"Error"===t)&&e.constructor){if("string"==typeof(n=e.constructor).name)return n.name;if(r=ye.exec(n.toString()))return r[1]}return we(e)?"Buffer":t}N(ve,"isObjectLikeArray",me(ve));var be="function"==typeof Q||"object"==typeof ce||"function"==typeof he?function(e){return de(e).toLowerCase()}:function(e){var r;return null===e?"null":"object"===(r=typeof e)?de(e).toLowerCase():r};function Ee(e){return"function"===be(e)}var Te=RegExp.prototype.exec;var _e=U();function xe(e){return"object"==typeof e&&(e instanceof RegExp||(_e?function(e){try{return Te.call(e),!0}catch(e){return!1}}(e):"[object RegExp]"===K(e)))}function Ve(e,r,t){return e.replace(r,t)}function Ae(e,r,t){if(!P(e))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",e));if(P(r))r=new RegExp(function(e){var r,t;if(!P(e))throw new TypeError(j("invalid argument. Must provide a regular expression string. Value: `%s`.",e));if("/"===e[0])for(t=e.length-1;t>=0&&"/"!==e[t];t--);return void 0===t||t<=0?e.replace(q,"\\$&"):(r=(r=e.substring(1,t)).replace(q,"\\$&"),e=e[0]+r+e.substring(t))}(r),"g");else if(!xe(r))throw new TypeError(j("invalid argument. Second argument must be a string or regular expression. Value: `%s`.",r));if(!P(t)&&!Ee(t))throw new TypeError(j("invalid argument. Third argument must be a string or replacement function. Value: `%s`.",t));return Ve(e,r,t)}var Se=/[!"'(),–.:;<>?`{}|~\/\\\[\]]/g;var Fe={"i.e.":["i.e."],"I.e.":["I.e."],"I.E.":["I.E."],"e.g.":["e.g."],"E.g.":["E.g."],"E.G.":["E.G."],"et al.":["et al."],"etc.":["etc."],"vs.":["vs."],"A.S.A.P":["A.S.A.P"],"E.T.A.":["E.T.A."],"D.I.Y":["D.I.Y"],"R.S.V.P":["R.S.V.P"],"P.S.":["P.S."],"B.Y.O.B":["B.Y.O.B"],"Ms.":["Ms."],"Mr.":["Mr."],"Dr.":["Dr."],"Prof.":["Prof."],"Mrs.":["Mrs."],"Messrs.":["Messrs."],"Gov.":["Gov."],"Gen.":["Gen."],"Lt.":["Lt."],"Col.":["Col."],"Mt.":["Mt."],"Bros.":["Bros."],"Corp.":["Corp."],"Co.":["Co."],"co.":["co."],"Inc.":["Inc."],"Ltd.":["Ltd."],"Rep.":["Rep."],"Sen.":["Sen."],"Jr.":["Jr."],"Sr.":["Sr."],"Ph.D.":["Ph.D."],"J.D.":["J.D."],"M.D.":["M.D."],"Rev.":["Rev."],"Adm.":["Adm."],"St.":["St."],"a.m.":["a.m."],"p.m.":["p.m."],"b.c.":["b.c."],"B.C.":["B.C."],"a.d.":["a.d."],"A.D.":["A.D."],"b.c.e.":["b.c.e."],"B.C.E.":["B.C.E."],"Jan.":["Jan."],"Feb.":["Feb."],"Mar.":["Mar."],"Apr.":["Apr."],"May.":["May."],"Jun.":["Jun."],"Jul.":["Jul."],"Aug.":["Aug."],"Sep.":["Sep."],"Sept.":["Sept."],"Oct.":["Oct."],"Nov.":["Nov."],"Dec.":["Dec."],"Ala.":["Ala."],"Ariz.":["Ariz."],"Ark.":["Ark."],"Calif.":["Calif."],"Colo.":["Colo."],"Conn.":["Conn."],"Del.":["Del."],"D.C.":["D.C."],"Fla.":["Fla."],"Ga.":["Ga."],"Ill.":["Ill."],"Ind.":["Ind."],"Kans.":["Kans."],"Kan.":["Kan."],"Ky.":["Ky."],"La.":["La."],"Md.":["Md."],"Mass.":["Mass."],"Mich.":["Mich."],"Minn.":["Minn."],"Miss.":["Miss."],"Mo.":["Mo."],"Mont.":["Mont."],"Nebr.":["Nebr."],"Neb.":["Neb."],"Nev.":["Nev."],"N.H.":["N.H."],"N.J.":["N.J."],"N.M.":["N.M."],"N.Y.":["N.Y."],"N.C.":["N.C."],"N.D.":["N.D."],"Okla.":["Okla."],"Ore.":["Ore."],"Pa.":["Pa."],"Tenn.":["Tenn."],"Va.":["Va."],"Wash.":["Wash."],"Wis.":["Wis."]},je={"^_^":["^_^"],"=D":["=D"],";-p":[";-p"],":O":[":O"],":-/":[":-/"],xD:["xD"],V_V:["V_V"],";(":[";("],"(:":["(:"],'")':['")'],":Y":[":Y"],":]":[":]"],":3":[":3"],":(":[":("],":-)":[":-)"],"=3":["=3"],":))":[":))"],":>":[":>"],";p":[";p"],":p":[":p"],"=[[":["=[["],xDD:["xDD"],"<333":["<333"],"<33":["<33"],":P":[":P"],"o.O":["o.O"],"<3":["<3"],";-)":[";-)"],":)":[":)"],"-_-":["-_-"],":')":[":')"],o_O:["o_O"],";)":[";)"],"=]":["=]"],"(=":["(="],"-__-":["-__-"],":/":[":/"],":0":[":0"],"(^_^)":["(^_^)"],";D":[";D"],o_o:["o_o"],":((":[":(("],"=)":["=)"]},Ie={"'s":["'s"],"'S":["'S"],"ain't":["ai","n't"],aint:["ai","nt"],"Ain't":["Ai","n't"],"aren't":["are","n't"],arent:["are","nt"],"Aren't":["Are","n't"],"can't":["ca","n't"],cant:["ca","nt"],"Can't":["Ca","n't"],"can't've":["ca","n't","'ve"],"'cause":["'cause'"],cannot:["can","not"],Cannot:["Can","not"],"could've":["could","'ve"],couldve:["could","ve"],"Could've":["Could","'ve"],"couldn't":["could","n't"],couldnt:["could","nt"],"Couldn't":["Could","n't"],"couldn't've":["could","n't","'ve"],couldntve:["could","nt","ve"],"Couldn't've":["Could","n't","'ve"],"didn't":["did","n't"],didnt:["did","nt"],"Didn't":["Did","n't"],"doesn't":["does","n't"],doesnt:["does","nt"],"Doesn't":["Does","n't"],"don't":["do","n't"],dont:["do","nt"],"Don't":["Do","n't"],"hadn't":["had","n't"],hadnt:["had","nt"],"Hadn't":["Had","n't"],"hadn't've":["had","n't","'ve"],"hasn't":["has","n't"],hasnt:["has","nt"],"haven't":["have","n't"],havent:["have","nt"],"he'd":["he","'d"],hed:["he","d"],"he'd've":["he","'d","'ve"],hedve:["he","d","ve"],"he'll":["he","'ll"],"he'll've":["he","'ll","'ve"],"he's":["he","'s"],hes:["he","s"],"how'd":["how","'d"],howd:["how","d"],"how'd'y":["how","'d","'y"],"how'll":["how","'ll"],howll:["how","ll"],"how's":["how","'s"],hows:["how","s"],"I'd":["I","'d"],"I'd've":["I","'d","'ve"],"I'll":["I","'ll"],"i'll":["i","'ll"],"I'll've":["I","'ll","'ve"],"i'll've":["i","'ll","'ve"],"I'm":["I","'m"],"i'm":["i","'m"],Im:["I","m"],im:["i","m"],"I'ma":["I","'ma"],"i'ma":["i","'ma"],"I've":["I","'ve"],"i've":["i","'ve"],"isn't":["is","n't"],isnt:["is","nt"],"Isn't":["Is","n't"],"It'd":["It","'d"],"it'd":["it","'d"],"it'd've":["it","'d","'ve"],"it'll've":["it","'ll","'ve"],"it'll":["it","'ll"],itll:["it","ll"],"it's":["it","'s"],"let's":["let","'s"],lets:["let","s"],"ma'am":["ma'am"],"mayn't":["may","n't"],"mightn't":["might","n't"],"mightn't've":["might","n't","'ve"],"might've":["might","'ve"],"mustn't":["must","n't"],"mustn't've":["must","n't","'ve"],"must've":["must","'ve"],"needn't":["need","n't"],"needn't've":["need","n't","'ve"],"not've":["not","'ve"],"o'clock":["o'clock"],"oughtn't":["ought","n't"],"oughtn't've":["ought","n't","'ve"],"so've":["so","'ve"],"so's":["so","'s"],"shan't":["sha","n't"],"sha'n't":["sha'","n't"],"shan't've":["sha","n't","'ve"],"she'd":["she","'d"],"she'd've":["she","'d","'ve"],"she'll":["she","'ll"],"she'll've":["she","'ll","'ve"],"she's":["she","'s"],"should've":["should","'ve"],"shouldn't":["should","n't"],"shouldn't've":["should","n't","'ve"],"that'd":["that","'d"],"that'd've":["that","'d","'ve"],"that's":["that","'s"],thats:["that","s"],"there'd":["there","'d"],"there'd've":["there","'d","'ve"],"there's":["there","'s"],"they'd":["they","'d"],"They'd":["They","'d"],"they'd've":["they","'d","'ve"],"They'd've":["They","'d","'ve"],"they'll":["they","'ll"],"They'll":["They","'ll"],"they'll've":["they","'ll","'ve"],"They'll've":["They","'ll","'ve"],"they're":["they","'re"],"They're":["They","'re"],"they've":["they","'ve"],"They've":["They","'ve"],"to've":["to","'ve"],"wasn't":["was","n't"],"we'd":["we","'d"],"We'd":["We","'d"],"we'd've":["we","'d","'ve"],"we'll":["we","'ll"],"We'll":["We","'ll"],"we'll've":["we","'ll","'ve"],"We'll've":["We","'ll","'ve"],"we're":["we","'re"],"We're":["We","'re"],"we've":["we","'ve"],"We've":["We","'ve"],"weren't":["were","n't"],"what'll":["what","'ll"],"what'll've":["what","'ll","'ve"],"what're":["what","'re"],"what's":["what","'s"],"what've":["what","'ve"],"when's":["when","'s"],"when've":["when","'ve"],"where'd":["where","'d"],"where's":["where","'s"],"where've":["where","'ve"],"who'd":["who","'d"],"who'll":["who","'ll"],"who'll've":["who","'ll'","'ve'"],"who're":["who","'re"],"who's":["who","'s"],"who've":["who","'ve"],"why've":["why","'ve"],"why'll":["why","'ll"],"why're":["why","'re"],"why's":["why","'s"],"will've":["will","'ve"],"won't":["wo","n't"],wont:["wo","nt"],"won't've":["wo","n't","'ve"],"would've":["would","'ve"],"wouldn't":["would","n't"],"wouldn't've":["would","n't","'ve"],"y'all":["y'","all"],"y'all'd":["y'","all","'d"],"y'all'd've":["y'","all","'d","'ve"],"y'all're":["y'","all","'re'"],"y'all've":["y'","all","ve"],"you'd":["you","'d"],"You'd":["You","'d"],"you'd've":["you","'d","'ve"],"You'd've":["You","'d","'ve"],"you'll":["you","'ll"],"You'll":["You","'ll"],"you'll've":["you","'ll","'ve"],"You'll've":["You","'ll","'ve"],"you're":["you","'re"],"You're":["You","'re"],"you've":["you","'ve"],"You've":["You","'ve"]},Oe=/^([,([{*<"“'`‘]|\.{1,3})/gi,ke=/([,.!?%*>:;"'”`)\]}]|\.\.\.)$/gi;function Me(e,r){var t;for(t=0;t<r.length;t++)e.push(r[t]);return e}function Le(e){var r,t,n,i=[],o=[];do{je[e]||Fe[e]||Ie[e]?t=!0:(r=e.split(Oe)).length>1?(i.push(r[1]),e=r[2]):(r=e.split(ke)).length>1?(e=r[0],o.unshift(r[1])):t=!0}while(!t);return n=i,e&&n.push(e),"..."===o[o.length-1]&&(o.pop(),o.unshift("...")),Me(n,o),n}function Re(e){return e.toUpperCase()}function Ce(e){return e.toLowerCase()}var Be="function";function Ne(e){return typeof e.get===Be&&typeof e.set===Be}var Pe={complex128:function(e,r){return e.get(r)},complex64:function(e,r){return e.get(r)},default:function(e,r){return e.get(r)}};function Ye(e){var r=Pe[e];return"function"==typeof r?r:Pe.default}var Ue={float64:function(e,r){return e[r]},float32:function(e,r){return e[r]},int32:function(e,r){return e[r]},int16:function(e,r){return e[r]},int8:function(e,r){return e[r]},uint32:function(e,r){return e[r]},uint16:function(e,r){return e[r]},uint8:function(e,r){return e[r]},uint8c:function(e,r){return e[r]},generic:function(e,r){return e[r]},default:function(e,r){return e[r]}};function De(e){var r=Ue[e];return"function"==typeof r?r:Ue.default}var We={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"},Je="function"==typeof Float64Array;var Ge="function"==typeof Float64Array?Float64Array:null;var $e="function"==typeof Float64Array?Float64Array:void 0;var Ke=function(){var e,r,t;if("function"!=typeof Ge)return!1;try{r=new Ge([1,3.14,-3.14,NaN]),t=r,e=(Je&&t instanceof Float64Array||"[object Float64Array]"===K(t))&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){e=!1}return e}()?$e:function(){throw new Error("not implemented")},Ze="function"==typeof Float32Array;var ze=Number.POSITIVE_INFINITY,He="function"==typeof Float32Array?Float32Array:null;var Xe="function"==typeof Float32Array?Float32Array:void 0;var qe=function(){var e,r,t;if("function"!=typeof He)return!1;try{r=new He([1,3.14,-3.14,5e40]),t=r,e=(Ze&&t instanceof Float32Array||"[object Float32Array]"===K(t))&&1===r[0]&&3.140000104904175===r[1]&&-3.140000104904175===r[2]&&r[3]===ze}catch(r){e=!1}return e}()?Xe:function(){throw new Error("not implemented")},Qe="function"==typeof Uint32Array;var er="function"==typeof Uint32Array?Uint32Array:null;var rr="function"==typeof Uint32Array?Uint32Array:void 0;var tr=function(){var e,r,t;if("function"!=typeof er)return!1;try{r=new er(r=[1,3.14,-3.14,4294967296,4294967297]),t=r,e=(Qe&&t instanceof Uint32Array||"[object Uint32Array]"===K(t))&&1===r[0]&&3===r[1]&&4294967293===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?rr:function(){throw new Error("not implemented")},nr="function"==typeof Int32Array;var ir="function"==typeof Int32Array?Int32Array:null;var or="function"==typeof Int32Array?Int32Array:void 0;var ar=function(){var e,r,t;if("function"!=typeof ir)return!1;try{r=new ir([1,3.14,-3.14,2147483648]),t=r,e=(nr&&t instanceof Int32Array||"[object Int32Array]"===K(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-2147483648===r[3]}catch(r){e=!1}return e}()?or:function(){throw new Error("not implemented")},ur="function"==typeof Uint16Array;var sr="function"==typeof Uint16Array?Uint16Array:null;var lr="function"==typeof Uint16Array?Uint16Array:void 0;var fr=function(){var e,r,t;if("function"!=typeof sr)return!1;try{r=new sr(r=[1,3.14,-3.14,65536,65537]),t=r,e=(ur&&t instanceof Uint16Array||"[object Uint16Array]"===K(t))&&1===r[0]&&3===r[1]&&65533===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?lr:function(){throw new Error("not implemented")},hr="function"==typeof Int16Array;var cr="function"==typeof Int16Array?Int16Array:null;var pr="function"==typeof Int16Array?Int16Array:void 0;var yr=function(){var e,r,t;if("function"!=typeof cr)return!1;try{r=new cr([1,3.14,-3.14,32768]),t=r,e=(hr&&t instanceof Int16Array||"[object Int16Array]"===K(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-32768===r[3]}catch(r){e=!1}return e}()?pr:function(){throw new Error("not implemented")},gr="function"==typeof Uint8Array;var mr="function"==typeof Uint8Array?Uint8Array:null;var vr="function"==typeof Uint8Array?Uint8Array:void 0;var wr=function(){var e,r,t;if("function"!=typeof mr)return!1;try{r=new mr(r=[1,3.14,-3.14,256,257]),t=r,e=(gr&&t instanceof Uint8Array||"[object Uint8Array]"===K(t))&&1===r[0]&&3===r[1]&&253===r[2]&&0===r[3]&&1===r[4]}catch(r){e=!1}return e}()?vr:function(){throw new Error("not implemented")},dr="function"==typeof Uint8ClampedArray;var br="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Er="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var Tr=function(){var e,r,t;if("function"!=typeof br)return!1;try{r=new br([-1,0,1,3.14,4.99,255,256]),t=r,e=(dr&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===K(t))&&0===r[0]&&0===r[1]&&1===r[2]&&3===r[3]&&5===r[4]&&255===r[5]&&255===r[6]}catch(r){e=!1}return e}()?Er:function(){throw new Error("not implemented")},_r="function"==typeof Int8Array;var xr="function"==typeof Int8Array?Int8Array:null;var Vr="function"==typeof Int8Array?Int8Array:void 0;var Ar=function(){var e,r,t;if("function"!=typeof xr)return!1;try{r=new xr([1,3.14,-3.14,128]),t=r,e=(_r&&t instanceof Int8Array||"[object Int8Array]"===K(t))&&1===r[0]&&3===r[1]&&-3===r[2]&&-128===r[3]}catch(r){e=!1}return e}()?Vr:function(){throw new Error("not implemented")};function Sr(e){return"number"==typeof e}var Fr=Number,jr=Fr.prototype.toString;var Ir=U();function Or(e){return"object"==typeof e&&(e instanceof Fr||(Ir?function(e){try{return jr.call(e),!0}catch(e){return!1}}(e):"[object Number]"===K(e)))}function kr(e){return Sr(e)||Or(e)}N(kr,"isPrimitive",Sr),N(kr,"isObject",Or);var Mr=Fr.NEGATIVE_INFINITY,Lr=Math.floor;function Rr(e){return Lr(e)===e}function Cr(e){return e<ze&&e>Mr&&Rr(e)}function Br(e){return Sr(e)&&Cr(e)}function Nr(e){return Or(e)&&Cr(e.valueOf())}function Pr(e){return Br(e)||Nr(e)}function Yr(e){return Br(e)&&e>=0}function Ur(e){return Nr(e)&&e.valueOf()>=0}function Dr(e){return Yr(e)||Ur(e)}N(Pr,"isPrimitive",Br),N(Pr,"isObject",Nr),N(Dr,"isPrimitive",Yr),N(Dr,"isObject",Ur);var Wr=4294967295;function Jr(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&Rr(e.length)&&e.length>=0&&e.length<=Wr}var Gr=9007199254740991;function $r(e){return"object"==typeof e&&null!==e&&"number"==typeof e.length&&Rr(e.length)&&e.length>=0&&e.length<=Gr}var Kr="function"==typeof ArrayBuffer;function Zr(e){return Kr&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===K(e)}function zr(e){return"object"==typeof e&&null!==e&&!ge(e)}var Hr=me(X.isPrimitive),Xr=me(X.isObject),qr=me(X);function Qr(e,r,t){B(e,r,{configurable:!1,enumerable:!0,writable:!1,value:t})}function et(e,r){if(!(this instanceof et))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Sr(e))throw new TypeError(j("invalid argument. Real component must be a number. Value: `%s`.",e));if(!Sr(r))throw new TypeError(j("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return Qr(this,"re",e),Qr(this,"im",r),this}N(qr,"primitives",Hr),N(qr,"objects",Xr),N(et,"name","Complex128"),N(et,"BYTES_PER_ELEMENT",8),N(et.prototype,"BYTES_PER_ELEMENT",8),N(et.prototype,"byteLength",16),N(et.prototype,"toString",(function(){var e=""+this.re;return this.im<0?e+=" - "+-this.im:e+=" + "+this.im,e+="i"})),N(et.prototype,"toJSON",(function(){var e={type:"Complex128"};return e.re=this.re,e.im=this.im,e}));var rt="function"==typeof Math.fround?Math.fround:null,tt=new qe(1);var nt="function"==typeof rt?rt:function(e){return tt[0]=e,tt[0]};function it(e,r){if(!(this instanceof it))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Sr(e))throw new TypeError(j("invalid argument. Real component must be a number. Value: `%s`.",e));if(!Sr(r))throw new TypeError(j("invalid argument. Imaginary component must be a number. Value: `%s`.",r));return Qr(this,"re",nt(e)),Qr(this,"im",nt(r)),this}function ot(e){return e instanceof et||e instanceof it||"object"==typeof e&&null!==e&&"number"==typeof e.re&&"number"==typeof e.im}function at(e){return Rr(e/2)}N(it,"name","Complex64"),N(it,"BYTES_PER_ELEMENT",4),N(it.prototype,"BYTES_PER_ELEMENT",4),N(it.prototype,"byteLength",8),N(it.prototype,"toString",(function(){var e=""+this.re;return this.im<0?e+=" - "+-this.im:e+=" + "+this.im,e+="i"})),N(it.prototype,"toJSON",(function(){var e={type:"Complex64"};return e.re=this.re,e.im=this.im,e}));var ut=8;function st(e){return"object"==typeof e&&null!==e&&"Complex64Array"===e.constructor.name&&e.BYTES_PER_ELEMENT===ut}var lt=16;function ft(e){return"object"==typeof e&&null!==e&&"Complex128Array"===e.constructor.name&&e.BYTES_PER_ELEMENT===lt}function ht(){return"function"==typeof G&&"symbol"==typeof G("foo")&&J(G,"iterator")&&"symbol"==typeof G.iterator}var ct=ht()?Symbol.iterator:null;function pt(e,r,t){B(e,r,{configurable:!1,enumerable:!1,get:t})}function yt(e){return e.re}function gt(e){return e.im}function mt(e,r){return new qe(e.buffer,e.byteOffset+e.BYTES_PER_ELEMENT*r,2*(e.length-r))}function vt(e,r){return new Ke(e.buffer,e.byteOffset+e.BYTES_PER_ELEMENT*r,2*(e.length-r))}function wt(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(Jr(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!ot(n))return new TypeError(j("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(yt(n),gt(n))}return r}var dt=2*qe.BYTES_PER_ELEMENT,bt=ht();function Et(e){return e instanceof xt||"object"==typeof e&&null!==e&&("Complex64Array"===e.constructor.name||"Complex128Array"===e.constructor.name)&&"number"==typeof e._length&&"object"==typeof e._buffer}function Tt(e){return e===xt||"Complex128Array"===e.name}function _t(e,r){return new it(e[r*=2],e[r+1])}function xt(){var e,r,t,n;if(r=arguments.length,!(this instanceof xt))return 0===r?new xt:1===r?new xt(arguments[0]):2===r?new xt(arguments[0],arguments[1]):new xt(arguments[0],arguments[1],arguments[2]);if(0===r)t=new qe(0);else if(1===r)if(Yr(arguments[0]))t=new qe(2*arguments[0]);else if($r(arguments[0]))if((n=(t=arguments[0]).length)&&ge(t)&&ot(t[0])){if(t=function(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i<t;i++){if(!ot(n=r[i]))return null;e[o]=yt(n),e[o+1]=gt(n),o+=2}return e}(new qe(2*n),t),null===t){if(!at(n))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));t=new qe(arguments[0])}}else{if(st(t))t=mt(t,0);else if(ft(t))t=vt(t,0);else if(!at(n))throw new RangeError(j("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));t=new qe(t)}else if(Zr(arguments[0])){if(!Rr((t=arguments[0]).byteLength/dt))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",dt,t.byteLength));t=new qe(t)}else{if(!zr(arguments[0]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(t=arguments[0],!1===bt)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",t));if(!Ee(t[ct]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!Ee((t=t[ct]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if((t=wt(t))instanceof Error)throw t;t=new qe(t)}else{if(!Zr(t=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(!Yr(e=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",e));if(!Rr(e/dt))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",dt,e));if(2===r){if(!Rr((n=t.byteLength-e)/dt))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",dt,n));t=new qe(t,e)}else{if(!Yr(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*dt>t.byteLength-e)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*dt));t=new qe(t,e,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function Vt(e){return e.re}function At(e){return e.im}function St(e){var r,t,n;for(r=[];!(t=e.next()).done;)if(Jr(n=t.value)&&n.length>=2)r.push(n[0],n[1]);else{if(!ot(n))return new TypeError(j("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));r.push(Vt(n),At(n))}return r}N(xt,"BYTES_PER_ELEMENT",dt),N(xt,"name","Complex64Array"),N(xt,"from",(function(e){var r,t,n,i,o,a,u,s,l,f,h,c;if(!Ee(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ee(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(Et(e)){if(s=e.length,n){for(o=(i=new this(s))._buffer,c=0,h=0;h<s;h++){if(ot(f=n.call(r,e.get(h),h)))o[c]=yt(f),o[c+1]=gt(f);else{if(!(Jr(f)&&f.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",f));o[c]=f[0],o[c+1]=f[1]}c+=2}return i}return new this(e)}if($r(e)){if(n){for(s=e.length,u=e.get&&e.set?Ye("default"):De("default"),h=0;h<s;h++)if(!ot(u(e,h))){l=!0;break}if(l){if(!at(s))throw new RangeError(j("invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.",2,s));for(o=(i=new this(s/2))._buffer,h=0;h<s;h++)o[h]=n.call(r,u(e,h),h);return i}for(o=(i=new this(s))._buffer,c=0,h=0;h<s;h++){if(ot(f=n.call(r,u(e,h),h)))o[c]=yt(f),o[c+1]=gt(f);else{if(!(Jr(f)&&f.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",f));o[c]=f[0],o[c+1]=f[1]}c+=2}return i}return new this(e)}if(zr(e)&&bt&&Ee(e[ct])){if(!Ee((o=e[ct]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if(a=n?function(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,Jr(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!ot(o))return new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(yt(o),gt(o))}return n}(o,n,r):wt(o),a instanceof Error)throw a;for(o=(i=new this(s=a.length/2))._buffer,h=0;h<s;h++)o[h]=a[h];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e))})),N(xt,"of",(function(){var e,r;if(!Ee(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);return new this(e)})),N(xt.prototype,"at",(function(e){if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rr(e))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",e));if(e<0&&(e+=this._length),!(e<0||e>=this._length))return _t(this._buffer,e)})),pt(xt.prototype,"buffer",(function(){return this._buffer.buffer})),pt(xt.prototype,"byteLength",(function(){return this._buffer.byteLength})),pt(xt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(xt.prototype,"BYTES_PER_ELEMENT",xt.BYTES_PER_ELEMENT),N(xt.prototype,"copyWithin",(function(e,r){if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*e,2*r):this._buffer.copyWithin(2*e,2*r,2*arguments[2]),this})),N(xt.prototype,"entries",(function(){var e,r,t,n,i,o;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,n=this._buffer,t=this._length,o=-1,N(r={},"next",(function(){if(o+=1,i||o>=t)return{done:!0};return{value:[o,_t(n,o)],done:!1}})),N(r,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),ct&&N(r,ct,(function(){return e.entries()})),r})),N(xt.prototype,"every",(function(e,r){var t,n;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)if(!e.call(r,_t(t,n),n,this))return!1;return!0})),N(xt.prototype,"fill",(function(e,r,t){var n,i,o,a,u,s;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(e))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(n=this._buffer,i=this._length,arguments.length>1){if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!Rr(t))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else r=0,t=i;for(a=yt(e),u=gt(e),s=r;s<t;s++)n[o=2*s]=a,n[o+1]=u;return this})),N(xt.prototype,"filter",(function(e,r){var t,n,i,o;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=[],i=0;i<this._length;i++)o=_t(t,i),e.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),N(xt.prototype,"find",(function(e,r){var t,n,i;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)if(i=_t(t,n),e.call(r,i,n,this))return i})),N(xt.prototype,"findIndex",(function(e,r){var t,n,i;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)if(i=_t(t,n),e.call(r,i,n,this))return n;return-1})),N(xt.prototype,"findLast",(function(e,r){var t,n,i;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=_t(t,n),e.call(r,i,n,this))return i})),N(xt.prototype,"findLastIndex",(function(e,r){var t,n,i;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=_t(t,n),e.call(r,i,n,this))return n;return-1})),N(xt.prototype,"forEach",(function(e,r){var t,n,i;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)i=_t(t,n),e.call(r,i,n,this)})),N(xt.prototype,"get",(function(e){if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Yr(e))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return _t(this._buffer,e)})),N(xt.prototype,"includes",(function(e,r){var t,n,i,o,a;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(e))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=yt(e),o=gt(e),t=this._buffer,a=r;a<this._length;a++)if(i===t[n=2*a]&&o===t[n+1])return!0;return!1})),N(xt.prototype,"indexOf",(function(e,r){var t,n,i,o,a;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(e))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=yt(e),o=gt(e),t=this._buffer,a=r;a<this._length;a++)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(xt.prototype,"join",(function(e){var r,t,n,i;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!P(e))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",e));n=e}for(r=[],t=this._buffer,i=0;i<this._length;i++)r.push(_t(t,i).toString());return r.join(n)})),N(xt.prototype,"keys",(function(){var e,r,t,n,i;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,t=this._length,i=-1,N(r={},"next",(function(){if(i+=1,n||i>=t)return{done:!0};return{value:i,done:!1}})),N(r,"return",(function(e){if(n=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),ct&&N(r,ct,(function(){return e.keys()})),r})),N(xt.prototype,"lastIndexOf",(function(e,r){var t,n,i,o,a;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(e))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r>=this._length?r=this._length-1:r<0&&(r+=this._length)}else r=this._length-1;for(i=yt(e),o=gt(e),t=this._buffer,a=r;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),pt(xt.prototype,"length",(function(){return this._length})),N(xt.prototype,"map",(function(e,r){var t,n,i,o,a;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(ot(a=e.call(r,_t(n,o),o,this)))t[2*o]=yt(a),t[2*o+1]=gt(a);else{if(!Jr(a)||2!==a.length)throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));t[2*o]=a[0],t[2*o+1]=a[1]}return i})),N(xt.prototype,"reduce",(function(e,r){var t,n,i,o;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));if(t=this._buffer,i=this._length,arguments.length>1)n=r,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=_t(t,0),o=1}for(;o<i;o++)n=e(n,_t(t,o),o,this);return n})),N(xt.prototype,"reduceRight",(function(e,r){var t,n,i,o;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));if(t=this._buffer,i=this._length,arguments.length>1)n=r,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=_t(t,i-1),o=i-2}for(;o>=0;o--)n=e(n,_t(t,o),o,this);return n})),N(xt.prototype,"reverse",(function(){var e,r,t,n,i,o;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=this._buffer,n=Lr(t/2),i=0;i<n;i++)o=t-i-1,r=e[2*i],e[2*i]=e[2*o],e[2*o]=r,r=e[2*i+1],e[2*i+1]=e[2*o+1],e[2*o+1]=r;return this})),N(xt.prototype,"set",(function(e){var r,t,n,i,o,a,u,s,l;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!Yr(t=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(ot(e)){if(t>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=yt(e),void(n[t+1]=gt(e))}if(Et(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*dt,r.buffer===n.buffer&&r.byteOffset<l&&r.byteOffset+r.byteLength>l){for(i=new qe(r.length),s=0;s<r.length;s++)i[s]=r[s];r=i}for(t*=2,l=0,s=0;s<a;s++)n[t]=r[l],n[t+1]=r[l+1],t+=2,l+=2}else{if(!$r(e))throw new TypeError(j("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",e));for(a=e.length,s=0;s<a;s++)if(!ot(e[s])){o=!0;break}if(o){if(!at(a))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(t+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*dt,r.buffer===n.buffer&&r.byteOffset<l&&r.byteOffset+r.byteLength>l){for(i=new qe(a),s=0;s<a;s++)i[s]=r[s];r=i}for(t*=2,a/=2,l=0,s=0;s<a;s++)n[t]=r[l],n[t+1]=r[l+1],t+=2,l+=2;return}if(t+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,s=0;s<a;s++)u=e[s],n[t]=yt(u),n[t+1]=gt(u),t+=2}})),N(xt.prototype,"slice",(function(e,r){var t,n,i,o,a,u,s;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)e=0,r=u;else{if(!Rr(e))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=u)<0&&(e=0),1===arguments.length)r=u;else{if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=u)<0&&(r=0):r>u&&(r=u)}}for(t=e<r?r-e:0,n=(i=new this.constructor(t))._buffer,s=0;s<t;s++)o=2*(s+e),n[2*s]=a[o],n[2*s+1]=a[o+1];return i})),N(xt.prototype,"some",(function(e,r){var t,n;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)if(e.call(r,_t(t,n),n,this))return!0;return!1})),N(xt.prototype,"sort",(function(e){var r,t,n,i,o;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=this._length,r=[],i=0;i<n;i++)r.push(_t(t,i));for(r.sort(e),i=0;i<n;i++)t[o=2*i]=yt(r[i]),t[o+1]=gt(r[i]);return this})),N(xt.prototype,"subarray",(function(e,r){var t,n,i;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)e=0,r=i;else{if(!Rr(e))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),1===arguments.length)r=i;else{if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=i)<0&&(r=0):r>i&&(r=i)}}return e>=i?(i=0,t=n.byteLength):e>=r?(i=0,t=n.byteOffset+e*dt):(i=r-e,t=n.byteOffset+e*dt),new this.constructor(n.buffer,t,i<0?0:i)})),N(xt.prototype,"toLocaleString",(function(e,r){var t,n,i,o,a;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!P(e)&&!Hr(e))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",e));n=e}if(arguments.length<2)t={};else{if(!zr(r))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",r));t=r}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(_t(o,a).toLocaleString(n,t));return i.join(",")})),N(xt.prototype,"toReversed",(function(){var e,r,t,n,i,o;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,r=new this.constructor(t),n=this._buffer,e=r._buffer,i=0;i<t;i++)o=t-i-1,e[2*i]=n[2*o],e[2*i+1]=n[2*o+1];return r})),N(xt.prototype,"toSorted",(function(e){var r,t,n,i;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=this._length,r=[],i=0;i<n;i++)r.push(_t(t,i));return r.sort(e),new xt(r)})),N(xt.prototype,"toString",(function(){var e,r,t;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=[],r=this._buffer,t=0;t<this._length;t++)e.push(_t(r,t).toString());return e.join(",")})),N(xt.prototype,"values",(function(){var e,r,t,n,i,o;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,i=this._buffer,t=this._length,o=-1,N(e={},"next",(function(){if(o+=1,n||o>=t)return{done:!0};return{value:_t(i,o),done:!1}})),N(e,"return",(function(e){if(n=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),ct&&N(e,ct,(function(){return r.values()})),e})),N(xt.prototype,"with",(function(e,r){var t,n,i;if(!Et(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rr(e))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",e));if(i=this._length,e<0&&(e+=i),e<0||e>=i)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",e));if(!ot(r))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",r));return(t=(n=new this.constructor(this._buffer))._buffer)[2*e]=yt(r),t[2*e+1]=gt(r),n}));var Ft=2*Ke.BYTES_PER_ELEMENT,jt=ht();function It(e){return e instanceof Mt||"object"==typeof e&&null!==e&&("Complex64Array"===e.constructor.name||"Complex128Array"===e.constructor.name)&&"number"==typeof e._length&&"object"==typeof e._buffer}function Ot(e){return e===Mt||"Complex64Array"===e.name}function kt(e,r){return new et(e[r*=2],e[r+1])}function Mt(){var e,r,t,n;if(r=arguments.length,!(this instanceof Mt))return 0===r?new Mt:1===r?new Mt(arguments[0]):2===r?new Mt(arguments[0],arguments[1]):new Mt(arguments[0],arguments[1],arguments[2]);if(0===r)t=new Ke(0);else if(1===r)if(Yr(arguments[0]))t=new Ke(2*arguments[0]);else if($r(arguments[0]))if((n=(t=arguments[0]).length)&&ge(t)&&ot(t[0])){if(t=function(e,r){var t,n,i,o;for(t=r.length,o=0,i=0;i<t;i++){if(!ot(n=r[i]))return null;e[o]=Vt(n),e[o+1]=At(n),o+=2}return e}(new Ke(2*n),t),null===t){if(!at(n))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));t=new Ke(arguments[0])}}else{if(st(t))t=mt(t,0);else if(ft(t))t=vt(t,0);else if(!at(n))throw new RangeError(j("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));t=new Ke(t)}else if(Zr(arguments[0])){if(!Rr((t=arguments[0]).byteLength/Ft))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Ft,t.byteLength));t=new Ke(t)}else{if(!zr(arguments[0]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(t=arguments[0],!1===jt)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",t));if(!Ee(t[ct]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!Ee((t=t[ct]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if((t=St(t))instanceof Error)throw t;t=new Ke(t)}else{if(!Zr(t=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(!Yr(e=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",e));if(!Rr(e/Ft))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Ft,e));if(2===r){if(!Rr((n=t.byteLength-e)/Ft))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Ft,n));t=new Ke(t,e)}else{if(!Yr(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Ft>t.byteLength-e)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Ft));t=new Ke(t,e,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function Lt(e){var r,t;for(r=[];!(t=e.next()).done;)r.push(re(t.value));return r}N(Mt,"BYTES_PER_ELEMENT",Ft),N(Mt,"name","Complex128Array"),N(Mt,"from",(function(e){var r,t,n,i,o,a,u,s,l,f,h,c;if(!Ee(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!Ee(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if(It(e)){if(s=e.length,n){for(o=(i=new this(s))._buffer,c=0,h=0;h<s;h++){if(ot(f=n.call(r,e.get(h),h)))o[c]=Vt(f),o[c+1]=At(f);else{if(!(Jr(f)&&f.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",f));o[c]=f[0],o[c+1]=f[1]}c+=2}return i}return new this(e)}if($r(e)){if(n){for(s=e.length,u=e.get&&e.set?Ye("default"):De("default"),h=0;h<s;h++)if(!ot(u(e,h))){l=!0;break}if(l){if(!at(s))throw new RangeError(j("invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.",s));for(o=(i=new this(s/2))._buffer,h=0;h<s;h++)o[h]=n.call(r,u(e,h),h);return i}for(o=(i=new this(s))._buffer,c=0,h=0;h<s;h++){if(ot(f=n.call(r,u(e,h),h)))o[c]=Vt(f),o[c+1]=At(f);else{if(!(Jr(f)&&f.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",f));o[c]=f[0],o[c+1]=f[1]}c+=2}return i}return new this(e)}if(zr(e)&&jt&&Ee(e[ct])){if(!Ee((o=e[ct]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));if(a=n?function(e,r,t){var n,i,o,a;for(n=[],a=-1;!(i=e.next()).done;)if(a+=1,Jr(o=r.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!ot(o))return new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Vt(o),At(o))}return n}(o,n,r):St(o),a instanceof Error)throw a;for(o=(i=new this(s=a.length/2))._buffer,h=0;h<s;h++)o[h]=a[h];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e))})),N(Mt,"of",(function(){var e,r;if(!Ee(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ot(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);return new this(e)})),N(Mt.prototype,"at",(function(e){if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rr(e))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",e));if(e<0&&(e+=this._length),!(e<0||e>=this._length))return kt(this._buffer,e)})),pt(Mt.prototype,"buffer",(function(){return this._buffer.buffer})),pt(Mt.prototype,"byteLength",(function(){return this._buffer.byteLength})),pt(Mt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(Mt.prototype,"BYTES_PER_ELEMENT",Mt.BYTES_PER_ELEMENT),N(Mt.prototype,"copyWithin",(function(e,r){if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*e,2*r):this._buffer.copyWithin(2*e,2*r,2*arguments[2]),this})),N(Mt.prototype,"entries",(function(){var e,r,t,n,i,o,a;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var r;if(o+=1,i||o>=n)return{done:!0};return r=new et(e[a+=2],e[a+1]),{value:[o,r],done:!1}})),N(t,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),ct&&N(t,ct,(function(){return r.entries()})),t})),N(Mt.prototype,"every",(function(e,r){var t,n;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)if(!e.call(r,kt(t,n),n,this))return!1;return!0})),N(Mt.prototype,"fill",(function(e,r,t){var n,i,o,a,u,s;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(e))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(n=this._buffer,i=this._length,arguments.length>1){if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!Rr(t))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else r=0,t=i;for(a=Vt(e),u=At(e),s=r;s<t;s++)n[o=2*s]=a,n[o+1]=u;return this})),N(Mt.prototype,"filter",(function(e,r){var t,n,i,o;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=[],i=0;i<this._length;i++)o=kt(t,i),e.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),N(Mt.prototype,"find",(function(e,r){var t,n,i;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)if(i=kt(t,n),e.call(r,i,n,this))return i})),N(Mt.prototype,"findIndex",(function(e,r){var t,n,i;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)if(i=kt(t,n),e.call(r,i,n,this))return n;return-1})),N(Mt.prototype,"findLast",(function(e,r){var t,n,i;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=kt(t,n),e.call(r,i,n,this))return i})),N(Mt.prototype,"findLastIndex",(function(e,r){var t,n,i;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=kt(t,n),e.call(r,i,n,this))return n;return-1})),N(Mt.prototype,"forEach",(function(e,r){var t,n,i;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)i=kt(t,n),e.call(r,i,n,this)})),N(Mt.prototype,"get",(function(e){if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Yr(e))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return kt(this._buffer,e)})),pt(Mt.prototype,"length",(function(){return this._length})),N(Mt.prototype,"includes",(function(e,r){var t,n,i,o,a;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(e))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=Vt(e),o=At(e),t=this._buffer,a=r;a<this._length;a++)if(i===t[n=2*a]&&o===t[n+1])return!0;return!1})),N(Mt.prototype,"indexOf",(function(e,r){var t,n,i,o,a;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(e))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(i=Vt(e),o=At(e),t=this._buffer,a=r;a<this._length;a++)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(Mt.prototype,"join",(function(e){var r,t,n,i;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!X(e))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",e));n=e}for(r=[],t=this._buffer,i=0;i<this._length;i++)r.push(kt(t,i).toString());return r.join(n)})),N(Mt.prototype,"keys",(function(){var e,r,t,n,i;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,t=this._length,i=-1,N(r={},"next",(function(){if(i+=1,n||i>=t)return{done:!0};return{value:i,done:!1}})),N(r,"return",(function(e){if(n=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),ct&&N(r,ct,(function(){return e.keys()})),r})),N(Mt.prototype,"lastIndexOf",(function(e,r){var t,n,i,o,a;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ot(e))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",e));if(arguments.length>1){if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r>=this._length?r=this._length-1:r<0&&(r+=this._length)}else r=this._length-1;for(i=Vt(e),o=At(e),t=this._buffer,a=r;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(Mt.prototype,"map",(function(e,r){var t,n,i,o,a;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(ot(a=e.call(r,kt(n,o),o,this)))t[2*o]=Vt(a),t[2*o+1]=At(a);else{if(!Jr(a)||2!==a.length)throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));t[2*o]=a[0],t[2*o+1]=a[1]}return i})),N(Mt.prototype,"reduce",(function(e,r){var t,n,i,o;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));if(t=this._buffer,i=this._length,arguments.length>1)n=r,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=kt(t,0),o=1}for(;o<i;o++)n=e(n,kt(t,o),o,this);return n})),N(Mt.prototype,"reduceRight",(function(e,r){var t,n,i,o;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));if(t=this._buffer,i=this._length,arguments.length>1)n=r,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=kt(t,i-1),o=i-2}for(;o>=0;o--)n=e(n,kt(t,o),o,this);return n})),N(Mt.prototype,"reverse",(function(){var e,r,t,n,i,o;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=this._buffer,n=Lr(t/2),i=0;i<n;i++)o=t-i-1,r=e[2*i],e[2*i]=e[2*o],e[2*o]=r,r=e[2*i+1],e[2*i+1]=e[2*o+1],e[2*o+1]=r;return this})),N(Mt.prototype,"set",(function(e){var r,t,n,i,o,a,u,s,l;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!Yr(t=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(ot(e)){if(t>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Vt(e),void(n[t+1]=At(e))}if(It(e)){if(t+(a=e._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e._buffer,l=n.byteOffset+t*Ft,r.buffer===n.buffer&&r.byteOffset<l&&r.byteOffset+r.byteLength>l){for(i=new Ke(r.length),s=0;s<r.length;s++)i[s]=r[s];r=i}for(t*=2,l=0,s=0;s<a;s++)n[t]=r[l],n[t+1]=r[l+1],t+=2,l+=2}else{if(!$r(e))throw new TypeError(j("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",e));for(a=e.length,s=0;s<a;s++)if(!ot(e[s])){o=!0;break}if(o){if(!at(a))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(t+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=e,l=n.byteOffset+t*Ft,r.buffer===n.buffer&&r.byteOffset<l&&r.byteOffset+r.byteLength>l){for(i=new Ke(a),s=0;s<a;s++)i[s]=r[s];r=i}for(t*=2,a/=2,l=0,s=0;s<a;s++)n[t]=r[l],n[t+1]=r[l+1],t+=2,l+=2;return}if(t+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,s=0;s<a;s++)u=e[s],n[t]=Vt(u),n[t+1]=At(u),t+=2}})),N(Mt.prototype,"slice",(function(e,r){var t,n,i,o,a,u,s;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)e=0,r=u;else{if(!Rr(e))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=u)<0&&(e=0),1===arguments.length)r=u;else{if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=u)<0&&(r=0):r>u&&(r=u)}}for(t=e<r?r-e:0,n=(i=new this.constructor(t))._buffer,s=0;s<t;s++)o=2*(s+e),n[2*s]=a[o],n[2*s+1]=a[o+1];return i})),N(Mt.prototype,"some",(function(e,r){var t,n;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)if(e.call(r,kt(t,n),n,this))return!0;return!1})),N(Mt.prototype,"sort",(function(e){var r,t,n,i,o;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=this._length,r=[],i=0;i<n;i++)r.push(kt(t,i));for(r.sort(e),i=0;i<n;i++)t[o=2*i]=Vt(r[i]),t[o+1]=At(r[i]);return this})),N(Mt.prototype,"subarray",(function(e,r){var t,n,i;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)e=0,r=i;else{if(!Rr(e))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),1===arguments.length)r=i;else{if(!Rr(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=i)<0&&(r=0):r>i&&(r=i)}}return e>=i?(i=0,t=n.byteLength):e>=r?(i=0,t=n.byteOffset+e*Ft):(i=r-e,t=n.byteOffset+e*Ft),new this.constructor(n.buffer,t,i<0?0:i)})),N(Mt.prototype,"toLocaleString",(function(e,r){var t,n,i,o,a;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!X(e)&&!Hr(e))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",e));n=e}if(arguments.length<2)t={};else{if(!zr(r))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",r));t=r}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(kt(o,a).toLocaleString(n,t));return i.join(",")})),N(Mt.prototype,"toReversed",(function(){var e,r,t,n,i,o;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,r=new this.constructor(t),n=this._buffer,e=r._buffer,i=0;i<t;i++)o=t-i-1,e[2*i]=n[2*o],e[2*i+1]=n[2*o+1];return r})),N(Mt.prototype,"toSorted",(function(e){var r,t,n,i;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=this._length,r=[],i=0;i<n;i++)r.push(kt(t,i));return r.sort(e),new Mt(r)})),N(Mt.prototype,"toString",(function(){var e,r,t;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=[],r=this._buffer,t=0;t<this._length;t++)e.push(kt(r,t).toString());return e.join(",")})),N(Mt.prototype,"values",(function(){var e,r,t,n,i,o;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,i=this._buffer,t=this._length,o=-1,N(e={},"next",(function(){if(o+=1,n||o>=t)return{done:!0};return{value:kt(i,o),done:!1}})),N(e,"return",(function(e){if(n=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),ct&&N(e,ct,(function(){return r.values()})),e})),N(Mt.prototype,"with",(function(e,r){var t,n,i;if(!It(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Rr(e))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",e));if(i=this._length,e<0&&(e+=i),e<0||e>=i)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",e));if(!ot(r))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",r));return(t=(n=new this.constructor(this._buffer))._buffer)[2*e]=Vt(r),t[2*e+1]=At(r),n}));var Rt=wr.BYTES_PER_ELEMENT,Ct=ht();function Bt(e){return"object"==typeof e&&null!==e&&"BooleanArray"===e.constructor.name&&e.BYTES_PER_ELEMENT===Rt}function Nt(e){return e===Pt}function Pt(){var e,r,t,n,i;if(r=arguments.length,!(this instanceof Pt))return 0===r?new Pt:1===r?new Pt(arguments[0]):2===r?new Pt(arguments[0],arguments[1]):new Pt(arguments[0],arguments[1],arguments[2]);if(0===r)t=new wr(0);else if(1===r)if(Yr(i=arguments[0]))t=new wr(i);else if($r(i))t=function(e,r){var t,n;for(t=r.length,n=0;n<t;n++)e[n]=re(r[n]);return e}(new wr(i.length),i);else if(Zr(i))t=new wr(i);else{if(!zr(i))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===Ct)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!Ee(i[ct]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!Ee((t=i[ct]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));t=new wr(Lt(t))}else{if(!Zr(t=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(!Yr(e=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",e));if(2===r)t=new wr(t,e);else{if(!Yr(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Rt>t.byteLength-e)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Rt));t=new wr(t,e,n)}}return N(this,"_buffer",t),N(this,"_length",t.length),this}N(Pt,"BYTES_PER_ELEMENT",Rt),N(Pt,"name","BooleanArray"),N(Pt,"from",(function(e){var r,t,n,i,o,a,u,s,l;if(!Ee(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Nt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((t=arguments.length)>1){if(!Ee(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(r=arguments[2])}if($r(e)){if(n){for(s=e.length,u=e.get&&e.set?Ye("default"):De("default"),o=(i=new this(s))._buffer,l=0;l<s;l++)o[l]=re(n.call(r,u(e,l),l));return i}return new this(e)}if(zr(e)&&Ct&&Ee(e[ct])){if(!Ee((o=e[ct]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e));for(a=n?function(e,r,t){var n,i,o;for(n=[],o=-1;!(i=e.next()).done;)o+=1,n.push(re(r.call(t,i.value,o)));return n}(o,n,r):Lt(o),o=(i=new this(s=a.length))._buffer,l=0;l<s;l++)o[l]=a[l];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",e))})),N(Pt,"of",(function(){var e,r;if(!Ee(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Nt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);return new this(e)})),N(Pt.prototype,"at",(function(e){var r,t;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Br(e))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",e));if(t=this._length,r=this._buffer,e<0&&(e+=t),!(e<0||e>=t))return re(r[e])})),pt(Pt.prototype,"buffer",(function(){return this._buffer.buffer})),pt(Pt.prototype,"byteLength",(function(){return this._buffer.byteLength})),pt(Pt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(Pt.prototype,"BYTES_PER_ELEMENT",Pt.BYTES_PER_ELEMENT),N(Pt.prototype,"copyWithin",(function(e,r){if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return 2===arguments.length?this._buffer.copyWithin(e,r):this._buffer.copyWithin(e,r,arguments[2]),this})),N(Pt.prototype,"entries",(function(){var e,r,t,n,i,o;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return e=this,n=this._buffer,t=this._length,o=-1,N(r={},"next",(function(){if(o+=1,i||o>=t)return{done:!0};return{value:[o,re(n[o])],done:!1}})),N(r,"return",(function(e){if(i=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),ct&&N(r,ct,(function(){return e.entries()})),r})),N(Pt.prototype,"every",(function(e,r){var t,n;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)if(!e.call(r,re(t[n]),n,this))return!1;return!0})),N(Pt.prototype,"fill",(function(e,r,t){var n,i,o,a;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ee(e))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",e));if(n=this._buffer,i=this._length,arguments.length>1){if(!Br(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),arguments.length>2){if(!Br(t))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else r=0,t=i;for(o=e?1:0,a=r;a<t;a++)n[a]=o;return this})),N(Pt.prototype,"filter",(function(e,r){var t,n,i,o;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=[],i=0;i<this._length;i++)o=re(t[i]),e.call(r,o,i,this)&&n.push(o);return new this.constructor(n)})),N(Pt.prototype,"find",(function(e,r){var t,n,i;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,i=0;i<this._length;i++)if(n=re(t[i]),e.call(r,n,i,this))return n})),N(Pt.prototype,"findIndex",(function(e,r){var t,n,i;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,i=0;i<this._length;i++)if(n=re(t[i]),e.call(r,n,i,this))return i;return-1})),N(Pt.prototype,"findLast",(function(e,r){var t,n,i;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,i=this._length-1;i>=0;i--)if(n=re(t[i]),e.call(r,n,i,this))return n})),N(Pt.prototype,"findLastIndex",(function(e,r){var t,n,i;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,i=this._length-1;i>=0;i--)if(n=re(t[i]),e.call(r,n,i,this))return i;return-1})),N(Pt.prototype,"forEach",(function(e,r){var t,n;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)e.call(r,re(t[n]),n,this)})),N(Pt.prototype,"get",(function(e){if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Yr(e))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",e));if(!(e>=this._length))return re(this._buffer[e])})),N(Pt.prototype,"includes",(function(e,r){var t,n;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ee(e))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",e));if(arguments.length>1){if(!Br(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(t=this._buffer,n=r;n<this._length;n++)if(e===re(t[n]))return!0;return!1})),N(Pt.prototype,"indexOf",(function(e,r){var t,n;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ee(e))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",e));if(arguments.length>1){if(!Br(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0&&(r+=this._length)<0&&(r=0)}else r=0;for(t=this._buffer,n=r;n<this._length;n++)if(e===re(t[n]))return n;return-1})),N(Pt.prototype,"join",(function(e){var r,t,n;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!P(e))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",e))}else e=",";for(r=this._buffer,t=[],n=0;n<this._length;n++)r[n]?t.push("true"):t.push("false");return t.join(e)})),N(Pt.prototype,"keys",(function(){var e,r,t,n,i;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return e=this,t=this._length,i=-1,N(r={},"next",(function(){if(i+=1,n||i>=t)return{done:!0};return{value:i,done:!1}})),N(r,"return",(function(e){if(n=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),ct&&N(r,ct,(function(){return e.keys()})),r})),N(Pt.prototype,"lastIndexOf",(function(e,r){var t,n;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ee(e))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",e));if(arguments.length>1){if(!Br(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r>=this._length?r=this._length-1:r<0&&(r+=this._length)}else r=this._length-1;for(t=this._buffer,n=r;n>=0;n--)if(e===re(t[n]))return n;return-1})),pt(Pt.prototype,"length",(function(){return this._length})),N(Pt.prototype,"map",(function(e,r){var t,n,i,o;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",e);for(i=this._buffer,t=(n=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)t[o]=re(e.call(r,re(i[o]),o,this));return n})),N(Pt.prototype,"reduce",(function(e,r){var t,n,i,o;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));if(t=this._buffer,n=this._length,arguments.length>1)i=r,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=re(t[0]),o=1}for(;o<n;o++)i=e(i,re(t[o]),o,this);return i})),N(Pt.prototype,"reduceRight",(function(e,r){var t,n,i,o;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));if(t=this._buffer,n=this._length,arguments.length>1)i=r,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=re(t[n-1]),o=n-2}for(;o>=0;o--)i=e(i,re(t[o]),o,this);return i})),N(Pt.prototype,"reverse",(function(){var e,r,t,n,i,o;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(e=this._buffer,t=this._length,n=Lr(t/2),i=0;i<n;i++)o=t-i-1,r=e[i],e[i]=e[o],e[o]=r;return this})),N(Pt.prototype,"set",(function(e){var r,t,n,i,o,a,u;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!Yr(t=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if($r(e)){if(t+(o=e.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(r=Bt(e)?e._buffer:e,u=n.byteOffset+t*Rt,r.buffer===n.buffer&&r.byteOffset<u&&r.byteOffset+r.byteLength>u){for(i=new wr(r.length),a=0;a<r.length;a++)i[a]=r[a];r=i}for(a=0;a<o;t++,a++)n[t]=r[a]?1:0}else{if(t>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));n[t]=e?1:0}})),N(Pt.prototype,"slice",(function(e,r){var t,n,i,o,a,u;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(o=this._buffer,a=this._length,0===arguments.length)e=0,r=a;else{if(!Br(e))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=a)<0&&(e=0),1===arguments.length)r=a;else{if(!Br(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=a)<0&&(r=0):r>a&&(r=a)}}for(t=e<r?r-e:0,n=(i=new this.constructor(t))._buffer,u=0;u<t;u++)n[u]=o[u+e];return i})),N(Pt.prototype,"some",(function(e,r){var t,n;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));for(t=this._buffer,n=0;n<this._length;n++)if(e.call(r,re(t[n]),n,this))return!0;return!1})),N(Pt.prototype,"sort",(function(e){var r;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(r=this._buffer,0===arguments.length)return r.sort(),this;if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));return r.sort((function(r,t){return e(re(r),re(t))})),this})),N(Pt.prototype,"subarray",(function(e,r){var t,n,i;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,i=this._length,0===arguments.length)e=0,r=i;else{if(!Br(e))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),1===arguments.length)r=i;else{if(!Br(r))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",r));r<0?(r+=i)<0&&(r=0):r>i&&(r=i)}}return e>=i?(i=0,t=n.byteLength):e>=r?(i=0,t=n.byteOffset+e*Rt):(i=r-e,t=n.byteOffset+e*Rt),new this.constructor(n.buffer,t,i<0?0:i)})),N(Pt.prototype,"toLocaleString",(function(e,r){var t,n,i,o,a;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!P(e)&&!Hr(e))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",e));n=e}if(arguments.length<2)t={};else{if(!zr(r))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",r));t=r}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(re(o[a]).toLocaleString(n,t));return i.join(",")})),N(Pt.prototype,"toReversed",(function(){var e,r,t,n,i;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=this._length,r=new this.constructor(t),n=this._buffer,e=r._buffer,i=0;i<t;i++)e[i]=n[t-i-1];return r})),N(Pt.prototype,"toSorted",(function(e){var r,t,n,i,o;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(n=this._length,t=new this.constructor(n),i=this._buffer,r=t._buffer,o=0;o<n;o++)r[o]=i[o];if(0===arguments.length)return r.sort(),t;if(!Ee(e))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",e));return r.sort((function(r,t){return e(re(r),re(t))})),t})),N(Pt.prototype,"toString",(function(){var e,r,t;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(e=[],r=this._buffer,t=0;t<this._length;t++)r[t]?e.push("true"):e.push("false");return e.join(",")})),N(Pt.prototype,"values",(function(){var e,r,t,n,i,o;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,i=this._buffer,t=this._length,o=-1,N(e={},"next",(function(){if(o+=1,n||o>=t)return{done:!0};return{value:re(i[o]),done:!1}})),N(e,"return",(function(e){if(n=!0,arguments.length)return{value:e,done:!0};return{done:!0}})),ct&&N(e,ct,(function(){return r.values()})),e})),N(Pt.prototype,"with",(function(e,r){var t,n;if(!Bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Br(e))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",e));if(n=this._length,e<0&&(e+=n),e<0||e>=n)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",e));if(!ee(r))throw new TypeError(j("invalid argument. Second argument must be a boolean. Value: `%s`.",r));return(t=new this.constructor(this._buffer))._buffer[e]=r?1:0,t}));var Yt=[Ke,qe,ar,tr,yr,fr,Ar,wr,Tr,xt,Mt,Pt],Ut=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],Dt=Ut.length;function Wt(e){var r;if(ge(e))return"generic";if(we(e))return null;for(r=0;r<Dt;r++)if(e instanceof Yt[r])return Ut[r];return We[de(e)]||null}function Jt(e){var r,t,n;if(!$r(e))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",e));return n=Wt(e),Ne(e)&&(r=Ye(n)),t=e.length,void 0===r?function(r){var n;for(n=0;n<t;n++)if(e[n]===r)return!0;return!1}:function(n){var i;for(i=0;i<t;i++)if(r(e,i)===n)return!0;return!1}}function Gt(){var e,r=arguments,t="https://stdlib.io/e/"+r[0]+"?";for(e=1;e<r.length;e++)t+="&arg[]="+encodeURIComponent(r[e]);return t}N((function(e,r){var t,n,i,o;for(i=Wt(e),n=Ne(e)?Ye(i):De(i),t=e.length,o=0;o<t;o++)if(n(e,o)===r)return!0;return!1}),"factory",Jt);var $t,Kt=Object,Zt=Object.getPrototypeOf;$t=Ee(Object.getPrototypeOf)?Zt:function(e){var r=function(e){return e.__proto__}(e);return r||null===r?r:"[object Function]"===K(e.constructor)?e.constructor.prototype:e instanceof Kt?Kt.prototype:null};var zt=$t;var Ht=Object.prototype;function Xt(e){var r;return!!zr(e)&&(r=function(e){return null==e?null:(e=Kt(e),zt(e))}(e),!r||!J(e,"constructor")&&J(r,"constructor")&&Ee(r.constructor)&&"[object Function]"===K(r.constructor)&&J(r,"isPrototypeOf")&&Ee(r.isPrototypeOf)&&(r===Ht||function(e){var r;for(r in e)if(!J(e,r))return!1;return!0}(e)))}function qt(e,r){return Xt(r)?!J(r,"stopwords")||(e.stopwords=r.stopwords,Hr(e.stopwords)||(t=e.stopwords,ge(t)&&0===t.length))?null:new TypeError(Gt("1ONAJ","stopwords",e.stopwords)):new TypeError(Gt("1ON2V",r));var t}var Qt=["a","all","also","although","an","and","any","are","as","at","b","be","been","but","by","c","could","d","e","each","eg","either","even","ever","ex","except","f","far","few","for","from","further","g","get","gets","given","gives","go","going","got","h","had","has","have","having","he","her","here","herself","him","himself","his","how","i","ie","if","in","into","is","it","its","itself","j","just","k","l","less","let","m","many","may","me","might","must","my","myself","n","need","needs","next","no","non","not","now","o","of","off","old","on","once","only","or","our","out","p","per","put","q","r","s","same","shall","she","should","since","so","such","sure","t","than","that","the","their","them","then","there","these","they","this","those","though","thus","to","too","u","us","v","w","was","we","well","went","were","what","when","where","which","who","whose","why","will","would","x","y","yet","z"],en=/-/g;return function(e,r){var t,n,i,o,a,u;if(!P(e))throw new TypeError(Gt("1ON3F",e));if(i={},arguments.length>1&&(o=qt(i,r)))throw o;for(t=Jt(i.stopwords||Qt),n=function(e,r){var t,n,i,o,a,u;if(!P(e))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",e));if(arguments.length>1&&!ee(r))throw new TypeError(j("invalid argument. Second argument must be a boolean. Value: `%s`.",r));if(!e)return[];for(n=r?e.split(/(\s+)/):e.split(/\s+/),a={},i=[],u=0;u<n.length;u++)J(a,o=n[u])?Me(i,a[o]):(Me(i,t=Le(o)),a[o]=t);return i}(e=Ve(e=function(e){if(!P(e))throw new TypeError(j("invalid argument. Must provide a string. Value: `%s`.",e));return Ae(e,Se,"")}(e),en," ")),a="",u=0;u<n.length;u++)!1===t(Ce(n[u]))&&(a+=Re(n[u].charAt(0)));return a}}));
//# sourceMappingURL=index.js.map